/* Upwick site — "Wax & Ink" tokens (src/components/theme.ts). Dark only, like the app. */
/* Fonts are self-hosted Latin subsets (website/tools/fonts.py): no requests to Google. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/bricolage-700.woff") format("woff"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/bricolage-800.woff") format("woff"); }
@font-face { font-family: "Geist"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/geist-400.woff") format("woff"); }
@font-face { font-family: "Geist"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/geist-500.woff") format("woff"); }
@font-face { font-family: "Geist"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/geist-600.woff") format("woff"); }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/geist-mono-400.woff") format("woff"); }
@font-face { font-family: "Geist Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/geist-mono-500.woff") format("woff"); }
@font-face { font-family: "Geist Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/geist-mono-600.woff") format("woff"); }
:root {
  --ink-900: #0b0e14;
  --ink-800: #131822;
  --ink-700: #1b2230;
  --ink-600: #2b3445;
  --wax: #f4efe4;
  --fog: #a7afbd;
  --ash: #8c95a4;
  --mint: #86ebb8;
  --ember: #ee5f47;
  --tallow: #f5c451;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 20px;
  --max: 1120px;
  --read: 680px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink-900);
  color: var(--wax);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--mint); text-underline-offset: 3px; }
a:hover { color: var(--wax); }
:focus-visible { outline: 2px solid var(--tallow); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.mono { font-family: var(--mono); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.read { max-width: var(--read); }
.muted { color: var(--fog); }
.small { font-size: 0.9rem; }
.eyebrow { font: 500 0.8rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tallow); margin-bottom: 14px; display: block; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--wax); color: var(--ink-900); padding: 8px 12px; z-index: 10; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--ink-900) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ink-700); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: flex-end; color: var(--wax); text-decoration: none; font: 800 1.45rem/1 var(--display); letter-spacing: -0.03em; }
.brand i { display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 9px; height: 1.2em; margin: 0 1.5px 0.16em; }
.brand i::before { content: ""; width: 6px; height: 7px; border-radius: 4px; background: var(--tallow); margin-bottom: 2px; }
.brand i::after { content: ""; width: 6px; height: 0.5em; border-radius: 1.5px; background: var(--mint); box-shadow: 0 -5px 0 -2px var(--mint); }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav a { color: var(--fog); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 8px 10px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--wax); background: var(--ink-800); }
@media (max-width: 560px) { .nav a.hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 16px; font: 700 1.05rem/1 var(--display); text-decoration: none; border: 0; cursor: pointer; transition: transform 0.12s ease; }
.btn:active { transform: scale(0.98); }
.btn-wax { background: var(--wax); color: var(--ink-900); }
.btn-wax:hover { color: var(--ink-900); background: #fff; }
.btn-ghost { background: var(--ink-800); color: var(--wax); border: 1px solid var(--ink-600); }
.btn-ghost:hover { color: var(--wax); border-color: var(--ash); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.95rem; border-radius: 12px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

.btn-store { background: var(--wax); color: var(--ink-900); gap: 12px; min-height: 60px; padding: 0 24px 0 20px; text-align: left; }
.btn-store:hover { color: var(--ink-900); background: #fff; }
.btn-store .apple { width: 24px; height: 28px; }
.btn-store span { display: flex; flex-direction: column; font: 700 1.3rem/1.05 var(--display); }
.btn-store small { font: 500 0.72rem/1.2 var(--body); letter-spacing: 0.01em; }
.btn-store.soon { background: var(--ink-800); color: var(--wax); border: 1px solid var(--ink-600); cursor: default; }
.btn-store.btn-sm { min-height: 48px; padding: 0 16px 0 14px; }
.btn-store.btn-sm span { font-size: 1.05rem; }
.btn-store.btn-sm .apple { width: 18px; height: 22px; }
.nav-cta { margin-left: 6px; color: var(--ink-900) !important; background: var(--wax) !important; }
.nav-cta:hover { background: #fff !important; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } .hero { padding: 88px 0 64px; } }
.hero h1 em { font-style: normal; color: var(--mint); }
.lede { font-size: 1.2rem; color: var(--fog); max-width: 34ch; }
.note { font-size: 0.85rem; color: var(--ash); margin-top: 14px; }

/* Chart card */
.chart-card { background: var(--ink-800); border: 1px solid var(--ink-700); border-radius: var(--r); padding: 18px 16px 14px; }
.chart-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-head b { font: 800 1.3rem/1 var(--display); }
.chart-head .tf { font-family: var(--mono); color: var(--fog); }
.chart-head .sub { color: var(--fog); font-size: 0.9rem; width: 100%; }
.chart .grid { stroke: var(--ink-700); stroke-width: 1; }
.chart .axis { fill: var(--ash); font: 14px var(--mono); }
.chart .candle line { stroke-width: 1.3; }
.chart .candle.up line { stroke: var(--mint); }
.chart .candle.up rect { fill: var(--mint); }
.chart .candle.dn line { stroke: var(--ember); }
.chart .candle.dn rect { fill: var(--ember); }
.chart .candle.dim { opacity: 0.32; }
.chart .vol.up { fill: var(--mint); opacity: 0.45; }
.chart .vol.dn { fill: var(--ember); opacity: 0.45; }
.chart .freeze { stroke: var(--ash); stroke-dasharray: 4 5; opacity: 0.7; }
.chart .qmark { fill: var(--ash); font: 800 54px var(--display); }
.chart .ann-level { stroke: var(--wax); stroke-dasharray: 6 5; opacity: 0.7; }
.chart .ann-line { stroke: var(--wax); stroke-width: 2; opacity: 0.85; }
.chart .ann-zone { fill: var(--wax); opacity: 0.07; }
.chart .ann-dot { fill: var(--tallow); }
.chart .ann-label { fill: var(--wax); font: 600 15px var(--body); paint-order: stroke; stroke: var(--ink-800); stroke-width: 4px; }
.chart .ann-label.tallow { fill: var(--tallow); }
@media (max-width: 600px) {
  .chart .axis { font-size: 22px; }
  .chart .ann-label { font-size: 22px; }
  .chart .qmark { font-size: 72px; }
}
.call-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.call { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; border-radius: 16px; font: 700 1.05rem/1.1 var(--display); text-decoration: none; border: 0; cursor: pointer; }
.call span { font-size: 0.9rem; }
.call-up { background: var(--mint); color: var(--ink-900); }
.call-flat { background: var(--ink-700); color: var(--wax); }
.call-dn { background: var(--ember); color: var(--ink-900); }
.call:hover { filter: brightness(1.06); color: inherit; }
.call-up:hover, .call-dn:hover { color: var(--ink-900); }

