/* ==========================================================================
   Tech2Buy design system
   Identity: "spec sheet" editorial — thin rules, mono indices, one display
   face, an electric-blue signal and a volt highlight used sparingly.
   Mobile first. No framework. Motion respects prefers-reduced-motion.
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 500 700;
  font-display: swap;
  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;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --surface-2: #EFEFEA;
  --ink: #0F1115;
  --ink-2: #3D4250;
  --muted: #5F6574;
  --line: #E1E2DC;
  --line-strong: #C9CBC3;
  --accent: #2344E8;
  --accent-ink: #FFFFFF;
  --accent-soft: #E7EBFE;
  --volt: #D5F55B;
  --volt-ink: #1B2300;
  --good: #11724A;
  --bad: #B3261E;
  --shadow: 0 1px 2px rgb(15 17 21 / .04), 0 8px 24px -12px rgb(15 17 21 / .12);
  --shadow-lift: 0 2px 4px rgb(15 17 21 / .05), 0 18px 40px -18px rgb(15 17 21 / .25);

  --display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r: 12px;
  --r-lg: 18px;
  --wrap: 1200px;
  --gutter: 16px;
  --header-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0A0C10;
  --surface: #12151B;
  --surface-2: #181C24;
  --ink: #EDEFF4;
  --ink-2: #C3C8D3;
  --muted: #98A0AF;
  --line: #232833;
  --line-strong: #323846;
  --accent: #8098FF;
  --accent-ink: #0A0C10;
  --accent-soft: #1A2140;
  --volt: #D5F55B;
  --volt-ink: #1B2300;
  --good: #52C98F;
  --bad: #FF8A80;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .6);
  --shadow-lift: 0 2px 4px rgb(0 0 0 / .4), 0 22px 44px -18px rgb(0 0 0 / .8);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0A0C10; --surface: #12151B; --surface-2: #181C24; --ink: #EDEFF4; --ink-2: #C3C8D3; --muted: #98A0AF;
    --line: #232833; --line-strong: #323846; --accent: #8098FF; --accent-ink: #0A0C10; --accent-soft: #1A2140;
    --good: #52C98F; --bad: #FF8A80;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .6);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / .4), 0 22px 44px -18px rgb(0 0 0 / .8);
    color-scheme: dark;
  }
}
@media (min-width: 768px) { :root { --gutter: 28px; --header-h: 68px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--sans); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; background: var(--surface-2); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--volt); color: var(--volt-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; 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: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); }

/* ---------- Small parts ---------- */
.eyebrow {
  font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow .dot, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 50%, transparent); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

.tag {
  display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap;
}
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  transition: border-color .2s, color .2s, background .2s;
}
a.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-volt { background: var(--volt); color: var(--volt-ink); border-color: transparent; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font: 12.5px/1.3 var(--mono); color: var(--muted); }
.meta > * { display: inline-flex; align-items: center; gap: 5px; }
.meta .icon { width: 14px; height: 14px; }

.btn {
  --b: var(--ink); --t: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--b); background: var(--b); color: var(--t);
  font: 600 14.5px/1 var(--sans); letter-spacing: -.005em; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translate(2px, -2px); }
