@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson';
  src: url('/fonts/atkinson-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson';
  src: url('/fonts/atkinson-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson';
  src: url('/fonts/atkinson-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #F3F4F8;
  --paper-2: #E8EAF2;
  --ink: #1A1840;
  --ink-soft: #46456B;
  --elephant: #6F73B0;
  --line: #D3D5E4;
  --signal: #FFB81C;
  --breach: #B8222A;
  --breach-bg: #FBE9E9;
  --caution: #8A5A00;
  --caution-bg: #FFF3D6;
  --clear: #1C6E4F;
  --clear-bg: #E3F3EC;
  --neutral-bg: #E8EAF2;
  --focus: #3B3FD8;
  --display: 'Archivo', 'Arial Narrow', sans-serif;
  --body: 'Atkinson', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13122B;
    --paper-2: #1C1B3A;
    --ink: #ECEBFA;
    --ink-soft: #B4B3D3;
    --elephant: #9EA2DA;
    --line: #34335A;
    --breach: #FF8A8F;
    --breach-bg: #3A1720;
    --caution: #FFC94D;
    --caution-bg: #33290F;
    --clear: #6FD3A8;
    --clear-bg: #12302A;
    --neutral-bg: #1C1B3A;
    --focus: #A9ACFF;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: inherit; text-decoration-color: var(--elephant); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

code { font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }

h1, h2, h3 { font-family: var(--display); font-stretch: 72%; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.75rem, 7.2vw, 5.25rem); font-weight: 850; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.45rem; font-weight: 750; font-stretch: 80%; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 40rem) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.wordmark { font-family: var(--display); font-stretch: 68%; font-weight: 800; font-size: 1.5rem; text-decoration: none; letter-spacing: -0.01em; }
.wordmark.small { font-size: 1.3rem; margin: 0 0 0.5rem; }
.by { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; gap: 3rem; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: minmax(0, 1fr) 17rem; gap: 4rem; align-items: start; } }

.alert-line { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1.25rem; font-weight: 700; color: var(--breach); }
.dot { flex: none; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--breach); box-shadow: 0 0 0 0 var(--breach); animation: pulse 2.4s ease-out 3; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--breach) 60%, transparent); } 100% { box-shadow: 0 0 0 0.75rem transparent; } }

h1 { max-width: 13ch; }
.lede { font-size: 1.2rem; max-width: 38em; margin: 1.5rem 0 2.25rem; color: var(--ink-soft); }

/* Checker */
.checker label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.checker-row { display: flex; gap: 0.5rem; max-width: 40rem; }
.checker input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 1.15rem;
  padding: 0.85rem 1rem;
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 8px;
}
.checker input::placeholder { color: var(--ink-soft); opacity: 0.7; }
.checker button, .button {
  flex: none;
  font-family: var(--display); font-stretch: 85%; font-weight: 750; font-size: 1.15rem;
  padding: 0.85rem 1.4rem;
  color: var(--paper); background: var(--ink);
  border: 2px solid var(--ink); border-radius: 8px;
  cursor: pointer; text-decoration: none; display: inline-block;
}
.checker button:hover, .button:hover { background: var(--elephant); border-color: var(--elephant); }
.checker button[disabled] { cursor: progress; opacity: 0.7; }
.consent { display: flex; gap: 0.65rem; align-items: flex-start; margin-top: 1rem; max-width: 40rem; }
.consent input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--ink); }
.checker .consent label { display: inline; font-weight: 400; margin: 0; }
.turnstile:not(:empty) { margin-top: 1rem; }
.hint { font-size: 0.95rem; color: var(--ink-soft); margin: 0.75rem 0 0; max-width: 40rem; }
@media (max-width: 30rem) { .checker-row { flex-direction: column; } }

