/* ==========================================================================
   WebIndexly — Mockup 1 design system
   Dark by default, light via [data-theme="light"]. No framework, ~0 deps.
   ========================================================================== */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080c;
  --bg-2: #0c0e14;
  --surface: #111319;
  --surface-2: #171a22;
  --surface-3: #1e222d;
  --border: rgba(255, 255, 255, 0.075);
  --border-2: rgba(255, 255, 255, 0.13);
  --text: #eceef5;
  --text-2: #b7bccb;
  --muted: #8b91a4;
  --faint: #8b91a4;
  --accent: #8c7cff;
  --accent-2: #53dcef;
  --accent-3: #ff7ac6;
  --accent-ink: #fff;
  --accent-soft: rgba(140, 124, 255, 0.14);
  --green: #3fdc98;
  --green-soft: rgba(63, 220, 152, 0.12);
  --amber: #f6bd4b;
  --amber-soft: rgba(246, 189, 75, 0.13);
  --blue: #6aa8ff;
  --blue-soft: rgba(106, 168, 255, 0.13);
  --pink: #ff86c8;
  --pink-soft: rgba(255, 134, 200, 0.12);
  --dot: rgba(255, 255, 255, 0.09);
  --header-bg: rgba(7, 8, 12, 0.72);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset, 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--border-2);
  --glow: 0 0 0 1px rgba(140, 124, 255, 0.35), 0 16px 40px -18px rgba(140, 124, 255, 0.5);
  --aurora-op: 0.55;
  --aurora-blend: screen;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7fa;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f4f8;
  --surface-3: #eaecf2;
  --border: rgba(17, 20, 45, 0.085);
  --border-2: rgba(17, 20, 45, 0.15);
  --text: #0d0f1c;
  --text-2: #3a3f55;
  --muted: #62687e;
  --faint: #62687e;
  --accent: #5a45f2;
  --accent-2: #08718c;
  --accent-3: #d6307e;
  --accent-soft: rgba(90, 69, 242, 0.085);
  --green: #087044;
  --green-soft: rgba(12, 143, 89, 0.1);
  --amber: #875308;
  --amber-soft: rgba(214, 150, 20, 0.14);
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.09);
  --pink: #c02a74;
  --pink-soft: rgba(192, 42, 116, 0.09);
  --dot: rgba(17, 20, 45, 0.11);
  --header-bg: rgba(247, 247, 250, 0.8);
  --shadow: 0 1px 2px rgba(17, 20, 45, 0.04), 0 8px 24px -14px rgba(17, 20, 45, 0.18);
  --shadow-lg: 0 30px 80px -24px rgba(17, 20, 45, 0.3), 0 0 0 1px var(--border-2);
  --glow: 0 0 0 1px rgba(90, 69, 242, 0.3), 0 16px 36px -18px rgba(90, 69, 242, 0.35);
  --aurora-op: 0.32;
  --aurora-blend: multiply;
}

:root {
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --font: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --header-h: 64px;
  --container: 1240px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.022em; font-weight: 650; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.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; }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 15px; height: 15px; }
.ic-xs { width: 13px; height: 13px; }
.ic-lg { width: 22px; height: 22px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ---------- Buttons, chips, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  font-size: 14px; font-weight: 550; white-space: nowrap;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn-primary {
  background: #5a45f2;
  border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 22px -10px var(--accent);
}
.btn-primary:hover { background: #4936d3; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  color: var(--text-2); border: 1px solid transparent; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; color: var(--text-2); white-space: nowrap; transition: all .15s;
}
.chip:hover { border-color: var(--border-2); color: var(--text); background: var(--surface-2); }
.chip .ic { width: 14px; height: 14px; opacity: .8; }
.chip .count { color: var(--faint); font-size: 12px; }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in oklab, var(--accent) 45%, transparent); color: var(--text); }
.chip-glass { background: color-mix(in oklab, var(--surface) 60%, transparent); backdrop-filter: blur(8px); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
  border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
}
.badge .ic { width: 11px; height: 11px; stroke-width: 2.2; }
.b-free { background: var(--green-soft); color: var(--green); }
.b-freemium { background: var(--blue-soft); color: var(--blue); }
.b-paid { background: var(--surface-3); color: var(--text-2); }
.b-oss { background: var(--pink-soft); color: var(--pink); }
.b-pick { background: var(--amber-soft); color: var(--amber); }
.b-new { background: var(--accent-soft); color: var(--accent); }
.b-sponsored { background: transparent; border: 1px solid var(--border-2); color: var(--muted); }

.tag {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px;
  font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border);
  transition: color .15s, border-color .15s;
}
.tag:hover { color: var(--text); border-color: var(--border-2); }
.tag::before { content: "#"; color: var(--faint); margin-right: 2px; }

kbd, .kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface);
}

/* ---------- Favicon tile (mockup monograms; real build = cached 64px WebP) ---------- */
.fav {
  --s: 40px; --c: #6d5efc;
  width: var(--s); height: var(--s); flex: none; border-radius: calc(var(--s) * .26);
  display: grid; place-items: center;
  font-weight: 700; font-size: calc(var(--s) * .42); letter-spacing: -.03em; color: #fff;
  background: linear-gradient(145deg, color-mix(in oklab, var(--c) 92%, #fff) 0%, var(--c) 45%, color-mix(in oklab, var(--c) 70%, #000) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.25);
  text-transform: none; user-select: none;
}
.fav-24 { --s: 24px; font-size: 11px; border-radius: 6px; }
.fav-28 { --s: 28px; }
.fav-32 { --s: 32px; }
.fav-48 { --s: 48px; }
.fav-56 { --s: 56px; }
.fav-stack { display: flex; }
.fav-stack .fav { --s: 26px; font-size: 11px; border-radius: 7px; box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1px rgba(255,255,255,.14); }
.fav-stack .fav + .fav { margin-left: -7px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; height: var(--header-h);
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.03em; flex: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: conic-gradient(from 210deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 6px 18px -6px var(--accent);
}
.logo-mark svg { width: 18px; height: 18px; }
.logo b { font-weight: 700; }
.logo span { color: var(--muted); font-weight: 500; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 11px; border-radius: 9px;
  font-size: 14px; color: var(--text-2); font-weight: 500; transition: color .15s, background .15s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-link .ic { width: 14px; height: 14px; opacity: .7; }
.has-mega { position: relative; }
.mega {
  position: absolute; top: calc(100% + 10px); left: -12px; width: 760px;
  padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .18s ease;
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; color: var(--text-2); }
.mega a:hover { background: var(--surface-2); color: var(--text); }
.mega a .n { margin-left: auto; font-size: 12px; color: var(--faint); }
.mega-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 12px 10px 2px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.mega-foot a { display: inline-flex; padding: 0; color: var(--accent); font-weight: 550; }
.mega-foot a:hover { background: none; }

.header-search {
  flex: 1; max-width: 420px; margin-left: auto; position: relative;
}
.header-search-btn {
  width: 100%; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--faint); font-size: 14px; transition: border-color .15s, background .15s;
}
.header-search-btn:hover { border-color: var(--border-2); color: var(--muted); }
.header-search-btn .kbds { margin-left: auto; display: flex; gap: 4px; }
.header-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: block; }
[data-theme="light"] .theme-toggle .i-moon { display: none; }
.menu-btn { display: none; }

@media (max-width: 1100px) {
  .main-nav .nav-link.hide-md { display: none; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-grid; }
  .header-search { max-width: none; }
  .header-actions .btn-submit { display: none; }
}
@media (max-width: 560px) {
  .header-search-btn .label-long, .header-search-btn .kbds { display: none; }
  .header-inner { gap: 10px; }
}

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 90; display: none; }
.drawer.open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); animation: fade .2s; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); overflow-y: auto;
  background: var(--bg-2); border-left: 1px solid var(--border); padding: 16px; animation: slideL .25s ease;
}
.drawer-panel .drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer-panel h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 18px 4px 8px; font-weight: 600; }
.drawer-panel a.dl { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; font-size: 15px; color: var(--text-2); }
.drawer-panel a.dl:hover { background: var(--surface-2); color: var(--text); }
@keyframes fade { from { opacity: 0; } }
@keyframes slideL { from { transform: translateX(30px); opacity: 0; } }

