/* Self-hosted, latin subset. Plex Sans is variable (400 to 600); Newsreader is the 600 instance. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-var.woff2) format('woff2'); 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: 'Newsreader'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/newsreader-600-latin.woff2) format('woff2'); 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; }

:root {
  /* Frost and ink, with the two sides of every answer: violet (side A) and teal (side B). */
  --ink: #15132b;
  --ink-2: #4b4866;
  --ink-3: #66637e;
  --paper: #f6f7fb;
  --card: #ffffff;
  --line: #e3e5f0;
  --frost: #e9edff;
  --purple: #6a3df0;
  --purple-soft: #efeaff;
  --teal: #0b7a7c;
  --side-b: #0e9f9a;
  --teal-soft: #e1f5f3;
  --amber: #a14a06;
  --amber-soft: #fff4e5;
  --focus: #0f8b8d;
  --r-l: 26px;
  --r-m: 18px;
  --r-s: 12px;
  --lift: 0 1px 2px rgb(21 19 43 / 0.05), 0 14px 34px -14px rgb(21 19 43 / 0.22);
  --serif-en: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans-en: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --serif: var(--serif-en);
  --sans: var(--sans-en);
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --measure: 720px;
  color-scheme: light dark;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #eceaf7; --ink-2: #c4bfd6; --ink-3: #9d97b2; --paper: #0f0e1a; --card: #181628; --line: #2a2740; --frost: #1c1a33;
    --purple: #ad97ff; --purple-soft: #261d45; --teal: #4fd1c5; --side-b: #2cc4bb; --teal-soft: #12302f; --amber: #f6ad55; --amber-soft: #33240f;
    --focus: #4fd1c5; --lift: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 36px -16px rgb(0 0 0 / 0.6); }
}
:root[data-theme="dark"] { --ink: #eceaf7; --ink-2: #c4bfd6; --ink-3: #9d97b2; --paper: #0f0e1a; --card: #181628; --line: #2a2740; --frost: #1c1a33;
    --purple: #ad97ff; --purple-soft: #261d45; --teal: #4fd1c5; --side-b: #2cc4bb; --teal-soft: #12302f; --amber: #f6ad55; --amber-soft: #33240f;
    --focus: #4fd1c5; --lift: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 36px -16px rgb(0 0 0 / 0.6); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); overflow-wrap: break-word; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--purple); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 20; background: var(--card); padding: 8px 12px; border-radius: 6px; }
.skip:focus { top: 8px; }
.label { font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal); margin: 0 0 8px; }

/* Header */
/* Two bars: the top one (logo, menu, Subscribe) always stays; the second (search, topics) slides up under it
   while reading down and comes back on any scroll up. ui.js sets .tuck; without JS both bars just stay. */