.btn-accent { --b: var(--accent); --t: var(--accent-ink); }
.btn-ghost { --b: transparent; --t: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 13.5px; }
.btn-buy { --b: var(--ink); --t: var(--bg); }
.btn-buy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; }
.link-arrow .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
.u-line { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
a:hover .u-line, .u-line:hover { background-size: 100% 1.5px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 20px/1 var(--display); letter-spacing: -.03em; margin-right: auto; }
.logo-mark { width: 28px; height: 28px; flex: none; }
.logo-mark rect { transition: transform .5s var(--ease); transform-origin: center; transform-box: fill-box; }
.logo:hover .logo-mark .m-2 { transform: translate(1px, -1px); }
.logo b { color: var(--accent); font-weight: 700; }
.nav-main { display: none; }
.nav-main a { position: relative; padding: 8px 2px; font-size: 14.5px; color: var(--ink-2); transition: color .2s; }
.nav-main a:hover, .nav-main a[aria-current='page'] { color: var(--ink); }
.nav-main a::after { content: ''; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-main a:hover::after, .nav-main a[aria-current='page']::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--ink);
  transition: background .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .icon { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .i-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .i-moon { display: none; }
}
.auth-links { display: none; align-items: center; gap: 8px; margin-left: 6px; }
.signed-in { display: none !important; }
.is-signed-in .signed-in { display: inline-flex !important; }
.is-signed-in .signed-out { display: none !important; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font: 700 14px/1 var(--display); text-transform: uppercase; }

/* Mobile drawer */
.drawer { position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; background: var(--bg); padding: 20px var(--gutter) 40px; overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s; }
.drawer.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.drawer nav a { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font: 600 20px/1.2 var(--display); letter-spacing: -.02em; }
.drawer .drawer-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.drawer .drawer-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.drawer-open { overflow: hidden; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded='true'] .i-close { display: block; }
.menu-btn[aria-expanded='true'] .i-menu { display: none; }

@media (min-width: 1024px) {
  .nav-main { display: flex; gap: 22px; margin-right: 18px; }
  .auth-links { display: flex; }
  .menu-btn { display: none; }
  .drawer { display: none; }
}

/* ---------- Search ---------- */
.search { position: relative; }
.search-field {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 6px 6px 18px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.search-field .icon { color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 16px; padding: 10px 0; }
.search-field input::placeholder { color: var(--muted); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field kbd { display: none; font: 12px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
@media (min-width: 768px) { .search-field kbd { display: inline-block; } }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40; max-height: min(70vh, 460px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lift); padding: 6px;
}
.suggest[hidden] { display: none; }
.suggest-group { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 6px; }
.suggest a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); }
.suggest a[aria-selected='true'], .suggest a:hover { background: var(--surface-2); }
.suggest .s-title { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.suggest .s-sub { font: 12px var(--mono); color: var(--muted); }
.suggest mark { background: var(--volt); color: var(--volt-ink); border-radius: 3px; padding: 0 1px; }
.suggest .s-empty { padding: 18px 12px; color: var(--muted); font-size: 14.5px; }
.search-dialog { position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 12px; }
.search-dialog[hidden] { display: none; }
.search-dialog .search { max-width: 680px; margin: 8vh auto 0; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
@media (min-width: 768px) { .section { padding: 80px 0; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head .idx { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: .08em; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-head .idx::after { content: ''; width: 40px; height: 1px; background: var(--line-strong); }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); }
.section-head p { color: var(--muted); margin-top: 8px; max-width: 560px; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 2; padding: 44px 0 36px; }
.hero .hero-grid-bg { overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: .7;
}
.hero-inner { max-width: 860px; }
.hero h1 { font-size: clamp(40px, 9vw, 84px); line-height: .98; letter-spacing: -.045em; margin: 18px 0 18px; }
/* Rotating word: baseline-aligned, clipped top/bottom only so descenders (g, y) stay visible */
.hero h1 .rot { display: inline-grid; vertical-align: baseline; line-height: 1.18; clip-path: inset(0 -0.3em); color: var(--accent); }
.hero h1 .rot span { grid-area: 1 / 1; display: block; transform: translateY(105%); animation: rot 12s var(--ease) infinite; }
.hero h1 .rot span:nth-child(2) { animation-delay: 3s; }
.hero h1 .rot span:nth-child(3) { animation-delay: 6s; }
.hero h1 .rot span:nth-child(4) { animation-delay: 9s; }
@keyframes rot { 0% { transform: translateY(105%); } 3%, 22% { transform: translateY(0); } 25%, 100% { transform: translateY(-105%); } }
.hero .lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); max-width: 620px; margin-bottom: 28px; }
.hero .search { max-width: 640px; }
.hero-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.hero-examples button { border: 1px dashed var(--line-strong); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); transition: border-color .2s, color .2s; }
.hero-examples button:hover { border-style: solid; border-color: var(--ink); color: var(--ink); }
@media (min-width: 768px) { .hero { padding: 88px 0 64px; } }

/* Hero photo panel (wide screens only; images are lazy so phones never download them) */
.hero-visual { display: none; }
@media (min-width: 1100px) {
  .hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: center; }
  .hero-inner { max-width: 700px; }
  .hero h1 { font-size: clamp(56px, 6.2vw, 84px); }
  .hero-visual { display: block; position: relative; height: 540px; animation: fadeUp .9s .15s var(--ease) both; }
  .hv-back { position: absolute; right: -8px; top: 6px; width: 250px; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; transform: rotate(5deg); opacity: .7; box-shadow: var(--shadow); border: 1px solid var(--line); }
  .hv-back img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }
  .hv-main { position: absolute; left: 0; top: 34px; width: 330px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lift); transform: rotate(-2deg); transition: transform .5s var(--ease); }
  .hero-visual:hover .hv-main { transform: rotate(0) translateY(-4px); }
  .hv-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
  .hv-media img { width: 100%; height: 100%; object-fit: cover; }
  .hv-badge { position: absolute; left: 12px; top: 12px; font: 600 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: var(--volt); color: var(--volt-ink); padding: 7px 9px; border-radius: 6px; }
  .hv-body { padding: 16px 18px 18px; display: grid; gap: 8px; }
  .hv-body h2 { font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
  .hv-body h2 a::after { content: ''; position: absolute; inset: 0; }
  .hv-chip { position: absolute; display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 10px 14px 10px 10px; font-size: 14px; font-weight: 600; animation: float 6s ease-in-out infinite; }
  .hv-chip small { display: block; font: 500 10.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .hv-chip .rank { font: 600 13px/1 var(--mono); background: var(--ink); color: var(--bg); border-radius: 8px; padding: 9px 8px; }
  .hv-top { right: -6px; bottom: 62px; max-width: 240px; z-index: 2; transition: border-color .2s; }
  .hv-top:hover { border-color: var(--ink); }
  .hv-check { left: -26px; bottom: 8px; padding: 9px 14px; font-size: 13px; color: var(--ink-2); animation-delay: -3s; }
  .hv-check .icon { width: 16px; height: 16px; color: var(--good); }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.fade-up { animation: fadeUp .7s var(--ease) both; }
.fade-up.d1 { animation-delay: .06s; } .fade-up.d2 { animation-delay: .12s; } .fade-up.d3 { animation-delay: .18s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Trust strip */
.trust { border-block: 1px solid var(--line); background: var(--surface); }
.trust ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; }
.trust li { display: flex; align-items: center; gap: 10px; padding: 16px 12px; font-size: 14px; font-weight: 600; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust li:nth-child(2n) { border-right: 0; }
.trust li:nth-last-child(-n+2) { border-bottom: 0; }
.trust li small { display: block; font: 12px var(--mono); color: var(--muted); font-weight: 400; }
.trust .icon { color: var(--accent); width: 22px; height: 22px; }
@media (min-width: 900px) {
  .trust ul { grid-template-columns: repeat(4, 1fr); }
  .trust li { border-bottom: 0; padding: 20px 22px; }
  .trust li:nth-child(2n) { border-right: 1px solid var(--line); }
  .trust li:last-child { border-right: 0; }
}

/* ---------- Cards ---------- */
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.card .card-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.035); }
.card .card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; flex: 1; }
.card h3 { font-size: 19px; line-height: 1.22; }
.card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.card .excerpt { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.card .meta { margin-top: auto; padding-top: 4px; }
.card .card-actions { position: relative; z-index: 2; }
.card-num { position: absolute; top: 12px; left: 12px; z-index: 2; font: 600 12px/1 var(--mono); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 6px 8px; box-shadow: var(--shadow); }
.save-btn {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink); box-shadow: var(--shadow);
  transition: transform .2s var(--ease), background .2s, color .2s;
}
.save-btn:hover { transform: scale(1.08); }
.save-btn .icon { width: 18px; height: 18px; }
.save-btn[aria-pressed='true'] { background: var(--volt); color: var(--volt-ink); }
.save-btn[aria-pressed='true'] .icon { fill: currentColor; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid { gap: 20px; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Featured: 1 large + 2 stacked */
.featured { display: grid; gap: 16px; }
.card-feature .card-media { aspect-ratio: 16 / 10; }
.card-feature h3 { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.08; letter-spacing: -.03em; }
.card-feature .excerpt { font-size: 16px; }
.card-row { flex-direction: row; }
.card-row .card-media { width: 38%; aspect-ratio: auto; min-height: 100%; flex: none; }
.card-row .card-body { padding: 14px 16px; }
.card-row h3 { font-size: 16.5px; }
.card-row .excerpt { display: none; }
@media (min-width: 900px) {
  .featured { grid-template-columns: 1.55fr 1fr; gap: 20px; }
  .featured .stack { display: grid; gap: 20px; grid-template-rows: 1fr 1fr; }
  .featured .stack .card { flex-direction: column; }
  .featured .stack .card-media { width: 100%; aspect-ratio: 16 / 8; min-height: 0; }
  .featured .stack .excerpt { display: block; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .featured .stack h3 { font-size: 20px; }
  .featured .stack .card-body { padding: 16px 18px 18px; }
}

/* Best-picks shelf */
.picks { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .picks { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .picks { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.pick {
  position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: center; padding: 14px; padding-right: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .25s, transform .3s var(--ease), box-shadow .3s;
}
.pick:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.pick .pick-media { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.pick .pick-media img { width: 100%; height: 100%; object-fit: cover; }
.pick h3 { font-size: 17px; }
.pick p { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 4px 0 8px; }
.pick .pick-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--muted); }
.pick .pick-foot b { white-space: nowrap; color: var(--ink); font: 600 13px var(--sans); display: inline-flex; align-items: center; gap: 4px; }
.pick .pick-foot .icon { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.pick:hover .pick-foot .icon { transform: translateX(3px); }
.pick a::after { content: ''; position: absolute; inset: 0; }

/* Numbered list (popular) */
.ranked { list-style: none; counter-reset: r; display: grid; gap: 0; }
.ranked li { counter-increment: r; border-top: 1px solid var(--line); }
.ranked li:last-child { border-bottom: 1px solid var(--line); }
.ranked a { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; }
.ranked a::before { content: counter(r, decimal-leading-zero); font: 600 14px/1 var(--mono); color: var(--muted); transition: color .2s; }
.ranked a:hover::before { color: var(--accent); }
.ranked .r-title { font: 600 17px/1.3 var(--display); letter-spacing: -.015em; }
.ranked .r-sub { font: 12px var(--mono); color: var(--muted); margin-top: 4px; }
.ranked .icon { color: var(--muted); transition: transform .2s var(--ease), color .2s; }
.ranked a:hover .icon { transform: translateX(4px); color: var(--ink); }
@media (min-width: 900px) { .ranked.cols { grid-template-columns: 1fr 1fr; column-gap: 40px; } .ranked.cols li:nth-last-child(2) { border-bottom: 1px solid var(--line); } }

/* Category tiles */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .cats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.cat {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; min-height: 132px; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .25s, background .25s;
}
.cat:hover { border-color: var(--ink); }
.cat .cat-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); transition: transform .4s var(--ease), background .25s, color .25s; }
.cat .cat-icon .icon { width: 22px; height: 22px; }
.cat:hover .cat-icon { transform: translateY(-3px) rotate(-6deg); background: var(--volt); color: var(--volt-ink); }
.cat h3 { font-size: 16.5px; }
.cat span.count { font: 12px var(--mono); color: var(--muted); }

/* Diary teaser + newsletter */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
@media (min-width: 768px) { .panel { padding: 36px; } }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.newsletter { position: relative; overflow: hidden; background: var(--ink); color: var(--bg); border: 0; }
.newsletter .eyebrow { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.newsletter h2 { font-size: clamp(28px, 4vw, 42px); margin: 12px 0 10px; }
.newsletter p { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.newsletter::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--bg) 20%, transparent); box-shadow: 0 0 0 40px color-mix(in srgb, var(--bg) 3%, transparent), 0 0 0 80px color-mix(in srgb, var(--bg) 2%, transparent); pointer-events: none; }
.nl-form { display: flex; flex-wrap: wrap; gap: 10px; }
.nl-form input { flex: 1 1 220px; min-height: 50px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); background: transparent; color: inherit; padding: 0 20px; font-size: 16px; }
.nl-form input::placeholder { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.nl-form input:focus { outline: 2px solid var(--volt); outline-offset: 2px; }
.nl-form .btn { --b: var(--volt); --t: var(--volt-ink); min-height: 50px; }
.form-note { font-size: 13px; margin-top: 12px; min-height: 1.3em; }
.form-note.ok { color: var(--good); }
.newsletter .form-note.ok { color: var(--volt); }
.form-note.err { color: var(--bad); }

.timeline { list-style: none; position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.timeline .day { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px -22px; padding-left: 22px; }
.timeline .day:first-child { margin-top: 0; }
.timeline .entry { position: relative; display: flex; gap: 12px; align-items: baseline; padding: 8px 0; }
.timeline .entry::before { content: ''; position: absolute; left: -20px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline .entry.saved::before { background: var(--volt); border-color: var(--volt-ink); }
.timeline .entry .verb { font: 12px var(--mono); color: var(--muted); min-width: 52px; }
.timeline .entry a { font-weight: 600; }
.timeline .entry a:hover { color: var(--accent); }
.timeline .entry time { margin-left: auto; font: 12px var(--mono); color: var(--muted); white-space: nowrap; }

/* ---------- Listing / category ---------- */
.page-head { padding: 40px 0 28px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(34px, 6vw, 60px); letter-spacing: -.04em; margin: 14px 0 12px; }
.page-head p { color: var(--ink-2); font-size: 17.5px; max-width: 680px; }
.page-head .cat-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--volt); color: var(--volt-ink); }
.page-head .cat-icon .icon { width: 26px; height: 26px; }
.stats { display: flex; gap: 28px; margin-top: 22px; }
.stats div { font: 12px var(--mono); color: var(--muted); }
.stats b { display: block; font: 700 26px/1.1 var(--display); color: var(--ink); letter-spacing: -.02em; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters .chip[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.crumbs { font: 12.5px var(--mono); color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line-strong); }
.crumbs a:hover { color: var(--accent); }
.layout-side { display: grid; gap: 40px; }
@media (min-width: 1024px) { .layout-side { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; } }
.side-block + .side-block { margin-top: 32px; }
.side-block h2 { font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Article ---------- */
.article-head { padding: 28px 0 0; }
.article-head .wrap { max-width: 880px; }
.article-head h1 { font-size: clamp(32px, 5.6vw, 56px); letter-spacing: -.04em; line-height: 1.04; margin: 16px 0 16px; }
.article-head .standfirst { font-size: clamp(17.5px, 2.2vw, 20px); color: var(--ink-2); line-height: 1.55; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 24px 0 0; padding: 16px 0; border-block: 1px solid var(--line); }
.byline .who { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.byline .who b { display: block; font-size: 14.5px; }
.byline .who span { font: 12px var(--mono); color: var(--muted); }
.share { display: flex; gap: 4px; }
.share .icon-btn { width: 38px; height: 38px; border: 1px solid var(--line); }
.article-hero { max-width: 1040px; margin: 28px auto 0; padding: 0 var(--gutter); }
.article-hero img { width: 100%; border-radius: var(--r-lg); aspect-ratio: 16 / 10; object-fit: cover; }
@media (min-width: 900px) { .article-hero img { aspect-ratio: 2 / 1; } }
.article-hero figcaption { font: 12px var(--mono); color: var(--muted); margin-top: 8px; }
.article-hero figcaption a { text-decoration: underline; }
.article-layout { display: grid; gap: 32px; max-width: 1180px; margin: 0 auto; padding: 32px var(--gutter) 0; }
@media (min-width: 1100px) { .article-layout { grid-template-columns: 240px minmax(0, 720px) 1fr; gap: 48px; } .article-layout > .toc { grid-column: 1; } .article-layout > .prose-col { grid-column: 2; } }
.toc { font-size: 14px; }
.toc details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.toc summary { list-style: none; cursor: pointer; padding: 14px 16px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary .icon { width: 16px; height: 16px; transition: transform .2s; }
.toc details[open] summary .icon { transform: rotate(180deg); }
.toc ol { list-style: none; padding: 0 8px 10px; max-height: 60vh; overflow-y: auto; }
.toc a { display: flex; gap: 10px; padding: 7px 8px; border-radius: 6px; color: var(--muted); line-height: 1.35; transition: color .2s, background .2s; }
.toc a:hover { color: var(--ink); background: var(--surface-2); }
.toc a.is-active { color: var(--ink); background: var(--accent-soft); }
.toc a .n { font: 11.5px/1.6 var(--mono); color: var(--accent); min-width: 18px; }
@media (min-width: 1100px) { .toc .toc-inner { position: sticky; top: calc(var(--header-h) + 24px); } }

.disclosure { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; line-height: 1.5; margin-bottom: 28px; }
.disclosure .icon { color: var(--accent); margin-top: 1px; }
.disclosure a { text-decoration: underline; text-underline-offset: 2px; }

.at-glance { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin: 0 0 36px; overflow: hidden; }
.at-glance h2 { font-size: 13px !important; font-family: var(--mono) !important; font-weight: 500 !important; letter-spacing: .08em !important; text-transform: uppercase; color: var(--muted); margin: 0 !important; padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.at-glance ol { list-style: none; padding: 0 !important; margin: 0 !important; }
.at-glance li { display: grid; grid-template-columns: 30px 48px 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); margin: 0 !important; }
.at-glance li:last-child { border-bottom: 0; }
.at-glance .n { font: 600 12.5px var(--mono); color: var(--muted); }
.at-glance img, .at-glance .img-fallback { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; margin: 0 !important; border: 0 !important; }
.at-glance a.name { font: 600 15px/1.3 var(--sans); color: var(--ink) !important; text-decoration: none !important; }
.at-glance a.name:hover { color: var(--accent) !important; }
.at-glance .btn { min-height: 34px; padding: 7px 12px; font-size: 13px; text-decoration: none !important; }
@media (max-width: 520px) { .at-glance li { grid-template-columns: 24px 1fr auto; gap: 10px; padding: 12px 14px; } .at-glance li img, .at-glance li .img-fallback { display: none; } .at-glance a.name { font-size: 14.5px; } }

.prose { font-size: 18px; line-height: 1.75; color: var(--ink-2); }
@media (max-width: 480px) { .prose { font-size: 17px; } }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(25px, 3vw, 31px); color: var(--ink); margin-top: 2em; margin-bottom: -.2em; }
.prose h3 { font-size: 21px; color: var(--ink); margin-top: 1.7em; margin-bottom: -.3em; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--accent); }
.prose figure { margin: 1.8em 0; }
.prose img { border-radius: var(--r); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.prose figcaption { font: 12px var(--mono); color: var(--muted); margin-top: 8px; }
.prose figcaption a { color: inherit; }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--volt); font-size: 1.08em; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 1.6em 0; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.prose th { font: 500 11.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; background: var(--surface-2); }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }

.product-section { position: relative; margin: 2.4em 0 0; padding: 22px 18px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
@media (min-width: 640px) { .product-section { padding: 28px 28px 22px; } }
.product-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: .2em; }
.product-head .rank { flex: none; font: 600 13px/1 var(--mono); color: var(--volt-ink); background: var(--volt); padding: 7px 8px; border-radius: 7px; margin-top: 4px; }
.product-section h2 { margin: 0 !important; font-size: clamp(22px, 2.6vw, 27px); }
.product-section figure:first-child, .product-section > figure { margin-top: 1.2em; }
.buy-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 1.4em !important; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.buy-bar .buy-name { font: 12.5px var(--mono); color: var(--muted); }
.prose .buy-bar a.btn { color: var(--bg); text-decoration: none; }
.prose .pros-cons { display: grid; gap: 12px; }
@media (min-width: 640px) { .prose .pros-cons { grid-template-columns: 1fr 1fr; } }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); margin-top: 1em; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font: 600 17px/1.4 var(--display); color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font: 400 24px var(--mono); color: var(--accent); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 16px; }

.where-to-buy { margin-top: 3em; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 22px; }
.where-to-buy h2 { margin: 0 0 6px !important; font-size: 22px !important; }
.where-to-buy p { font-size: 15px; color: var(--muted); }
.where-to-buy ul { list-style: none; padding: 0 !important; margin-top: 14px !important; display: grid; gap: 8px; }
@media (min-width: 640px) { .where-to-buy ul { grid-template-columns: 1fr 1fr; } }
.where-to-buy li { margin: 0 !important; }
.where-to-buy a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink) !important; text-decoration: none !important; transition: border-color .2s, background .2s; }
.where-to-buy a:hover { border-color: var(--ink); }
.where-to-buy a span { font: 12px var(--mono); color: var(--muted); font-weight: 400; white-space: nowrap; }
.where-to-buy small { display: block; font: 12px var(--mono); color: var(--muted); margin-top: 12px; }

