/* Tarkika design system (Apple's neutral palette since 1 Dec 2026) for the pages Astro does not build (essays, news, My Library, the game, 404).
   The same tokens, type ladder and components as web/src/styles/global.css and web/src/components/apple/*,
   written as plain CSS so hand-written and generated HTML can use it. The top bar, product bar and footer markup
   comes from tools/chrome.py (Python pages) and /assets/chrome.mjs (written by chrome.py, for news/render.js).
   Source of truth for values: docs/brand/BRAND-BOOK.md and docs/brand/tokens.json. Keep the two CSS files in step. */

@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/geist-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/geist-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/assets/fonts/geist-mono-latin-wght-normal.woff2) format("woff2-variations"); }

:root {
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --canvas: #ffffff; --parchment: #f5f5f7; --pearl: #fbfbfd;
  --tile: #000000; --tile-1: #1d1d1f; --tile-2: #2d2d2f;
  --hairline: #d2d2d7; --hairline-dark: #424245;
  --ink: #1d1d1f; --ink-80: #424245; --ink-48: #6e6e73; --ink-on-dark: #f5f5f7; --ink-on-dark-muted: #a1a1a6;
  --blue: #0071e3; --blue-hover: #0077ed; --mint: #2997ff; --teal: #6e6e73; --deep: #1d1d1f; --ochre: #964734;
  --success: #248a3d; --danger: #e30000;
  --ease: cubic-bezier(.16,1,.3,1);
  --gut: 20px; --max: 1024px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--canvas); color: var(--ink); }