.site-head { position: sticky; top: 0; z-index: 5; pointer-events: none; }
.head-bar, .head-tools { pointer-events: auto; background: var(--paper); }
.head-bar { position: relative; z-index: 3; }
.head-tools { position: relative; z-index: 1; border-bottom: 1px solid var(--line); transition: transform .25s ease, visibility 0s; }
.tuck .head-tools { transform: translateY(-100%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
.tuck .head-bar { box-shadow: 0 1px 0 var(--line); }
@supports (backdrop-filter: blur(1px)) {
  .head-bar, .head-tools { background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); }
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { font: 600 24px/1 var(--serif); text-decoration: none; color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.brand-logo { width: 32px; height: 32px; flex: none; }
.brand .dot { color: var(--teal); }
.brand .tld { color: var(--purple); }
.head-sub { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 16px 0 13px; border-radius: 999px; background: var(--purple); color: #fff; font: 600 15px/1 var(--sans); text-decoration: none; }
.head-sub:hover { color: #fff; filter: brightness(1.08); }
.head-sub svg { width: 18px; height: 18px; flex: none; }
/* Phones: a lighter, text-only Subscribe so the logo and menu keep their room */
@media (max-width: 719px) {
  .head-sub { min-height: 34px; padding: 0 13px; gap: 0; font-size: 14px; background: var(--purple-soft); color: var(--purple); }
  .head-sub:hover { color: var(--purple); }
  .head-sub svg { display: none; }
}
.theme-btn { display: none; flex: none; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); cursor: pointer; }
.theme-btn:hover { color: var(--purple); }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .i-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; } :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; } }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
.tools-row { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; padding-bottom: 8px; }
.search { min-width: 0; position: relative; }
.search::before { content: ""; position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; margin-top: -8px; pointer-events: none; background: var(--ink-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") center / contain no-repeat; }
.search input { font: 16px var(--sans); padding: 8px 14px 8px 38px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); width: 100%; }
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font: 500 14px var(--sans); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.cats a:hover { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 40%, var(--line)); }
.cats a[aria-current="page"] { color: var(--purple); background: var(--purple-soft); border-color: transparent; font-weight: 600; }
/* Phone menu: lines that fold into an X, a panel of section tiles dropping from under the top bar, a dimmed page */
.menu-btn { flex: none; width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.head-sub { margin-left: auto; }
html:not(.js) .menu-btn { display: none; }
.menu-ico { position: relative; width: 18px; height: 12px; }
.menu-ico i { position: absolute; left: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .15s, width .25s ease; }
.menu-ico i:nth-child(1) { top: 0; width: 18px; }
.menu-ico i:nth-child(2) { top: 5px; width: 11px; }
.menu-ico i:nth-child(3) { top: 10px; width: 15px; }
.menu-open .head-bar { background: var(--paper); }
.menu-open .menu-btn { color: var(--purple); border-color: var(--purple); }
.menu-open .menu-ico i:nth-child(1) { width: 18px; transform: translateY(5px) rotate(45deg); }
.menu-open .menu-ico i:nth-child(2) { opacity: 0; transform: translateX(6px); }
.menu-open .menu-ico i:nth-child(3) { width: 18px; transform: translateY(-5px) rotate(-45deg); }
.menu-scrim { position: fixed; inset: 0; z-index: 2; background: rgb(18 12 48 / 0.4); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.site-menu { position: absolute; left: 0; right: 0; top: 58px; z-index: 3; background: var(--paper); border-bottom: 1px solid var(--line); border-radius: 0 0 20px 20px; box-shadow: 0 24px 40px -24px rgb(18 12 48 / 0.45); padding: 10px 0 18px;
  max-height: calc(100dvh - 58px - var(--tab-h) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-12px); transition: opacity .2s, transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s .28s; }
.menu-open .menu-scrim, .menu-open .site-menu { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .2s, transform .28s cubic-bezier(.2, .8, .2, 1); }
.menu-open .site-menu { transform: none; }
.menu-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.menu-tiles a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink-2); font: 600 14px/1.2 var(--sans); text-decoration: none;
  opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .25s, transform .3s cubic-bezier(.2, .8, .2, 1), background .15s; }
.menu-tiles a:hover, .menu-tiles a[aria-current="page"] { color: var(--purple); background: var(--purple-soft); border-color: transparent; }
.menu-tiles svg { width: 26px; height: 26px; }
.menu-open .menu-tiles a { opacity: 1; transform: none; }
.menu-open .menu-tiles a:nth-child(2) { transition-delay: 30ms; }
.menu-open .menu-tiles a:nth-child(3) { transition-delay: 60ms; }
.menu-open .menu-tiles a:nth-child(4) { transition-delay: 90ms; }
.menu-open .menu-tiles a:nth-child(5) { transition-delay: 120ms; }
.menu-open .menu-tiles a:nth-child(6) { transition-delay: 150ms; }
.menu-more { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 14px 2px 0; font-size: 15px; }
.menu-more a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.menu-lock, .menu-lock body { overflow: hidden; }
.menu-theme { display: flex; align-items: center; gap: 4px; margin: 14px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.menu-theme span { flex: 1; padding-left: 12px; font: 600 14px var(--sans); color: var(--ink-2); }
.menu-theme button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 600 14px var(--sans); cursor: pointer; }
.menu-theme button[aria-pressed="true"] { background: var(--purple); color: #fff; }
html:not(.js) .menu-theme { display: none; }
@media (max-width: 359px) { .brand { font-size: 21px; } .brand-logo { width: 28px; height: 28px; } .head-sub { padding: 0 12px 0 10px; font-size: 14px; } .head-row { gap: 8px; } }
@media (prefers-reduced-motion: reduce) {
  .head-tools, .tuck .head-tools, .menu-ico i, .menu-scrim, .site-menu, .menu-tiles a { transition: none !important; }
  .site-menu, .menu-tiles a { transform: none; }
}

/* Home hero: headline left, the prism stage right (live 3D from hero3d.js over the facet poster) */
.hero { display: grid; gap: 4px 40px; align-items: center; padding: 26px 0 8px; }
.hero h1 { font: 600 clamp(38px, 8.4vw, 72px)/1.0 var(--serif); letter-spacing: -0.035em; margin: 0 0 16px; max-width: 12ch; }
.lede { color: var(--ink-2); font-size: 18px; max-width: 46ch; margin: 0 0 8px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.hero-note { margin: 16px 0 0; font-size: 14px; color: var(--ink-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 16px var(--sans); text-decoration: none; }
.btn:hover { color: var(--paper); background: var(--purple); }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-quiet:hover { color: var(--purple); background: var(--purple-soft); }
.hero-stage { position: relative; aspect-ratio: 16 / 10; max-height: 300px; width: 100%; margin: 0 auto; }
.hero-stage .fx-hero, .hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-canvas { opacity: 0; transition: opacity 0.8s ease; }
.hero-stage.is-live .hero-canvas { opacity: 1; }
.hero-stage.is-live .fx-hero { opacity: 0; transition: opacity 0.8s ease; }
.list-head { padding: 28px 0 8px; }
.list-head h1 { font: 600 clamp(30px, 5vw, 44px)/1.1 var(--serif); letter-spacing: -0.02em; margin: 0 0 8px; }
.section-h { font: 600 26px/1.2 var(--serif); letter-spacing: -0.015em; margin: 44px 0 16px; color: var(--ink); }

/* Cards: a picture (cover photo or the post's own facet) above the answer */
.grid-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 24px; padding: 8px 0; }
.card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-visual { display: block; position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-m); overflow: hidden; background: hsl(var(--h, 250) 70% 92%); box-shadow: var(--lift); }
.card-visual img, .card-visual svg, .post-visual img, .post-visual svg, .fc-cover svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 13px; }
.card-kicker:empty { display: none; }
.card-kicker .badge { margin: 0; }
.news-pill { font: 600 13px var(--sans); color: #fff; background: #d6293e; padding: 3px 11px; border-radius: 999px; text-decoration: none; }
.news-pill:hover { color: #fff; background: #b81f33; }
.series-pill { display: inline-flex; align-items: center; gap: 5px; font: 600 13px var(--sans); color: var(--purple); background: var(--purple-soft); padding: 3px 11px 3px 8px; border-radius: 999px; text-decoration: none; }
.series-pill svg { width: 15px; height: 15px; }
a.series-pill:hover { color: var(--purple); filter: brightness(0.97); }
.topic-pill { font: 600 13px var(--sans); color: hsl(var(--h, 250) 55% 30%); background: hsl(var(--h, 250) 85% 94%); padding: 3px 11px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.topic-pill:hover { color: hsl(var(--h, 250) 70% 22%); background: hsl(var(--h, 250) 85% 89%); }
.card h2 { font: 600 21px/1.25 var(--serif); margin: 0; letter-spacing: -0.01em; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover { color: var(--purple); }
.card-answer { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.card-facts, .trust { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; font-size: 13px; color: var(--ink-3); }
.trust { font-weight: 600; }
.more-link { align-self: flex-start; font-weight: 600; font-size: 15px; text-decoration: none; padding: 4px 0; }
.more-link:hover { text-decoration: underline; }
.card.is-sponsored .card-visual { outline: 3px solid var(--amber); outline-offset: -3px; }
.badge { display: inline-block; font: 600 12px var(--sans); padding: 3px 8px; border-radius: 6px; margin-bottom: 6px; }
.badge.sponsored { background: var(--amber); color: var(--paper); }
.empty { padding: 40px 0; color: var(--ink-3); }
.pager { display: flex; justify-content: space-between; padding: 28px 0 40px; font-weight: 600; }

/* The lead card and the "Also new" list beside it */
.lead-row { display: grid; gap: 28px 40px; padding: 18px 0 4px; }
.card.is-featured h2 { font-size: clamp(26px, 4.2vw, 36px); line-height: 1.12; letter-spacing: -0.02em; }
.card.is-featured .card-answer { -webkit-line-clamp: unset; line-clamp: unset; display: block; font-size: 18px; color: var(--ink); }
.card.is-featured .card-visual { border-radius: var(--r-l); }
.also .section-h { margin-top: 0; font-size: 20px; }
.also ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.also a { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.mini-visual { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-s); overflow: hidden; background: hsl(var(--h, 250) 70% 92%); }
.mini-visual svg, .mini-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mini-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-topic { font-size: 13px; font-weight: 600; color: hsl(var(--h, 250) 55% 30%); }
.mini-title { font: 600 17px/1.25 var(--serif); }
.also a:hover .mini-title { color: var(--purple); }

/* Topic tiles: the busiest topic is the big tile; each carries its own crystal */
.bento ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile a { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; min-height: 150px; padding: 16px 18px; border-radius: var(--r-l); overflow: hidden; text-decoration: none; color: hsl(var(--h) 60% 16%); background: linear-gradient(155deg, hsl(var(--h) 90% 96%), hsl(var(--h) 72% 87%)); }
.tile .fx { position: absolute; z-index: -1; right: -10%; top: 4%; width: 60%; height: auto; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tile a:hover .fx { transform: translateY(-6px) rotate(-4deg) scale(1.05); }
.tile-name { font: 600 19px/1.15 var(--serif); letter-spacing: -0.01em; max-width: 9ch; }
.tile-count { font-size: 13px; font-weight: 600; opacity: 0.75; }
.tile.is-empty a { filter: saturate(0.35); }
/* Phones: an odd last tile takes the whole row instead of leaving a hole beside it. */
@media (max-width: 899px) { .bento li:last-child:nth-child(odd) { grid-column: span 2; } }
.tile-big .tile-name { font-size: 21px; }

/* Post */
.post { max-width: 800px; margin: 0 auto; padding: 22px 0 16px; }
.post-hero { display: grid; gap: 16px 28px; margin: 0 0 20px; }
.post-hero h1 { margin: 10px 0 0; }
/* `.post h1` (later, same weight) zeroes the top margin, so the topic pill sat flush on the title; Tamil and
   Devanagari glyphs rise higher and need a little more room. */
.post-hero .card-kicker:not(:empty) + h1 { margin-top: 12px; }
:is(:lang(hi), :lang(ta)) .post-hero .card-kicker:not(:empty) + h1 { margin-top: 16px; }
.img-credit { margin: 6px 2px 0; font-size: 12px; color: var(--ink-3); }
.img-credit a { color: inherit; }
.prose figure { margin: 1.4em 0; }
.prose figure img { display: block; width: 100%; border-radius: var(--r-s); }
.prose figcaption { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.post-visual { position: relative; aspect-ratio: 16 / 7; border-radius: var(--r-m); overflow: hidden; background: hsl(var(--h, 250) 70% 92%); box-shadow: var(--lift); }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-3); }
.post h1 { font: 600 clamp(30px, 6vw, 46px)/1.08 var(--serif); letter-spacing: -0.025em; margin: 0 0 16px; }
.disclosure { background: var(--amber-soft); border: 1px solid var(--amber); color: var(--ink); padding: 12px 16px; border-radius: 10px; font-size: 15px; margin-bottom: 18px; }
/* The answer: one card, its edge running from side A to side B */
.answer { position: relative; font-size: 19px; line-height: 1.6; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px 20px 18px 26px; box-shadow: var(--lift); }
.answer::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--purple), var(--side-b)); }
.answer p { margin: 0 0 0.7em; }
.answer p:last-child { margin-bottom: 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--ink-3); margin: 14px 0 20px; }
.read-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 600 16px var(--sans); color: var(--purple); background: var(--card); border: 1.5px solid var(--purple); border-radius: 999px; padding: 8px 20px; cursor: pointer; margin: 0 0 8px; }
.read-more span { font-weight: 400; color: var(--ink-3); }
.read-more:hover { background: var(--purple-soft); }
html:not(.js) .read-more { display: none; }
.js .more:not(.open) { display: none; }
.more { scroll-margin-top: 110px; padding-top: 12px; }
.extras { margin-top: 8px; }

.prose { font-size: 18px; line-height: 1.7; }
.prose h2 { font: 600 24px/1.25 var(--serif); margin: 1.6em 0 0.4em; letter-spacing: -0.01em; scroll-margin-top: 110px; }
.prose h3 { font: 600 20px/1.3 var(--serif); margin: 1.4em 0 0.3em; }
.prose > :first-child { margin-top: 0; }
.prose code { font: 0.88em var(--mono); background: var(--purple-soft); padding: 2px 5px; border-radius: 4px; }
.prose pre { background: var(--card); border: 1px solid var(--line); padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 14px; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; margin: 1.4em 0; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--purple-soft); font-weight: 600; }
.prose blockquote { border-left: 3px solid var(--teal); margin: 1.2em 0; padding: 2px 0 2px 16px; color: var(--ink-2); }
.prose img { border-radius: 10px; }
sup.ref { line-height: 0; }
sup.ref a { position: relative; font-size: 0.7em; font-weight: 600; text-decoration: none; padding: 0 1px; }
sup.ref a::after { content: ''; position: absolute; inset: -12px -5px; }

