/* Fonts and colours follow cnxion.io and the CNXION app: DM Sans for headings, Inter for text, teal #187f67 as accent.
   The fonts are self-hosted (SIL Open Font License), so no visitor data goes to a font service. */
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url("fonts/dm-sans-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("fonts/dm-sans-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url("fonts/dm-sans-latin-ext-600.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("fonts/dm-sans-latin-ext-700.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-ext-600.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* cnxion.io tokens */
  --accent: #187f67;
  --teal-light: #2ea388;
  --teal-ink: #1a3d35;
  --teal-ghost: #f0faf8;
  --grey-pale: #f1f7f6;
  --teal-fog: #b6f0e2;
  --text: #050706;
  --text-muted: #545454;
  --text-inverse: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --surface-inverse: #222222;
  --border-color: #dadada;
  --callout-error: #b42318;
  --radius: 2px;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

/* The footer stays at the bottom of the window when the content is short, instead of jumping up under it. */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--teal-ink); }
[hidden] { display: none !important; }
main { flex: 1 0 auto; }

:focus-visible { outline: 3px solid var(--teal-light); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }

.site-header { border-bottom: 1px solid var(--border-color); background: var(--surface); }
.header-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; }
.logo-link { display: inline-flex; }
.logo { height: auto; max-width: 100%; display: block; }
.header-label { font-weight: 600; font-size: 14px; color: var(--accent); }

.hero { background: var(--grey-pale); }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px;
  align-items: center;
  padding-block: 64px 72px;
}
.hero-text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.date-chip { background: var(--accent); color: var(--text-inverse); padding: 3px 8px; border-radius: var(--radius); }
.hero h1 { font-size: clamp(32px, 4.6vw, 44px); }
.lead { font-size: 18px; color: var(--text-muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hint { color: var(--text-muted); font-size: 15px; }

.button {
  font: 600 16px var(--font-body);
  border-radius: var(--radius);
  padding: 13px 24px;
  min-height: 48px;
  cursor: pointer;
  border: 1px solid transparent;
}
.button.primary { background: var(--accent); color: var(--text-inverse); }
.button.primary:hover { background: var(--teal-ink); }
.button.ghost { background: var(--surface); color: var(--accent); border-color: var(--border-color); }
.button.ghost:hover { border-color: var(--accent); }
.button:disabled { opacity: 0.6; cursor: wait; }
.button.text { background: none; color: var(--text-muted); padding-inline: 8px; text-decoration: underline; text-underline-offset: 3px; }
.button.text:hover { color: var(--accent); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.card { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-family: var(--font-heading); font-weight: 700; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.2; padding: 0; margin-bottom: 8px; }
.question-help { color: var(--text-muted); margin-bottom: 20px; }
.error { color: var(--callout-error); font-weight: 600; margin-top: 14px; }
input:not([type="checkbox"]):not([type="radio"]), select {
  font: 400 16px var(--font-body);
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  width: 100%;
  min-height: 46px;
}
input:focus, select:focus { border-color: var(--accent); }
.turnstile { min-height: 65px; }

.faq { background: var(--grey-pale); padding-block: 64px; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px 56px; align-items: start; }
.faq-intro { display: flex; flex-direction: column; gap: 12px; }
.faq-intro h2 { font-size: clamp(26px, 3.4vw, 34px); }
.faq-list { grid-column: span 2; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.faq-list details { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); }
.faq-list summary { cursor: pointer; padding: 16px 20px; font-family: var(--font-heading); font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list .faq-answer { padding: 0 20px 14px; color: var(--text-muted); max-width: 70ch; display: flex; flex-direction: column; gap: 10px; }
.faq-list .faq-answer ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.faq-list .faq-answer strong { color: var(--text); font-weight: 600; }

@media (max-width: 720px) {
  .faq-list { grid-column: auto; }
}

.site-footer { background: var(--surface-inverse); color: #d9d9d9; padding-block: 36px; font-size: 14px; }
.footer-grid { display: flex; flex-direction: column; gap: 14px; }
.site-footer a { color: var(--text-inverse); }

.legal { max-width: 760px; padding-block: 48px 72px; display: flex; flex-direction: column; gap: 14px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); }
.legal h2 { font-size: 22px; margin-top: 18px; }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* Start screen */
.closed-note { background: var(--surface); border-left: 3px solid var(--accent); padding: 12px 16px; font-weight: 600; }
.start-form { display: flex; flex-direction: column; gap: 16px; }
.start-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.start-legend { font: 700 18px var(--font-heading); margin-bottom: 10px; padding: 0; }
.jurisdictions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.jurisdiction { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); cursor: pointer; font-weight: 600; min-height: 48px; }
.jurisdiction:hover { border-color: var(--teal-light); }
.jurisdiction:has(input:checked) { border-color: var(--accent); background: var(--teal-ghost); box-shadow: inset 3px 0 0 var(--accent); }
.jurisdiction input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.jurisdiction:has(input:focus-visible) { outline: 3px solid var(--teal-light); outline-offset: 2px; }
.jurisdiction-code { font: 700 13px var(--font-heading); background: var(--accent); color: var(--text-inverse); padding: 2px 6px; border-radius: var(--radius); }
.rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text-muted); font-size: 15px; }
.rules strong { color: var(--text); }

/* High scores */
.scores-card { display: flex; flex-direction: column; gap: 12px; align-self: start; }
.scores-card h2 { font-size: 22px; }
.score-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.score-tab { font: 600 14px var(--font-body); padding: 6px 12px; min-height: 36px; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.score-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--text-inverse); }
.scores { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.score-row { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--border-color); font-variant-numeric: tabular-nums; }
.score-row:nth-child(-n+3) .score-rank { color: var(--accent); }
.score-row.is-you { background: var(--teal-ghost); font-weight: 600; }
.score-rank { font-weight: 700; text-align: right; color: var(--text-muted); }
.score-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-points { font-weight: 600; }

