/* The OmniGrowth identity (docs/brand/branding-board.png): a Paper ground, Obsidian type, hairline Steel rules,
   tracked capital eyebrows over a large serif headline, and Signal as the only chromatic colour.
   Signal is never text on a light ground (1.40:1 on Paper); it marks focus, rules and accents only.
   Text pairs (WCAG AA): Obsidian on Paper 15.64:1, on white 17.99:1, on --table 13.89:1; --muted on Paper 7.17:1,
   on white 8.24:1, on --table 6.36:1; Paper on Obsidian 15.64:1; Signal on Obsidian 11.20:1; Steel on Obsidian 7.75:1. */

/* Fonts are self-hosted (the site's policy allows fonts from itself only), copied by scripts/vendor-fonts.mts. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
}

:root {
  --obsidian: #111720;
  --steel: #abaaa8;
  --signal: #75dbea;
  --paper: #f0efeb;
  --white: #ffffff;
  /* Secondary text, a lighter Obsidian: Steel is too light for text on Paper (2.02:1). */
  --muted: #4a4f57;
  /* A slightly deeper Paper for table heads and quiet panels. */
  --table: #e4e2dc;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --radius: 2px;
  --measure: 46rem;
}

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

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

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

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }

main.wrap { padding-top: 2.5rem; padding-bottom: 4rem; }
main:focus { outline: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 1.8em 0 0.5em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); margin-top: 0.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; font-weight: 600; }
p, ul, ol { margin: 0 0 1em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 600; }

a { color: var(--obsidian); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

/* Focus: a Signal band hugging the element and an Obsidian ring outside it, so it shows on Paper and on Obsidian. */
:focus-visible {
  outline: 3px solid var(--obsidian);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--signal);
}

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

.skip-link {
  position: absolute; left: 0.75rem; top: -4rem;
  background: var(--obsidian); color: var(--paper);
  padding: 0.6rem 1rem; border-radius: var(--radius);
  z-index: 10;
}
.skip-link:focus { top: 0.75rem; }

[hidden] { display: none !important; }

/* Small tracked capitals over a headline, as on the board. */
.eyebrow {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted); margin: 0 0 0.75rem;
}

/* Header and footer */
.site-header { border-bottom: 1px solid var(--steel); }
.header-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--obsidian); text-decoration: none;
}
/* The Minimal mark sits on its own white ground; the round tile keeps the square's corners from showing. */
.brand-mark { display: block; width: 3rem; height: 3rem; border-radius: 50%; background: var(--white); }
.account-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 1rem; }
.who { color: var(--muted); overflow-wrap: anywhere; }
.site-footer { background: var(--obsidian); color: var(--paper); font-size: 1rem; padding: 2rem 0; }
.site-footer p { margin: 0; color: var(--steel); }
.site-footer a { color: var(--signal); }

/* Text */
.lead { font-size: 1.25rem; color: var(--obsidian); max-width: 40rem; }
.hint { color: var(--muted); font-size: 1rem; margin: 0 0 0.4rem; }
.optional { font-weight: 400; color: var(--muted); }
.loading { color: var(--muted); }

.hero { padding-bottom: 1rem; }
/* A short Signal rule under the headline: an accent, not text. */
.hero h1::after {
  content: ""; display: block; width: 3.5rem; height: 2px; margin-top: 1.25rem;
  background: var(--signal);
}

.steps { padding-left: 1.4rem; }
.steps li { margin-bottom: 0.6rem; }
.steps li::marker { font-family: var(--serif); color: var(--muted); }