/* ---------- Hero (home) ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 84px 0 64px; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: clip; }
.aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: var(--aurora-op); mix-blend-mode: var(--aurora-blend); }
.aurora.a1 { width: 640px; height: 440px; left: 50%; top: -200px; margin-left: -620px; background: radial-gradient(closest-side, #7b5cff, transparent); }
.aurora.a2 { width: 560px; height: 420px; left: 50%; top: -140px; margin-left: 40px; background: radial-gradient(closest-side, #22c9e6, transparent); }
.aurora.a3 { width: 520px; height: 300px; left: 50%; top: 140px; margin-left: -260px; background: radial-gradient(closest-side, #ff5fb4, transparent); opacity: calc(var(--aurora-op) * .55); }
.dot-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 25%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 25%, transparent 75%);
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to bottom, transparent, var(--bg)); z-index: -1; }
.hero-inner { position: relative; max-width: 820px; text-align: center; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 12px; border-radius: 999px;
  font-size: 13px; color: var(--text-2); border: 1px solid var(--border-2);
  background: color-mix(in oklab, var(--surface) 65%, transparent); backdrop-filter: blur(10px);
}
.eyebrow-pill .go { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); }
.hero h1 {
  margin: 22px 0 16px; font-size: clamp(38px, 6.4vw, 70px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 680;
}
.hero h1 em {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; padding-right: .06em;
  background: linear-gradient(95deg, var(--accent) 10%, var(--accent-2) 55%, var(--accent-3) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: clamp(16px, 2vw, 18.5px); color: var(--text-2); max-width: 640px; margin: 0 auto; }
.hero-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-top: 26px; font-size: 13px; color: var(--muted); }
.hero-stats b { color: var(--text); font-weight: 600; }
.hero-stats span { display: inline-flex; align-items: center; gap: 7px; }
.hero-stats .ic { color: var(--accent); width: 15px; height: 15px; }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.hero-chips .lbl { font-size: 13px; color: var(--faint); align-self: center; margin-right: 2px; }

/* ---------- Search box + autocomplete ---------- */
.searchbar { position: relative; margin: 32px auto 0; max-width: 720px; text-align: left; }
.searchbar-field {
  position: relative; display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 8px 0 20px;
  border-radius: 18px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--border-2), 0 20px 50px -20px rgba(0,0,0,.6), 0 0 80px -30px var(--accent);
}
.searchbar-field::before {
  content: ""; position: absolute; inset: -1px; border-radius: 19px; padding: 1px; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 60%, var(--accent) 72%, var(--accent-2) 82%, var(--accent-3) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .9;
}
.searchbar-field > .ic { width: 22px; height: 22px; color: var(--muted); }
.searchbar input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--text);
}
.searchbar input::placeholder { color: var(--faint); opacity: 1; }
.searchbar-field:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.searchbar .kbd { margin-right: 4px; }
.searchbar .btn-primary { height: 46px; border-radius: 12px; padding: 0 20px; }
@media (max-width: 640px) {
  .searchbar-field { height: 54px; padding-left: 14px; border-radius: 15px; }
  .searchbar-field::before { border-radius: 16px; }
  .searchbar input { font-size: 16px; }
  .searchbar .btn-primary .t, .searchbar .kbd { display: none; }
  .searchbar .btn-primary { width: 44px; height: 44px; padding: 0; }
}

.ac {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 40;
  max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 8px; display: none; text-align: left;
}
.ac.open { display: block; animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.99); } }
.ac-group + .ac-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.ac-label { display: flex; justify-content: space-between; padding: 8px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.ac-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; min-height: 48px; }
.ac-item[aria-selected="true"], .ac-item:hover { background: var(--surface-2); }
.ac-item .t { font-size: 14.5px; font-weight: 550; color: var(--text); }
.ac-item .t mark { background: none; color: var(--accent); }
.ac-item .s { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item .body { min-width: 0; flex: 1; }
.ac-item .end { margin-left: auto; display: flex; gap: 6px; align-items: center; color: var(--faint); font-size: 12px; }
.ac-item .ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.ac-item.intent { background: linear-gradient(90deg, var(--accent-soft), transparent); border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); }
.ac-item.intent .ico { background: var(--accent); color: #fff; }
.ac-note { padding: 8px 12px; font-size: 13px; color: var(--muted); }
.ac-note b { color: var(--text); }
.ac-foot { display: flex; align-items: center; gap: 14px; padding: 10px 12px 4px; margin-top: 6px; border-top: 1px solid var(--border); font-size: 12px; color: var(--faint); }
.ac-foot .all { margin-right: auto; color: var(--accent); font-weight: 550; font-size: 13px; }
.ac-foot span { display: inline-flex; gap: 5px; align-items: center; }
.ac-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 8px 8px; }
@media (max-width: 640px) { .ac-foot span { display: none; } }

