/* Shared by terms.html and privacy.html — the two long-form pages.
   index.html deliberately keeps its own inline <style> instead of using
   this: its CSS carries hard-won specificity fixes (see the comments in it
   and tests/test_marketing_site.py) and pulling them into a shared file
   would risk the live landing page to save a duplicated colour token.

   The tokens, nav and footer below are the same values index.html uses.
   If the brand colours change there, change them here too — there's no
   build step to do it for us.

   Loaded with an absolute href (/legal.css). It must stay absolute:
   wrangler.jsonc sets not_found_handling to "single-page-application", so
   a path that doesn't resolve is answered with index.html rather than a
   404 — a relative href that missed would quietly hand the browser an
   HTML document as a stylesheet and the page would render unstyled. */

:root {
  --paper: #FAFAFA;
  --paper-raised: #FFFFFF;
  --ink: #16181B;
  --ink-soft: #5B6169;
  --ink-faint: #9AA0A6;
  --line: #E6E6E4;
  --line-strong: #D6D6D3;
  --accent: #A8465A;
  --accent-deep: #8A3649;
  --accent-wash: #FBF4F5;
  --accent-border: #DCB9BE;
  --shadow: 0 1px 2px rgba(20,20,20,0.04), 0 8px 24px -14px rgba(20,20,20,0.14);

  --font-display: 'Avenir Next', 'Segoe UI Semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Mono', Consolas, 'Courier New', monospace;
}
/* Fixed light theme, matching the landing page and the app. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; background: var(--paper); font-family: var(--font-body); color: var(--ink); }
a { color: inherit; }

/* Narrower than the landing page's 880px: this is body text to be read
   line after line, and ~70 characters a line is where that stays
   comfortable. */
.wrap { max-width: 760px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent);
}

/* ── Nav (same 68px bar as the landing page) ── */
.nav {
  position: sticky; top: 0; z-index: 40; background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { max-width: 880px; }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.wordmark {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
  font-size: 1.1rem; color: var(--ink); text-decoration: none;
}
.nav-links { display: flex; gap: 24px; font-size: 0.9rem; color: var(--ink-soft); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ── Document head ── */
.doc-head { padding-top: 60px; padding-bottom: 30px; }
.doc-head h1 { font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.2; margin-top: 14px; }
.doc-meta {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint);
  margin-top: 18px; line-height: 1.9;
}
.doc-intro { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.75; margin-top: 20px; }

/* ── Contents ── */
.toc {
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper-raised);
  padding: 22px 24px; margin-top: 34px;
}
.toc-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); }
.toc ol { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 0.92rem; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* ── Body ── */
.doc-body { padding-top: 12px; padding-bottom: 72px; }
/* scroll-margin, not padding, and on the <section> rather than its heading:
   the nav bar is sticky, and it's the section that carries the id every
   contents link and every /terms#refunds link targets. Put this on the h2
   and the jump still tucks the heading under the nav — the browser scrolls
   to the element the hash names, which isn't the h2. */
.doc-body section { padding-top: 38px; scroll-margin-top: 76px; }
.doc-body section > h2 {
  font-size: 1.28rem; line-height: 1.35;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.doc-body section > h2 .num { color: var(--accent); font-family: var(--font-mono); font-size: 0.85rem; margin-right: 10px; }
.doc-body h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin-top: 24px; }
.doc-body p { margin: 14px 0 0; font-size: 0.97rem; line-height: 1.78; color: var(--ink-soft); }
.doc-body strong { color: var(--ink); font-weight: 600; }
.doc-body a { color: var(--accent); }
.doc-body a:hover { color: var(--accent-deep); }
.doc-body ul, .doc-body ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.doc-body li { font-size: 0.97rem; line-height: 1.75; color: var(--ink-soft); }
.doc-body li strong { color: var(--ink); }

/* Pulled-out passages. .callout is the plain one; .callout-accent marks the
   two clauses a reader most needs to have actually seen — the no-refunds
   rule and the statutory-rights carve-out that sits with it. */
.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
  border-radius: 0 10px 10px 0; background: var(--paper-raised);
  padding: 18px 22px; margin-top: 20px;
}
.callout-accent { border-color: var(--accent-border); border-left-color: var(--accent); background: var(--accent-wash); }
.callout p:first-child { margin-top: 0; }
.callout-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}

/* Who-we-share-with, what-we-collect: two columns of short facts. Falls to
   one column on a phone, where a two-column table of provider names would
   be unreadable. */
.facts { margin-top: 18px; border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 190px 1fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.fact-key { font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.fact-val { font-size: 0.93rem; line-height: 1.7; color: var(--ink-soft); }
.fact-val a { color: var(--accent); }

.contact-block {
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper-raised);
  box-shadow: var(--shadow); padding: 24px; margin-top: 22px;
}
.contact-block a {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--accent); text-decoration: none; word-break: break-all;
}
.contact-block a:hover { text-decoration: underline; }

/* ── Footer (matches index.html) ── */
footer { border-top: 1px solid var(--line); padding: 32px 0; }
footer .wrap { max-width: 880px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; font-size: 0.86rem; color: var(--ink-soft); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.foot-small { font-size: 0.76rem; color: var(--ink-faint); margin-top: 22px; line-height: 1.8; }

@media (max-width: 760px) {
  .nav-links { gap: 16px; font-size: 0.84rem; }
  .doc-head { padding-top: 40px; }
  .fact { grid-template-columns: 1fr; gap: 4px; }
}