.tiers { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.tiers li { padding: 0.75rem 0; border-top: 1px solid var(--steel); }
.tiers li:last-child { border-bottom: 1px solid var(--steel); }
.tiers li + li { margin-top: 0; }

/* Sections: separated by a hairline rule and white space, not boxed. */
.card { border-top: 1px solid var(--steel); padding: 1.5rem 0 0.5rem; margin: 2rem 0; }
.card > h2:first-child { margin-top: 0; }
.two-up { display: grid; gap: 0 3rem; }
@media (min-width: 52rem) {
  .two-up { grid-template-columns: 1fr 1fr; }
  body:has(.two-up) .wrap { max-width: 60rem; }
}

/* Forms */
.field { margin-bottom: 1.5rem; }
label { display: block; font-weight: 600; margin-bottom: 0.2rem; }
input[type="text"], input[type="email"], input[type="password"], textarea {
  display: block; width: 100%;
  font: inherit; color: inherit;
  background: var(--white);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  min-height: 3rem;
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible { border-color: var(--obsidian); }

/* The report choice */
fieldset.choice { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
fieldset.choice legend { padding: 0; margin-bottom: 0.5rem; font-weight: 600; }
.option {
  display: grid; grid-template-columns: auto 1fr; column-gap: 0.75rem; align-items: start;
  padding: 0.85rem 0; border-top: 1px solid var(--steel);
}
.option:last-child { border-bottom: 1px solid var(--steel); }
.option input[type="radio"] { width: 1.35rem; height: 1.35rem; margin: 0.2rem 0 0; accent-color: var(--obsidian); }
.option label { margin: 0; font-family: var(--serif); font-size: 1.25rem; font-weight: 400; cursor: pointer; }
.option .hint { grid-column: 2; margin: 0.15rem 0 0; }
.option input:disabled + label { cursor: not-allowed; color: var(--muted); }
.tier-status { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; color: var(--muted); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.6rem 1.5rem;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; letter-spacing: 0.02em;
  color: var(--paper); background: var(--obsidian);
  border: 1px solid var(--obsidian); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
}
/* Hover lights the primary action in Signal, with Obsidian type on it (11.20:1). */
.button:hover { color: var(--obsidian); background: var(--signal); border-color: var(--obsidian); }
.button:disabled { cursor: progress; opacity: 0.8; }
.button[aria-busy="true"]::before {
  content: ""; width: 1em; height: 1em; margin-right: 0.6em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.button-quiet { color: var(--obsidian); background: transparent; }
.button-small { min-height: 2.5rem; padding: 0.3rem 0.9rem; font-size: 0.95rem; }
.link-button {
  font: inherit; font-size: 1rem; color: var(--obsidian);
  background: none; border: 0; padding: 0.25rem 0;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; cursor: pointer;
}
.link-button:hover { text-decoration-thickness: 2px; }
/* The two buy buttons: stacked on a phone, side by side from 40rem, Basic first. */
.buy-options { display: flex; flex-direction: column; align-items: stretch; gap: 0.75rem; margin: 0 0 1.25rem; }
.buy-options[hidden] { display: none; }
.buy-soon { display: flex; align-items: center; min-height: 3rem; font-weight: 600; color: var(--muted); }
@media (min-width: 40rem) {
  .buy-options { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .button[aria-busy="true"]::before { animation: none; }
}

.cost { font-weight: 600; margin: 1rem 0 0; max-width: 36rem; }
.cost:empty { display: none; }

/* Messages: carried by wording and weight, in Obsidian on white with a hairline frame. No red or green. */
.message {
  margin: 1rem 0; padding: 0.75rem 1rem;
  background: var(--white); color: var(--obsidian);
  border: 1px solid var(--obsidian); border-radius: var(--radius);
  font-weight: 600;
}
.message[data-kind="ok"] { border-color: var(--signal); font-weight: 400; }
.message[data-kind="info"] { border-color: var(--steel); font-weight: 400; }

/* Past surveys */
.survey-list { list-style: none; padding: 0; }
.survey-list li { padding: 0.9rem 0; margin: 0; border-top: 1px solid var(--steel); }
.survey-list li:last-child { border-bottom: 1px solid var(--steel); }
.survey-list a { font-weight: 600; overflow-wrap: anywhere; }
.survey-meta { display: block; color: var(--muted); font-size: 1rem; }

/* Progress */
progress {
  width: 100%; height: 0.75rem; margin: 0.5rem 0 1.5rem;
  accent-color: var(--obsidian);
}
.stages { list-style: none; padding: 0; }
.stage { position: relative; padding-left: 2rem; color: var(--muted); }
.stage::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.45em;
  width: 0.9rem; height: 0.9rem; border-radius: 50%; border: 1px solid var(--muted);
}
.stage-done { color: var(--obsidian); }
.stage-done::before { background: var(--obsidian); border-color: var(--obsidian); }
.stage-current { color: var(--obsidian); font-weight: 600; }
.stage-current::before { background: var(--signal); border: 2px solid var(--obsidian); }

/* The report */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-bottom: 2rem; }
.report h1 { overflow-wrap: anywhere; }
.report h2 { border-top: 1px solid var(--steel); padding-top: 1.5rem; }
.report .notice { background: var(--table); padding: 0.75rem 1rem; border-radius: var(--radius); }
.report .summary { color: var(--muted); }
.report .thin-banner {
  background: var(--white); border: 1px solid var(--obsidian); border-radius: var(--radius);
  padding: 0.75rem 1rem; margin: 0 0 1em; font-weight: 600;
}
.report .question { margin-bottom: 2.5rem; }
.report .indication { color: var(--obsidian); font-weight: 600; }
.report .note { color: var(--muted); font-size: 1rem; }
.report blockquote {
  margin: 0 0 1.25em; padding: 1rem 0;
  border-top: 1px solid var(--steel); border-bottom: 1px solid var(--steel);
  font-family: var(--serif); font-size: 1.35rem; line-height: 1.4;
}
.report blockquote p:last-child { margin-bottom: 0; }
.report .quotes { padding-left: 1.2rem; }
.report .quote { overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; margin: 0 0 1em; }
.report table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 1rem; font-variant-numeric: tabular-nums; }
.report th, .report td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border: 1px solid var(--steel); }
.report th { background: var(--table); font-weight: 600; }
.report table.answers td:nth-child(n+2), .report table.answers th:nth-child(n+2),
.report table.keywords td:nth-child(n+2), .report table.keywords th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.report table.scoring td { min-width: 6rem; }

/* The Deluxe report: the publics, where sources disagree, checking the sorting. Same tables and type as Basic. */
.report table.publics td:nth-child(3), .report table.publics th:nth-child(3),
.report table.sources td:nth-child(3), .report table.sources th:nth-child(3),
.report table.sources td:nth-child(4), .report table.sources th:nth-child(4) { text-align: right; white-space: nowrap; }
.report table.publics td:first-child { min-width: 9rem; }
.report .disagreement { margin-bottom: 2rem; }
.report .agreement { padding-left: 1.2rem; font-variant-numeric: tabular-nums; }
