/* Quant Daily site chrome — the shared shell for every STATIC page (about, how-to-play,
   drill-types, faq, legal). The PWA itself is Tailwind; these pages are hand-written HTML
   that must render with zero JS and zero build step, so the chrome lives here instead.

   Deliberately ONE stylesheet for chrome AND content: Deduce's static pages each carry a
   duplicated <style> block, which is how they drifted apart. Here a page ships <head> meta
   + a link to this file and nothing else, so a typography change lands everywhere at once.

   Palette mirrors tailwind.config.js exactly (brand = the icon gradient's two stops,
   #0E7490 → #1E3A5F; ink = the warm stone ramp). Warm orange is the family rule: cool =
   reasoning (Deduce), warm = speed (Quant Daily). */

/* `hidden` MUST actually hide — this is a cascade trap, not a nicety (2026-09-03).
   The UA stylesheet's `[hidden] { display: none }` is the weakest rule in the cascade, so ANY
   author rule that sets `display` on the same element silently defeats it. `.cta` sets
   `display: inline-block`, which meant `<a class="cta" hidden>` rendered in full: /speed-kit's
   gated download link was visible before anyone typed an email, and the gate shipped as
   decoration. jsdom does not reproduce it (the `.hidden` PROPERTY is true either way) — only a
   real browser does, which is how it was caught. institutes.html had already hit the same trap
   and patched it locally with `.tablist[hidden]`; this is that fix made global so the next
   `hidden` element on any static page is hidden by default rather than by remembering. */
[hidden] { display: none !important; }

:root {
  --brand: #1E3A5F;
  --brand-mid: #0F766E;
  --brand-bright: #0E7490;
  --brand-tint: #F0F9FF;
  --brand-line: #BAE6FD;
  --ink: #1C1917;
  --ink-soft: #44403C;
  --muted: #78716C;
  --line: #E7E5E4;
  --bg: #FAFAF9;
  --card: #FFFFFF;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

/* Numerals are the product. Anything that shows a figure, a time limit or a worked step
   gets the same tabular monospace the drill screen uses (Drill.jsx font-drill). */
.num, .drill, table td, table th { font-variant-numeric: tabular-nums; }
.num, .drill { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; }

a { color: var(--brand); }
a:hover { color: var(--brand-mid); }

/* ── Header ──────────────────────────────────────────────────────────────── */

header.site {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

header.site .site-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

header.site .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}

header.site .brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }

.wordmark {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.wordmark .wm-accent { color: var(--brand); }
.wordmark .tagline {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-right { display: flex; align-items: center; gap: 6px; }

nav#site-nav a {
  margin-left: 15px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
nav#site-nav a:hover { color: var(--brand); }

/* The two things Quant Daily sells, sitting in a nav of otherwise free content links
   (2026-08-16). Colour and weight only: this nav collapses to a stacked drop-down of
   full-width rows under 820px, and anything box-like (pill, border, background) would
   have to be undone again at that breakpoint. Ink for the book, brand for Pro — a
   two-step lift off the grey, so the upgrade reads as the strongest item without a
   second primary competing with it. */
nav#site-nav a.offer { color: var(--ink); font-weight: 700; }
nav#site-nav a.offer.pro { color: var(--brand); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 8px;
  color: var(--ink-soft);
  cursor: pointer;
}

/* The account chip — mirrors the app header's rounded outline button so the two headers
   read as one product's chrome, not two. Stays visible at every width, same as the app. */
.header-signin {
  margin-left: 8px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.header-signin:hover { border-color: var(--brand-line); color: var(--brand); }

/* The app-shell breakpoint: on a phone the links collapse behind the hamburger, so the
   header never wraps into two lines above the content. */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  nav#site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 6px 20px 14px;
  }
  header.site.nav-open nav#site-nav { display: block; }
  nav#site-nav a { display: block; margin: 0; padding: 9px 0; font-size: 15px; border-top: 1px solid var(--line); }
}

/* ── Content ─────────────────────────────────────────────────────────────── */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 20px 64px;
}

h1 { font-size: 31px; line-height: 1.18; letter-spacing: -0.025em; margin: 6px 0 14px; font-weight: 800; }
h2 { font-size: 21px; line-height: 1.3; letter-spacing: -0.015em; margin: 34px 0 8px; font-weight: 800; }
h3 { font-size: 16.5px; margin: 22px 0 6px; font-weight: 700; }

.lede { font-size: 18px; color: var(--ink-soft); }
.muted { color: var(--muted); font-size: 14px; }
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0;
}

ul, ol { padding-left: 20px; }
li { margin: 6px 0; }

/* The answer card — used by FAQ and by any "question as a heading" block. Leading with
   the direct answer in the first sentence is deliberate: it's what an AI answer engine
   lifts, and it's what a hurried aspirant reads. */