/* The game */
.game, .result { padding-block: 40px 72px; }
.game.wrap { max-width: 860px; }
.game-card { display: flex; flex-direction: column; gap: 14px; }
.game-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 15px; color: var(--text-muted); }
.game-score { margin-left: auto; }
.game-bar .button.text { min-height: 0; padding: 0 0 0 8px; font-size: 14px; }
.game-score strong { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.difficulty { background: #dca014; color: var(--text); font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius); }
.timer { height: 8px; background: var(--grey-pale); border-radius: 4px; overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: var(--accent); }
.timer-fill[data-state="running"] { background: var(--teal-light); }
.timer-fill[data-state="low"] { background: #dca014; }
.timer-points { font-size: 14px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.question { display: flex; flex-direction: column; gap: 10px; max-width: 68ch; }
.question-situation { font-size: clamp(17px, 1.9vw, 19px); line-height: 1.6; }
.question-ask { font-size: clamp(19px, 2.2vw, 22px); line-height: 1.3; }
.answers { display: flex; flex-direction: column; gap: 8px; }
.answer { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 12px; align-items: start; text-align: left; font: 400 16px var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 12px 14px; min-height: 52px; cursor: pointer; }
.answer:hover:not(:disabled) { border-color: var(--accent); background: var(--teal-ghost); }
.answer:disabled { cursor: default; }
.answer-label { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-color); font-weight: 700; font-size: 14px; }
.answer-text { padding-top: 3px; line-height: 1.45; }
.answer-code { display: block; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.answer-why { grid-column: 2; font-size: 14px; color: var(--text-muted); }
.answer[data-result="right"] { border-color: var(--accent); background: var(--teal-ghost); }
.answer[data-result="right"] .answer-label { background: var(--accent); border-color: var(--accent); color: var(--text-inverse); }
.answer[data-result="close"] { border-color: #dca014; }
.answer[data-result="close"] .answer-label { border-color: #dca014; }
.answer.is-chosen { box-shadow: inset 4px 0 0 var(--text); }
.answer[data-result="wrong"].is-chosen { border-color: var(--callout-error); box-shadow: inset 4px 0 0 var(--callout-error); }
.feedback { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border-color); padding-top: 16px; }
.feedback-headline { font: 700 22px var(--font-heading); }
.feedback-headline[data-result="right"] { color: var(--accent); }
.feedback-headline[data-result="wrong"] { color: var(--callout-error); }
.sources { font-size: 13px; color: var(--text-muted); }
.sources a { color: var(--text-muted); text-decoration: underline; overflow-wrap: anywhere; }
.sources a:hover { color: var(--accent); }
.report { font-size: 14px; }
.feedback-actions { display: flex; justify-content: flex-end; }

/* Result */
.result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 760px) { .result { grid-template-columns: minmax(0, 1fr); } }
.result-card { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.result-card h2 { font-size: clamp(36px, 5vw, 48px); color: var(--accent); font-variant-numeric: tabular-nums; }
.result-card .of { font-size: 20px; color: var(--text-muted); }
.name-form { display: flex; flex-direction: column; gap: 10px; align-self: stretch; }
.name-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.result .scores-card { grid-column: 2; grid-row: 1 / span 3; }
@media (max-width: 760px) { .result .scores-card { grid-column: auto; grid-row: auto; } }

/* Report form */
.form-card { display: flex; flex-direction: column; gap: 14px; }
.form-card h2 { font-size: 24px; }
#contact-form { display: flex; flex-direction: column; gap: 14px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
#contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; min-width: 0; }
.optional { font-weight: 400; color: var(--text-muted); }
#contact-form label.consent { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 400; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; }
.notice { font-size: 14px; color: var(--text-muted); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sent-card h2 { font-size: 28px; margin-bottom: 12px; }

.missing { padding-block: 72px; display: flex; flex-direction: column; gap: 14px; }
.missing h1 { font-size: clamp(30px, 4vw, 40px); }
.disclaimer { max-width: 80ch; }

/* Links to the other CNXION checks: one line on the result, cards above the footer. */
.cross-link { align-self: stretch; border-top: 1px solid var(--border-color); padding-top: 12px; font-size: 15px; color: var(--text-muted); }
.cross-link a { font-weight: 600; }
.more-tools { padding-block: 48px 56px; }
.more-tools h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 18px; }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; border: 1px solid var(--border-color); border-left: 3px solid var(--accent); border-radius: var(--radius); color: var(--text); text-decoration: none; background: var(--surface); }
.tool-card:hover { border-color: var(--accent); background: var(--teal-ghost); color: var(--text); }
.tool-name { font: 700 18px var(--font-heading); }
.tool-text { color: var(--text-muted); font-size: 15px; }
.tool-go { color: var(--accent); font-weight: 600; margin-top: auto; }
