/* ─────────────────────────────────────────────────────────────
   ASTRAAS — shared stylesheet
   Ink + amber signal. Geometric monogram. Charts as imagery.
   ───────────────────────────────────────────────────────────── */

:root {
  --ink:        #14161a;   /* near-black base            */
  --paper:      #faf9f6;   /* warm off-white             */
  --amber:      #f0a500;   /* signal — links, CTAs       */
  --cost:       #c8442e;   /* semantic: money going out  */
  --save:       #2f7d5a;   /* semantic: money saved      */

  --bg:         var(--paper);
  --surface:    #f2f0ea;
  --text:       var(--ink);
  --text-dim:   #5c5f66;
  --text-faint: #8a8d94;
  --border:     #e2dfd6;
  --rule:       #cdc9bd;
  --amber-wash: #fdf3dc;
  --on-amber:   #14161a;

  --measure: 720px;
  --nav-w: 1100px;
}

/* Light is the standard. Dark is opt-in only — applied when the theme toggle
   sets data-theme="dark". We deliberately do NOT follow prefers-color-scheme:
   the paper look is the brand, and the reader chooses to leave it. */
:root[data-theme="dark"] {
  --bg:         #14161a;
  --surface:    #1c1f24;
  --text:       #eceae4;
  --text-dim:   #a4a7ae;
  --text-faint: #7b7f87;
  --border:     #2b2f36;
  --rule:       #3a3f47;
  --amber:      #f5b52c;
  --amber-wash: #2a2113;
  --cost:       #e8654d;
  --save:       #4fa87c;
  --on-amber:   #14161a;
}

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

body {
  font-family: 'Roboto', -apple-system, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Masthead ─────────────────────────────────────────────── */
header.nav {
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: var(--nav-w); margin: 0 auto;
  display: flex; align-items: center; gap: 18px; height: 66px;
}
/* pushes the links + toggle group to the right, keeping them adjacent */
nav.links { margin-left: auto; }
.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 21px; font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
}
.brand svg { width: 25px; height: 25px; display: block; flex-shrink: 0; }
.brand svg .mark { fill: var(--amber); }