/* Command palette */
.palette { position: fixed; inset: 0; z-index: 100; display: none; padding: min(10vh, 80px) 16px 16px; }
.palette.open { display: flex; align-items: flex-start; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(4,5,10,.6); backdrop-filter: blur(4px); animation: fade .15s; }
.palette-box { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; max-width: 660px; max-height: 100%; margin: 0 auto; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.palette-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 8px 12px 0 16px; }
.palette-top h2 { font-size: 16px; line-height: 1.4; }
.palette-top .btn { min-height: 44px; }
.palette-input { display: flex; align-items: center; flex: none; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.palette-input input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 4px; border: 0; background: none; font-size: 16px; }
.palette-input input::placeholder { color: var(--muted); opacity: 1; }
.palette-input input:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.palette-input > .ic { width: 20px; height: 20px; color: var(--muted); }
.palette-input .btn { flex: none; min-height: 44px; }
.palette .ac { position: static; display: block; flex: 1 1 auto; min-height: 0; box-shadow: none; border-radius: 0; max-height: 60vh; padding: 12px; }
.palette .ac a, .palette .ac .chip { min-height: 44px; }
@media (max-width: 640px) {
  .palette { padding: 0; }
  .palette-box { border-radius: 0; height: 100%; height: 100dvh; max-height: 100%; }
  .palette .ac { max-height: none; }
  .palette-input > .ic { display: none; }
  .palette-input .btn { padding-inline: 12px; }
}

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-tight { padding: 28px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sec-head h2 { font-size: clamp(20px, 2.4vw, 24px); }
.sec-head p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.kicker .ic { width: 14px; height: 14px; }
.sec-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.sec-link:hover { color: var(--text); }
.sec-link .ic { width: 15px; height: 15px; transition: transform .15s; }
.sec-link:hover .ic { transform: translateX(3px); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------- Category cards (home) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.cat-card {
  --c: #8c7cff; position: relative; overflow: hidden; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s;
}
.cat-card::before { content: ""; position: absolute; width: 220px; height: 220px; left: -90px; top: -120px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--c) 45%, transparent), transparent); opacity: .35; transition: opacity .25s; pointer-events: none; }
.cat-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.cat-card:hover::before { opacity: .7; }
.cat-top { position: relative; display: flex; align-items: center; gap: 12px; }
.cat-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in oklab, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 28%, transparent); }
.cat-ic .ic { width: 20px; height: 20px; }
.cat-name { font-weight: 620; font-size: 15.5px; letter-spacing: -.01em; }
.cat-name:hover { color: var(--accent); }
.cat-count { font-size: 12.5px; color: var(--faint); }
.cat-subs { position: relative; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 14px; font-size: 13.5px; }
.cat-subs a { color: var(--text-2); }
.cat-subs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-2); }
.cat-more { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.cat-more:hover { color: var(--accent); }
.cat-card.cta { display: grid; place-items: center; text-align: center; border-style: dashed; background: transparent; }
.cat-card.cta:hover { background: var(--surface); }
.home-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.home-category { display: flex; align-items: center; gap: 10px; min-height: 72px; min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--border-2); }
.home-category:hover { color: var(--accent); }
.home-category > span:last-child { min-width: 0; }
.home-category b { display: block; font-size: 14px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.home-category small { display: block; color: var(--faint); font-size: 12px; margin-top: 3px; }
.home-category .cat-ic { width: 30px; height: 30px; border-radius: 9px; }
#categories .sec-head { flex-wrap: wrap; align-items: center; gap: 8px 16px; }
#categories .sec-link { min-height: 44px; }
@media (min-width: 720px) { .home-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Site cards ---------- */
.site {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.site:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow); }
.site-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-title { min-width: 0; flex: 1; }
.site-name { display: block; font-weight: 620; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-name::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.site-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.site-meta .domain { font-family: var(--mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-visit { position: relative; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--faint); transition: all .15s; flex: none; }
.site:hover .site-visit { color: var(--text); background: var(--surface-2); }
.site-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.site-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.site-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 2px; }
.site-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.alt-link { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.alt-link:hover { color: var(--accent); }
.alt-link .ic { width: 13px; height: 13px; }
.site .added { font-size: 12px; color: var(--faint); }
.site.is-sponsored { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, color-mix(in oklab, var(--amber) 60%, transparent), var(--border) 45%) border-box; border: 1px solid transparent; }
.site .spons-label { position: absolute; top: -9px; right: 14px; z-index: 2; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 1px 8px; border-radius: 6px; background: var(--bg); color: var(--amber); border: 1px solid color-mix(in oklab, var(--amber) 35%, transparent); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 12px; }
.card-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .card-grid.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .card-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .card-grid, .card-grid.cols-4 { grid-template-columns: 1fr; } }

/* Listing views */
.listing { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); }
.listing[data-view="list"] { grid-template-columns: 1fr; gap: 10px; }
.listing[data-view="list"] .site { flex-direction: row; align-items: flex-start; gap: 16px; padding: 16px 18px; }
.listing[data-view="list"] .site-head { width: 250px; flex: none; }
.listing[data-view="list"] .site-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.listing[data-view="list"] .site-desc { min-height: 0; }
.listing[data-view="list"] .site-foot { margin-top: 0; }
.listing[data-view="list"] .site-visit { order: 3; }
.listing[data-view="compact"] { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.listing[data-view="compact"] .site { flex-direction: row; align-items: center; gap: 14px; border: 0; border-radius: 0; padding: 10px 14px; background: transparent; }
.listing[data-view="compact"] .site + .site { border-top: 1px solid var(--border); }
.listing[data-view="compact"] .site:hover { transform: none; background: var(--surface-2); box-shadow: none; }
.listing[data-view="compact"] .site-head { width: 290px; flex: none; }
.listing[data-view="compact"] .fav { --s: 28px; font-size: 12px; border-radius: 7px; }
.listing[data-view="compact"] .site-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.listing[data-view="compact"] .site-desc { -webkit-line-clamp: 1; min-height: 0; flex: 1; font-size: 13px; }
.listing[data-view="compact"] .site-tags, .listing[data-view="compact"] .alt-link { display: none; }
.listing[data-view="compact"] .site-foot { margin: 0; padding: 0; }
.listing[data-view="compact"] .site.is-sponsored { background: var(--amber-soft); }
.listing[data-view="compact"] .spons-label { position: static; margin-left: 4px; }
.listing[data-view="compact"] .ad-slot { margin: 0; border-radius: 0; border-width: 1px 0 0; }
.site-body { display: contents; }
@media (max-width: 860px) {
  .listing[data-view="list"] .site { flex-direction: column; }
  .listing[data-view="list"] .site-head { width: 100%; }
  .listing[data-view="compact"] .site-head { width: auto; flex: 1; }
  .listing[data-view="compact"] .site-desc, .listing[data-view="compact"] .site-badges { display: none; }
}

/* Rail (horizontal scroller) */
.rail-wrap { position: relative; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-btns { display: flex; gap: 6px; }
.rail-btns .icon-btn { width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface); }
@media (max-width: 640px) { .rail { grid-auto-columns: 84%; } .rail-btns { display: none; } }

/* Tabs */
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 530; color: var(--muted); white-space: nowrap; transition: all .15s; }
.tab .ic { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tab-panel[hidden] { display: none; }

/* Alternatives tiles */
.alt-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .alt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { .alt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.alt-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); transition: all .18s; }
.alt-tile:hover { border-color: var(--border-2); background: var(--surface-2); }
.alt-tile .t { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; line-height: 1.25; }
.alt-tile .t small { display: block; font-weight: 450; font-size: 12px; color: var(--muted); margin-top: 2px; }
.alt-tile .fav { --s: 34px; font-size: 14px; }