/* Sections */
section { padding: 56px 0; }
@media (min-width: 900px) { section { padding: 88px 0; } }
.rule { border-top: 1px solid var(--ink-700); }
.steps { display: grid; gap: 16px; margin-top: 32px; counter-reset: s; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--ink-800); border: 1px solid var(--ink-700); border-radius: var(--r); padding: 24px; }
.step::before { counter-increment: s; content: "0" counter(s); font: 500 0.85rem var(--mono); color: var(--tallow); display: block; margin-bottom: 16px; }
.step p { color: var(--fog); margin: 0; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--ink-700); border: 1px solid var(--ink-700); border-radius: var(--r); overflow: hidden; margin-top: 32px; }
@media (min-width: 800px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--ink-900); padding: 22px 20px; }
.fact b { display: block; font: 500 2.1rem/1 var(--mono); color: var(--wax); margin-bottom: 8px; letter-spacing: -0.03em; }
.fact span { color: var(--fog); font-size: 0.92rem; }
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.verdict { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font: 600 0.85rem/1 var(--mono); }
.verdict.ok { background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); }
.verdict.fail { background: color-mix(in srgb, var(--ember) 18%, transparent); color: var(--ember); }
.phones { display: flex; gap: 16px; justify-content: center; }
.hero-phones { padding-bottom: 32px; }
.features { display: grid; gap: 28px 20px; margin-top: 36px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 960px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature .phone { width: 100%; max-width: 240px; margin: 0 auto 18px; transform: none !important; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--fog); font-size: 0.95rem; margin: 0; }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } .feature .phone { max-width: 220px; } }
.app-box { display: grid; gap: 20px; align-items: center; }
.app-box .phone { width: 150px; justify-self: center; transform: none; }
@media (min-width: 640px) { .app-box { grid-template-columns: 1fr 160px; } }
.get { background: linear-gradient(180deg, var(--ink-900), var(--ink-800)); }
.get-grid { display: grid; gap: 32px; align-items: center; }
.get-grid .phone { width: 220px; justify-self: center; transform: none; }
@media (min-width: 800px) { .get-grid { grid-template-columns: 1fr 260px; } }
.get h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.phone { width: min(260px, 46%); border-radius: 34px; border: 6px solid var(--ink-700); overflow: hidden; background: var(--ink-900); box-shadow: 0 30px 60px -30px #000; }
.phone:nth-child(2) { transform: translateY(32px); }
.units { display: grid; gap: 12px; margin-top: 32px; }
@media (min-width: 700px) { .units { grid-template-columns: repeat(2, 1fr); } }
.unit { display: block; background: var(--ink-800); border: 1px solid var(--ink-700); border-radius: 16px; padding: 18px 20px; text-decoration: none; color: var(--wax); }
.unit:hover { border-color: var(--ink-600); color: var(--wax); }
.unit small { font-family: var(--mono); color: var(--tallow); }
.unit strong { display: block; font: 700 1.15rem/1.2 var(--display); margin: 6px 0 4px; }
.unit span { color: var(--fog); font-size: 0.93rem; }

/* FAQ */
.faq { margin-top: 24px; }
.faq details { border-top: 1px solid var(--ink-700); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--ink-700); }
.faq summary { cursor: pointer; font: 700 1.1rem/1.3 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--ash); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--fog); margin: 12px 0 0; }

