/* NoticeCopilot design system.
   Direction: a calm, paper-and-ink document aesthetic. Serif display for
   headings (legal-document gravitas), system sans for reading, a single deep
   ink-blue accent, warm hairline rules instead of boxes and shadows.

   LIGHT IS THE DEFAULT FOR EVERYONE, regardless of system preference (owner
   direction 2026-07-11). Dark exists only as an explicit opt-in: the footer
   toggle sets a cookie and the layout adds .theme-dark on <html>. There is
   deliberately no prefers-color-scheme auto-switch. No JavaScript anywhere. */

:root {
  --paper: #fcfbf8;
  --surface: #ffffff;
  --ink: #23292f;
  --muted: #5d6a76;
  --rule: #e8e3d7;
  --rule-strong: #cfc8b6;
  --accent: #1f4f74;
  --accent-strong: #163a57;
  --accent-wash: #eff4f8;
  --warn-ink: #7c4a0a;
  --warn-wash: #fbf2e0;
  --good-ink: #2c614a;
  --good-wash: #ecf4ef;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

.theme-dark {
  --paper: #16181c;
  --surface: #1e2126;
  --ink: #e8e5de;
  --muted: #a2a9b1;
  --rule: #31353c;
  --rule-strong: #464b54;
  --accent: #92c1e2;
  --accent-strong: #b3d5ee;
  --accent-wash: #20303c;
  --warn-ink: #e5b877;
  --warn-wash: #2b2318;
  --good-ink: #9ecfb4;
  --good-wash: #1c2b23;
}

* { box-sizing: border-box; }

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

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-top: 2em; }
h3 { font-size: 1.12rem; margin-top: 1.4em; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

ul, ol { padding-left: 1.4rem; }

/* ---- Structure ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--surface);
  color: var(--accent);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.shell {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.shell-wide { max-width: 64rem; }

.site-header {
  border-bottom: 3px double var(--rule-strong);
  background: var(--paper);
}
.site-header .shell, .site-header .shell-wide {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1rem;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--accent); }
.brand-tag {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.site-nav { margin-left: auto; display: flex; gap: 1.25rem; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover { color: var(--accent); text-decoration: underline; }

main { padding: 2.5rem 0 4rem; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer p { margin-bottom: 0.6rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---- Typographic devices ------------------------------------------------ */

.eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.8rem;
}

.lede { font-size: 1.15rem; color: var(--ink); }

.rule-above { border-top: 1px solid var(--rule); padding-top: 1.5rem; margin-top: 2rem; }

.crumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--rule-strong); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* ---- Trust strip -------------------------------------------------------- */

.trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  padding: 0.9rem 0;
  margin: 1.75rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--muted);
}
.trust-strip li::before { content: "\2713\00a0"; color: var(--good-ink); }

/* ---- Cards & panels ----------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
}

.card-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  padding: 0;
  margin: 1.5rem 0;
  list-style: none;
}
.card-grid h3 { margin-top: 0; }
.card-grid .card p { font-size: 0.94rem; color: var(--muted); margin-bottom: 0.75rem; }
.card-grid .card a { font-weight: 600; }

/* ---- Callouts ----------------------------------------------------------- */

.callout {
  border-left: 3px solid var(--rule-strong);
  background: var(--surface);
  padding: 0.9rem 1.2rem;
  margin: 1.25rem 0;
  border-radius: 0 6px 6px 0;
}
.callout-warn { border-left-color: var(--warn-ink); background: var(--warn-wash); }
.callout-warn strong { color: var(--warn-ink); }
.callout-good { border-left-color: var(--good-ink); background: var(--good-wash); }
.callout-good strong { color: var(--good-ink); }

/* ---- Citations & facts -------------------------------------------------- */

.fact-list { list-style: none; padding: 0; margin: 1.25rem 0; }
.fact-list li {
  border-left: 2px solid var(--accent);
  padding: 0.15rem 0 0.35rem 1.1rem;
  margin-bottom: 1.4rem;
}
.fact-sources {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.83rem;
  color: var(--muted);
}
.fact-sources a { color: var(--muted); }
.fact-sources a:hover { color: var(--accent); }

.source-list { font-size: 0.9rem; }
.source-list li { margin-bottom: 0.35rem; }

/* ---- Buttons & forms ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.55rem 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-wash); color: var(--accent-strong); }

.btn-primary {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-strong); color: var(--paper); }

.btn-block { width: 100%; }

label { font-weight: 600; display: block; margin-bottom: 0.4rem; }

input[type="text"], input[type="email"], input[type="number"], input[type="date"],
select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  min-height: 46px;
}
textarea { min-height: 7rem; resize: vertical; }

input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-field { margin: 1.25rem 0; }
.help-text { color: var(--muted); font-size: 0.92rem; margin: 0.35rem 0 0.9rem; }

/* The delivery address on the success page: large enough that a typo in it is
   noticed while the buyer is still on the page. */
.order-email { font-size: 1.15rem; margin: 0.4rem 0 0.6rem; word-break: break-all; }

.choice-list { display: grid; gap: 0.6rem; margin: 1rem 0; }
.choice-list label {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  font-weight: 400;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  margin: 0;
}
.choice-list label:hover { border-color: var(--accent); }
.choice-list input { accent-color: var(--accent); }