/* Collection cards */
.col-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .col-grid { grid-template-columns: 1fr; } }
.col-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .2s, border-color .2s; }
.col-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.col-cover { --g1: #6d5efc; --g2: #22c9e6; position: relative; height: 128px; overflow: hidden; background: radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--g1) 70%, transparent), transparent 60%), radial-gradient(120% 140% at 100% 100%, color-mix(in oklab, var(--g2) 60%, transparent), transparent 55%), var(--surface-2); }
.col-cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1.2px); background-size: 16px 16px; opacity: .5; }
.col-cover .fav-stack { position: absolute; left: 18px; bottom: 16px; z-index: 1; }
.col-cover .fav-stack .fav { --s: 38px; font-size: 15px; border-radius: 11px; box-shadow: 0 0 0 3px color-mix(in oklab, var(--surface) 70%, transparent), 0 8px 18px -8px rgba(0,0,0,.6); }
.col-cover .fav-stack .fav + .fav { margin-left: -9px; }
.col-cover .count { position: absolute; right: 14px; top: 14px; z-index: 1; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 8px; background: rgba(7,8,12,.8); color: #fff; }
/* Keep the complete branded cover visible; the count badge has its own contrast background. */
.col-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.col-cover.has-cover { height: auto; aspect-ratio: 16 / 9; background: var(--surface-2); }
.col-cover.has-cover::after { display: none; }
.col-cover.has-cover .fav-stack { display: none; }
.col-cover.has-cover .count { background: rgba(0,0,0,.55); }
.col-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.col-type { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.col-title { font-size: 17px; font-weight: 640; letter-spacing: -.015em; }
.col-title a::after { content: ""; position: absolute; inset: 0; }
.col-desc { font-size: 13.5px; color: var(--muted); }
.col-meta { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--faint); display: flex; gap: 10px; align-items: center; }

/* Comparison cards */
.cmp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cmp-grid { grid-template-columns: 1fr; } }
.cmp-card { position: relative; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: all .18s; }
.cmp-card.has-cover { overflow: hidden; }
.cmp-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.cmp-cover { margin: -18px -18px 14px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cmp-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp-vs { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.cmp-vs .fav { --s: 44px; font-size: 18px; border-radius: 12px; }
.cmp-vs .vs { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--faint); }
.cmp-card h3 { font-size: 15px; text-align: center; font-weight: 620; }
.cmp-card h3 a::after { content: ""; position: absolute; inset: 0; }
.cmp-card p { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 4px; }

/* Audience */
.aud-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .aud-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aud-card { --c: #8c7cff; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: all .18s; }
.aud-card:hover { border-color: color-mix(in oklab, var(--c) 45%, transparent); background: color-mix(in oklab, var(--c) 7%, var(--surface)); }
.aud-card .cat-ic { width: 40px; height: 40px; }
.aud-card b { display: block; font-size: 14.5px; font-weight: 600; }
.aud-card small { font-size: 12.5px; color: var(--muted); }

/* Guide cards */
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-card { position: relative; display: flex; flex-direction: column; gap: 10px; }
.guide-cover { --g1: #6d5efc; --g2: #22c9e6; aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; position: relative; background: linear-gradient(135deg, color-mix(in oklab, var(--g1) 55%, var(--surface-2)), color-mix(in oklab, var(--g2) 40%, var(--surface-2))); display: grid; place-items: center; }
.guide-cover .ic { width: 42px; height: 42px; color: rgba(255,255,255,.85); stroke-width: 1.4; }
.guide-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.2px) 0 0 / 14px 14px; mask-image: linear-gradient(135deg, #000, transparent 70%); }
.guide-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.guide-cover.has-cover::after { display: none; }
.guide-card .meta { font-size: 12px; color: var(--faint); display: flex; gap: 8px; align-items: center; }
.guide-card .meta b { color: var(--accent); font-weight: 600; }
.guide-card h3 { font-size: 15.5px; font-weight: 620; line-height: 1.3; }
.guide-card h3 a::after { content: ""; position: absolute; inset: 0; }
.guide-card:hover h3 { color: var(--accent); }

/* Editorial archives use the existing brand palette, with the featured story above the reading grid. */
.editorial-archive-head { padding: 24px 0 22px; }
.editorial-archive-head h1 { margin-top: 16px; font-size: clamp(2rem, 4.3vw, 3.2rem); line-height: 1.08; letter-spacing: -.035em; }
.editorial-archive-head > .container > p { max-width: 720px; margin-top: 12px; color: var(--text-2); font-size: clamp(1rem, 1.6vw, 1.125rem); }
.editorial-archive { padding: 0 0 52px; }
.editorial-archive-head .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.editorial-feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 16px; border: 1px solid var(--border-2); border-radius: var(--radius-lg); background: var(--surface); }
.editorial-feature-cover, .editorial-card-cover { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.editorial-feature-cover { align-self: center; border-radius: var(--radius); }
.editorial-feature-cover img, .editorial-card-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.editorial-feature-body { min-width: 0; align-self: center; }
.editorial-feature-label { color: var(--accent); font-size: .875rem; font-weight: 600; margin-bottom: 12px; }
.editorial-feature h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.17; letter-spacing: -.025em; overflow-wrap: anywhere; }
.editorial-feature h2 a { display: block; min-height: 44px; }
.editorial-excerpt { color: var(--text-2); font-size: .9375rem; line-height: 1.65; overflow-wrap: anywhere; }
.editorial-feature .editorial-excerpt { margin-top: 14px; }
.editorial-meta { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: center; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.editorial-meta > * { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.editorial-author { color: var(--text-2); }
.editorial-author:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.editorial-read { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; color: var(--accent); font-size: .9375rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.editorial-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: end; margin: 30px 0 26px; padding: 22px 0; border-top: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); }
.editorial-filters > div { min-width: 0; }
.editorial-filters label { display: block; margin-bottom: 8px; font-size: .875rem; font-weight: 600; }
.editorial-filters input, .editorial-filters select { width: 100%; min-width: 0; height: 46px; border: 1px solid var(--muted); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); padding: 0 12px; font-size: 1rem; }
.editorial-filters input::placeholder { color: var(--muted); opacity: 1; }
.editorial-filter-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.editorial-filter-actions button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 24px; border-radius: var(--radius-sm); background: var(--accent); color: var(--bg); font-size: .9375rem; font-weight: 650; }
.editorial-filter-actions button:hover { filter: brightness(.95); }
.editorial-filter-actions a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 8px; color: var(--text-2); text-decoration: underline; text-underline-offset: 4px; }
.editorial-results-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.editorial-results-head h2 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
.editorial-results-head p { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.editorial-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.editorial-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.editorial-card-cover { border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.editorial-cover-empty { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 24px; color: var(--muted); }
.editorial-cover-empty span { font-size: .875rem; }
.editorial-cover-empty b { font-size: 1.1rem; font-weight: 550; color: var(--text-2); }
.editorial-card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 18px 18px 12px; }
.editorial-card h3 { font-size: 1.1875rem; line-height: 1.35; letter-spacing: -.015em; overflow-wrap: anywhere; }
.editorial-card h3 a { display: block; min-height: 44px; }
.editorial-card h3 a:hover, .editorial-feature h2 a:hover { color: var(--accent); }
.editorial-card .editorial-excerpt { margin-top: 10px; margin-bottom: 14px; }
.editorial-card .editorial-meta { margin-top: auto; }
.editorial-archive :is(a, button, input, select, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.editorial-pagination .pager a, .editorial-pagination .pager span.gap { min-width: 44px; height: 44px; }
.editorial-pagination .pager a[aria-current="page"] { border-color: var(--muted); }
.editorial-pagination .pager .info { color: var(--muted); }
.editorial-empty { padding: 28px 22px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--surface); color: var(--text-2); }
.editorial-empty a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.editorial-quick { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border-2); }
.editorial-quick > h2 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
.editorial-quick > p { margin-top: 10px; color: var(--text-2); font-size: .9375rem; }
.editorial-quick-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 20px; }
.editorial-quick-card { min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.editorial-quick-icons { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.editorial-quick-icons .fav { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.editorial-quick-icons > span { color: var(--muted); font-size: .8125rem; }
.editorial-quick-card h3 { font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.editorial-quick-card h3 a { display: flex; align-items: center; min-height: 44px; }
.editorial-quick-card h3 a:hover { color: var(--accent); }
.editorial-quick-more { margin-top: 20px; }
.editorial-quick-more summary { width: fit-content; max-width: 100%; min-height: 44px; padding: 10px 0; color: var(--accent); cursor: pointer; font-weight: 550; }
.editorial-quick-more .editorial-quick-grid { margin-top: 12px; }
@media (min-width: 640px) {
  .editorial-archive-head { padding-top: 32px; padding-bottom: 28px; }
  .editorial-filters { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
  .editorial-filter-actions { grid-column: 1 / -1; }
  .editorial-grid, .editorial-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-feature { padding: 22px; gap: 24px; }
}
@media (min-width: 1000px) {
  .editorial-feature { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; padding: 24px; }
  .editorial-filters { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 20px; }
  .editorial-filter-actions { grid-column: auto; }
  .editorial-grid, .editorial-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .editorial-grid { gap: 28px; }
  .editorial-results-head { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 20px; }
  .editorial-results-head p { text-align: right; }
}

/* CTA band */
.cta-band { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 900px) { .cta-band { grid-template-columns: 1fr; } }
.cta-card { position: relative; overflow: hidden; padding: 30px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.cta-card.hl { background: radial-gradient(90% 120% at 100% 0%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%), radial-gradient(70% 90% at 0% 100%, color-mix(in oklab, var(--accent-2) 14%, transparent), transparent 60%), var(--surface); }
.cta-card h3 { font-size: 22px; letter-spacing: -.02em; }
.cta-card p { color: var(--text-2); margin-top: 8px; font-size: 14.5px; max-width: 520px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.newsletter { display: flex; gap: 8px; margin-top: 18px; }
.newsletter input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--muted); background: var(--bg-2); }
.newsletter .btn { min-height: 44px; }
.newsletter input:focus { border-color: var(--accent); }
.fine { font-size: 12px; color: var(--faint); margin-top: 10px; }
.plan-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.plan-pill { font-size: 12.5px; padding: 6px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.plan-pill b { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--bg-2); }
.site-footer .foot-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding: 48px 0 36px; }
@media (max-width: 860px) { .site-footer .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.foot-brand p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 320px; }
.foot-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; margin-bottom: 12px; }
.foot-col a { display: block; font-size: 14px; color: var(--text-2); padding: 4px 0; }
.foot-col a:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px 0 28px; border-top: 1px solid var(--border); font-size: 13px; color: var(--faint); }
.foot-bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }
.foot-bottom a:hover { color: var(--text); }
.site-footer .foot-news input[type=email] { min-width: 0; min-height: 44px; flex: 1 1 170px; border-color: var(--muted); font-size: 16px; }
.site-footer .foot-news .btn { min-height: 44px; }
.foot-brand .fine { font-size: 12px; line-height: 1.6; }
.foot-bottom > span { overflow-wrap: anywhere; min-width: 0; }
.site-footer-compact { margin-top: 16px; }
.site-footer-compact .foot-bottom { border-top: 0; padding-block: 16px; align-items: center; }
.site-footer-compact .foot-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 640px) {
  .site-footer { margin-top: 24px; }
  .site-footer .foot-top { gap: 24px 16px; padding: 28px 0 20px; }
  .foot-col a { display: flex; align-items: center; min-height: 44px; line-height: 1.4; }
  .foot-col h4 { margin-bottom: 6px; }
  .foot-col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .foot-col:last-child h4 { grid-column: 1 / -1; }
  .foot-bottom { padding-block: 16px; gap: 4px; }
  .foot-bottom nav { gap: 4px 16px; }
  .foot-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
  .newsletter { flex-wrap: wrap; }
  .newsletter input { flex-basis: 180px; }
}