.sources { margin-top: 32px; }
.sources h2, .related h2 { font: 600 22px/1.3 var(--serif); margin: 0 0 10px; }
.sources ol { padding-left: 22px; font-size: 15px; margin: 0; }
.sources li { margin: 6px 0; overflow-wrap: anywhere; scroll-margin-top: 110px; }
.sources li:target { background: var(--teal-soft); border-radius: 4px; }
.sources .dom { color: var(--ink-3); font-size: 13px; }
.tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { font-size: 13px; background: var(--purple-soft); padding: 4px 10px; border-radius: 999px; text-decoration: none; }
/* Share: big buttons in each network's own colour and mark */
.share { margin-top: 28px; }
.share h2 { font: 600 20px/1.3 var(--serif); margin: 0 0 12px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sh { --c: var(--ink); display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: var(--c); color: #fff; font: 600 15px var(--sans); text-decoration: none; cursor: pointer; }
.sh:hover { color: #fff; filter: brightness(1.1); }
.sh svg { flex: none; }
.sh-linkedin { --c: #0a66c2; }
.sh-whatsapp { --c: #1fa855; }
.sh-x { --c: #000; }
.sh-facebook { --c: #0866ff; }
.sh-telegram { --c: #229ed9; }
.sh-native { --c: var(--purple); }
.sh-copy { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.sh-copy:hover { color: var(--purple); filter: none; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .sh-x { box-shadow: inset 0 0 0 1.5px #3a3656; }
}
:where(:root[data-theme="dark"]) .sh-x { box-shadow: inset 0 0 0 1.5px #3a3656; }
@media (max-width: 520px) { .sh span { display: none; } .sh { padding: 0; width: 50px; justify-content: center; } .sh-native span, .sh-copy span { display: inline; } .sh-native, .sh-copy { width: auto; padding: 0 16px; } }
.method { margin-top: 24px; font-size: 14px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 14px; }
/* Ads: labelled, after the content, styled apart from posts so nobody mistakes one for an answer */
.ad { margin: 28px 0 28px; }
.ad-label { margin: 0 0 6px; font-size: 12px; color: var(--ink-3); }
.ad-link { position: relative; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 16px; align-items: center; padding: 18px 20px; border-radius: var(--r-m); text-decoration: none; color: #f4f2ff; background: radial-gradient(circle at 85% 20%, hsl(var(--h) 70% 34% / 0.9), transparent 60%), linear-gradient(135deg, #1b1836, #26214a); box-shadow: var(--lift); }
.ad-link:hover { color: #fff; }
.ad-mark img, .ad-initial { display: block; width: 44px; height: 44px; border-radius: 12px; background: #fff; padding: 4px; }
.ad-initial { display: grid; place-items: center; font: 600 22px var(--serif); color: #1b1836; }
.ad-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ad-head { font: 600 20px/1.25 var(--serif); letter-spacing: -0.01em; }
.ad-body { font-size: 15px; line-height: 1.5; color: #d6d2ee; }
.ad-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.ad-cta, .ad-wa { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 999px; font: 600 15px var(--sans); text-decoration: none; }
.ad-cta { background: #fff; color: #1b1836; }
/* The main button's hit area covers the whole card; the WhatsApp button sits above it. */
.ad-cta::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-m); }
.ad-link:hover .ad-cta { background: hsl(var(--h) 90% 92%); }
.ad-wa { position: relative; z-index: 1; color: #fff; background: #15803d; }
.ad-wa:hover { color: #fff; background: #116932; }
.ad-cta:focus-visible, .ad-wa:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ad-post { max-width: 800px; margin-left: auto; margin-right: auto; }
@media (min-width: 720px) {
  .ad-link { grid-template-columns: auto minmax(0, 1fr) auto; padding: 22px 26px; }
  .ad-actions { grid-column: auto; flex-direction: column; }
}
.money-note { margin-top: 20px; font-size: 14px; color: var(--ink-2); background: var(--amber-soft); border-radius: var(--r-s); padding: 10px 14px; }
.cite-line { margin-top: 20px; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.cite-line > span:first-child { font-weight: 600; }
.cta-line { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.cta-line a { color: var(--purple); font-weight: 600; }
.local { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 14px; padding: 14px 16px; margin: 4px 0 12px; }
.local h2 { display: flex; align-items: center; gap: 6px; font: 600 18px/1.3 var(--serif); margin: 0 0 6px; }
.local ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.local li a { color: var(--ink); font-weight: 600; text-decoration: none; }
.local li a:hover { color: var(--purple); }
.local time { color: var(--ink-3); font-size: 13px; margin-left: 4px; }
.contact-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.contact-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.contact-list span { min-width: 72px; font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.contact-list a { overflow-wrap: anywhere; }
.prose a.btn { display: inline-block; background: var(--purple); color: #fff; text-decoration: none; font-weight: 600; padding: 10px 18px; border-radius: 999px; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head h1 { margin-bottom: 4px; }
.profile-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; }
.related h2 .count { font: 600 14px var(--sans); color: var(--ink-3); margin-left: 6px; }
.related { max-width: 1080px; margin: 8px auto 40px; padding-top: 4px; }

/* Static pages */
.page { max-width: var(--measure); margin: 0 auto; padding: 28px 0 16px; }
.page h1 { font: 600 clamp(28px, 6vw, 40px)/1.15 var(--serif); margin: 0 0 14px; }
.page li { margin: 6px 0; }

/* Both sides, evidence */
.sides { margin: 16px 0 0; }
.sides > h2 { font: 600 21px/1.3 var(--serif); color: var(--ink); margin: 26px 0 10px; }
.sides-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.side { --c: var(--ink-3); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, var(--card)), var(--card) 75%); border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line)); border-radius: var(--r-s); padding: 14px 16px; }
.side-a { --c: var(--purple); }
.side-b { --c: var(--side-b); }
.side h3 { display: flex; align-items: center; gap: 8px; font: 600 15px/1.3 var(--sans); margin: 0 0 6px; color: var(--ink); }
.side h3::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); transform: rotate(45deg); }
.side p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.evidence { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13px; text-decoration: none; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; }
.evidence .ev-k { font-weight: 400; color: var(--ink-3); }
.ev-meter { display: inline-flex; gap: 2px; margin-right: 4px; }
.ev-meter i { width: 9px; height: 7px; border-radius: 2px; background: var(--line); }
.ev-meter i.on { background: var(--teal); }
.evidence.ev-disputed .ev-meter i { background: color-mix(in srgb, var(--amber) 40%, transparent); }
.evidence:hover { border-color: var(--teal); color: var(--teal); }
.evidence.ev-disputed { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.evidence.ev-disputed .ev-k { color: inherit; }
.origin { font-size: 12.5px; font-weight: 600; color: var(--purple); background: var(--purple-soft); border-radius: 4px; padding: 1px 7px; white-space: nowrap; }
.field-note { font-size: 14px; color: var(--ink-2); border-left: 3px solid var(--purple); padding: 2px 0 2px 12px; margin: 28px 0 0; }
.field-note + .sources { margin-top: 16px; }
.ev-list dt { font-weight: 600; margin-top: 12px; }
.ev-list dd { margin: 2px 0 0; color: var(--ink-2); }

/* Up next */
/* Series: where a post sits in its series, with the part before and after it (top: under the answer; end: after the post). */
.series-bar { border: 1.5px solid var(--purple-soft); border-radius: var(--r-l); padding: 14px; margin: 18px 0; background: var(--card); }
.series-end { max-width: 800px; margin: 8px auto 24px; }
.series-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 0 0 10px; font-size: 14px; }
.series-head a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--purple); text-decoration: none; }
.series-head a:hover span { text-decoration: underline; }
.series-head svg { width: 18px; height: 18px; flex: none; }
.series-n { color: var(--ink-3); font-weight: 600; }
.series-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.series-step { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 10px 12px; border-radius: 12px; background: var(--frost); color: var(--ink); text-decoration: none; }
.series-step.next { justify-content: flex-end; text-align: right; }
.series-step svg { width: 20px; height: 20px; flex: none; color: var(--purple); }
.series-step > span { display: grid; gap: 2px; min-width: 0; }
.step-k { font: 700 12px var(--sans); color: var(--purple); }
.step-t { font: 600 15px/1.3 var(--serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.series-step:hover { box-shadow: inset 0 0 0 1.5px var(--purple); }
.series-step.is-none { opacity: 0.75; }
.series-step.is-none .step-k { color: var(--ink-3); }
.series-step.is-none .step-t { font: 500 14px/1.3 var(--sans); color: var(--ink-3); }
.series-count { margin: 6px 0 0; font-weight: 600; color: var(--ink-2); }
.series-src { margin: 6px 0 0; font-size: 14px; color: var(--ink-3); }
.series-list { list-style: none; padding: 0; }
.series-list > li { min-width: 0; }
.part-n { margin: 0 0 6px; font: 700 14px var(--sans); color: var(--purple); }
.series-tiles { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 14px; max-width: 800px; }
.series-tiles a { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--card); color: var(--ink-2); text-decoration: none; }
.series-tiles strong { font: 600 22px/1.25 var(--serif); color: var(--ink); }
.series-tiles .series-pill { justify-self: start; }
@media (max-width: 479px) { .series-step { min-height: 0; padding: 10px; } .step-t { font-size: 14px; } }
.up-next { max-width: 800px; margin: 8px auto 24px; background: var(--frost); border-radius: var(--r-l); padding: 18px 20px 4px; }
.up-next .section-h { margin: 0 0 12px; font-size: 20px; }
.up-next .card { padding-bottom: 16px; }
.up-next .card-visual { aspect-ratio: 16 / 7; }
@media (min-width: 640px) {
  .up-next .card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
  .up-next .card-visual { aspect-ratio: 4 / 3; }
}

/* Main sections: header links on desktop, tab bar on phones */
:root { --tab-h: 56px; }
.site-nav { display: none; gap: 2px; margin-right: auto; }
.site-nav a { font: 600 15px var(--sans); color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--purple); background: var(--purple-soft); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; background: var(--paper); border-top: 1px solid var(--line); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: var(--tab-h); font: 600 12px var(--sans); color: var(--ink-3); text-decoration: none; }
.tabbar a[aria-current="page"] { color: var(--purple); }
.tabbar a:focus-visible { outline-offset: -4px; }
.tabbar svg { width: 24px; height: 24px; }
body { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }

/* Swipe feed: one full-height card per post, vertical snap; JS drags .fcard-in sideways */
.is-feed { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; padding-bottom: 0; }
.is-feed .site-head { display: none; }
.is-feed .head-tools { display: none; }
.feed-main { flex: 1; min-height: 0; position: relative; margin-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
.feed { position: relative; height: 100%; overflow-x: hidden; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; overflow-anchor: none; scrollbar-width: none; outline: 0; }
.feed::-webkit-scrollbar { display: none; }
.fcard { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)); }
.fcard-in { position: relative; flex: 1; min-width: 0; width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 14px; overflow: hidden; touch-action: pan-y; box-shadow: 0 1px 2px rgb(23 19 42 / 0.06), 0 10px 28px rgb(23 19 42 / 0.07); }
.fcard-in.is-sponsored { border-color: var(--amber); }
.fcard-in.drag { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.fcard-in.back { transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.fcard-in.fly { transition: transform 0.3s ease-in, opacity 0.3s ease-in; }
.stamp { position: absolute; top: 18px; z-index: 2; font: 700 22px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 12px; border: 3px solid; border-radius: 8px; background: var(--card); opacity: 0; pointer-events: none; }
.stamp-save { left: 16px; color: var(--teal); transform: rotate(-10deg); }
.stamp-skip { right: 16px; color: var(--ink-3); transform: rotate(10deg); }
.fc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: 13px; color: var(--ink-3); }
.fc-top .badge { margin: 0; }
.chip { font: 600 13px var(--sans); color: var(--teal); background: var(--teal-soft); padding: 3px 10px; border-radius: 999px; text-decoration: none; }
.fc-read { margin-left: auto; white-space: nowrap; }
.fc-cover { margin: 0; flex: 1 1 0; min-height: 0; max-height: 40%; border-radius: 12px; overflow: hidden; background: var(--line); }
.fc-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fc-cover { background: hsl(var(--h, 250) 70% 92%); }
/* Clipped, never its own scroll area: a nested scroller swallows swipes that start on the text (no save, skip or next card). The picture shrinks first, so answers fit. */
.fc-text { flex: 0 1 auto; min-height: 0; overflow: hidden; overflow: clip; }
.fc-text h2 { font: 600 clamp(22px, 6.2vw, 28px)/1.2 var(--serif); letter-spacing: -0.01em; margin: 0 0 8px; }
.fc-text h2 a { color: var(--ink); text-decoration: none; }
.fc-answer p { margin: 0 0 0.6em; font-size: 17px; line-height: 1.55; }
.fc-answer p:last-child { margin-bottom: 0; }
.fc-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.fc-more { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 999px; background: var(--purple); color: var(--paper); font: 600 16px var(--sans); text-decoration: none; }
.fc-more:hover { color: var(--paper); filter: brightness(1.08); }
.fact { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 46px; height: 46px; padding: 0; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font: 600 15px var(--sans); cursor: pointer; }
.fact svg { width: 22px; height: 22px; pointer-events: none; }
.fact:hover { border-color: var(--purple); color: var(--purple); }
.fact-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
html:not(.js) .fact { display: none; }
.fend .fcard-in { justify-content: center; text-align: center; padding: 28px 20px; }
.fend h2 { font: 600 28px/1.2 var(--serif); margin: 0 0 8px; }
.fend p { margin: 0 0 8px; color: var(--ink-2); }
.fend-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-weight: 600; margin-top: 12px !important; }
.fend:not(.done) .fend-done, .fend.done .fend-more { display: none; }
.feed-hint { display: none; }
/* Game bar and effects on the swipe feed (public/feed.js). Everything here is decoration: the feed works without it. */
.fhud { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px 16px; width: 100%; max-width: 664px; margin: 0 auto; padding: 8px max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); font: 600 14px var(--sans); color: var(--ink-2); }
.fhud[hidden] { display: none; }
.fhud b { color: var(--ink); font-variant-numeric: tabular-nums; }
.fh-streak, .fh-goal, .fh-level, .fh-mail { display: inline-flex; align-items: center; gap: 6px; }
.fh-streak svg { width: 20px; height: 20px; fill: var(--ink-3); transition: fill 0.3s; }
.fh-streak.on svg { fill: #f97316; filter: drop-shadow(0 0 4px rgb(249 115 22 / 0.5)); }
.fh-ring { width: 26px; height: 26px; transform: rotate(-90deg); }
.fh-ring circle { fill: none; stroke-width: 4; stroke: var(--line); }
.fh-ring #fh-ring { stroke: var(--teal); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fh-goal.done #fh-ring { stroke: #f59e0b; }
.fh-badge { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: linear-gradient(135deg, var(--purple), var(--teal)); color: #fff; font-size: 13px; }
.fh-lvl { display: grid; gap: 3px; line-height: 1; }
.fh-bar { display: block; width: 64px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.fh-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--purple), var(--teal)); transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fh-mail { color: var(--purple); text-decoration: none; margin-left: auto; }
.fh-mail svg { width: 20px; height: 20px; }
@media (max-width: 479px) { .fhud .fh-l { display: none; } .fhud { justify-content: space-between; } .fh-mail { margin-left: 0; } }
.pop { animation: fx-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes fx-pop { 40% { transform: scale(1.35); } }
/* Drag: the card glows teal toward save and grey toward skip; the stamp grows and locks in past the line. */
.fcard-in { --p: 0; }
.fcard-in.pull-r { box-shadow: 0 0 0 calc(var(--p) * 3px) var(--teal), 0 18px calc(var(--p) * 48px) -12px var(--teal); }
.fcard-in.pull-l { box-shadow: 0 0 0 calc(var(--p) * 3px) var(--ink-3), 0 18px calc(var(--p) * 40px) -14px var(--ink-3); }
.fcard-in.armed .stamp { animation: fx-pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.fcard-in.deal { animation: fx-deal 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
@keyframes fx-deal { from { transform: translateY(18px) scale(0.95); opacity: 0.4; } }
.fsave.on svg path { fill: currentColor; }
.fsave.on { color: var(--teal); border-color: var(--teal); }
.fx-layer { position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; }
.fx-p { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 2px; will-change: transform, opacity; }
.fx-xp { position: absolute; left: 0; top: 0; font: 700 18px var(--sans); color: var(--teal); white-space: nowrap; text-shadow: 0 1px 0 var(--card), 0 0 12px var(--card); will-change: transform, opacity; }
.fx-xp.skip { color: var(--ink-3); font-size: 15px; }
.ftoast { position: absolute; left: 50%; top: 64px; margin: 0; max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--paper); font: 600 15px/1.35 var(--sans); text-align: center; box-shadow: var(--lift); opacity: 0; transform: translate(-50%, -12px) scale(0.96); transition: opacity 0.25s, transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1); }
.ftoast.show { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.ftoast a { color: var(--paper); text-decoration: underline; }
.ftoast .big { display: block; font-size: 22px; margin-bottom: 2px; }
.fend-mail { margin-top: 16px !important; }
.feed-main { display: flex; flex-direction: column; }
.feed-main .feed { flex: 1; min-height: 0; height: auto; }
@media (prefers-reduced-motion: reduce) {
  .pop, .fcard-in.deal, .fcard-in.armed .stamp { animation: none; }
  .fh-ring #fh-ring, .fh-bar i, .ftoast { transition: none; }
}
@media (max-height: 640px) {
  .fc-answer p { font-size: 16px; line-height: 1.5; }
  .fc-text h2 { font-size: 21px; }
}

/* Topics hub and saved list */
.topic-grid { list-style: none; margin: 0; padding: 8px 0 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
/* Subscribe band: the page's own feed in one click */
.subscribe { display: grid; gap: 14px 28px; align-items: center; margin: 44px 0 8px; padding: 22px 24px; border-radius: var(--r-l); background: linear-gradient(120deg, var(--purple-soft), var(--teal-soft)); }
.subscribe h2 { font: 600 22px/1.25 var(--serif); margin: 0 0 4px; }
.subscribe .sub-text p { margin: 0; color: var(--ink-2); font-size: 15px; }
.sub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.sub-actions .btn { gap: 6px; min-height: 42px; padding: 0 18px; font-size: 15px; }
.sub-actions .btn-quiet { background: var(--card); }
.sub-all { font-weight: 600; font-size: 14px; margin-left: 4px; }
@media (min-width: 900px) { .subscribe { grid-template-columns: minmax(0, 1fr) auto; } }
@media (min-width: 900px) { .subscribe.sub-email { grid-template-columns: minmax(0, 1fr); } }
.sub-email .sub-text p { max-width: 62ch; }
.sub-email .sub-form { max-width: 760px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sub-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.sub-form input[type="email"], .sub-form select, .email-addr input { font: 16px var(--sans); min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); }
.sub-form input[type="email"] { flex: 1 1 220px; min-width: 0; }
.sub-form .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.sub-only { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.sub-feeds { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--ink-2); }
.sub-feeds a { margin-left: 8px; font-weight: 600; }
.email-form { margin: 20px 0; }
.email-addr { display: grid; gap: 6px; max-width: 420px; font-weight: 600; }
.email-choice { border: 1px solid var(--line); border-radius: var(--r-s); margin: 18px 0; padding: 12px 16px 14px; }
.email-choice legend { font-weight: 600; padding: 0 6px; }
.email-choice label { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; font-size: 16px; line-height: 1.4; }
.email-choice small { color: var(--ink-3); font-weight: 400; }
.email-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); column-gap: 16px; }
.email-topics legend { grid-column: 1 / -1; }
.email-all { grid-column: 1 / -1; font-weight: 600; border-bottom: 1px solid var(--line); margin-bottom: 4px; padding-bottom: 8px !important; }
html:not(.js) .email-all { display: none; }
.form-error { color: var(--amber); background: var(--amber-soft); border-radius: var(--r-s); padding: 10px 14px; }
.form-ok { color: var(--teal); background: var(--teal-soft); border-radius: var(--r-s); padding: 10px 14px; }
.email-page form { margin: 16px 0; }
.follow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }
.follow a { display: inline-flex; align-items: center; gap: 5px; color: var(--purple); text-decoration: none; font-weight: 600; }
.follow a:hover { text-decoration: underline; }
.feeds-h { font: 600 20px/1.3 var(--serif); margin: 18px 0 2px; }
.feed-tile h3 { font: 600 19px/1.25 var(--serif); margin: 0; }
.feed-tile h3 a { color: var(--ink); text-decoration: none; }
.feed-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; font-size: 14px; }
.feed-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--purple); text-decoration: none; }
.feed-links a:hover { text-decoration: underline; }
.topic-tile { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(155deg, hsl(var(--h, 250) 90% 97%), hsl(var(--h, 250) 70% 90%)); border-radius: var(--r-l); padding: 18px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.topic-art .fx { position: absolute; z-index: -1; right: -16%; top: -18%; width: 70%; height: auto; }
.topic-tile h2 { font: 600 21px/1.25 var(--serif); margin: 0; }
.topic-tile h2 a { color: var(--ink); text-decoration: none; }
.tile-link::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.topic-latest a { position: relative; z-index: 1; }
.topic-tile h2 a:hover { color: var(--purple); }
.topic-count { margin: 0; font-weight: 600; font-size: 14px; color: var(--teal); }
.topic-tile.is-empty .topic-count { color: var(--ink-3); }
.topic-latest { margin: 0; font-size: 14px; color: var(--ink-3); }
.unsave { font: 600 14px var(--sans); color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; min-height: 36px; cursor: pointer; }
.unsave:hover { border-color: var(--purple); color: var(--purple); }

/* Places: chips on cards and posts, the /places hub and place pages */
.place-chip { display: inline-flex; align-items: center; gap: 3px; min-width: 0; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.place-chip .pin { flex: none; width: 14px; height: 14px; color: var(--teal); }
.place-chip:hover { color: var(--purple); }
.fc-top .place-chip { font-size: 13px; background: var(--card); border: 1px solid var(--line); padding: 2px 9px 2px 7px; border-radius: 999px; }
.post-meta .place-chip { font-size: 13px; background: var(--teal-soft); color: var(--ink); padding: 1px 10px 1px 8px; border-radius: 999px; }
.post-meta .place-chip:hover { color: var(--purple); }
.place-group { padding: 8px 0 4px; }
.place-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 4px; }
.place-group-head h2 { font: 600 24px/1.25 var(--serif); margin: 0; }
.place-group-head h2 a { color: var(--ink); text-decoration: none; }
.place-group-head h2 a:hover { color: var(--purple); }
.place-group .place-grid { padding-bottom: 24px; }
.place-tile h3 { font: 600 21px/1.25 var(--serif); margin: 0; }
.place-tile h3 a { color: var(--ink); text-decoration: none; }
.place-tile h3 a:hover { color: var(--purple); }
.place-kind { margin: 0; font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.place-label { margin: 0; font-size: 14px; color: var(--ink-2); }
.place-head .crumbs { margin-bottom: 10px; }
.place-stat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }
.place-stat .pin { width: 16px; height: 16px; color: var(--teal); margin-right: -10px; }
.place-stat span:first-of-type { color: var(--ink-2); font-weight: 600; }
.place-kids { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.place-kid { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font: 600 14px var(--sans); color: var(--teal); background: var(--teal-soft); padding: 4px 12px; border-radius: 999px; text-decoration: none; }
.place-kid span { font-weight: 400; color: var(--ink-3); }
.place-kid:hover { color: var(--purple); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 32px; padding: 24px 0 36px; font-size: 14px; color: var(--ink-3); }
.foot-row p { margin: 4px 0 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.foot-links a { display: inline-block; padding: 8px 0; }

@media (min-width: 720px) {
  body { font-size: 17px; }
  .brand { font-size: 26px; }
  .lede { font-size: 19px; }
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .answer { font-size: 21px; padding: 22px 26px 22px 30px; }
  .prose { font-size: 18px; }
  .sides-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { display: flex; margin-left: 12px; }
  .tools-row { flex-direction: row; align-items: center; gap: 20px; padding-top: 0; }
  .search { flex: none; width: min(300px, 32vw); }
  .cats { flex: 1; min-width: 0; }
  .tabbar { display: none; }
  .menu-btn, .menu-scrim, .site-menu { display: none; }
  .js .theme-btn { display: inline-grid; }
  .head-sub { margin-left: 0; }
  .cats { margin: 0; padding: 0; }
  body, .is-feed { padding-bottom: 0; }
  .is-feed .site-head { display: block; }
  .feed-main { margin-bottom: 0; }
  .fcard { padding: 16px 16px 40px; }
  .fcard-in { padding: 22px 24px 18px; gap: 12px; }
  .fc-answer p { font-size: 18px; }
  .fact { width: auto; padding: 0 16px; }
  .fact-l { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .feed-hint { display: block; position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; text-align: center; font-size: 13px; color: var(--ink-3); pointer-events: none; }
}

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 56px 0 20px; }
  .hero-stage { aspect-ratio: 5 / 4; max-height: none; }
  .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lead-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .card.is-featured { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .card.is-featured .card-visual { aspect-ratio: 4 / 5; }
  .bento ul { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .tile-big { grid-column: span 2; grid-row: span 2; }
  .tile-wide { grid-column: span 2; }
  .tile-big .fx { width: 78%; right: -8%; top: -4%; }
  .tile-wide .fx { width: 40%; right: -2%; top: 2%; }
  .post-hero { grid-template-columns: minmax(0, 1fr) 280px; align-items: end; }
  .post-visual { aspect-ratio: 4 / 3; }
}

/* Facets move slowly on their own: shards float, the crystal drifts, the beams glow */
@media (prefers-reduced-motion: no-preference) {
  .fx .fx-shard { animation: fx-bob 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .fx .fx-body { animation: fx-drift 7s ease-in-out infinite; }
  .fx .fx-glow { animation: fx-glow 3.2s ease-in-out infinite; }
  .fx .fx-glow.fx-b { animation-delay: -1.6s; }
}
@keyframes fx-bob { 50% { transform: translateY(-8px) rotate(10deg); } }
@keyframes fx-drift { 50% { transform: translateY(-5px); } }
@keyframes fx-glow { 50% { stroke-opacity: 0.36; } }

/* Topic scenes (src/lib/topic-art.js): one animated picture per topic, tinted by --h. Static, they still read. */
.tile .ta { position: absolute; z-index: -1; right: 2%; top: 4%; width: 40%; height: auto; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tile a:hover .ta { transform: translateY(-4px) scale(1.05); }
.topic-art { align-self: flex-end; margin: -8px -6px auto 0; }
.topic-art .ta { display: block; width: auto; height: 104px; }
.list-head.has-art { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; align-items: center; }
.list-art .ta { display: block; width: 100%; height: auto; }
.ta .t0 { fill: hsl(var(--h) 95% 98%); }
.ta .t1 { fill: hsl(var(--h) 82% 85%); }
.ta .t2 { fill: hsl(var(--h) 68% 64%); }
.ta .t3 { fill: hsl(var(--h) 60% 40%); }
.ta .ta-a { fill: #6a3df0; }
.ta .ta-b { fill: #0e9f9a; }
.ta .ta-g { fill: #f5b301; }
.ta .ta-gs { stroke: #c98a00; stroke-width: 1.5; }
.ta .ta-flame2 { fill: #fff6d0; }
.ta .ta-sh { opacity: 0.7; }
.ta .ta-tx { fill: #8a5a00; font-family: var(--sans); font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.ta .ln { fill: none; }
.ta .s2, .ta .s3, .ta .sa, .ta .sb, .ta .sw { stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ta .sa, .ta .sb { stroke-width: 4; }
.ta .ta-thin { stroke-width: 2; }
.ta .s2 { stroke: hsl(var(--h) 68% 64%); }
.ta .s3 { stroke: hsl(var(--h) 60% 40%); }
.ta .sa { stroke: #6a3df0; }
.ta .sb { stroke: #0e9f9a; }
.ta .sw { stroke: #fff; }
.ta .ta-flow { stroke-dasharray: 3 8; }
.ta .ta-flowline { stroke-dasharray: 2 12; }
@media (min-width: 900px) {
  .tile-big .tile-name, .tile-wide .tile-name { max-width: 14ch; }
  .tile-big .tile-name { font-size: clamp(24px, 3vw, 32px); }
  .tile-big .ta { width: 60%; right: 3%; top: 5%; }
  .tile-wide .ta { width: 32%; right: 4%; top: 8%; }
  .list-head.has-art { grid-template-columns: minmax(0, 1fr) 210px; }
}
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .ta .t0 { fill: hsl(var(--h) 36% 27%); }
  :where(:root:not([data-theme="light"])) .ta .t1 { fill: hsl(var(--h) 40% 35%); }
  :where(:root:not([data-theme="light"])) .ta .t2 { fill: hsl(var(--h) 58% 55%); }
  :where(:root:not([data-theme="light"])) .ta .t3 { fill: hsl(var(--h) 75% 74%); }
  :where(:root:not([data-theme="light"])) .ta .s2 { stroke: hsl(var(--h) 58% 55%); }
  :where(:root:not([data-theme="light"])) .ta .s3 { stroke: hsl(var(--h) 75% 74%); }
  :where(:root:not([data-theme="light"])) .ta .ta-a { fill: #7c5cf5; }
  :where(:root:not([data-theme="light"])) .ta .ta-b { fill: #14b8a6; }
  :where(:root:not([data-theme="light"])) .ta .sa { stroke: #a78bfa; }
  :where(:root:not([data-theme="light"])) .ta .sb { stroke: #2dd4bf; }
}
:where(:root[data-theme="dark"]) .ta .t0 { fill: hsl(var(--h) 36% 27%); }
:where(:root[data-theme="dark"]) .ta .t1 { fill: hsl(var(--h) 40% 35%); }
:where(:root[data-theme="dark"]) .ta .t2 { fill: hsl(var(--h) 58% 55%); }
:where(:root[data-theme="dark"]) .ta .t3 { fill: hsl(var(--h) 75% 74%); }
:where(:root[data-theme="dark"]) .ta .s2 { stroke: hsl(var(--h) 58% 55%); }
:where(:root[data-theme="dark"]) .ta .s3 { stroke: hsl(var(--h) 75% 74%); }
:where(:root[data-theme="dark"]) .ta .ta-a { fill: #7c5cf5; }
:where(:root[data-theme="dark"]) .ta .ta-b { fill: #14b8a6; }
:where(:root[data-theme="dark"]) .ta .sa { stroke: #a78bfa; }
:where(:root[data-theme="dark"]) .ta .sb { stroke: #2dd4bf; }
@media (prefers-reduced-motion: no-preference) {
  .ta .ta-bob { animation: ta-bob 4s ease-in-out infinite; }
  .ta .ta-late { animation-delay: -2s; }
  .ta .ta-stamp { animation: ta-stamp 3.6s cubic-bezier(0.5, 0, 0.3, 1) infinite; }
  .ta .ta-seal { transform-box: fill-box; transform-origin: center; animation: ta-seal 3.6s ease infinite; }
  .ta .ta-hover { animation: ta-bob 2.4s ease-in-out infinite; }
  .ta .ta-flame, .ta .ta-flame2 { transform-box: fill-box; transform-origin: 50% 0; animation: ta-flame 0.18s ease-in-out infinite alternate; }
  .ta .ta-speed { animation: ta-speed 1.4s linear infinite; }
  .ta .ta-puff { transform-box: fill-box; transform-origin: 50% 100%; animation: ta-puff 1.2s ease-in-out infinite alternate; }
  .ta .ta-spark { transform-box: fill-box; transform-origin: center; animation: ta-spark 2.4s ease-in-out infinite; }
  .ta .ta-drop { animation: ta-drop 2.8s cubic-bezier(0.5, 0, 0.8, 0.4) infinite; }
  .ta .ta-drop2 { animation-delay: -1.4s; }
  .ta .ta-stack { animation: ta-stack 1.4s ease infinite; }
  .ta .ta-parcel { animation: ta-parcel 6s linear infinite; }
  .ta .ta-roll path { transform-box: fill-box; transform-origin: center; animation: ta-spin 0.9s linear infinite; }
  .ta .ta-wave { animation: ta-wave 1.8s ease-out infinite; }
  .ta .ta-like { transform-box: fill-box; transform-origin: center; animation: ta-like 3s ease-in infinite; }
  .ta .ta-flag { transform-box: fill-box; transform-origin: 0 50%; animation: ta-flag 1.2s ease-in-out infinite alternate; }
  .ta .ta-climb { animation: ta-climb 4.8s ease-in-out infinite; }
  .ta .ta-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: ta-bar 3.6s ease-in-out infinite; }
  .ta .ta-trend { stroke-dasharray: 100; animation: ta-trend 3.6s ease-in-out infinite; }
  .ta .ta-head { animation: ta-head 3.6s ease infinite; }
  .ta .ta-spin, .ta .ta-spin-r { transform-box: fill-box; transform-origin: center; animation: ta-spin 8s linear infinite; }
  .ta .ta-spin-r { animation-duration: 5.6s; animation-direction: reverse; }
  .ta .ta-flow { animation: ta-flow 0.9s linear infinite; }
  .ta .ta-flowline { animation: ta-flowline 1s linear infinite; }
  .ta .ta-node { transform-box: fill-box; transform-origin: center; animation: ta-node 2s ease-in-out infinite; }
  .ta .ta-blink { transform-box: fill-box; transform-origin: center; animation: ta-blink 4s ease infinite; }
  .ta .ta-pop { transform-box: fill-box; transform-origin: center; animation: ta-pop 2.8s ease infinite; }
  .ta .ta-ring { transform-box: fill-box; transform-origin: center; animation: ta-ring 2s ease-out infinite; }
  .ta .ta-eq { transform-box: fill-box; transform-origin: 50% 100%; animation: ta-eq 1s ease-in-out infinite alternate; }
  .ta .ta-scan { animation: ta-scan 2.6s ease-in-out infinite; }
  .ta .ta-shackle { animation: ta-shackle 3.2s ease-in-out infinite; }
}
@keyframes ta-bob { 50% { transform: translateY(-7px); } }
@keyframes ta-stamp { 0%, 12% { transform: none; } 34%, 44% { transform: translateY(50px); } 66%, 100% { transform: none; } }
@keyframes ta-seal { 0%, 36% { opacity: 0; transform: scale(0.5); } 46% { opacity: 1; transform: scale(1.15); } 54%, 86% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@keyframes ta-flame { to { transform: scaleY(1.3) scaleX(0.85); } }
@keyframes ta-speed { 0% { transform: translateY(-30px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(50px); opacity: 0; } }
@keyframes ta-puff { to { transform: scale(1.12); } }
@keyframes ta-spark { 0%, 100% { transform: scale(0.4); opacity: 0.4; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes ta-drop { 0% { transform: translateY(-14px); opacity: 0; } 15% { opacity: 1; transform: none; } 30% { transform: none; } 52% { transform: translateY(38px); opacity: 1; } 58%, 100% { transform: translateY(42px); opacity: 0; } }
@keyframes ta-stack { 0%, 8% { transform: none; } 14% { transform: translateY(2px); } 22%, 100% { transform: none; } }
@keyframes ta-parcel { 0% { transform: translateX(0); opacity: 0; } 8%, 88% { opacity: 1; } 100% { transform: translateX(150px); opacity: 0; } }
@keyframes ta-wave { 0% { opacity: 0; transform: translateX(-6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(8px); } }
@keyframes ta-like { 0% { transform: translateY(10px) scale(0.6); opacity: 0; } 20% { transform: none; opacity: 1; } 100% { transform: translateY(-50px) scale(0.9); opacity: 0; } }
@keyframes ta-flag { to { transform: skewY(-8deg) scaleX(0.9); } }
@keyframes ta-climb {
  0% { transform: none; opacity: 0; } 6% { opacity: 1; }
  12% { transform: translate(17px, -34px); } 20% { transform: translate(34px, -22px); }
  32% { transform: translate(51px, -56px); } 40% { transform: translate(68px, -44px); }
  52% { transform: translate(85px, -78px); } 60%, 88% { transform: translate(102px, -66px); opacity: 1; }
  96%, 100% { transform: translate(102px, -66px); opacity: 0; }
}
@keyframes ta-bar { 0%, 100% { transform: scaleY(0.35); } 40%, 80% { transform: none; } }
@keyframes ta-trend { 0%, 10% { stroke-dashoffset: 100; } 50%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes ta-head { 0%, 45% { opacity: 0; } 55%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ta-spin { to { transform: rotate(360deg); } }
@keyframes ta-flow { to { stroke-dashoffset: -22; } }
@keyframes ta-flowline { to { stroke-dashoffset: -14; } }
@keyframes ta-node { 50% { transform: scale(1.25); } }
@keyframes ta-blink { 0%, 90%, 100% { transform: none; } 94% { transform: scaleY(0.1); } }
@keyframes ta-pop { 0%, 20% { transform: scale(0); opacity: 0; } 32% { transform: scale(1.15); opacity: 1; } 40%, 80% { transform: none; opacity: 1; } 100% { transform: scale(0.6); opacity: 0; } }
@keyframes ta-ring { 0% { transform: none; opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes ta-eq { from { transform: scaleY(0.25); } to { transform: none; } }
@keyframes ta-scan { 0% { transform: none; opacity: 0; } 15%, 85% { opacity: 0.8; } 100% { transform: translateY(120px); opacity: 0; } }
@keyframes ta-shackle { 0%, 15% { transform: translateY(-9px); } 30%, 80% { transform: none; } 95%, 100% { transform: translateY(-9px); } }

/* 3D lean on hover (public/ui.js sets --rx/--ry from the pointer), with a light sheen that follows it */
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; }
.tilt.is-tilting, .touch-tilt .tilt { transition: transform 0.08s linear; }
.tilt::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.4), transparent 55%); }
.tilt.is-tilting::after { opacity: 1; }

/* Facets in the dark theme (the SVG carries light-theme colours as attributes) */
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .fx-bg0 { stop-color: hsl(var(--h) 42% 22%); }
  :where(:root:not([data-theme="light"])) .fx-bg1 { stop-color: hsl(var(--h) 46% 12%); }
  :where(:root:not([data-theme="light"])) .fx-in { stroke: hsl(var(--h) 40% 82%); }
  :where(:root:not([data-theme="light"])) .card-visual, :where(:root:not([data-theme="light"])) .post-visual, :where(:root:not([data-theme="light"])) .mini-visual, :where(:root:not([data-theme="light"])) .fc-cover { background: hsl(var(--h, 250) 40% 16%); }
  :where(:root:not([data-theme="light"])) .topic-pill { color: hsl(var(--h, 250) 85% 86%); background: hsl(var(--h, 250) 40% 22%); }
  :where(:root:not([data-theme="light"])) .topic-pill:hover { color: #fff; background: hsl(var(--h, 250) 45% 28%); }
  :where(:root:not([data-theme="light"])) .mini-topic { color: hsl(var(--h, 250) 70% 75%); }
  :where(:root:not([data-theme="light"])) .tile a { color: hsl(var(--h) 85% 93%); background: linear-gradient(155deg, hsl(var(--h) 42% 22%), hsl(var(--h) 46% 12%)); }
  :where(:root:not([data-theme="light"])) .topic-tile { background: linear-gradient(155deg, hsl(var(--h, 250) 42% 20%), hsl(var(--h, 250) 46% 12%)); }
  :where(:root:not([data-theme="light"])) .tilt::after { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.14), transparent 55%); }
}
:where(:root[data-theme="dark"]) .fx-bg0 { stop-color: hsl(var(--h) 42% 22%); }
:where(:root[data-theme="dark"]) .fx-bg1 { stop-color: hsl(var(--h) 46% 12%); }
:where(:root[data-theme="dark"]) .fx-in { stroke: hsl(var(--h) 40% 82%); }
:where(:root[data-theme="dark"]) .card-visual, :where(:root[data-theme="dark"]) .post-visual, :where(:root[data-theme="dark"]) .mini-visual, :where(:root[data-theme="dark"]) .fc-cover { background: hsl(var(--h, 250) 40% 16%); }
:where(:root[data-theme="dark"]) .topic-pill { color: hsl(var(--h, 250) 85% 86%); background: hsl(var(--h, 250) 40% 22%); }
:where(:root[data-theme="dark"]) .topic-pill:hover { color: #fff; background: hsl(var(--h, 250) 45% 28%); }
:where(:root[data-theme="dark"]) .mini-topic { color: hsl(var(--h, 250) 70% 75%); }
:where(:root[data-theme="dark"]) .tile a { color: hsl(var(--h) 85% 93%); background: linear-gradient(155deg, hsl(var(--h) 42% 22%), hsl(var(--h) 46% 12%)); }
:where(:root[data-theme="dark"]) .topic-tile { background: linear-gradient(155deg, hsl(var(--h, 250) 42% 20%), hsl(var(--h, 250) 46% 12%)); }
:where(:root[data-theme="dark"]) .tilt::after { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 0.14), transparent 55%); }

/* Phones: list cards are compact rows (title beside a square picture, three lines of answer) so a list scans fast.
   The home page's lead card and the Up next card keep the big picture. */
@media (max-width: 719px) {
  .grid-cards { gap: 0; }
  .grid-cards .card { display: grid; grid-template-columns: minmax(0, 1fr) 96px; column-gap: 14px; row-gap: 6px; padding: 18px 0; }
  .grid-cards .card + .card { border-top: 1px solid var(--line); }
  .grid-cards .card-text { display: contents; }
  .grid-cards .card-visual { grid-column: 2; grid-row: 1 / span 2; align-self: start; aspect-ratio: 1; border-radius: var(--r-s); box-shadow: none; }
  .grid-cards .card-kicker { grid-column: 1; grid-row: 1; align-self: start; }
  .grid-cards .card h2 { grid-column: 1; grid-row: 2; font-size: 18px; line-height: 1.28; }
  .grid-cards .card-answer { grid-column: 1 / -1; font-size: 15px; line-height: 1.55; -webkit-line-clamp: 3; line-clamp: 3; }
  .grid-cards .card-facts, .grid-cards .more-link, .grid-cards .unsave { grid-column: 1 / -1; justify-self: start; }
  .grid-cards .card-kicker:empty + h2 { grid-row: 1 / span 2; }
}

/* Empty states and dead ends: say what happened, then offer a way on */
.empty-box { display: grid; justify-items: center; gap: 12px; margin: 16px 0 32px; padding: 32px 20px; border: 1px dashed var(--line); border-radius: var(--r-l); text-align: center; color: var(--ink-2); }
.empty-box[hidden] { display: none; }
.empty-box svg { width: 36px; height: 36px; color: var(--purple); }
.empty-box p { margin: 0; max-width: 36ch; }
.way-out { display: grid; gap: 14px; margin: 8px 0 40px; max-width: 720px; }
.way-text { margin: 0; font-size: 18px; color: var(--ink-2); }
.way-h { margin: 10px 0 0; font-weight: 600; }
.way-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.way-topics a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.way-topics a:hover { color: var(--purple); border-color: var(--purple); }
.way-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; }

/* Topics page on phones: shorter tiles with the art at the side */
@media (max-width: 719px) {
  .topic-tile { min-height: 0; padding: 18px 120px 18px 18px; }
  .topic-tile .topic-art { position: absolute; right: 10px; top: 50%; margin: 0; transform: translateY(-50%); }
  .topic-tile .topic-art .ta { height: 84px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, .read-more { transition: color 0.15s, background-color 0.15s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-head, .site-foot, .read-more, .share, .related, .up-next, .tabbar { display: none; }
  body { padding-bottom: 0; }
  .js .more:not(.open) { display: block; }
}

/* Translations (Hindi, Tamil): language links under the title, the note above the answer, and type for Devanagari and
   Tamil. The site's own fonts are Latin only, so these scripts use the reader's system font (Noto, Nirmala UI). */
.lang-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.lang-links a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font: 600 14px/1 var(--sans); text-decoration: none; }
.lang-links a:hover { border-color: var(--purple); color: var(--purple); }
.lang-links a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.list-head .lang-links { margin-top: 14px; }
.tr-note { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.tr-note a { font-weight: 600; white-space: nowrap; }
:lang(hi) { --sans: 'IBM Plex Sans', 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', system-ui, sans-serif; --serif: var(--sans); }
:lang(ta) { --sans: 'IBM Plex Sans', 'Noto Sans Tamil', 'Nirmala UI', 'Latha', system-ui, sans-serif; --serif: var(--sans); }
[lang="en"] { --sans: var(--sans-en); --serif: var(--serif-en); }
:is(:lang(hi), :lang(ta)) :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.35; }
:lang(ta) .post-hero h1 { font-size: clamp(23px, 6vw, 40px); }
@media (max-width: 719px) {
  :lang(ta) .answer { font-size: 17px; }
  :lang(ta) .prose { font-size: 16px; }
  :lang(ta) .side p { font-size: 15px; }
}
:lang(ta) .card h2 { font-size: 0.92em; }
:is(:lang(hi), :lang(ta)) .answer { line-height: 1.75; }

/* Free tools (/tools): a form, a result table and the method, on the page column. Colours come from the theme tokens, so dark mode follows. */
.tool-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 12px 0 40px; }
.tool-card { display: block; padding: 20px 22px; border-radius: var(--r-m); background: var(--card); box-shadow: var(--lift); color: var(--ink); text-decoration: none; }
.tool-card h3 { margin: 0 0 6px; font: 600 20px/1.3 var(--serif); }
.tool-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.tool-card:hover h3 { color: var(--purple); }
.tool-form { display: grid; gap: 16px; margin: 22px 0; padding: 20px; border-radius: var(--r-m); background: var(--card); box-shadow: var(--lift); }
.tool-field { display: grid; gap: 6px; }
.tool-field span, .tool-choice legend { font-weight: 600; font-size: 15px; color: var(--ink); }
.tool-field input { font: 16px var(--sans); min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--ink); max-width: 320px; }
.tool-field small { color: var(--ink-3); font-size: 13px; }
.tool-choice { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.tool-choice label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.tool-choice input { margin-top: 4px; accent-color: var(--purple); }
.tool-form .btn { justify-self: start; border: 0; cursor: pointer; }
.tool-result { margin: 8px 0 28px; padding: 18px 20px; border-radius: var(--r-m); background: var(--teal-soft); }
.tool-result h2 { margin: 0 0 12px; font: 600 24px/1.25 var(--serif); }
.tool-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tool-table th, .tool-table td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; color: var(--ink-2); }
.tool-table td { text-align: right; white-space: nowrap; padding-left: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tool-table tr.total th, .tool-table tr.total td { font-weight: 700; color: var(--ink); }
.tool-note { font-size: 14px; color: var(--ink-2); margin: 12px 0 0; }
.tool-share { margin: 24px 0; font-size: 15px; }
.tool-share summary { cursor: pointer; font-weight: 600; }
.tool-share textarea { width: 100%; font: 14px var(--mono); padding: 10px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--ink); }
.tool-read { font-size: 16px; }
.tool-private { font-size: 14px; color: var(--teal); font-weight: 600; margin: -4px 0 0; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tool-chips label { align-items: center; }
.tool-small { width: 84px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--ink); font: 15px var(--sans); }
.tool-inline { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.tool-inline input { max-width: 120px; }
.tool-field select, .tool-inline select { font: 16px var(--sans); min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--ink); max-width: 320px; }
.tool-field textarea { font: 16px/1.6 var(--sans); padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--ink); width: 100%; resize: vertical; }
.tool-field input[type="file"] { padding: 8px 0; border: 0; background: none; min-height: 0; }
.tool-field input[type="range"] { accent-color: var(--purple); max-width: 320px; padding: 0; border: 0; background: none; }
.tool-form .tool-result { display: block; margin: 4px 0 0; }
.tool-files { padding-left: 20px; font-size: 15px; } .tool-files span { color: var(--ink-3); }
.tool-qr-img { background: #fff; padding: 8px; border-radius: var(--r-s); width: min(280px, 100%); }
.tool-qr-img svg { display: block; width: 100%; height: auto; }
.tool-more { margin: 28px 0 8px; } .tool-more h2 { font: 600 18px var(--sans); margin: 0 0 8px; }
.tool-more p { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tool-more a { padding: 6px 12px; border-radius: 999px; background: var(--purple-soft); color: var(--ink); text-decoration: none; font-size: 14px; }
.tool-more a:hover { color: var(--purple); }
.tool-list + .section-h, .list-head + .section-h { margin-top: 18px; }