body { font-family: var(--sans); font-size: 17px; line-height: 1.47; letter-spacing: -0.022em; -webkit-font-smoothing: antialiased; overflow-x: clip; min-height: 100dvh; }
h1, h2, h3, h4, h5, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.wrap.narrow { max-width: 760px; }
.sec { padding: 64px 0; }
@media (min-width: 768px) { .sec { padding: 96px 0; } }
.bg-white { background: var(--canvas); } .bg-parchment { background: var(--parchment); }
.tile-dark { background: #000000; color: var(--ink-on-dark); }
.center { text-align: center; }

/* type ladder: 600 for display, 400 for body, tighter tracking as size grows */
.hero-title { font-weight: 600; font-size: clamp(48px, 13vw, 96px); line-height: 1.04; letter-spacing: -0.015em; }
.display-lg { font-weight: 600; font-size: clamp(32px, 7.4vw, 64px); line-height: 1.07; letter-spacing: -0.009em; text-wrap: balance; }
.display-md { font-weight: 600; font-size: clamp(28px, 5.4vw, 48px); line-height: 1.08; letter-spacing: -0.003em; text-wrap: balance; }
.tagline { font-weight: 600; font-size: clamp(21px, 3.4vw, 28px); line-height: 1.14; letter-spacing: .004em; }
.lead { font-weight: 400; font-size: clamp(19px, 2.8vw, 24px); line-height: 1.35; letter-spacing: .009em; }
.eyebrow { font-weight: 600; font-size: 17px; color: #bf4800; }
.tile-dark .eyebrow { color: #f56300; }
.caption { font-size: 14px; line-height: 1.43; letter-spacing: -0.016em; }
.fine { font-size: 12px; line-height: 1.34; letter-spacing: -0.01em; color: var(--ink-48); }
.muted { color: var(--ink-48); } .tile-dark .muted { color: var(--ink-on-dark-muted); }
/* Apple's two-tone headline: the second clause in grey. */
.grad { color: #86868b; }
.grad-deep { color: #6e6e73; }

/* pills: the one action colour */
.pill-buy, .pill-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 980px; font-size: 17px; font-weight: 400; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s, color .2s, transform .15s ease-out; white-space: nowrap; }
.pill-buy { background: var(--blue); color: #fff; border: 0; }
.pill-buy:hover { background: var(--blue-hover); }
.pill-ghost { border: 1px solid var(--blue); color: var(--blue); background: transparent; }
.pill-ghost:hover { background: var(--blue); color: #fff; }
.pill-buy:active, .pill-ghost:active { transform: scale(.95); }
.pill-buy.lg { min-height: 52px; padding: 0 28px; font-size: 18px; }
.pill-buy.sm, .pill-ghost.sm { min-height: 32px; padding: 0 14px; font-size: 14px; }
.tile-dark .pill-ghost { border-color: var(--mint); color: var(--mint); }
.tile-dark .pill-ghost:hover { background: var(--mint); color: var(--deep); }
.link-more { color: var(--blue); font-size: 17px; }
.link-more:hover { text-decoration: underline; }
.tile-dark .link-more { color: var(--mint); }
.pills { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.center .pills { justify-content: center; }

.tile-card { background: var(--canvas); border-radius: 18px; }
.bg-white .tile-card { background: var(--parchment); }

/* logo */
.tk-logo { display: block; width: auto; overflow: visible; }
.tk-logo path { fill: none; stroke: #1d1d1f; stroke-width: 20; stroke-linecap: round; stroke-linejoin: round; }
.tk-logo.dark path { stroke: #f5f5f7; }
.tk-logo .dt { fill: var(--ochre); stroke: none; }
.tk-logo .tdot { fill: #1d1d1f; stroke: none; }
.tk-logo.dark .tdot { fill: #f5f5f7; }

/* global bar: 44px, dark, quiet links; folds into a menu on phones */
.tk-gnav { position: relative; z-index: 60; background: rgba(0,0,0,.95); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); color: var(--ink-on-dark-muted); font-size: 12px; letter-spacing: -0.01em; }
.tk-gnav .in { max-width: var(--max); margin: 0 auto; height: 44px; padding: 0 var(--gut); display: flex; align-items: center; justify-content: space-between; }
.tk-gnav .links { display: none; gap: 36px; }
.tk-gnav a:hover, .tk-gnav a[aria-current] { color: #fff; }
.tk-gnav .end { display: flex; align-items: center; gap: 20px; }
.tk-gnav details > summary { list-style: none; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; }
.tk-gnav details > summary::-webkit-details-marker { display: none; }
.tk-gnav details > summary i { display: block; width: 16px; height: 1.5px; background: currentColor; box-shadow: 0 5px 0 currentColor; transform: translateY(-2.5px); }
.tk-gnav details > nav { position: absolute; left: 0; right: 0; top: 44px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.95); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); padding: 16px 32px 32px; }
.tk-gnav details > nav a { display: block; padding: 12px 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-on-dark); }
@media (min-width: 640px) { .tk-gnav .links { display: flex; } .tk-gnav details { display: none; } }

/* product bar: 52px, sticky, frosted, the name and one pill */
.tk-sub { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(0,0,0,.1); background: rgba(255,255,255,.75); -webkit-backdrop-filter: saturate(1.5) blur(24px); backdrop-filter: saturate(1.5) blur(24px); }
.tk-sub .in { max-width: var(--max); margin: 0 auto; height: 52px; padding: 0 var(--gut); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tk-sub .name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-sub .end { display: flex; align-items: center; gap: 24px; font-size: 12px; color: var(--ink-80); flex-shrink: 0; }
.tk-sub .end a.l { display: none; } .tk-sub .end a.l:hover, .tk-sub .end a.l[aria-current] { color: var(--blue); }
.tk-sub .pill-buy { min-height: 28px; padding: 0 12px; font-size: 12px; }
@media (min-width: 640px) { .tk-sub .name { font-size: 21px; } .tk-sub .end a.l { display: block; } }

/* footer: parchment, small type: footnotes, link columns, the legal line */
.tk-foot { background: var(--parchment); }
.tk-foot .in { max-width: var(--max); margin: 0 auto; padding: 32px var(--gut) 40px; }
.tk-foot ol.notes { border-bottom: 1px solid var(--hairline); padding-bottom: 24px; display: grid; gap: 8px; }
.tk-foot .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; border-bottom: 1px solid var(--hairline); padding: 32px 0; }
.tk-foot .cols p { font-weight: 600; color: var(--ink-80); }
.tk-foot .cols ul { margin-top: 10px; display: grid; gap: 8px; }
.tk-foot a:hover { text-decoration: underline; }
.tk-foot .legal { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.tk-foot .legal span { display: flex; flex-wrap: wrap; gap: 4px 16px; }
@media (min-width: 640px) { .tk-foot .cols { grid-template-columns: repeat(4, 1fr); } .tk-foot .legal { flex-direction: row; align-items: center; justify-content: space-between; } }

/* forms (subscribe, sign-in) */
.field { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--hairline); background: #fff; font-size: 17px; }
.field:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: transparent; }
.tile-dark .field { background: var(--tile-1); border-color: var(--hairline-dark); color: var(--ink-on-dark); }
.sub-form { display: flex; gap: 10px; max-width: 440px; }
.center .sub-form { margin-left: auto; margin-right: auto; }
.sub-form .field { flex: 1; min-width: 0; border-radius: 980px; }
.okmsg:empty { display: none; }
.okmsg { margin-top: 12px; font-size: 14px; color: var(--success); }

/* list rows (essays, stories): a title, a line, quiet meta */
.rows { border-top: 1px solid var(--hairline); }
.row { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--hairline); transition: background .2s; }
.row .k { font-size: 14px; font-weight: 600; color: var(--teal); }
.row h3 { font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.row p { color: var(--ink-48); }
.row .m { font-size: 14px; color: var(--ink-48); }
a.row:hover h3 { color: var(--blue); }

/* scroll reveal: visible without JS; with JS (.rv-on on <html>) each .rv rises in once */
.rv-on .rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.rv-on .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