/* ---------- Inner page hero ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: 28px 0 34px; border-bottom: 1px solid var(--border); }
.page-hero .hero-bg .aurora { filter: blur(90px); opacity: calc(var(--aurora-op) * .6); animation: none; }
.page-hero .aurora.a1 { --c: #8c7cff; width: 520px; height: 320px; left: -120px; top: -180px; margin: 0; background: radial-gradient(closest-side, var(--c), transparent); }
.page-hero .aurora.a2 { width: 420px; height: 280px; left: auto; right: -80px; top: -140px; margin: 0; }
.page-hero .dot-grid { -webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%); mask-image: linear-gradient(to bottom, #000, transparent 90%); opacity: .6; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.crumbs a:hover { color: var(--text); }
.crumbs .ic { width: 13px; height: 13px; color: var(--faint); }
.crumbs [aria-current] { color: var(--text-2); }
.ph-row { display: flex; align-items: flex-start; gap: 18px; }
.ph-ic { width: 60px; height: 60px; border-radius: 17px; flex: none; }
.ph-ic .ic { width: 28px; height: 28px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.035em; font-weight: 680; }
.ph-sub { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.ph-sub span { display: inline-flex; align-items: center; gap: 6px; }
.ph-sub .ic { width: 14px; height: 14px; }
.ph-intro { margin-top: 18px; max-width: 820px; color: var(--text-2); font-size: 15.5px; }
.ph-intro p + p { margin-top: 10px; }
.ph-intro a, .prose p > a, .prose li > a, .callout a, .faq a, .link { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--accent) 55%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.ph-intro a:hover, .prose p > a:hover, .prose li > a:hover, .callout a:hover, .faq a:hover, .link:hover { text-decoration-color: var(--accent); }
.scoped-search { margin-top: 22px; max-width: 560px; }
.scoped-search .searchbar { margin: 0; max-width: none; }
.scoped-search .searchbar-field { height: 50px; border-radius: 14px; padding-left: 16px; box-shadow: 0 0 0 1px var(--border-2); }
.scoped-search .searchbar-field::before { display: none; }
.scoped-search input { font-size: 15px; }
.scope-pill { font-size: 12px; padding: 3px 8px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; font-weight: 550; }
@media (max-width: 640px) { .ph-ic { width: 48px; height: 48px; border-radius: 14px; } .ph-ic .ic { width: 22px; height: 22px; } .ph-row { gap: 14px; } }

/* Topic (subcategory) cards */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.topic-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: all .18s; }
.topic-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.topic-card .top { display: flex; align-items: center; gap: 12px; }
.topic-card .cat-ic { width: 36px; height: 36px; border-radius: 10px; }
.topic-card .cat-ic .ic { width: 18px; height: 18px; }
.topic-card h3 { font-size: 15px; font-weight: 620; }
.topic-card h3 a::after { content: ""; position: absolute; inset: 0; }
.topic-card .n { font-size: 12.5px; color: var(--faint); }
.topic-card p { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topic-card .bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.topic-card .arrow { color: var(--faint); transition: transform .15s, color .15s; }
.topic-card:hover .arrow { color: var(--accent); transform: translateX(3px); }
.topic-card.hot::before { content: "Popular"; position: absolute; top: 14px; right: 14px; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--amber); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* Two-column layouts */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.split-even { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
@media (max-width: 960px) { .split-even { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { border-radius: 12px; background: var(--surface); border: 1px solid var(--border); transition: border-color .15s; }
.faq details[open] { border-color: var(--border-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; font-weight: 580; font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details > div { padding: 0 18px 16px; color: var(--text-2); font-size: 14.5px; }

/* Link lists / side boxes */
.box { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.box + .box { margin-top: 14px; }
.box h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.box h3 .ic { width: 15px; height: 15px; color: var(--accent); }
.link-list li + li { border-top: 1px solid var(--border); }
.link-list a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; font-size: 14px; color: var(--text-2); }
.link-list a:hover { color: var(--text); }
.link-list a .n { margin-left: auto; font-size: 12px; color: var(--faint); }
.link-list .fav { --s: 24px; font-size: 11px; border-radius: 6px; }
.box.guide-box { background: radial-gradient(100% 100% at 100% 0%, var(--accent-soft), transparent 70%), var(--surface); }
.box.guide-box b { display: block; font-size: 16px; line-height: 1.3; margin: 2px 0 6px; letter-spacing: -.01em; }
.box.guide-box p { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }

/* Ads (placeholders) */
.ad-slot { display: grid; place-items: center; gap: 2px; border-radius: 12px; border: 1px dashed var(--border-2); color: var(--faint); font-size: 12px; text-align: center; background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in oklab, var(--surface-2) 60%, transparent) 10px 20px); }
.ad-slot b { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.ad-leader { height: 100px; margin: 8px 0; }
.ad-infeed { grid-column: 1 / -1; height: 110px; }
.ad-rect { height: 250px; }

/* ---------- Subcategory toolbar & filters ---------- */
.sib-chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 2px; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 92%, transparent); mask-image: linear-gradient(to right, #000 92%, transparent); }
.sib-chips::-webkit-scrollbar { display: none; }
.toolbar { position: sticky; top: var(--header-h); z-index: 30; margin: 0 -24px; padding: 12px 24px; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.toolbar.stuck { border-bottom-color: var(--border); }
.toolbar-row { display: flex; align-items: center; gap: 10px; }
.toolbar .result-count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.toolbar .result-count b { color: var(--text); }
.filter-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dd { position: relative; }
.dd > .chip .ic:last-child { width: 13px; height: 13px; }
.dd-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 35; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); display: none; }
.dd.open .dd-menu { display: block; animation: pop .12s; }
.dd-menu label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.dd-menu label:hover { background: var(--surface-2); color: var(--text); }
.dd-menu label .n { margin-left: auto; font-size: 12px; color: var(--faint); }
.dd-menu input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }
.chip .dot-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; font-weight: 600; border-radius: 99px; background: #5a45f2; color: #fff; }
.toolbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.select { height: 34px; padding: 0 30px 0 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b91a4' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; font-size: 13.5px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.view-toggle { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.view-toggle button { width: 30px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--faint); }
.view-toggle button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.view-toggle .ic { width: 16px; height: 16px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.active-filters:empty { display: none; }
.af { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 6px 0 10px; font-size: 12.5px; border-radius: 99px; background: var(--accent-soft); color: var(--text); }
.af .ic { width: 13px; height: 13px; }
.af-clear { font-size: 12.5px; color: var(--muted); padding: 0 6px; }
.af-clear:hover { color: var(--text); }
.mobile-filter-btn { display: none; }
@media (max-width: 860px) {
  .toolbar { margin: 0 -16px; padding: 10px 16px; }
  .toolbar .filter-chips, .toolbar .result-count.desk { display: none; }
  .mobile-filter-btn { display: inline-flex; }
  .toolbar-right .view-toggle button[data-view="compact"] { display: none; }
}
@media (max-width: 640px) { .toolbar { margin: 0 -16px; } }

.sheet { position: fixed; inset: 0; z-index: 95; display: none; }
.sheet.open { display: block; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 85vh; display: flex; flex-direction: column; background: var(--bg-2); border-radius: 20px 20px 0 0; border-top: 1px solid var(--border-2); animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sheet-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--border-2); }
.sheet-body { overflow-y: auto; padding: 8px 16px 16px; }
.sheet-body h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 16px 0 10px; font-weight: 600; }
.sheet-body .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: 10px; }
.sheet-foot .btn-primary { flex: 1; }

/* Pagination */
.pager { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 28px; }
.pager nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pager a, .pager span.gap { min-width: 38px; height: 38px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px; font-size: 14px; color: var(--text-2); border: 1px solid transparent; }
.pager a:hover { background: var(--surface-2); color: var(--text); }
.pager a[aria-current="page"] { background: var(--surface); border-color: var(--border-2); color: var(--text); font-weight: 600; }
.pager .info { font-size: 13px; color: var(--faint); }

.empty-state { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--border-2); border-radius: var(--radius); display: none; }

/* ---------- Article / guide ---------- */
.article-head { padding: 28px 0 8px; }
.article-head .inner { max-width: 820px; }
.article-head h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.07; letter-spacing: -0.04em; font-weight: 690; margin-top: 10px; }
.article-head .dek { font-size: clamp(16px, 2vw, 19px); color: var(--text-2); margin-top: 14px; max-width: 720px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 22px; font-size: 13.5px; color: var(--muted); }
.byline .who { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 560; }
.byline .who small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.byline .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.byline .checked { display: inline-flex; align-items: center; gap: 5px; color: var(--green); }
.byline .checked .ic { width: 15px; height: 15px; }
.share { display: flex; gap: 6px; margin-left: auto; }
.share .icon-btn { width: 34px; height: 34px; border: 1px solid var(--border); }
.article-cover { position: relative; margin: 26px auto 8px; width: 100%; max-width: 820px; aspect-ratio: 16 / 9; height: auto; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); background: radial-gradient(60% 90% at 15% 20%, color-mix(in oklab, #7b5cff 55%, transparent), transparent 70%), radial-gradient(50% 80% at 85% 80%, color-mix(in oklab, #22c9e6 45%, transparent), transparent 70%), radial-gradient(40% 60% at 60% 10%, color-mix(in oklab, #ff5fb4 30%, transparent), transparent 70%), var(--surface-2); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-collage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 18px; z-index: 1; }
.cover-collage .win { width: 220px; border-radius: 14px; background: color-mix(in oklab, var(--surface) 82%, transparent); border: 1px solid var(--border-2); box-shadow: 0 24px 60px -20px rgba(0,0,0,.6); backdrop-filter: blur(10px); padding: 12px; }
.cover-collage .win:nth-child(1) { transform: rotate(-5deg) translateY(12px); }
.cover-collage .win:nth-child(3) { transform: rotate(4deg) translateY(16px); }
.cover-collage .win:nth-child(2) { transform: translateY(-8px); z-index: 1; }
.win .bar { display: flex; gap: 5px; margin-bottom: 10px; }
.win .bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.win .row { display: flex; align-items: center; gap: 10px; }
.win .row b { font-size: 13.5px; }
.win .row small { display: block; font-size: 11px; color: var(--muted); }
.win .lines { margin-top: 12px; display: grid; gap: 6px; }
.win .lines i { display: block; height: 7px; border-radius: 4px; background: var(--surface-3); }
.win .lines i:nth-child(2) { width: 75%; } .win .lines i:nth-child(3) { width: 55%; }
@media (max-width: 760px) { .cover-collage .win:nth-child(1), .cover-collage .win:nth-child(3) { display: none; } }

.article-layout { display: grid; grid-template-columns: minmax(0, 720px) 300px; gap: 56px; justify-content: space-between; padding: 22px 0 40px; }
@media (max-width: 1100px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .article-aside { display: none; } }
.article-aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; scrollbar-width: thin; }
.toc a { display: block; padding: 6px 0 6px 14px; font-size: 13.5px; color: var(--muted); border-left: 2px solid var(--border); transition: all .15s; }
.toc a:hover { color: var(--text); }
.toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.toc a.active { color: var(--text); border-left-color: var(--accent); }
.toc-mobile { display: none; margin: 8px 0 20px; }
@media (max-width: 1100px) { .toc-mobile { display: block; } }
.toc-mobile summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-weight: 580; font-size: 14.5px; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile .toc { padding: 0 16px 12px; }
.tool { scroll-margin-top: calc(var(--header-h) + 20px); border-top: 1px solid var(--border); padding-top: 22px; }
.tool-head, .tool-title, .tool-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.tool-head { justify-content: space-between; gap: 14px; }
.prose .tool-title { margin: 0; font-size: 25px; }
.tool-title .fav { flex: none; }
.tool-rank { color: var(--muted); font-size: 17px; }
.tool-meta { margin: 12px 0; font-size: 13px; }
.tool-meta .domain, .tool-details { white-space: nowrap; }
.tool-details {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding-inline: 6px;
  margin: -6px -6px;
}
.tool-label { color: var(--text); font-weight: 600; margin: 16px 0 8px; }
.tool-note > * + * { margin-top: 1.1em; }
.tool-note h3 { margin-top: 1.6em; }
.tool-note a, .prose > p a, .prose li a, .prose td a { text-decoration: underline; text-underline-offset: 3px; }
.cmp-byline { max-width: 720px; margin-inline: auto; }
.dir-details { margin-top: 32px; border-block: 1px solid var(--border); padding: 16px 0; }
.dir-details summary { cursor: pointer; color: var(--text); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.dir-details .table-wrap { margin-top: 18px; }
.prose .h-anchor:focus-visible { opacity: 1; }
.prose img { display: block; max-width: 100%; height: auto; }
@media (max-width: 640px) { .tool-head { align-items: flex-start; } .tool-visit { min-height: 42px; } .tool-details { min-height: 44px; margin-block: -12px; } }

.prose { font-size: 17px; line-height: 1.72; color: var(--text-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 26px; color: var(--text); margin-top: 2em; letter-spacing: -.025em; line-height: 1.2; }
.prose h3 { font-size: 19px; color: var(--text); margin-top: 1.6em; letter-spacing: -.015em; }
.prose strong { color: var(--text); font-weight: 620; }
.prose ul { padding-left: 1.2em; list-style: none; }
.prose ul li { position: relative; }
.prose ul li + li { margin-top: .5em; }
.prose ul li::before { content: ""; position: absolute; left: -1em; top: .72em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.prose .h-anchor { color: var(--faint); margin-left: 6px; opacity: 0; font-weight: 400; text-decoration: none; }
.prose h2:hover .h-anchor { opacity: 1; }

.quick-answer { padding: 22px; border-radius: 18px; background: radial-gradient(90% 120% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--border)); }
.quick-answer .kicker { margin-bottom: 6px; }
.quick-answer > p { font-size: 15.5px; color: var(--text-2); }
.qa-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
@media (max-width: 640px) { .qa-picks { grid-template-columns: 1fr; } }
.qa-pick { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); font-size: 13.5px; line-height: 1.45; }
.qa-pick .lab { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.qa-pick .row { display: flex; align-items: center; gap: 10px; }
.qa-pick b { color: var(--text); font-size: 15px; }
.qa-pick span { color: var(--muted); }

.inline-site { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-size: 15px; line-height: 1.55; transition: border-color .15s; }
.inline-site:hover { border-color: var(--border-2); }
.inline-site .body { flex: 1; min-width: 0; }
.inline-site .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-site .top b { color: var(--text); font-size: 17px; letter-spacing: -.01em; }
.inline-site .top .domain { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.inline-site p { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.inline-site .pc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; font-size: 13.5px; }
.inline-site .pc div b { display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 4px; }
.inline-site .pc .pro b { color: var(--green); }
.inline-site .pc .con b { color: var(--accent-3); }
.inline-site .actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.inline-site .rank { position: absolute; left: -12px; top: -12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--text); color: var(--bg); }
@media (max-width: 640px) { .inline-site { flex-direction: column; } .inline-site .actions { flex-direction: row; } .inline-site .pc { grid-template-columns: 1fr; } }

.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px; background: var(--amber-soft); border: 1px solid color-mix(in oklab, var(--amber) 30%, transparent); font-size: 15px; color: var(--text-2); }
.callout .ic { color: var(--amber); margin-top: 3px; }
.callout b { color: var(--text); }

.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.cmp-table th, .cmp-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cmp-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; background: var(--surface-2); }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr:hover td { background: var(--surface-2); }
.cmp-table td:first-child { color: var(--text); font-weight: 580; }
.cmp-table .nm { display: flex; align-items: center; gap: 10px; }
.cmp-table .nm .fav { --s: 26px; font-size: 11px; border-radius: 7px; }
.yes { color: var(--green); } .no { color: var(--faint); } .part { color: var(--amber); }

.entity-box { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 18px; border: 1px solid var(--border-2); background: linear-gradient(120deg, color-mix(in oklab, #f472b6 12%, var(--surface)), var(--surface) 60%); }
.entity-box .body { flex: 1; }
.entity-box b { display: block; font-size: 17px; color: var(--text); letter-spacing: -.01em; }
.entity-box span { font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .entity-box { flex-direction: column; align-items: flex-start; } }

.explore-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .explore-grid { grid-template-columns: 1fr; } }
.explore-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; transition: all .15s; }
.explore-item:hover { border-color: var(--border-2); background: var(--surface-2); }
.explore-item .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.explore-item small { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.explore-item b { color: var(--text); font-weight: 580; }

.author-box { display: flex; gap: 16px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.author-box .avatar { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.author-box b { color: var(--text); font-size: 15.5px; }
.author-box p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.author-box .links { display: flex; gap: 14px; margin-top: 10px; font-size: 13.5px; }

.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 70; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---------- Toast + mockup switcher ---------- */
.toast { position: fixed; left: 50%; bottom: 84px; z-index: 120; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 13.5px; box-shadow: 0 16px 40px -10px rgba(0,0,0,.5); transition: all .22s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast code { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border-radius: 5px; background: color-mix(in oklab, var(--bg) 14%, transparent); }
.mock-switch { position: fixed; left: 50%; bottom: 16px; z-index: 80; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 14px; background: color-mix(in oklab, var(--surface) 85%, transparent); backdrop-filter: blur(14px); box-shadow: var(--shadow-lg); font-size: 12.5px; max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; }
.mock-switch .lbl { padding: 0 10px 0 8px; color: var(--faint); font-weight: 600; white-space: nowrap; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.mock-switch a { padding: 7px 11px; border-radius: 9px; color: var(--muted); white-space: nowrap; font-weight: 530; }
.mock-switch a:hover { color: var(--text); background: var(--surface-2); }
.mock-switch a[aria-current="page"] { color: var(--text); background: var(--surface-3); }
.mock-switch .x { padding: 7px; color: var(--faint); display: grid; place-items: center; }
.mock-switch.hidden { display: none; }

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

/* heading resets inside components */
.site-title h3 { font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; margin: 0; }
.topic-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.topic-strip::-webkit-scrollbar { display: none; }
.topic-strip .lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--faint); white-space: nowrap; margin-right: 4px; }
.topic-strip .lbl .ic { color: var(--accent-3); width: 15px; height: 15px; }
.inline-filter { position: relative; flex: 0 1 240px; }
.inline-filter input { width: 100%; height: 34px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; outline: 0; }
.inline-filter input:focus { border-color: var(--accent); }
.inline-filter .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
@media (max-width: 860px) { .inline-filter { flex: 1; } }
.how-choose { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: color-mix(in oklab, var(--surface) 80%, transparent); border: 1px solid var(--border); font-size: 14px; color: var(--text-2); max-width: 820px; }
.how-choose .ic { color: var(--amber); }
.how-choose a { margin-left: auto; white-space: nowrap; color: var(--accent); font-weight: 550; display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 640px) { .how-choose { flex-wrap: wrap; } .how-choose a { margin-left: 30px; } }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* --- fixes after review --- */
@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } }
.header-search-btn .label-long { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hero h1, .page-hero h1, .article-head h1 { text-wrap: balance; }
@media (max-width: 640px) {
  .toolbar-row { flex-wrap: wrap; }
  .inline-filter { order: -1; flex: 1 1 100%; }
  .toolbar-right { margin-left: auto; }
}

[hidden] { display: none !important; }
.nav-link { white-space: nowrap; }
.header-search { max-width: 360px; }
.header-search-btn .label-short { display: none; }
@media (max-width: 560px) { .header-search-btn .label-short { display: inline; } }
.topic-card.hot::before { top: auto; bottom: 20px; right: 44px; }
.toolbar .filter-chips { flex-wrap: nowrap; }
.toolbar .chip { padding: 0 11px; }
@media (max-width: 1240px) and (min-width: 861px) { .inline-filter { display: none; } }
@media (max-width: 1180px) { .header-search { max-width: 250px; } .header-search-btn .kbds { display: none; } }
@media (max-width: 1100px) { .header-actions .btn-submit { display: none; } }
body .saved-count { background: #5a45f2; color: #fff; }
.drawer-panel a.dl .saved-count { position: static; height: auto; min-width: 24px; background: transparent; }
@media (max-width: 1100px) {
  .header-actions .member-nav, .header-actions .saved-btn { display: none; }
  .header-actions .menu-btn { display: grid; }
}
@media (max-width: 1000px) { .main-nav { display: none; } .menu-btn { display: inline-grid; } .header-search { max-width: none; } }
.header-search, .header-search-btn { min-width: 0; }
.header-inner > * { flex-shrink: 0; }
.header-inner > .header-search { flex-shrink: 1; }
.site-foot { flex-wrap: wrap; row-gap: 6px; }
.site-foot .alt-link, .site-foot .added { margin-left: auto; white-space: nowrap; }
.site-badges { flex-wrap: nowrap; }
@media (max-width: 640px) {
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cat-card { padding: 14px; }
  .cat-card .cat-subs, .cat-card .cat-more { display: none; }
  .cat-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cat-name { font-size: 14px; line-height: 1.25; display: block; }
  .section { padding: 32px 0; }
}

/* ---------- Alternatives page ---------- */
.ph-fav { --s: 60px; font-size: 26px; border-radius: 17px; }
.h2 { font-size: 20px; letter-spacing: -.02em; margin-bottom: 14px; }
.about-box { padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.about-head { display: flex; align-items: center; gap: 14px; }
.about-head b { display: block; font-size: 17px; }
.about-head .domain { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.about-head .btn { margin-left: auto; }
.about-box > p { margin-top: 12px; color: var(--text-2); font-size: 15px; }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.about-grid small, .why-switch small { display: block; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 6px; }
.why-switch { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.why-switch ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; font-size: 14px; color: var(--text-2); }
.why-switch li { display: flex; gap: 8px; align-items: flex-start; }
.why-switch li .ic { color: var(--green); margin-top: 4px; }
@media (max-width: 640px) { .about-grid, .why-switch ul { grid-template-columns: 1fr; } }
.alt-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .alt-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.alt-picks .qa-pick { background: var(--surface); transition: border-color .15s; }
.alt-picks .qa-pick:hover { border-color: var(--border-2); }
.alt-toolbar { position: sticky; top: var(--header-h); z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 0; margin-bottom: 8px; background: color-mix(in oklab, var(--bg) 90%, transparent); backdrop-filter: blur(12px); }
.alt-filter-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.alt-filter-row::-webkit-scrollbar { display: none; }
.alt-toolbar-right { display: flex; align-items: center; gap: 10px; flex: none; }
.alt-toolbar .result-count { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.alt-toolbar .result-count b { color: var(--text); }
@media (max-width: 640px) { .alt-toolbar { flex-wrap: wrap; } .alt-toolbar-right { width: 100%; justify-content: space-between; } }
.alt-list { display: flex; flex-direction: column; gap: 12px; }
.alt-row { position: relative; display: grid; grid-template-columns: 34px 56px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); transition: border-color .2s; scroll-margin-top: calc(var(--header-h) + 80px); }
.alt-row:hover { border-color: var(--border-2); }
.alt-row:target { border-color: color-mix(in oklab, var(--accent) 55%, transparent); box-shadow: var(--glow); }
.alt-rank { font-size: 22px; font-weight: 700; color: var(--faint); letter-spacing: -.03em; padding-top: 12px; text-align: center; }
.alt-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.alt-top h3 { font-size: 19px; letter-spacing: -.02em; }
.alt-top h3 a:hover { color: var(--accent); }
.alt-top .domain { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.alt-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.alt-main p { margin-top: 8px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.alt-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 12px; font-size: 13.5px; color: var(--text-2); }
.alt-meta b { display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 2px; }
.alt-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.match { position: relative; display: inline-flex; align-items: center; width: 150px; height: 24px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; font-size: 12px; }
.match i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, color-mix(in oklab, var(--green) 30%, transparent), color-mix(in oklab, var(--green) 14%, transparent)); }
.match em { position: relative; font-style: normal; font-weight: 600; padding-left: 9px; color: var(--text); }
@media (max-width: 760px) {
  .alt-row { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 18px; }
  .alt-rank { position: absolute; top: -10px; left: -8px; width: 26px; height: 26px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--text); color: var(--bg); }
  .alt-row .fav-56 { --s: 48px; }
  .alt-actions { grid-column: 1 / -1; }
  .alt-actions .btn { width: 100%; }
}
.alt-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .alt-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.about-head > div { min-width: 0; }
.about-head .domain { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1280px) { .main-nav .nav-link.hide-md { display: none; } }
