/* Colours for each theme. Change these to restyle the whole site. */
:root, [data-theme="light"] {
  --bg: #f7f7f5;
  --text: #1c1c1e;
  --muted: #5f6368;
  --accent: #1f4fd1;
  --accent-text: #ffffff;
  --panel: #ffffff;
  --border: #dcdcdc;
  --ok: #16794a;
  --bad: #b3261e;
}
/* Challenge pages: the main site's background and teal, with their own font. */
[data-theme="dark"] {
  --bg: #1C1C24;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #03B3DB;
  --accent-text: #FFFFFF;
  --panel: #23232d;
  --border: #575769;
  --ok: #39d98a;
  --bad: #ff6b6b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-theme="dark"] body { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 16px; }

.page { max-width: 720px; margin: 0 auto; padding: 48px 16px 32px; }
.page.wide { max-width: 1100px; }
h1 { font-size: 2.2rem; line-height: 1.2; margin: 0 0 24px; }
h2 { font-size: 1.4rem; margin: 40px 0 12px; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; border-radius: 8px; }
img.logo { display: block; width: 420px; border-radius: 0; margin: 0 0 32px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

.nav { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 16px; border-bottom: 1px solid var(--border); }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.footer { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 24px 16px 48px; }
.footer p { margin: 0; }
.social { list-style: none; display: flex; justify-content: center; gap: 1.5rem; padding: 0; margin: 0 0 1.5rem; }
.social a {
  display: flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem;
  border: 1px solid var(--border); border-radius: 50%; color: var(--text); transition: transform .25s, border-color .25s;
}
.social a:hover { border-color: var(--text); transform: scale(1.04); }
.social svg { width: 60%; height: 60%; fill: currentColor; }
.columns { display: flex; gap: 4rem; align-items: flex-start; }
.columns > .column { flex: 1 1 0; min-width: 0; }
.columns > .column:first-child { flex-grow: 1.5; }
@media (max-width: 736px) { .columns { flex-direction: column; gap: 1rem; } }

.button-row { margin: 28px 0; }
.next-level { margin: 28px 0; }
.next-level p:first-child { font-weight: 600; }
.button {
  display: inline-block; padding: 12px 26px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.08); }

.form { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin: 28px 0; }
.form-title { margin-top: 0; font-weight: 600; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; color: var(--muted); font-size: 0.95rem; margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.result { margin: 14px 0 0; font-weight: 600; }
.result.ok, .ok { color: var(--ok); }
.result.bad, .error { color: var(--bad); }
.stats { color: var(--muted); font-size: 0.95rem; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.table-wrap { overflow-x: auto; }
table.admin { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
table.admin th, table.admin td { border-bottom: 1px solid var(--border); padding: 8px; text-align: left; vertical-align: top; }

/* ---------- talentstill.com theme (matches the original Carrd site) ---------- */
[data-theme="talentstill"] {
  --bg: #1C1C24;
  --text: #FFFFFF;
  --muted: #575769;
  --accent: #03B3DB;
  --accent-text: #FFFFFF;
  --panel: #23232d;
  --border: #575769;
  font-size: 19pt;
}
@media (max-width: 1680px) { [data-theme="talentstill"] { font-size: 14pt; } }
@media (max-width: 1280px) { [data-theme="talentstill"] { font-size: 12pt; } }
@media (max-width: 736px)  { [data-theme="talentstill"] { font-size: 11pt; } }
[data-theme="talentstill"] body {
  font-family: "Plus Jakarta Sans", sans-serif; font-weight: 300; font-size: 1rem; line-height: 1.875;
  text-align: center;
}
/* the faint hexagon pattern from the original site, on the main page and the challenge pages */
[data-theme="talentstill"] body, [data-theme="dark"] body {
  background: #1C1C24 url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20height%3D%22512%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23272733%22%20stroke-width%3D%221.01%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20vector-effect%3D%22non-scaling-stroke%22%20d%3D%22M424%2C331.8c0%2C12.5-6.7%2C24.1-17.5%2C30.3l-132%2C76.2c-10.8%2C6.3-24.2%2C6.3-35%2C0l-132-76.2C96.7%2C355.8%2C90%2C344.3%2C90%2C331.8V179.2c0-12.5%2C6.7-24.1%2C17.5-30.3l132-76.2c10.8-6.3%2C24.2-6.3%2C35%2C0l132%2C76.2c10.8%2C6.3%2C17.5%2C17.8%2C17.5%2C30.3V331.8z%20M238.5%2C73l-256%2C147.6%20M273.5%2C439l252.1-145.4%20M256%2C634.7V378.3c0-12.5%2C6.7-24.1%2C17.5-30.3l252.1-145.4%20M256-122.7v256.4c0%2C12.5-6.7%2C24.1-17.5%2C30.3l-256%2C147.6%22%2F%3E%3C%2Fsvg%3E') center / 799px repeat fixed;
}
[data-theme="talentstill"] .page { max-width: 52rem; padding: 6rem 2rem 0; }
[data-theme="talentstill"] img.logo { width: 669px; max-width: 100%; margin: 0 auto 0.5rem; border-radius: 0; }
[data-theme="talentstill"] h1,
[data-theme="talentstill"] h2 {
  color: var(--accent); text-transform: uppercase; font-weight: 600;
  font-size: 1.5em; line-height: 1.625; letter-spacing: 0.2rem; margin: 0 0 1.125rem;
}
[data-theme="talentstill"] h2:not(:first-child) { margin-top: 5rem; }
[data-theme="talentstill"] h2 + p { margin-top: 0; }
[data-theme="talentstill"] h3 {
  color: var(--text); font-weight: 600; font-size: 2.25em; line-height: 1.25; letter-spacing: 0.025rem; margin: 0 0 0.5rem;
}
[data-theme="talentstill"] h3 a { color: inherit; text-decoration: none; }
[data-theme="talentstill"] h3 a:hover { text-decoration: underline; }
[data-theme="talentstill"] p { max-width: 44.625rem; margin: 1.125rem auto; }
[data-theme="talentstill"] a { color: var(--text); }
[data-theme="talentstill"] .columns { margin: 1rem 0 2rem; align-items: center; }
[data-theme="talentstill"] .columns p { margin: 0 auto; }
[data-theme="talentstill"] .columns img { border-radius: 1rem; display: block; }
[data-theme="talentstill"] .footer { font-family: "Source Sans 3", sans-serif; font-size: 1em; line-height: 1.875; padding: 2rem 1.5rem 6rem; }
@media (max-width: 736px) {
  [data-theme="talentstill"] .page { padding: 4.5rem 1.5rem 0; }
  [data-theme="talentstill"] h1, [data-theme="talentstill"] h2 { font-size: 1em; letter-spacing: 0.175rem; }
  [data-theme="talentstill"] h2:not(:first-child) { margin-top: 3.5rem; }
  [data-theme="talentstill"] h3 { font-size: 2em; }
}
[data-theme="talentstill"] p:has(> img.logo) { margin-bottom: 0; }
[data-theme="talentstill"] p:has(> img.logo) + h2 { margin-top: 0.75rem; }
[data-theme="talentstill"] .columns { max-width: 40rem; margin-left: auto; margin-right: auto; }
.field select { width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.field.checkbox { display: flex; gap: 10px; align-items: flex-start; }
.field.checkbox input { width: auto; flex: none; margin-top: 0.35em; }
.field.checkbox span { color: var(--text); margin: 0; }
.form-text { color: var(--text); }
.form-text.small-print { color: var(--muted); font-size: 0.8rem; margin: 4px 0; }
.field input[type=file] { padding: 8px; }
.field .help { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* Cookie banner, shown until the visitor answers (only when tracking IDs are set). */
.cookie-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10; max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px;
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18); text-align: left; font-size: 0.85rem; line-height: 1.4;
}
.cookie-banner[hidden] { display: none; }
.cookie-text { flex: 1 1 240px; }
.cookie-text summary { list-style: none; cursor: pointer; }
.cookie-text summary::-webkit-details-marker { display: none; }
.cookie-more { color: var(--muted); text-decoration: underline; white-space: nowrap; }
.cookie-text[open] .cookie-more { display: none; }
.cookie-text p { margin: 6px 0 0; color: var(--muted); }
.cookie-buttons { display: flex; gap: 8px; margin-left: auto; }
.cookie-banner .button { padding: 6px 14px; font-size: 0.85rem; border-radius: 6px; }
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.cookie-link { margin-top: 8px !important; font-size: 0.85rem; }
.cookie-link a { color: var(--muted); }