/* Verdict: the one loud element on the page */
.result { margin-top: 2rem; max-width: 40rem; border-radius: 12px; padding: 1.5rem; border-left: 8px solid var(--tone); background: var(--tone-bg); }
.result[data-tone='bad'] { --tone: var(--breach); --tone-bg: var(--breach-bg); }
.result[data-tone='warn'] { --tone: var(--caution); --tone-bg: var(--caution-bg); }
.result[data-tone='ok'] { --tone: var(--clear); --tone-bg: var(--clear-bg); }
.result[data-tone='neutral'], .result[data-tone='error'] { --tone: var(--ink-soft); --tone-bg: var(--neutral-bg); }
.result-site { margin: 0 0 0.35rem; font-size: 0.95rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.result h2 { font-size: clamp(1.75rem, 4vw, 2.4rem); color: var(--tone); }
.result h2:focus { outline: none; }
.result p { margin: 0.75rem 0 0; }
.result .evidence { margin: 1rem 0 0; padding-left: 1.2rem; font-size: 0.97rem; }
.result .evidence li + li { margin-top: 0.25rem; }
.result .note { font-size: 0.97rem; padding-top: 0.75rem; border-top: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); margin-top: 1rem; }
.result .next { font-weight: 700; }
.result.loading { --tone: var(--elephant); --tone-bg: var(--paper-2); }
@media (prefers-reduced-motion: no-preference) {
  .result:not(.loading) { animation: arrive 260ms ease-out; }
  @keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* Fixed versions panel */
.fixed-panel { border-top: 6px solid var(--ink); padding-top: 1.25rem; }
.fixed-panel h2 { font-size: 1.6rem; }
.fixed-sub { margin: 0.5rem 0 0.75rem; color: var(--ink-soft); }
.fixed-list { list-style: none; margin: 0; padding: 0; }
.fixed-list li { border-bottom: 1px solid var(--line); }
.fixed-list .ver { display: block; font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 3.25rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fixed-note { font-size: 0.95rem; color: var(--ink-soft); margin: 1rem 0 0; }
@media (max-width: 59.99rem) {
  .fixed-list { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
  .fixed-list li { border: 0; }
  .fixed-list .ver { font-size: 2.5rem; }
}

/* Content bands */
.band { padding: clamp(3rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.prose > * { max-width: 42rem; }
.prose h2 { margin-bottom: 1.25rem; }
.prose p { margin: 0 0 1rem; }
.small { font-size: 0.95rem; color: var(--ink-soft); }

.facts { display: grid; gap: 1rem 2rem; margin: 2rem 0 0; max-width: 52rem !important; }
@media (min-width: 40rem) { .facts { grid-template-columns: 1fr 1fr; } }
.facts div { border-left: 3px solid var(--elephant); padding-left: 1rem; }
.facts dt { font-size: 0.95rem; color: var(--ink-soft); }
.facts dd { margin: 0.15rem 0 0; font-weight: 700; }

.table-wrap { overflow-x: auto; max-width: 52rem !important; margin-bottom: 1.25rem; }
.versions { width: 100%; border-collapse: collapse; font-size: 1rem; }
.versions th, .versions td { text-align: left; padding: 0.8rem 1rem 0.8rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.versions thead th { font-size: 0.95rem; color: var(--ink-soft); font-weight: 400; }
.versions tbody th { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 1.25rem; white-space: nowrap; }
.versions td:nth-child(2) { font-weight: 700; white-space: nowrap; }
@media (max-width: 39.99rem) {
  .versions thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .versions tr { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .versions th, .versions td { display: block; padding: 0; border: 0; }
  .versions td:nth-child(2) { text-align: right; align-self: center; white-space: normal; }
  .versions td:nth-child(3) { grid-column: 1 / -1; color: var(--ink-soft); }
}
.versions .ok { color: var(--clear); }
.versions .warn { color: var(--caution); }
.versions .bad { color: var(--breach); }

/* Steps are a real sequence, so they're numbered */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 3.5rem; margin-bottom: 2rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1rem;
  font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 2.6rem; line-height: 1;
  color: var(--elephant);
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { margin: 0; }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 700; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 0.25rem; top: 0.85rem; font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--elephant); }
details[open] summary::after { content: '–'; }
details p { margin: 0 0 1.25rem; }

/* Help */
.help { background: var(--ink); color: var(--paper); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.help-grid { display: grid; gap: 2.5rem; }
@media (min-width: 50rem) { .help-grid { grid-template-columns: 1fr 1fr; gap: 0; } .help-option:first-child { padding-right: 4rem; } }
.help-option h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.help-option p { max-width: 34em; margin: 0.75rem 0 1.25rem; opacity: 0.88; }
.help-option + .help-option { border-top: 1px solid color-mix(in srgb, var(--paper) 25%, transparent); padding-top: 2.5rem; }
@media (min-width: 50rem) { .help-option + .help-option { border-top: 0; padding-top: 0; border-left: 1px solid color-mix(in srgb, var(--paper) 25%, transparent); padding-left: 4rem; } }
.help .button { color: var(--ink); background: var(--signal); border-color: var(--signal); }
.help .button:hover { background: var(--paper); border-color: var(--paper); }
.help .button.secondary-light { color: var(--paper); background: transparent; border-color: var(--paper); }
.help .button.secondary-light:hover { color: var(--ink); background: var(--paper); }
.help :focus-visible { outline-color: var(--signal); }

/* Footer */
.footer { padding: 3rem 0 4rem; font-size: 0.95rem; color: var(--ink-soft); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 50rem) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.footer p { margin: 0; max-width: 36em; }
.footer-h { font-size: 1.15rem; color: var(--ink); margin-bottom: 0.5rem; }
.sources { margin: 0; padding-left: 1.1rem; }
.sources li + li { margin-top: 0.3rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Navigation */
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.97rem; }
.nav a { text-decoration: none; padding: 0.25rem 0; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--elephant); }

/* Situation chooser: a list of large linked rows, not a card grid */
.band > .wrap > h2 { margin-bottom: 1.5rem; }
.situations { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); max-width: 52rem; }
.situations li { border-bottom: 1px solid var(--line); }
.situations a { display: grid; gap: 0.2rem; padding: 1.1rem 2.5rem 1.1rem 0; text-decoration: none; position: relative; }
.situations a::after { content: ''; position: absolute; right: 0.5rem; top: 50%; width: 0.7rem; height: 0.7rem; border-top: 3px solid var(--elephant); border-right: 3px solid var(--elephant); transform: translateY(-50%) rotate(45deg); }
.situations a:hover .sit-title { text-decoration: underline; text-decoration-color: var(--elephant); text-underline-offset: 0.15em; }
.sit-title { font-family: var(--display); font-stretch: 78%; font-weight: 780; font-size: clamp(1.35rem, 2.6vw, 1.7rem); line-height: 1.1; }
.sit-desc { color: var(--ink-soft); }

/* Guide pages */
.page { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem); }
.page h1 { font-size: clamp(2.4rem, 6vw, 4rem); max-width: 18ch; margin-bottom: 0; }
.page .lede { margin: 1.25rem 0 2rem; }
.page h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 2.75rem 0 0.9rem; }
.page h2:first-of-type { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li + li { margin-top: 0.45rem; }
.prose li::marker { color: var(--elephant); }
.crumb { margin: 0 0 1rem; font-size: 0.95rem; }
.crumb a { color: var(--ink-soft); }

.callout { margin-top: 2.75rem; padding: 1.5rem; border-radius: 12px; background: var(--paper-2); border-left: 6px solid var(--elephant); }
.callout h2 { margin: 0 0 0.5rem !important; font-size: 1.6rem; }
.callout p:last-child { margin-bottom: 0; }

.code-block, .copy-block, .template { max-width: 52rem !important; margin: 1rem 0 1.5rem; }
.code-block pre, .copy-block pre, .template-body {
  margin: 0; padding: 1rem 1.15rem; overflow-x: auto;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); font-size: 0.88rem; line-height: 1.55; white-space: pre;
}
.code-block code { background: none; padding: 0; font-size: inherit; }
.copy-block pre, .template-body { white-space: pre-wrap; font-family: var(--body); font-size: 0.98rem; }
.copy-block .button { margin-top: 0.75rem; }

.template { border: 2px solid var(--ink); border-radius: 12px; padding: 1.25rem; }
.template-fields label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.template-fields input { width: 100%; max-width: 24rem; font: inherit; padding: 0.6rem 0.8rem; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; }
.template-subject { margin: 1.1rem 0 0.6rem; font-weight: 700; }
.template-label { display: inline-block; font-weight: 400; color: var(--ink-soft); margin-right: 0.35rem; }
.template-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--paper-2); border-color: var(--ink); }
.copy-status { font-size: 0.95rem; color: var(--clear); }

