/* Mini — site styles for mini.dailyqz.com.
   Shared by index.html, 404.html and the legal pages (privacy, terms,
   consumer-health-data). Tokens mirror the app's default "Classic" scheme in
   app/theme/schemes.ts — light #F8EFFD / #7611AC / #62045A, dark #1D012C —
   so the site and the app read as one thing. Every text/background pair below
   clears WCAG AA (most clear AAA); re-check if you retune a token. */

/* ---- fonts: the app's three families, subset to Latin, served from here.
   No Google Fonts request — a privacy-first product's site should not leak
   visitor IPs to a font CDN. Licence: /fonts/OFL.txt. */
@font-face { font-family: "Fredoka"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/fonts/Fredoka-Bold.woff2") format("woff2"); }
@font-face { font-family: "Shantell Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/fonts/ShantellSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Shantell Sans"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/fonts/ShantellSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "Shantell Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/fonts/ShantellSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/fonts/SpaceGrotesk-Medium.woff2") format("woff2"); }

/* ---- tokens ---- */
:root {
  color-scheme: light dark;
  --bg: #F8EFFD;
  --surface: #FFFFFF;
  --surface-2: #F1E4FA;
  --text: #25102F;
  --muted: #5E4A68;
  --primary: #7611AC;        /* fills: buttons, the face, chart ink */
  --on-primary: #FFFFFF;
  --ink-brand: #7611AC;      /* brand-coloured text on the page background */
  --link: #62045A;
  --border: #E4D3EF;
  --tint: rgba(118, 17, 172, .10);
  --tint-2: rgba(118, 17, 172, .18);
  --band: #2A0F3B;           /* the privacy band is always night-plum */
  --band-text: #F4ECF8;
  --band-muted: #C3B2CF;
  --band-link: #E9B6FF;
  --shadow: 0 14px 40px rgba(98, 4, 90, .12);
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1D012C;
    --surface: #2A0F3B;
    --surface-2: #351650;
    --text: #F4ECF8;
    --muted: #C3B2CF;
    --ink-brand: #D2A3F5;    /* #7611AC is 2.2:1 on the dark bg — never use it for text there */
    --link: #E9B6FF;
    --border: #42245A;
    --tint: rgba(210, 163, 245, .12);
    --tint-2: rgba(210, 163, 245, .22);
    --band: #12001D;
    --shadow: 0 14px 40px rgba(0, 0, 0, .45);
  }
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Shantell Sans", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
h1, h2, h3 { font-family: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif; font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.8vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink-brand); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }
.num { font-family: "Space Grotesk", ui-monospace, monospace; font-weight: 500; font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- the Mini face (code-drawn, like app/components/MiniFace.tsx) ---- */
.face { width: 48px; height: 48px; color: var(--primary); display: inline-block; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .face { color: var(--ink-brand); } }

/* ---- header ---- */
.site-header { padding: 22px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .face { width: 38px; height: 38px; }
.brand-name { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-size: 1.55rem; line-height: 1; color: var(--ink-brand); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-weight: 500; font-size: .98rem; }
.nav a { text-decoration: none; color: var(--text); padding: 6px 0; }
.nav a:hover { color: var(--ink-brand); text-decoration: underline; }

/* ---- hero ---- */
.hero { padding: 40px 0 56px; }
.hero .container { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 500; color: var(--ink-brand); background: var(--tint); border-radius: 999px; padding: 6px 14px; font-size: .92rem; margin-bottom: 18px; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.28rem); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 14px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 13px 22px; font-weight: 700; text-decoration: none; line-height: 1; }
.pill-primary { background: var(--primary); color: var(--on-primary); }
.pill-primary:hover { filter: brightness(1.08); }
.pill-soon { background: var(--surface-2); color: var(--text); border: 1px dashed var(--border); font-weight: 500; }
.pill-soon .store { font-weight: 700; }
.arrow-link { font-weight: 500; }
.hero-note { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---- phone illustration ---- */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 300px; padding: 12px; border-radius: 44px; background: #25102F;
  box-shadow: var(--shadow); position: relative; isolation: isolate;
}
.phone::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 108px; height: 26px; background: #25102F; border-radius: 0 0 16px 16px; z-index: 2; }
.screen { background: var(--bg); border-radius: 34px; padding: 40px 14px 10px; display: grid; gap: 10px; font-size: 13px; line-height: 1.35; }
.greet { display: flex; align-items: center; gap: 10px; padding: 2px 4px 4px; }
.greet .face { width: 40px; height: 40px; flex: none; }
.greet-hi { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-size: 17px; color: var(--text); }
.greet-sub { color: var(--muted); font-size: 12px; }
.m-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; }
.m-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.m-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 500; }
.m-btn { display: inline-block; margin-top: 8px; background: var(--primary); color: var(--on-primary); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; }
.spark { width: 100%; height: 64px; display: block; margin: 2px 0; color: var(--primary); }
.m-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.bubbles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 6px; }
.bubbles span {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700;
  color: var(--text); background: color-mix(in srgb, var(--primary) calc(var(--v) * 100%), var(--surface-2));
}
.bubbles span[style*="--v:.8"], .bubbles span[style*="--v:.7"], .bubbles span[style*="--v:.55"] { color: var(--on-primary); }
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin-top: 4px; padding: 8px 0 2px; border-top: 1px solid var(--border); font-size: 10.5px; text-align: center; color: var(--muted); }
.tabbar span { display: grid; place-items: center; gap: 2px; }
.tabbar .on { color: var(--ink-brand); font-weight: 700; }
.tabbar .face { width: 18px; height: 18px; }
.tabbar i { display: block; width: 18px; height: 18px; border-radius: 6px; background: var(--tint-2); }
.tabbar .on i { background: var(--primary); }