nav.links { display: flex; gap: 30px; font-size: 14px; }
nav.links a {
  text-decoration: none; color: var(--text-dim); font-weight: 500;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
nav.links a:hover, nav.links a[aria-current="page"] {
  color: var(--text); border-bottom-color: var(--amber);
}

/* ── Theme toggle ─────────────────────────────────────────── */
.theme-toggle {
  display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; flex-shrink: 0;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.theme-toggle:hover { color: var(--amber); border-color: var(--amber); background: var(--surface); }
.theme-toggle:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.theme-toggle svg { width: 17px; height: 17px; display: block; fill: none;
  stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* show the moon on light (offer dark), the sun on dark (offer light) */
.theme-toggle .i-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ── Layout ───────────────────────────────────────────────── */
main { max-width: var(--measure); margin: 0 auto; padding: 60px 24px 96px; }

h1.title, h1.home {
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: clamp(31px, 5vw, 44px); font-weight: 500;
  line-height: 1.15; letter-spacing: -0.022em; margin-bottom: 22px;
  text-wrap: balance;
}
.lede, .standfirst {
  font-size: 20px; line-height: 1.5; color: var(--text-dim); margin-bottom: 34px;
  text-wrap: pretty;
}
.lede strong, .standfirst strong { color: var(--text); font-weight: 500; }

.kicker {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 16px;
}
.kicker .sep { color: var(--text-faint); margin: 0 6px; }

.byline {
  display: flex; align-items: center; gap: 13px;
  padding-bottom: 28px; margin-bottom: 34px; border-bottom: 1px solid var(--border);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; flex-shrink: 0;
  font-family: 'Google Sans', sans-serif; font-weight: 700; font-size: 14px;
}
/* NOTE: an @media block can never appear inside a selector list — doing so makes
   the parser skip to the matching brace and silently swallow the rules that follow. */
:root[data-theme="dark"] .avatar { background: var(--amber); color: var(--ink); }
.byline .name { font-size: 14px; font-weight: 500; }
.byline .meta { font-size: 13px; color: var(--text-dim); }

/* ── Prose ────────────────────────────────────────────────── */
article p { font-size: 18px; margin-bottom: 24px; }
article h2 {
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 27px; font-weight: 500; letter-spacing: -0.015em;
  margin: 50px 0 18px; text-wrap: balance;
}
article ul { margin: 0 0 24px 20px; font-size: 18px; }
article li { margin-bottom: 9px; }
article li::marker { color: var(--amber); }
article a { color: var(--text); text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: .15em; }
article a:hover { color: var(--amber); }
article code {
  font-family: 'Roboto Mono', ui-monospace, monospace; font-size: .88em;
  background: var(--surface); padding: 2px 6px; border-radius: 4px;
}
article blockquote {
  border-left: 3px solid var(--amber); padding: 2px 0 2px 22px;
  margin: 34px 0; font-size: 21px; line-height: 1.4; font-style: italic;
  text-wrap: pretty;
}
strong { font-weight: 700; }

/* ── Article hero ─────────────────────────────────────────── */
/* The on-page hero carries NO baked-in text — the <h1> is the headline.
   The text-baked variants from the pipeline are for OG/social only. */
.hero-figure { margin: 0 0 36px; }
.hero-figure img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 12px; background: var(--surface);
}
.hero-figure figcaption {
  font-size: 12.5px; color: var(--text-faint);
  margin-top: 9px; display: flex; gap: 7px; align-items: baseline;
}
.hero-figure figcaption::before {
  content: ''; width: 13px; height: 2px; background: var(--amber);
  border-radius: 2px; flex-shrink: 0; transform: translateY(-4px);
}

/* Thumbnails on the homepage listing */
.entry .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Verdict block ────────────────────────────────────────── */
.verdict {
  background: var(--amber-wash); border-left: 3px solid var(--amber);
  border-radius: 0 12px 12px 0; padding: 24px 28px; margin-bottom: 36px;
}
.verdict h2 {
  font-family: 'Google Sans', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 10px;
}
.verdict p { font-size: 19px; line-height: 1.5; margin: 0; }

/* ── Figures strip ────────────────────────────────────────── */
.figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 40px;
}
.fig { background: var(--bg); padding: 17px 20px 19px; display: grid; grid-template-rows: auto 1fr; }
.fig dt {
  font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 8px; line-height: 1.35; min-height: 2.7em;
}
.fig dd {
  align-self: end; font-family: 'Google Sans', sans-serif;
  font-size: 26px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.fig dd .unit { font-size: 15px; font-weight: 400; color: var(--text-dim); margin-left: 3px; }
.fig dd.is-cost { color: var(--cost); }
.fig dd.is-save { color: var(--save); }

/* ── Tables ───────────────────────────────────────────────── */
.table-block { margin: 40px 0; }
.table-block > figcaption {
  font-family: 'Google Sans', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 12px;
}
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
thead th {
  text-align: left; font-family: 'Google Sans', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-dim); padding: 13px 16px; background: var(--surface); white-space: nowrap;
}
tbody td { padding: 13px 16px; border-top: 1px solid var(--border); vertical-align: baseline; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num { font-weight: 500; }
td.is-cost { color: var(--cost); }
td.is-save { color: var(--save); }
td .qual { display: block; font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
tfoot td { padding: 13px 16px; border-top: 2px solid var(--rule); font-weight: 700; background: var(--surface); }
.table-note { font-size: 14px; color: var(--text-dim); margin-top: 12px; line-height: 1.55; }

/* ── Charts (SVG) ─────────────────────────────────────────── */
.chart-block { margin: 44px 0; }
.chart-block > figcaption {
  font-family: 'Google Sans', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 18px;
}
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .c-label   { font: 500 13px 'Roboto', sans-serif; fill: var(--text); }
.chart .c-sub     { font: 400 11px 'Roboto', sans-serif; fill: var(--text-faint); }
.chart .c-val     { font: 500 12px 'Roboto', sans-serif; fill: var(--text-dim); font-variant-numeric: tabular-nums; }
.chart .c-val-lg  { font: 700 13px 'Google Sans', sans-serif; fill: var(--text); font-variant-numeric: tabular-nums; }
.chart .bar-vol   { fill: var(--rule); }
.chart .bar-cost  { fill: var(--amber); }
.chart .bar-track { fill: var(--surface); }
.chart .c-axis    { stroke: var(--border); stroke-width: 1; }
.chart-legend {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 16px; font-size: 13px; color: var(--text-dim);
}
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.chart-legend .k-vol  { background: var(--rule); }
.chart-legend .k-cost { background: var(--amber); }

/* ── Buyer qualification ──────────────────────────────────── */
.qualify { margin: 40px 0; }
.qualify h2 { margin-top: 0; }
.qualify ul { list-style: none; margin: 0; padding: 0; }
.qualify li { position: relative; padding-left: 27px; margin-bottom: 10px; font-size: 17px; line-height: 1.5; }
.qualify li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 13px; height: 2px; border-radius: 2px; background: var(--amber);
}
.qualify li.not::before { background: var(--text-faint); }
.qualify li.not { color: var(--text-dim); }

/* ── Method note ──────────────────────────────────────────── */
.method {
  background: var(--surface); border-radius: 12px; padding: 24px 28px;
  margin: 40px 0; font-size: 15px; line-height: 1.6; color: var(--text-dim);
}
.method h2 {
  font-family: 'Google Sans', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--text-dim); margin: 0 0 10px;
}
.method p { font-size: 15px; color: var(--text-dim); margin-bottom: 12px; }
.method p:last-child { margin-bottom: 0; }

/* ── Home: the promise strip ──────────────────────────────── */
/* Every serious newsletter in this category quantifies the ask up front.
   State the commitment before asking for the email. */
.promise {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: -18px 0 34px;
}
.promise span {
  font-size: 12.5px; font-weight: 500; letter-spacing: .03em;
  color: var(--text-dim); background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 13px;
}
.promise span strong { color: var(--text); font-weight: 700; }

/* ── Home: who writes it ──────────────────────────────────── */
.author-card {
  display: grid; grid-template-columns: auto 1fr; gap: 16px;
  align-items: start;
  border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 24px; margin: 40px 0 8px;
  background: var(--surface);
}
.author-card .avatar { width: 46px; height: 46px; font-size: 15px; }
.author-card .who {
  font-family: 'Google Sans', sans-serif; font-size: 16px;
  font-weight: 700; letter-spacing: .01em; margin-bottom: 5px;
}
.author-card p { font-size: 15px; line-height: 1.55; color: var(--text-dim); margin: 0 0 10px; }
.author-card .more {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  text-decoration-color: var(--amber); text-decoration-thickness: 2px;
  text-underline-offset: .15em;
}
.author-card .more:hover { color: var(--amber); }
@media (max-width: 560px) { .author-card { grid-template-columns: 1fr; } }

/* ── Home: section headers ────────────────────────────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding-bottom: 11px; margin: 56px 0 4px;
  border-bottom: 2px solid var(--ink);
}
:root[data-theme="dark"] .section-head { border-bottom-color: var(--text); }
.section-head h2 {
  font-family: 'Google Sans', sans-serif; font-size: 15px; font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase;
}
.section-head .note { font-size: 13px; color: var(--text-dim); }

/* ── Home: fast-lane feed ─────────────────────────────────── */
.feed { list-style: none; }
.feed li { border-bottom: 1px solid var(--border); }
.feed a {
  display: grid; grid-template-columns: 82px 1fr; gap: 18px;
  padding: 15px 0; text-decoration: none; color: inherit; align-items: baseline;
}
.feed a:hover .f-title { color: var(--amber); }
.feed .f-date {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-faint); padding-top: 3px; white-space: nowrap;
}
.feed .f-title { font-size: 17px; font-weight: 500; line-height: 1.4; transition: color .15s ease; }
.feed .f-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--amber); margin-left: 9px; white-space: nowrap;
}
.feed .f-dek { font-size: 14.5px; color: var(--text-dim); margin-top: 4px; }
@media (max-width: 560px) {
  .feed a { grid-template-columns: 1fr; gap: 5px; }
  .feed .f-date { padding-top: 0; }
}