.judge { list-style: none; padding-left: 0 !important; }
.judge li { padding-left: 2rem; position: relative; }
.judge li::before { position: absolute; left: 0; top: 0; font-weight: 700; font-family: var(--display); font-size: 1.2rem; line-height: 1.4; }
.judge .good::before { content: '✓'; color: var(--clear); }
.judge .bad::before { content: '✗'; color: var(--breach); }

.next-links { margin: 1rem 0 0; padding-left: 1.2rem; font-weight: 700; }
.next-links li + li { margin-top: 0.3rem; }

.status-table td { font-size: 0.97rem; }
.pill { display: inline-block; font-weight: 700; font-size: 0.85rem; padding: 0.15rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--clear-bg); color: var(--clear); }
.pill.warn { background: var(--caution-bg); color: var(--caution); }
.pill.none { background: var(--neutral-bg); color: var(--ink-soft); }

.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.5rem; }
.footer-links li { margin-bottom: 0.35rem; break-inside: avoid; }
.sources-list li + li { margin-top: 0.75rem; }

/* Ready-to-send emails strip on the home page */
.templates-strip { padding: 0 0 clamp(2.5rem, 5vw, 3.5rem); }
.templates-strip h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-bottom: 1rem; }
.template-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; max-width: 52rem; }
@media (min-width: 46rem) { .template-links { grid-template-columns: 1fr 1fr; } }
.template-links a { display: grid; align-content: start; gap: 0.35rem; height: 100%; padding: 1.1rem 1.25rem 1.2rem 3.25rem; position: relative; text-decoration: none; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.template-links a::before { content: ''; position: absolute; left: 1.1rem; top: 1.25rem; width: 1.4rem; height: 1.4rem; background: var(--elephant); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2'/%3E%3Cpath d='M3 6.5l9 6.5 9-6.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2'/%3E%3Cpath d='M3 6.5l9 6.5 9-6.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.template-links a:hover { background: var(--paper-2); }
.template-links a:hover .tl-title { text-decoration: underline; text-decoration-color: var(--elephant); text-underline-offset: 0.15em; }
.tl-title { font-family: var(--display); font-stretch: 80%; font-weight: 780; font-size: 1.3rem; line-height: 1.15; }
.tl-desc { color: var(--ink-soft); font-size: 0.97rem; }

/* Who's giving advice */
.band-intro { max-width: 42rem; margin: -0.5rem 0 2rem; color: var(--ink-soft); }
.advice-groups { display: grid; gap: 2rem; max-width: 64rem; }
@media (min-width: 56rem) { .advice-groups { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.advice-groups h3 { font-size: 1.3rem; font-stretch: 78%; margin: 0 0 0.75rem; }
.advice-groups ul + h3 { margin-top: 2rem; }
.advice-bodies { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.advice-bodies li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.advice-bodies a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; text-decoration: none; }
.advice-bodies a:hover .ab-name { text-decoration: underline; text-decoration-color: var(--elephant); text-underline-offset: 0.15em; }
.ab-name { font-weight: 700; }
.ab-who { font-size: 0.9rem; color: var(--ink-soft); }
.ab-what { display: block; margin-top: 0.2rem; font-size: 0.97rem; color: var(--ink-soft); }
.help-option .help-note { margin: 0.6rem 0 0; font-size: 0.9rem; opacity: 0.75; }

/* Share row */
.share { border-top: 1px solid var(--line); padding: clamp(2rem, 4vw, 2.75rem) 0; }
.share-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.share h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); }
.share-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.share .button { font-size: 1.05rem; padding: 0.7rem 1.2rem; }