/* ---- Wizard -------------------------------------------------------------- */

.wizard { max-width: 38rem; }
.wizard-progress {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.wizard-bar {
  height: 3px;
  background: var(--rule);
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.wizard-bar span { display: block; height: 100%; background: var(--accent); }
.wizard legend, .wizard-question {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 0;
  margin-bottom: 0.75rem;
}
.wizard fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.wizard-nav { display: flex; align-items: center; gap: 1.25rem; }
.wizard-nav .muted-link { color: var(--muted); font-size: 0.92rem; }

/* ---- Assessment (the free result + paywall) ------------------------------ */

.assess-list { list-style: none; padding: 0; margin: 1.5rem 0 2.5rem; display: grid; gap: 1rem; }
.assess-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left-width: 3px;
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.3rem;
}
.assess-item.tone-warning { border-left-color: var(--warn-ink); }
.assess-item.tone-good { border-left-color: var(--good-ink); }
.assess-item.tone-info { border-left-color: var(--accent); }
.assess-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.25rem;
}
.assess-value { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; margin: 0 0 0.4rem; }
.tone-warning .assess-value { color: var(--warn-ink); }
.tone-good .assess-value { color: var(--good-ink); }
.assess-detail { font-size: 0.94rem; color: var(--muted); margin: 0; }

/* ---- Tiers (the paywall) -------------------------------------------------- */

.tier-cards { display: grid; gap: 1.1rem; margin: 1.5rem 0; }
@media (min-width: 40rem) { .tier-cards { grid-template-columns: 1fr 1fr; } }
.tier-card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 1.3rem 1.4rem;
  cursor: pointer;
}
.tier-card:hover { border-color: var(--accent); }
.tier-card input { position: absolute; top: 1.3rem; right: 1.3rem; accent-color: var(--accent); width: 1.15rem; height: 1.15rem; }
.tier-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tier-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; margin: 0 2rem 0.1rem 0; }
.tier-price { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; margin: 0 0 0.75rem; }
.tier-price small { font-size: 0.8rem; font-weight: 400; color: var(--muted); font-family: var(--font-sans); }
.tier-price s { color: var(--muted); font-weight: 400; margin-right: 0.4rem; }
.free-badge { color: var(--good-ink); }
.tier-card ul { margin: 0; padding-left: 1.2rem; font-size: 0.92rem; color: var(--muted); }
.tier-card li { margin-bottom: 0.3rem; }

/* ---- Answers summary ------------------------------------------------------ */

.answers-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.95rem; }
.answers-table th, .answers-table td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 1rem 0.6rem 0;
}
.answers-table th { font-weight: 600; width: 55%; }

/* ---- Notice library ------------------------------------------------------- */

.agency-directory { list-style: none; padding: 0; margin: 1.5rem 0; }
.agency-directory li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 0;
}
.agency-directory a { font-weight: 600; text-decoration: none; }
.agency-directory a:hover { text-decoration: underline; }
.agency-count { color: var(--muted); font-size: 0.88rem; white-space: nowrap; }

.guide-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.guide-list li { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.guide-list a { font-weight: 600; text-decoration: none; }
.guide-list a:hover { text-decoration: underline; }
.guide-list p { margin: 0.3rem 0 0; font-size: 0.92rem; color: var(--muted); }

.related-links { columns: 2; column-gap: 2rem; padding-left: 1.2rem; font-size: 0.94rem; }
@media (max-width: 40rem) { .related-links { columns: 1; } }
.related-links li { margin-bottom: 0.5rem; break-inside: avoid; }

.guide-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }

/* ---- Playbook cross-link box ---------------------------------------------- */

.tool-box {
  background: var(--accent-wash);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 1.3rem 1.5rem;
  margin: 2rem 0;
}
.tool-box h2, .tool-box h3 { margin-top: 0; }
.tool-box p { font-size: 0.95rem; }

/* ---- Waitlist form --------------------------------------------------------- */

.waitlist {
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--surface);
  padding: 1.3rem 1.5rem;
  margin: 2rem 0;
}
.waitlist h2, .waitlist h3 { margin-top: 0; }
.waitlist .fields { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.waitlist input[type="email"] { flex: 1 1 14rem; width: auto; }

/* ---- Steps (how it works) --------------------------------------------------- */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.5rem 0; display: grid; gap: 1.1rem; }
.steps li { counter-increment: step; display: flex; gap: 1rem; }
.steps li::before {
  content: counter(step);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  width: 2.1rem; height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.steps strong { display: block; }
.steps p { margin: 0.1rem 0 0; font-size: 0.94rem; color: var(--muted); }

/* ---- Misc ------------------------------------------------------------------- */

.stat-line {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding: 0.4rem 0 0.4rem 1.1rem;
  margin: 1.5rem 0;
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 2.5rem;
}

.error-panel { text-align: center; padding: 3rem 0; }
.error-panel .status-code {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 700;
  color: var(--rule-strong);
  margin-bottom: 0.5rem;
}

.subscribed-note {
  border: 1px solid var(--good-ink);
  background: var(--good-wash);
  color: var(--good-ink);
  border-radius: 6px;
  padding: 0.8rem 1.1rem;
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  a, .btn, .tier-card, .choice-list label { transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease; }
}