/* ── Home: research entries ───────────────────────────────── */
.entry {
  display: grid; grid-template-columns: 128px 1fr; gap: 24px;
  padding: 26px 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; align-items: start;
}
.entry:hover h3 { color: var(--amber); }
.entry .thumb {
  border-radius: 8px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); aspect-ratio: 4 / 3;
}
.entry .thumb svg { width: 100%; height: 100%; display: block; }
.entry h3 {
  font-family: 'Google Sans', sans-serif; font-size: 23px; font-weight: 500;
  line-height: 1.25; letter-spacing: -0.015em; margin: 6px 0 9px;
  transition: color .15s ease; text-wrap: balance;
}
.entry p { color: var(--text-dim); font-size: 16px; margin-bottom: 10px; }
.entry .meta { font-size: 12.5px; color: var(--text-faint); }
@media (max-width: 560px) { .entry { grid-template-columns: 1fr; gap: 14px; } .entry .thumb { max-width: 160px; } }

/* ── Subscribe ────────────────────────────────────────────── */
.subscribe {
  border: 1px solid var(--rule); border-radius: 12px;
  padding: 32px; margin: 56px 0 40px; background: var(--surface);
}
.subscribe h2 {
  font-family: 'Google Sans', sans-serif; font-size: 25px; font-weight: 500;
  letter-spacing: -0.015em; margin: 0 0 8px;
}
.subscribe p { font-size: 16px; color: var(--text-dim); margin-bottom: 20px; }
.sub-form { display: flex; flex-wrap: wrap; gap: 10px; }
.sub-form input[type=email] {
  flex: 1 1 240px; min-width: 0; padding: 12px 16px;
  font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--rule); border-radius: 6px;
}
.sub-form input[type=email]:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.btn {
  padding: 12px 26px; font-family: 'Google Sans', sans-serif;
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
  color: var(--on-amber); background: var(--amber);
  border: none; border-radius: 6px; cursor: pointer;
  transition: filter .15s ease, transform .15s cubic-bezier(.22,1,.36,1);
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.sub-meta { font-size: 13px; color: var(--text-faint); margin-top: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 46px; padding-top: 30px; border-top: 1px solid var(--border); }
.tag { font-size: 12.5px; padding: 5px 13px; border-radius: 20px; background: var(--surface); color: var(--text-dim); }

footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px 52px;
  text-align: center; color: var(--text-faint); font-size: 13px;
}
footer .f-inner { max-width: var(--measure); margin: 0 auto; }
footer .f-mark {
  font-family: 'Google Sans', sans-serif; font-size: 14px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 10px;
}
footer .f-quip {
  color: var(--text-dim); font-size: 14px; line-height: 1.5;
  max-width: 34rem; margin: 0 auto 18px;
}
footer .f-legal {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--text-faint);
}
footer .f-legal .sep { color: var(--border); }
footer .f-legal .sra { color: var(--text-dim); font-weight: 500; letter-spacing: .04em; }
footer a { color: var(--text-dim); text-decoration-color: var(--border); }
footer a:hover { color: var(--amber); text-decoration-color: var(--amber); }

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