/* Article (guides) */
.crumbs { font-size: 0.85rem; color: var(--ash); padding-top: 28px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ink-600); }
.crumbs a { color: var(--fog); text-decoration: none; }
.article { padding: 20px 0 40px; }
.article h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-top: 12px; }
.byline { color: var(--ash); font-size: 0.88rem; margin-bottom: 28px; font-family: var(--mono); }
.answer { background: var(--ink-800); border-left: 3px solid var(--mint); border-radius: 0 16px 16px 0; padding: 18px 20px; margin: 0 0 32px; }
.answer p { margin: 0; font-size: 1.08rem; }
.answer p + p { margin-top: 10px; }
.article h2 { font-size: 1.7rem; margin-top: 48px; }
.article figure { margin: 20px 0 28px; }
.article figcaption { color: var(--fog); font-size: 0.9rem; margin-top: 10px; }
.article ul, .article ol { padding-left: 1.2em; }
.article li { margin-bottom: 6px; }
.check { background: var(--ink-800); border: 1px solid var(--ink-700); border-radius: var(--r); padding: 20px; margin: 24px 0; }
.check .eyebrow { margin-bottom: 10px; }
.check p.q { font-weight: 600; }
.check ol { list-style: upper-alpha; color: var(--fog); }
.check details { margin-top: 12px; }
.check summary { cursor: pointer; color: var(--mint); font-weight: 600; }
.check details p { margin: 10px 0 0; color: var(--fog); }
.real { display: grid; gap: 16px; }
.real .chart-card p { margin: 10px 0 0; color: var(--fog); font-size: 0.95rem; }
.cta-box { background: linear-gradient(160deg, var(--ink-700), var(--ink-800)); border: 1px solid var(--ink-600); border-radius: var(--r); padding: 28px 24px; margin: 40px 0; }
.cta-box h2, .cta-box h3 { margin-top: 0; }
.cta-box p { color: var(--fog); }
.pager { display: grid; gap: 12px; margin: 40px 0 0; }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--ink-700); border-radius: 16px; text-decoration: none; color: var(--wax); }
.pager a small { display: block; color: var(--ash); font-family: var(--mono); font-size: 0.78rem; margin-bottom: 4px; }
.pager a.next { text-align: right; }
.sources { font-size: 0.9rem; color: var(--fog); }
.toc-list { list-style: none; padding: 0; margin: 8px 0 0; }
.toc-list li { border-top: 1px solid var(--ink-700); }
.toc-list a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; text-decoration: none; color: var(--wax); }
.toc-list a span { color: var(--ash); font-family: var(--mono); font-size: 0.85rem; white-space: nowrap; }
.toc-list a:hover { color: var(--mint); }
.unit-block { margin-top: 40px; }
.unit-block h2 { margin-top: 0; font-size: 1.5rem; }

/* Legal */
.legal { padding: 40px 0 64px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.35rem; margin-top: 36px; }
.legal p, .legal li { color: #d9d4c9; }

/* Footer */
.site-foot { border-top: 1px solid var(--ink-700); padding: 40px 0 56px; color: var(--fog); font-size: 0.92rem; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-foot h2 { font: 600 0.8rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ash); margin-bottom: 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 8px; }
.site-foot a { color: var(--fog); text-decoration: none; }
.site-foot a:hover { color: var(--wax); }
.disclaimer { margin-top: 32px; font-size: 0.82rem; color: var(--ash); max-width: 80ch; }

@media (prefers-reduced-motion: no-preference) {
  .chart .ann-reveal { animation: fade 0.5s ease both; animation-delay: 0.9s; }
  @keyframes fade { from { opacity: 0; } }
}