.article-foot { max-width: 720px; }
.filed { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 40px; font: 12px var(--mono); color: var(--muted); }
.author-box { display: grid; grid-template-columns: 56px 1fr; gap: 16px; margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.author-box .avatar { width: 56px; height: 56px; font-size: 20px; }
.author-box h2 { font-size: 18px; }
.author-box .role { font: 12px var(--mono); color: var(--muted); }
.author-box p { color: var(--ink-2); font-size: 15px; margin: 8px 0 10px; }
.read-progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 60; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- Auth / account ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: center; padding: 48px 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 34px; letter-spacing: -.035em; margin: 12px 0 8px; }
.auth-card section > p { color: var(--muted); margin-bottom: 24px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field input { min-height: 48px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 14px; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field small { color: var(--muted); font-size: 12.5px; }
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-alt { margin-top: 18px; font-size: 14.5px; color: var(--muted); text-align: center; }
.auth-alt a, .auth-card .text-link { color: var(--accent); font-weight: 600; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs button[aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
[data-view][hidden] { display: none !important; }

/* ---------- Empty / error states ---------- */
.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty .empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.empty h2, .empty h3 { font-size: 20px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }
.img-fallback, img.img-broken { display: block; width: 100%; height: 100%; min-height: 60px; background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); color: transparent; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 90; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-lift); transition: opacity .25s, transform .25s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.offline-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--bad); color: #fff; text-align: center; font-size: 13.5px; padding: 8px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); font-size: 14.5px; }
.footer-grid { display: grid; gap: 32px; padding: 48px 0 32px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { color: var(--muted); max-width: 340px; margin: 12px 0 16px; }
.footer-grid h2 { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-grid ul { list-style: none; display: grid; gap: 9px; }
.footer-grid ul a { color: var(--ink-2); }
.footer-grid ul a:hover { color: var(--accent); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; padding: 18px 0 28px; border-top: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.social { display: flex; gap: 6px; }

/* ---------- Scroll reveal (progressive; content is visible without JS) ---------- */
.rv .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv .reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hero h1 .rot span { animation: none; transform: translateY(105%); }
  .hero h1 .rot span:first-child { transform: none; }
  .rv .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .toc, .share, .save-btn, .newsletter, .read-progress { display: none !important; }
  body { background: #fff; color: #000; }
}