/* ---- sections ---- */
.section { padding: 56px 0; }
.section-head { max-width: 40em; margin-bottom: 28px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 18px; }
.card h3 { margin: 12px 0 6px; }
.card p { margin: 0; color: var(--muted); }
.card-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--ink-brand); display: grid; place-items: center; }
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-icon .face { width: 28px; height: 28px; color: var(--ink-brand); }

/* ---- privacy band ---- */
.band { background: var(--band); color: var(--band-text); padding: 64px 0; }
.band h2 { color: #FFFFFF; }
.band .section-head p, .band .band-foot { color: var(--band-muted); }
.band a { color: var(--band-link); }
.claims { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 28px; }
.claims li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.02rem; }
.claims .ck { flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(233, 182, 255, .16); color: var(--band-link); margin-top: 2px; }
.claims .ck svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.band-foot { margin: 30px 0 0; font-size: 1rem; }

/* ---- faces + schemes ---- */
.faces { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 14px; margin: 0 0 34px; }
.face-item { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 8px 12px; text-align: center; }
.face-item .face { width: 56px; height: 56px; }
.face-item figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.schemes { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--chip-bg); color: var(--chip-ink); border-radius: 999px; padding: 7px 14px 7px 8px; font-weight: 500; font-size: .95rem; border: 1px solid rgba(37, 16, 47, .08); }
.chip .face { width: 26px; height: 26px; color: var(--chip-ink); }

/* ---- disclaimer + get the app + footer ---- */
.disclaimer { border: 1px solid var(--border); border-left: 4px solid var(--primary); background: var(--surface); border-radius: 14px; padding: 18px 22px; max-width: 52em; }
.disclaimer p { margin: 0; }
.get { text-align: center; }
.get .cta-row { justify-content: center; }
.get .section-head { margin: 0 auto 8px; }
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: .92rem; }
.site-footer .container { display: grid; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--text); }

/* ---- legal pages (privacy / terms / consumer health data) ----
   Long documents read better in a system sans than in a handwriting face; the
   headings keep the brand. Class names here are the ones those pages already use. */
.legal { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.6; }
.legal main { max-width: 720px; margin: 0 auto; padding: 32px 24px 64px; }
.legal h1 { font-size: 2rem; margin: 8px 0 4px; }
.legal h2 { font-size: 1.3rem; margin: 32px 0 8px; color: var(--ink-brand); }
.legal h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.legal .meta { color: var(--muted); font-size: .85rem; }
.legal ul { padding-left: 22px; }
.legal .home { display: inline-block; margin-bottom: 18px; font-size: .9rem; }
.legal .summary { background: var(--surface-2); border-left: 3px solid var(--primary); border-radius: 8px; padding: 4px 20px 12px; margin: 20px 0 8px; }
.legal .summary p { margin: 8px 0; }
.legal table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .9rem; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal th { color: var(--ink-brand); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.legal .wrap { overflow-x: auto; }
.legal .note { color: var(--muted); font-size: .92rem; font-style: italic; }

/* ---- 404 ---- */
.oops { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.oops .face { width: 96px; height: 96px; margin-bottom: 12px; }

/* ---- responsive ---- */
@media (max-width: 880px) {
  .hero { padding-top: 16px; }
  .hero .container { grid-template-columns: 1fr; gap: 36px; }
  .phone-wrap { order: 2; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .section { padding: 44px 0; }
  .band { padding: 48px 0; }
  .pill { padding: 12px 18px; }
}