.qa {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 17px;
  margin: 12px 0;
}
.qa h2, .qa h3 { font-size: 17px; margin: 0 0 5px; }
.qa p { margin: 0 0 8px; color: var(--ink-soft); }
.qa p:last-child { margin-bottom: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 14px 0;
}

.note {
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  padding: 14px 17px;
  margin: 16px 0;
}
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
tbody tr:hover { background: var(--brand-tint); }

.pill {
  display: inline-block;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 4px 6px 0;
}
.pill.vedic { border-color: var(--brand-line); background: var(--brand-tint); color: var(--brand); }

.cta {
  display: inline-block;
  margin: 22px 0 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(194, 65, 12, 0.24);
}
.cta:hover { background: var(--brand-mid); color: #fff; }

/* Lead-capture inputs (2026-08-11). /speed-kit's email box shipped completely unstyled — a raw
   browser control beside a branded pill button, reading as a half-built form on the exact
   element we are asking a stranger to trust. (/institutes and /landing were never affected:
   both carry their own page-local, higher-specificity form CSS, which is also why these rules
   change nothing there.) Scoped to `main` so the app shell is untouched, and to the control
   types these pages use. font: inherit is load-bearing — a bare input does NOT inherit the
   page font, so the placeholder rendered in the browser default while every word around it
   was Inter. */
main input[type="email"],
main input[type="text"],
main input[type="tel"],
main input[type="number"],
main textarea,
main select {
  font: inherit;
  font-size: 16px; /* < 16px makes iOS Safari zoom the page on focus. */
  width: 100%;
  max-width: 340px;
  padding: 11px 14px;
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
main textarea { max-width: 100%; }
main input:focus-visible,
main textarea:focus-visible,
main select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
/* A submit button inside a form is a <button class="cta">, and a button does NOT inherit the
   page font — the UA stylesheet gives it its own family and size, so every form's submit
   rendered in ~13px Arial beside 17px Inter link CTAs wearing the identical pill. `font:
   inherit` fixes that, but the shorthand also resets .cta's font-weight, hence re-asserting
   700 after it. The margin/baseline bits keep it level with the input beside it. */
main form .cta {
  font: inherit;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  vertical-align: middle;
  margin-top: 10px;
}

/* The family bridge — the cross-promotion the 2026-07-30 separate-products decision made
   mandatory. Styled as a distinct block on every page so it reads as "our other product",
   never as an ad. */
.family {
  border: 1px dashed var(--brand-line);
  background: #fff;
  border-radius: 14px;
  padding: 14px 17px;
  margin: 30px 0 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.family strong { color: var(--ink); }

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer.site {
  background: #fff;
  border-top: 1px solid var(--line);
  margin-top: 30px;
}

footer.site .site-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 20px 34px;
}

.foot-group { margin-bottom: 16px; }
.foot-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-links a { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.foot-links a:hover { color: var(--brand); }

/* Offer row (2026-08-16) — the Speed Book and Pro were grey text links in the middle of
   "Learn", reading exactly like the free pages beside them. Buttons now: filled for the book,
   `.ghost` outlined for the subscription, so the row is one primary + one secondary rather
   than two competing CTAs. Left-aligned to match .foot-links on this site (Deduce's twin of
   this block is centred, matching its own footer). landing.html re-expresses these rules
   inline because it loads no external stylesheet — change both together. */
.foot-cta { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-cta a {
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 7px 15px;
  border: 1.5px solid var(--brand);
  background: var(--brand);
  color: #fff;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.foot-cta a:hover {
  background: var(--brand-mid, var(--brand));
  border-color: var(--brand-mid, var(--brand));
  color: #fff;
}
.foot-cta a.ghost { background: transparent; color: var(--brand); }
.foot-cta a.ghost:hover { background: var(--brand-tint, transparent); color: var(--brand); border-color: var(--brand); }
/* The free PDF: a button like the two paid ones, but tinted and hairline-bordered so the
   row still reads as one primary (the book), one secondary (Pro), one free extra. */
.foot-cta a.free {
  background: var(--brand-tint, transparent);
  color: var(--brand);
  border-color: var(--brand-line, var(--brand));
  font-weight: 600;
}
.foot-cta a.free:hover { background: var(--brand-tint, transparent); color: var(--brand); border-color: var(--brand); }
/* The institutes CTA: a button, but in neutral ink. It addresses a different reader (an
   institute owner, not an aspirant), so it must be findable without competing with the
   three offers beside it for a student's attention. */
.foot-cta a.institute {
  background: transparent;
  color: var(--ink, #1c1917);
  border-color: var(--line, #e7e5e4);
  font-weight: 600;
}
.foot-cta a.institute:hover { background: transparent; color: var(--brand); border-color: var(--brand); }

.foot-copy { font-size: 13px; color: var(--muted); margin: 18px 0 2px; }
.foot-company { font-size: 12.5px; color: var(--muted); margin: 0; }

/* ── Topic pages (/drill-types/<topic>) ──────────────────────────────────────
   Added 2026-08-05 for the generated SEO topic pages (tools/quantdaily-seo-gen).
   They live HERE, not in a per-page <style> block, for the reason this file's header
   already gives: one stylesheet for chrome and content is what keeps these pages from
   drifting apart the way Deduce's duplicated blocks did. */

/* The answer-first block an AI answer engine lifts, and the first thing a hurried
   aspirant reads. Deliberately louder than .lede and quieter than a heading. */
.answer {
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  border-left: 4px solid var(--brand);
  border-radius: 14px;
  padding: 15px 18px;
  margin: 14px 0 18px;
  font-size: 17px;
  color: var(--ink-soft);
}

/* A baked practice question. Mirrors the drill screen's own order: the question lines
   first, the ask underneath, then the options — see Drill.jsx. */
.q-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 18px;
  margin: 14px 0;
}
.q-card h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.q-line { margin: 0 0 6px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.q-ask { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.opts { margin: 0; padding-left: 22px; font-variant-numeric: tabular-nums; }
.opts li { margin: 3px 0; }

details { margin: 12px 0 0; }
details summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--brand); }
.walk { margin: 8px 0 2px; padding-left: 22px; color: var(--ink-soft); font-size: 14.5px; }
.walk li { margin: 4px 0; }

/* Numbered method steps. The counter is drawn rather than listed so the number keeps the
   brand colour and the tabular figures the rest of the product uses. */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 14px 0; }
.steps li {
  position: relative;
  padding: 13px 15px 13px 52px;
  margin: 10px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}
.steps h3 { margin: 0 0 3px; font-size: 15.5px; }
.steps p { margin: 0; color: var(--ink-soft); }

.topics { list-style: none; padding: 0; }
.topics li { margin: 9px 0; }
.topics a { font-weight: 700; text-decoration: none; }
.topics a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .answer { font-size: 16px; }
  .q-line { font-size: 16px; }
}

/* ── Testimonials ─────────────────────────────────────────────────────────────
 *  The block injected by `<!-- @include testimonials -->` (scripts/testimonials.cjs).
 *  These rules ship whether or not the marker resolves to anything: the block is empty
 *  until real, moderated, consented quotes exist, and CSS for a section that isn't there
 *  costs nothing — whereas a deploy that shipped the quotes and forgot the styling would
 *  put unstyled text under the footer of every hub page.
 *
 *  Restrained on purpose. Stars, avatars and five-column marquees are the visual grammar
 *  of bought social proof; the whole value of these lines is that they are the opposite
 *  of that, so they are set as quotations and left to be read. */
.testimonials {
  margin: 2.5rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.testimonials h2 {
  font-size: 1.05rem;
  margin: 0 0 1rem;
  color: var(--ink);
}
.testimonial {
  margin: 0 0 1.1rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--line);
}
.testimonial blockquote {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.testimonial blockquote::before { content: "\201C"; }
.testimonial blockquote::after  { content: "\201D"; }
.testimonial figcaption {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted-faint, var(--muted));
}
.testimonials-note {
  margin: 1.1rem 0 0;
  font-size: 0.8rem;
  color: var(--muted-faint, var(--muted));
}

/* ─────────────────────────────────────────────────────────────────────────────
   QUESTION BANKS — /questions/<slug>, generated by tools/question-bank-gen.
   ─────────────────────────────────────────────────────────────────────────────
   Same reason as the block above: these pages ship <head> meta plus a link to this
   file and nothing else, so their content classes live here rather than in 32
   duplicated <style> blocks that would drift the moment one page was regenerated.

   They REUSE what is already defined above — .q-card, .opts, details/.walk, .cta,
   .lede, .topics, .pill. Only the four things a bank page needs and a drill-type
   page never did are new. Deduce carries the mirror of this in a per-page <style>,
   which is that product's own convention (web/public/reasoning/* does the same). */

/* The question stem. `.q-line` above is sized for a single arithmetic expression;
   a bank stem can be a two-line word problem, so it wraps at body measure. */
.q-card .setup { margin: 0 0 8px; font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.q-card .ctx { margin: 0 0 4px; }
.q-card .ctx p { margin: 4px 0; font-variant-numeric: tabular-nums; }
.q-card .ask { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.q-card .clues { margin: 8px 0 4px; padding-left: 22px; }
.q-card .clues li { margin: 4px 0; }

/* The download panel. This is the page's primary action — the whole cluster is PDF
   intent — so it sits above the fold and reads as an offer, not a footnote. */
.dl {
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0 8px;
}
.dl p { margin: 0; }
.dl .dl-line { margin-top: 9px; font-size: 14.5px; color: var(--ink-soft); }
.dl-btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
}
.dl-btn:hover { background: var(--brand-mid); color: #fff; }

/* Small print: the engine-provenance line and the affiliation disclaimer. `.muted`
   above does the same job, but a bank page also uses it inside .dl, where the
   surface is tinted — one class, so the two can't drift. */
.fine { color: var(--muted); font-size: 14px; }
