/* RousseauAi. Tokens from brand/BRAND.md. One green accent per screen. */
:root {
  --ink: #0E1116;
  --surface: #171B22;
  --line: #2A2F37;
  --paper: #F2F4F7;
  --muted: #A0A6B0;
  --green: #4ECB8D;
  --green-deep: #1F7A4F;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 40rem;
  --gutter: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--paper); text-decoration-color: var(--muted); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--paper); }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 1rem; }
h1 { font-size: clamp(2.25rem, 7vw, 4.25rem); max-width: 18ch; }
h2 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); max-width: 22ch; }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.2rem; }
strong { font-weight: 600; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.prose > :last-child { margin-bottom: 0; }
.lede { font-size: 1.25rem; color: var(--paper); max-width: var(--measure); }
.muted { color: var(--muted); }
.eyebrow {
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1.25rem;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); color: var(--ink); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { position: relative; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.brand img { width: 128px; height: auto; }
.nav-toggle {
  font: 600 0.95rem var(--font); color: var(--paper); background: transparent;
  border: 1px solid var(--line); border-radius: 6px; padding: 0.45rem 0.9rem; cursor: pointer;
}
/* Below 860px: Menu button opens a full-width ink panel under the header.
   Without JS the nav simply sits under the logo. */
.site-nav { width: 100%; }
.js .site-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
  background: var(--ink); border-bottom: 1px solid var(--line); padding: 0.5rem var(--gutter) 1.5rem;
}
.js .site-nav.is-open { display: block; }
.no-js .nav-toggle { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0.5rem 0 0.25rem; }
.site-nav a { display: block; padding: 0.6rem 0; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 1rem; border-top: 1px solid var(--line); }
.js .site-nav a { padding: 0.95rem 0; font-size: 1.25rem; }
.site-nav li:first-child a { border-top: 0; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--paper); }

@media (min-width: 53.75rem) {
  .js .site-nav { position: static; background: none; border: 0; padding: 0; }
  .js .site-nav a { padding: 0.25rem 0; font-size: 0.95rem; }
  .nav-toggle { display: none; }
  .js .site-nav, .site-nav { display: block; width: auto; }
  .site-nav ul { display: flex; gap: 1.75rem; padding: 0; }
  .site-nav a { border-top: 0; padding: 0.25rem 0; font-size: 0.95rem; }
  .site-nav a[aria-current] { box-shadow: 0 2px 0 var(--paper); }
}

/* Sections */
.section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.hero { padding: 4.5rem 0 5rem; }
.hero .lede { margin-top: 1.5rem; }
@media (min-width: 48rem) {
  .section { padding: 6.5rem 0; }
  .hero { padding: 7.5rem 0 7rem; }
}
.section-head { margin-bottom: 2.5rem; }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--muted); }
.text-link::after { content: " \2192"; }
.text-link:hover { border-color: var(--paper); }

/* Buttons. Primary is the screen's one green accent. */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-block; font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  padding: 0.95rem 1.4rem; border-radius: 6px; border: 1px solid transparent; text-align: center;
}
.btn-primary { background: var(--green); color: var(--ink); }
.btn-primary:hover { background: #6BD7A2; }
.btn-secondary { background: transparent; color: var(--paper); border-color: var(--muted); }
.btn-secondary:hover { border-color: var(--paper); }

/* Editorial rows: numbered or labelled lists with rules, not cards */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 52rem; }
.rows > li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.25rem; }
.rows > li > :last-child { margin-bottom: 0; }
.rows .row-label { font-weight: 700; }
.rows .row-body { color: var(--muted); }
@media (min-width: 48rem) {
  .rows > li { grid-template-columns: 12rem 1fr; gap: 2rem; }
}
.rows.numbered { counter-reset: row; }
.rows.numbered .row-label::before { counter-increment: row; content: counter(row, decimal-leading-zero) "  "; color: var(--muted); font-weight: 600; white-space: pre; }

/* Columns for short proof and offer items */
.columns { display: grid; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.columns > li { border-top: 1px solid var(--paper); padding-top: 1.1rem; }
.columns h3 { margin-bottom: 0.5rem; }
.columns p { color: var(--muted); margin: 0; }
@media (min-width: 48rem) { .columns { grid-template-columns: repeat(3, 1fr); } }

/* Tables */
.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; min-width: 36rem; }
th, td { text-align: left; vertical-align: top; padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--line); }
thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
tbody th { font-weight: 700; white-space: nowrap; }
td { color: var(--muted); }

/* Callouts */
.pull { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; max-width: 30ch; margin: 0 0 1.5rem; }
.note { font-style: italic; color: var(--muted); }
.price { font-size: clamp(1.75rem, 4.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.75rem; }

/* Figures and diagrams */
figure { margin: 0; }
figcaption { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 1.5rem; }
.diagram { margin: 2.5rem 0 1rem; }
.diagram .dg-wide { display: none; }
@media (min-width: 48rem) {
  .diagram .dg-wide { display: block; }
  .diagram .dg-tall { display: none; }
}
.dg-tall { max-width: 26rem; }
.dg-box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.dg-score { fill: #1C2129; stroke: var(--line); stroke-width: 1.5; }
.dg-frame { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 6 6; }
.dg-accent { fill: rgba(78, 203, 141, 0.08); stroke: var(--green); stroke-width: 2.5; }
.dg-line { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.dg-arrow { fill: var(--muted); }
.dg-title { fill: var(--paper); font: 700 20px var(--font); }
.dg-sub { fill: var(--muted); font: 400 15px var(--font); }
.dg-label { fill: var(--muted); font: 400 15px var(--font); }
.dg-accent-title { fill: var(--green); }
a.dg-link:hover .dg-box, a.dg-link:focus .dg-box { stroke: var(--paper); }

/* Closing band */
.closing { border-top: 1px solid var(--line); background: var(--surface); padding: 4.5rem 0; }
@media (min-width: 48rem) { .closing { padding: 6rem 0; } }
.closing-title { max-width: 24ch; margin-bottom: 2.5rem; }
.closing-grid { display: grid; gap: 2.5rem; }
@media (min-width: 48rem) { .closing-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.closing-panel { border-top: 1px solid var(--paper); padding-top: 1.25rem; }
.closing-panel p { color: var(--muted); }

/* Forms */
.inline-form { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.inline-form input { flex: 1 1 14rem; }
input, textarea, select {
  font: 400 1rem var(--font); color: var(--paper); background: var(--ink);
  border: 1px solid #4A515C; border-radius: 6px; padding: 0.85rem 1rem; width: 100%;
}
.inline-form input { width: auto; }
input::placeholder, textarea::placeholder { color: #7D8490; }
textarea { min-height: 9rem; resize: vertical; }
.form { max-width: 36rem; display: grid; gap: 1.4rem; margin-top: 2rem; }
.field label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 0.4rem; }
.field .hint { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 400; margin-top: 0.15rem; }
.form-note { margin-top: 0.75rem; font-size: 0.95rem; color: var(--muted); }

/* Build TODOs. Hidden from visitors; shown on localhost or with ?draft=1
   (the html.show-drafts class is set by the inline script in the layout head).
   Every one must be resolved or removed before launch. */
.todo { display: none; }
.show-drafts .todo { display: block; }
.show-drafts span.todo { display: inline; }
.todo {
  border: 1px dashed var(--muted); border-radius: 4px; padding: 0.6rem 0.85rem;
  font: 400 0.9rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--paper);
  background: rgba(242, 244, 247, 0.04); margin: 0.75rem 0; max-width: var(--measure);
}
.todo::before { content: "TODO  "; font-weight: 700; white-space: pre; }
span.todo { padding: 0.1rem 0.4rem; margin: 0; }

/* Evidence stories */
.story { padding: 2rem 0; border-top: 1px solid var(--line); max-width: 52rem; }
.story:last-of-type { border-bottom: 1px solid var(--line); }
.story dl { margin: 1rem 0 0; display: grid; gap: 0.9rem; }
.story dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.story dd { margin: 0.15rem 0 0; }
@media (min-width: 48rem) {
  .story dl { grid-template-columns: 12rem 1fr; gap: 1rem 2rem; }
  .story dd { margin: 0; }
}

/* FAQ */
.faq { max-width: 52rem; border-top: 1px solid var(--line); }
.faq div { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.faq dt { font-weight: 700; margin-bottom: 0.35rem; }
.faq dd { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 3.5rem; }
.footer-inner { display: grid; gap: 1.5rem; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--paper); }
.footer-meta { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---------- Editorial energy pass (home first; other pages opt in later) ---------- */

/* Paper sections swap the tokens so every component inverts cleanly.
   On paper, --paper is the text color and --green is green-deep (green on white). */
.theme-paper {
  --ink: #F2F4F7;
  --paper: #0E1116;
  --surface: #E6E9ED;
  --line: #D3D8DE;
  --muted: #4B525C;
  --green: #1F7A4F;
  background: #F2F4F7;
  color: #0E1116;
  border-top: 0;
}
.theme-paper .btn-primary:hover { background: #17633F; }
.theme-paper + .section, .section + .theme-paper { border-top: 0; }

/* Thin green rule over a small label, above each section headline */
.kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.5rem; }
.kicker::before { content: ""; display: block; width: 3rem; height: 2px; background: var(--green); margin-bottom: 1rem; }

/* Hero */
.hero-xl { padding: 4rem 0 4.5rem; }
@media (min-width: 48rem) { .hero-xl { padding: 5rem 0 6rem; } }
.display {
  font-size: clamp(2.75rem, 7.2vw, 5.5rem); /* 64 to 88px from tablet up */
  letter-spacing: -0.04em; line-height: 1.0; max-width: 14ch; margin-bottom: 1.75rem;
}
.hero-xl .lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--muted); }
.hero-map { margin-top: 4rem; }
.hero-map .diagram { margin: 0; }
.hero-map figcaption { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 48rem) { .hero-map { margin-top: 4rem; } }

/* Big pull quotes */
.pull-xl { font-size: clamp(2.5rem, 6.5vw, 5rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 13ch; margin-bottom: 2.5rem; }
.pull-lg { font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.06; letter-spacing: -0.035em; max-width: 22ch; margin-bottom: 2.5rem; }
.h-lg { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.035em; line-height: 1.05; max-width: 18ch; margin-bottom: 1.5rem; }
.quote { margin: 0 0 1.5rem; font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; max-width: 30ch; }
.quote p { margin: 0; }
/* Inner page hero headline: same voice as .display, sized for longer lines */
.display-page { font-size: clamp(2.5rem, 6vw, 4.75rem); letter-spacing: -0.04em; line-height: 1.02; max-width: 17ch; margin-bottom: 1.75rem; }
.hero .lede { color: var(--muted); }
/* A section whose headline is a plain label: the h2 itself takes the kicker style */
h2.kicker { max-width: none; line-height: 1.4; }
.big-price { font-size: clamp(3rem, 9vw, 6rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; margin: 0 0 1rem; }
.stack > * + * { margin-top: 2.5rem; }
.split { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .split { grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; } }

/* Strip, Sort, Shift, Supervise, Score: numbered nodes on a green line */
.sequence { --node: 3.5rem; --gap: 2.5rem; --steps: 5; list-style: none; padding: 0; margin: 3.5rem 0; position: relative; display: grid; gap: var(--gap); counter-reset: step; }
.sequence > li { position: relative; padding-left: calc(var(--node) + 1.25rem); counter-increment: step; }
/* Mobile: each node draws its segment down to the next node's center */
.sequence > li:not(:last-child)::after {
  content: ""; position: absolute; left: calc(var(--node) / 2 - 1px); top: calc(var(--node) / 2);
  width: 2px; height: calc(100% + var(--gap)); background: var(--green);
}
.sequence > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0;
  width: var(--node); height: var(--node); border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); border: 2px solid var(--green); color: var(--paper); font: 700 1.05rem var(--font);
}
.sequence h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.03em; margin: 0.55rem 0 0.4rem; }
.sequence p { color: var(--muted); margin: 0; }
.sequence > li::before { z-index: 1; }
.seq-out, .sequence .seq-out, .columns .seq-out { color: var(--paper); margin-top: 0.75rem; font-size: 1rem; font-weight: 600; }
.h-md { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.15; }
.h-md a { text-decoration: none; }
.h-md a:hover { text-decoration: underline; }
.sequence[data-steps="3"] { --steps: 3; }
.sequence[data-steps="4"] { --steps: 4; }
.sequence.compact h3:not(.h-md) { font-size: clamp(1.25rem, 2.2vw, 1.5rem); letter-spacing: -0.02em; line-height: 1.25; }
@media (min-width: 60rem) {
  .sequence { --gap: 2rem; grid-template-columns: repeat(var(--steps), 1fr); }
  .sequence > li:not(:last-child)::after { display: none; }
  /* Desktop: one line from the first node's center to the last node's center */
  .sequence::before {
    content: ""; position: absolute; top: calc(var(--node) / 2 - 1px); height: 2px; background: var(--green);
    left: calc(var(--node) / 2); right: calc((100% - (var(--steps) - 1) * var(--gap)) / var(--steps) - var(--node) / 2);
  }
  .sequence > li { padding-left: 0; padding-top: calc(var(--node) + 1.25rem); }
}

/* Proof items on paper: heavy top rule, no boxes */
.columns.strong > li { border-top-width: 3px; }
@media (min-width: 48rem) { .columns.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .columns.four { grid-template-columns: repeat(4, 1fr); } }

/* Home Advisory: three offer cards, stacked on mobile */
.offer-cards { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 48rem) { .offer-cards { grid-template-columns: repeat(3, 1fr); } }
.offer-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 1.75rem;
}
.offer-card.featured { border: 2px solid var(--green); }
.offer-card:focus-within { outline: 2px solid var(--paper); outline-offset: 3px; }
.offer-card .offer-duration { color: var(--paper); font-size: clamp(2.25rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin: 0 0 1rem; }
.offer-card h3 { margin-bottom: 0.5rem; }
.offer-card h3 a { text-decoration: none; }
.offer-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.offer-card h3 a:focus-visible { outline: none; }
.offer-card p { color: var(--muted); margin: 0; }
.offer-card .offer-price { color: var(--paper); font-weight: 700; margin-top: auto; padding-top: 1.25rem; }

/* Home Proof: Gazelle stat block and weighted proof cards */
.stat-block { border-top: 3px solid var(--paper); padding-top: 1.25rem; }
.stat-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.stat-block dl { margin: 0; }
.stat { margin-top: 1.75rem; }
.stat dt { color: var(--muted); font-weight: 600; }
.stat dd { margin: 0.25rem 0 0; font-size: clamp(3rem, 7vw, 5rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.columns.proof-cards > li { background: var(--surface); padding: 1.75rem; border-top: 3px solid var(--green); border-radius: 0 0 8px 8px; }

/* Closing band with one panel removed on this page */
.closing-grid > :only-child { grid-column: 1 / -1; max-width: 40rem; }

/* Motion: fade and rise on scroll, only when the reader allows motion */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.35s ease-out, transform 0.35s ease-out; }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}
