/* Grok Field Guide: v2 design system plus v3 information architecture. Mobile-first, dark-first, no external requests. */
[hidden] { display: none !important; }
@font-face { font-family: "Geist Local"; src: url("fonts/geist-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono Local"; src: url("fonts/geist-mono-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif Local"; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --sans: "Geist Local", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono Local", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --serif: "Instrument Serif Local", "Iowan Old Style", Georgia, "Times New Roman", serif;

  /* fluid type scale (360px -> 1600px) */
  --t-xs: clamp(.75rem, .73rem + .1vw, .8125rem);
  --t-sm: clamp(.875rem, .85rem + .12vw, .9375rem);
  --t-md: clamp(1rem, .97rem + .15vw, 1.0625rem);
  --t-lg: clamp(1.125rem, 1.05rem + .35vw, 1.375rem);
  --t-xl: clamp(1.375rem, 1.2rem + .8vw, 1.875rem);
  --t-2xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --t-hero: clamp(2.375rem, 1.5rem + 4.4vw, 5.75rem);

  /* fluid space */
  --s-1: clamp(.25rem, .22rem + .1vw, .3125rem);
  --s-2: clamp(.5rem, .45rem + .2vw, .625rem);
  --s-3: clamp(.75rem, .68rem + .3vw, 1rem);
  --s-4: clamp(1rem, .9rem + .45vw, 1.375rem);
  --s-5: clamp(1.5rem, 1.3rem + .9vw, 2.25rem);
  --s-6: clamp(2.25rem, 1.8rem + 2vw, 4rem);
  --s-7: clamp(3rem, 2.2rem + 3.5vw, 6.5rem);
  --gutter: clamp(1rem, .6rem + 2vw, 2.5rem);
  --maxw: 1520px;
  --measure: 68ch;
  --r: 14px; --r-sm: 9px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --head-h: 60px;
  --tabbar-h: 0px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0e; --bg-2: #101114; --surface: #14161a; --surface-2: #1a1d22; --line: #262a31; --line-2: #343943;
  --text: #edece6; --text-2: #c3c4c6; --muted: #979ba3;
  --accent: #c8f25a; --accent-ink: #c8f25a; --on-accent: #0b0c0e; --accent-soft: rgba(200, 242, 90, .12);
  --warn: #ffb35c; --warn-soft: rgba(255, 179, 92, .12);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 50px -24px rgba(0,0,0,.8);
  --grid-line: rgba(255,255,255,.045); --noise-o: .07;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f2ec; --bg-2: #ebeae3; --surface: #ffffff; --surface-2: #f7f6f1; --line: #dcdad1; --line-2: #c9c6bb;
  --text: #121316; --text-2: #33363c; --muted: #5a5e66;
  --accent: #c8f25a; --accent-ink: #3d5c00; --on-accent: #0b0c0e; --accent-soft: rgba(110, 150, 0, .12);
  --warn: #9a4a00; --warn-soft: rgba(190, 100, 0, .1);
  --shadow: 0 1px 2px rgba(20,20,10,.05), 0 18px 40px -26px rgba(20,20,10,.35);
  --grid-line: rgba(0,0,0,.05); --noise-o: .05;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
html.locked { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: var(--t-md); line-height: 1.55;
  font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
body::before { /* film grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: var(--noise-o);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .site-foot, .site-head { position: relative; z-index: 1; }
main:focus { outline: none; }
img, svg { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
p a, .method-card a { color: var(--accent-ink); }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.02em; font-weight: 620; text-wrap: balance; }
p { margin: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.muted { color: var(--muted); }
.small { font-size: var(--t-xs); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }

.shell { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(12px + env(safe-area-inset-top)); }

.eyebrow { display: inline-block; font-family: var(--mono); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.num { color: var(--accent-ink); font-size: .62em; font-weight: 500; letter-spacing: 0; margin-right: .7em; vertical-align: .32em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: 0 1.15em; border-radius: 999px; border: 1px solid transparent;
  font: 600 var(--t-sm)/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), color .2s; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.sm { min-height: 40px; padding: 0 .95em; font-size: var(--t-xs); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; transition: background .2s, border-color .2s; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.link-btn { background: none; border: 0; color: var(--accent-ink); font: 600 var(--t-sm) var(--sans); cursor: pointer; min-height: 44px; padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) {
  .btn.primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
  .btn.ghost:hover { border-color: var(--text); background: var(--surface); }
  .icon-btn:not(:disabled):hover { background: var(--surface-2); border-color: var(--line-2); }
}

/* Header */
.site-head { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); }
/* no backdrop-filter on phones: it would trap the fixed bottom tab bar inside the header */
@media (min-width: 768px) { .site-head { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); } }
.head-row { display: flex; align-items: center; gap: var(--s-3); height: var(--head-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.015em; font-size: var(--t-md); min-height: 44px; margin-right: auto; }
.brand em, .foot-brand em { font-size: 1.14em; }
.mark { width: 30px; height: 30px; flex: none; }
.mark rect { fill: var(--accent); stroke: none; }
.mark path { stroke: var(--on-accent); stroke-width: 2.6; }
.theme-toggle .i-moon { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* Tabs: bottom bar on phones, inline in header from 768px */
.tabs { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border-radius: 12px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .01em; }
.tabs svg { width: 22px; height: 22px; }
.tabs a[aria-current="page"] { color: var(--text); }
.tabs a[aria-current="page"] svg { color: var(--accent-ink); }
:root { --tabbar-h: 66px; }
@media (min-width: 768px) {
  :root { --tabbar-h: 0px; --head-h: 68px; }
  .tabs { position: static; display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: none; }
  .tabs a { flex-direction: row; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: var(--t-sm); }
  .tabs svg { width: 16px; height: 16px; }
  .tabs a[aria-current="page"] { background: var(--text); color: var(--bg); }
  .tabs a[aria-current="page"] svg { color: var(--bg); }
  .brand { margin-right: 0; }
  .head-row { justify-content: space-between; }
}
@media (hover: hover) { .tabs a:not([aria-current]):hover { color: var(--text); } }
/* Phone landscape: short screens get the tabs back in the header */
@media (max-width: 767px) and (orientation: landscape) and (max-height: 500px) {
  :root { --tabbar-h: 0px; }
  .tabs { position: static; display: flex; padding: 0; background: none; border: 0; backdrop-filter: none; gap: 2px; }
  .tabs a { flex-direction: row; min-height: 44px; padding: 0 10px; font-size: .8rem; }
  .tabs svg { display: none; }
  .brand-text { display: none; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: var(--s-6) 0 var(--s-6); border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 0%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 70% 0%, #000 30%, transparent 75%); }
.hero-bg::after { content: ""; position: absolute; width: 60vmax; height: 60vmax; right: -18vmax; top: -34vmax; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent); filter: blur(10px); opacity: .7; }
html[data-theme="light"] .hero-bg::after { opacity: .9; }
.hero .shell { position: relative; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: var(--t-xs); color: var(--text-2); letter-spacing: .04em;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px 6px 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: var(--t-hero); font-weight: 640; letter-spacing: -.045em; line-height: .98; margin-top: var(--s-4); max-width: 15ch; }
.hero h1 em { color: var(--accent-ink); letter-spacing: -.02em; font-size: 1.06em; padding-right: .04em; }
.hero .lede { margin-top: var(--s-4); font-size: var(--t-lg); color: var(--text-2); max-width: 56ch; line-height: 1.5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s-5); }
.hero-sm { padding-bottom: var(--s-5); }
.hero-sm h1 { font-size: clamp(2.125rem, 1.4rem + 3.4vw, 4.5rem); max-width: 18ch; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); margin: var(--s-6) 0 0; border-top: 1px solid var(--line); }
.stat { padding: var(--s-4) var(--s-3) 0 0; display: flex; flex-direction: column-reverse; gap: 4px; }
.stat + .stat { padding-left: 0; }
.stat dd { margin: 0; font-family: var(--mono); font-size: var(--t-2xl); font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.stat dt { font-size: var(--t-xs); color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat + .stat { padding-left: var(--s-4); border-left: 1px solid var(--line); }
}

/* Sections */
.section { padding-block: var(--s-6); }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px var(--s-4); margin-bottom: var(--s-5); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: var(--t-2xl); letter-spacing: -.035em; }
.section-head p { font-size: var(--t-sm); max-width: 48ch; }

/* Meter + confidence */
.meter { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); white-space: nowrap; }
.meter-bar { display: inline-grid; grid-template-columns: repeat(10, 6px); gap: 2px; }
.meter-bar i { height: 14px; border-radius: 2px; background: var(--line-2); }
.meter-bar i.on { background: var(--accent); }
html[data-theme="light"] .meter-bar i.on { background: var(--accent-ink); }
.meter b { font-size: var(--t-md); font-weight: 600; }
.meter small { color: var(--muted); font-size: var(--t-xs); margin-left: -6px; }
.conf { display: inline-flex; align-items: center; gap: 6px; font: 600 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.conf::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.conf-high { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); background: var(--accent-soft); }
.conf-medium { color: var(--text-2); }
.conf-medium::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.conf-low { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); border-style: dashed; background: var(--warn-soft); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--t-xs)/1 var(--mono); color: var(--text-2); padding: 6px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; }
a.tag { min-height: 32px; }
.tag .mono { color: var(--muted); }

/* Featured */
.features { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
.feature { position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; overflow: hidden; box-shadow: var(--shadow); transition: transform .3s var(--ease), border-color .3s var(--ease); isolation: isolate; }
.feature-rank { position: absolute; right: var(--s-4); top: calc(var(--s-2) * -1); font-family: var(--serif); font-style: italic; font-size: clamp(5rem, 3rem + 7vw, 9rem); line-height: 1; color: var(--line-2); z-index: -1; letter-spacing: -.04em; opacity: .7; }
.feature-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feature h3 { font-size: var(--t-xl); max-width: 26ch; }
.feature p { color: var(--text-2); max-width: var(--measure); }
.feature-result { border-left: 2px solid var(--accent); padding-left: var(--s-3); display: flex; flex-direction: column; gap: 4px; }
.feature-foot { margin-top: auto; padding-top: var(--s-3); display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); }
.more { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--accent-ink); }
.more svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.feature-lg { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)) 0%, var(--surface) 55%); }
.feature-lg h3 { font-size: var(--t-2xl); letter-spacing: -.035em; }
.feature-lg .feature-rank { color: color-mix(in srgb, var(--accent-ink) 35%, transparent); opacity: 1; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } .feature-lg { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .features { grid-template-columns: 1.55fr 1fr; grid-template-rows: 1fr 1fr; } .feature-lg { grid-column: 1; grid-row: 1 / span 2; padding: var(--s-6) var(--s-5) var(--s-5); } }
@media (hover: hover) {
  .feature:hover, .card:hover, .tile-top:hover { border-color: var(--line-2); transform: translateY(-2px); }
  .feature:hover .more svg, .card:hover .more svg { transform: translateX(3px); }
  a.tag:hover { border-color: var(--line-2); color: var(--text); }
}

/* Explorer toolbar */
.toolbar { position: relative; z-index: 5; margin-bottom: var(--s-4); }
@media (min-height: 860px) and (min-width: 1280px) {
  .toolbar { position: sticky; top: calc(var(--head-h) + env(safe-area-inset-top)); padding-top: 10px; margin-top: -10px;
    background: linear-gradient(var(--bg) 85%, transparent); }
}
.toolbar-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.search { position: relative; display: flex; align-items: center; grid-column: 1 / -1; }
.search svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 48px; padding: 0 44px 0 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 500 var(--t-md) var(--sans); transition: border-color .2s, box-shadow .2s; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.search kbd { position: absolute; right: 12px; font: 500 .75rem var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 7px; display: none; }
@media (hover: hover) and (pointer: fine) { .search kbd { display: block; } .search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; } }
.sort select { appearance: none; -webkit-appearance: none; min-height: 44px; height: 100%; padding: 0 38px 0 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text); font: 600 var(--t-sm) var(--sans); cursor: pointer; width: 100%;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23979ba3' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.filter-toggle .badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 .72rem var(--mono); }
.filter-toggle .badge[hidden] { display: none; }
.filters { display: none; margin-top: 10px; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); gap: var(--s-3); flex-direction: column; }
.filters.open { display: flex; }
.fgroup { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.flabel { font: 500 var(--t-xs) var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
/* Phones: chips scroll sideways inside each row */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; margin-inline: calc(var(--s-3) * -1); padding: 2px var(--s-3) 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--s-3), #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 var(--s-3), #000 calc(100% - 24px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-2);
  font: 600 var(--t-sm) var(--sans); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.chip .mono { font-size: .72rem; color: var(--muted); font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[aria-pressed="true"] .mono { color: color-mix(in srgb, var(--bg) 70%, var(--text)); }
.chip-more { border-style: dashed; color: var(--muted); }
@media (hover: hover) { .chip:not([aria-pressed="true"]):hover { border-color: var(--text); color: var(--text); } }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-top: 6px; }
.result-bar p { font-size: var(--t-xs); color: var(--muted); letter-spacing: .02em; }

@media (min-width: 768px) {
  .toolbar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .search { grid-column: 1; }
  .filter-toggle { display: none; }
  .filters { display: grid; grid-template-columns: 1fr; padding: 0; border: 0; background: none; }
  .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .fgroup { flex-direction: row; align-items: flex-start; gap: var(--s-3); }
  .flabel { flex: 0 0 96px; padding-top: 13px; }
  .chip { min-height: 40px; padding: 0 13px; font-size: var(--t-xs); }
  .toolbar { margin-bottom: var(--s-4); }
}
@media (min-width: 768px) and (pointer: coarse) { .chip { min-height: 44px; } }

/* Result grid */
.grid { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; gap: 10px; padding: var(--s-4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-width: 0;
  transition: transform .3s var(--ease), border-color .3s var(--ease); animation: rise .45s var(--ease) both; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rank { font-size: var(--t-sm); color: var(--muted); font-weight: 500; }
.card h3 { font-size: var(--t-lg); letter-spacing: -.02em; line-height: 1.22; }
.card-sum { color: var(--text-2); font-size: var(--t-sm); line-height: 1.5; }
.card .tags { margin-top: 2px; }
.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.card .more svg { width: 20px; height: 20px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.empty { text-align: center; padding: var(--s-6) var(--s-4); border: 1px dashed var(--line-2); border-radius: var(--r); display: grid; gap: 10px; justify-items: center; }
.empty-title { font-size: var(--t-xl); font-weight: 600; }
.noscript { padding-block: var(--s-5); }
.noscript li { margin-bottom: 10px; max-width: var(--measure); }

/* Method */
.method-grid { display: grid; gap: var(--s-3); }
@media (min-width: 900px) { .method-grid { grid-template-columns: 1.2fr 1fr; } }
.method-card { padding: var(--s-5); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: var(--s-3); }
.method-card h3 { font-size: var(--t-xl); }
.method-card h3 + p, .method-card p { color: var(--text-2); max-width: var(--measure); }
.factors { list-style: none; margin: 0; padding: 0; counter-reset: f; display: grid; gap: 2px; }
.factors li { counter-increment: f; display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 2px 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.factors li::before { content: counter(f, decimal-leading-zero); grid-row: span 2; font: 500 var(--t-sm) var(--mono); color: var(--accent-ink); padding-top: 2px; }
.factors b { font-weight: 620; }
.factors span { color: var(--muted); font-size: var(--t-sm); }
.conf-key { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: grid; gap: 12px; }
.conf-key li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--text-2); font-size: var(--t-sm); }
.conf-key .conf { justify-self: start; }

/* Categories */
.tiles { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tile-head { display: flex; justify-content: space-between; align-items: center; }
.tile-head .num { font-size: var(--t-sm); vertical-align: 0; }
.tile-count { font-size: var(--t-xs); color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; }
.tile h2 { font-size: var(--t-xl); letter-spacing: -.03em; }
.tile-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--t-sm); }
.confbar { display: flex; width: 80px; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--line); }
.confbar i { display: block; min-width: 4px; }
.cb-high { background: var(--accent); } html[data-theme="light"] .cb-high { background: var(--accent-ink); }
.cb-medium { background: var(--muted); }
.cb-low { background: var(--warn); }
.tile-top { display: flex; flex-direction: column; gap: 8px; padding: var(--s-3); border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; transition: transform .3s var(--ease), border-color .3s var(--ease); }
.tile-top strong { font-weight: 600; line-height: 1.3; }
.tile-list { list-style: none; margin: 0; padding: 0; }
.tile-list a { display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 10px 0; min-height: 44px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text-2); font-size: var(--t-sm); }
.tile-list .mono { color: var(--muted); }
@media (hover: hover) { .tile-list a:hover { color: var(--text); } .tile-all:hover { text-decoration: underline; } }
.tile-all { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: var(--t-sm); color: var(--accent-ink); text-decoration: none; }
.tile-all svg { width: 18px; height: 18px; }

/* Power plays */
.pps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pp { display: grid; grid-template-columns: 1fr; gap: var(--s-3) var(--s-5); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.pp-num { font-family: var(--serif); font-style: italic; font-size: clamp(3.25rem, 2rem + 4vw, 6.5rem); line-height: .9; color: var(--accent-ink); letter-spacing: -.04em; }
.pp-main { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.pp-meta { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.pp h2 { font-size: var(--t-2xl); letter-spacing: -.035em; max-width: 24ch; }
.pp-lede { color: var(--text-2); max-width: var(--measure); }
.pp-side { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); align-self: start; min-width: 0; }
.pp-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.pp-steps li { counter-increment: s; display: grid; grid-template-columns: 1.8em minmax(0, 1fr); gap: 8px; font-size: var(--t-sm); color: var(--text-2); }
.pp-steps li::before { content: counter(s); font: 600 .75rem/1.9 var(--mono); width: 1.8em; height: 1.8em; text-align: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text); }
.pp-snippet { font-size: var(--t-xs); color: var(--text-2); line-height: 1.6; overflow-wrap: anywhere; }
.pp-result { display: flex; flex-direction: column; gap: 4px; font-size: var(--t-sm); border-left: 2px solid var(--accent); padding-left: 12px; }
.pp-side .btn { align-self: flex-start; }
@media (min-width: 900px) {
  .pp { grid-template-columns: minmax(5rem, 9rem) minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; padding: var(--s-6) 0; }
}
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud .tag { min-height: 40px; padding: 0 12px; }
.tagcloud .tag-strong { border-color: var(--line-2); color: var(--text); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: var(--s-6) 0 var(--s-5); margin-top: var(--s-5); }
.foot-grid { display: grid; gap: var(--s-5); }
.foot-brand { font-weight: 650; font-size: var(--t-lg); margin-bottom: 8px; }
.site-foot .muted { font-size: var(--t-sm); max-width: 60ch; }
.foot-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: 0; }
.foot-meta dt { font: 500 var(--t-xs) var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.foot-meta dd { margin: 4px 0 0; font-family: var(--mono); font-size: var(--t-sm); }
.foot-meta a { color: var(--accent-ink); }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.3fr 1fr; } .foot-meta { grid-template-columns: repeat(4, auto); justify-content: end; gap: var(--s-5); } }

/* Drawer: bottom sheet on phones, side panel from 768px */
.drawer-root { position: fixed; inset: 0; z-index: 80; }
.drawer-root[hidden] { display: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(5, 6, 8, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s var(--ease); }
.drawer { position: absolute; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 10px); display: flex; flex-direction: column; background: var(--bg-2); color: var(--text);
  border-radius: 20px 20px 0 0; border: 1px solid var(--line-2); border-bottom: 0; box-shadow: 0 -30px 60px -20px rgba(0,0,0,.6);
  transform: translateY(100%); transition: transform .32s var(--ease); outline: none; overflow: hidden; }
.drawer-root.open .drawer-scrim { opacity: 1; }
.drawer-root.open .drawer { transform: none; }
.drawer-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; flex: none; }
.drawer-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px max(12px, env(safe-area-inset-left)) 8px max(12px, env(safe-area-inset-right)); border-bottom: 1px solid var(--line); flex: none; }
.drawer-nav { display: flex; align-items: center; gap: 6px; }
.drawer-pos { font-size: var(--t-xs); color: var(--muted); margin-left: 4px; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: var(--s-4) max(var(--s-4), env(safe-area-inset-right)) calc(var(--s-6) + env(safe-area-inset-bottom)) max(var(--s-4), env(safe-area-inset-left)); display: flex; flex-direction: column; gap: var(--s-4); }
.drawer-body > * { max-width: var(--measure); flex-shrink: 0; }
.dr-kicker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dr-kicker a { text-decoration: none; }
.drawer-body h2 { font-size: var(--t-2xl); letter-spacing: -.035em; line-height: 1.08; }
.dr-scores { display: flex; gap: var(--s-5); flex-wrap: wrap; padding: var(--s-3) 0; border-block: 1px solid var(--line); }
.dr-scores > div { display: flex; flex-direction: column; gap: 8px; }
.dr-lede { font-size: var(--t-lg); color: var(--text); line-height: 1.5; }
.dr-why { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: var(--t-sm); }
.dr-sec { display: flex; flex-direction: column; gap: 10px; }
.dr-sec h3 { font: 600 var(--t-xs)/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; gap: 8px; }
.dr-sec p { color: var(--text-2); }
.dr-result { font-size: var(--t-lg); color: var(--text) !important; border-left: 2px solid var(--accent); padding-left: var(--s-3); line-height: 1.45; }
.snippet { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.snippet-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px var(--s-3); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.snippet-body { padding: var(--s-3); font-family: var(--mono); font-size: var(--t-sm); line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
.snippet-body ol { margin: 0; padding-left: 1.6em; display: grid; gap: 8px; }
.snippet-body li::marker { color: var(--accent-ink); }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sources a { display: grid; grid-template-columns: auto minmax(0, 1fr) 18px; grid-template-areas: "type host icon" "url url url"; gap: 6px 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-decoration: none; min-height: 44px; transition: border-color .2s; }
.sources svg { grid-area: icon; width: 16px; height: 16px; color: var(--muted); }
.src-type { grid-area: type; font: 600 .68rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 5px 7px; border-radius: 5px; white-space: nowrap; }
.src-official { background: var(--accent-soft); color: var(--accent-ink); }
.src-primary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); }
.src-secondary { color: var(--muted); border: 1px dashed var(--line-2); }
.src-host { grid-area: host; font-weight: 600; font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-url { grid-area: url; font: var(--t-xs) var(--mono); color: var(--muted); overflow-wrap: anywhere; }
@media (hover: hover) { .sources a:hover { border-color: var(--line-2); } .sources a:hover svg { color: var(--accent-ink); } }
.dr-meta { font-size: var(--t-xs); color: var(--muted); padding-top: var(--s-3); border-top: 1px solid var(--line); }
@media (min-width: 768px) {
  .drawer { left: auto; top: 0; width: min(680px, 92vw); border-radius: 0; border: 0; border-left: 1px solid var(--line-2); transform: translateX(100%); box-shadow: -30px 0 80px -30px rgba(0,0,0,.7); padding-top: env(safe-area-inset-top); }
  .drawer-grip { display: none; }
  .drawer-bar { padding: 12px var(--s-4); }
  .drawer-body { padding: var(--s-5) var(--s-5) var(--s-6); }
}
@media (min-width: 1900px) { .drawer { width: 760px; } }
html[data-theme="light"] .drawer { background: var(--bg); }
html[data-theme="light"] .drawer-scrim { background: rgba(20, 20, 15, .4); }

.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font: 600 var(--t-sm) var(--sans); transition: opacity .2s, transform .2s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Ultrawide: keep reading width sane */
@media (min-width: 2200px) { :root { --maxw: 1760px; } html { font-size: 112.5%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) { .meter-bar i.on { background: CanvasText; } .chip[aria-pressed="true"] { outline: 2px solid; } }
@media print { .site-head, .tabs, .toolbar, .drawer-root, .hero-bg, body::before { display: none !important; } body { background: #fff; color: #000; } }

/* Hero glance panel */
.hero-grid { display: grid; gap: var(--s-5); }
.glance { display: none; }
@media (min-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); align-items: start; column-gap: var(--s-6); }
  .hero-grid .stats { grid-column: 1 / -1; }
  .glance { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-3); padding: var(--s-4); border-radius: 18px; border: 1px solid var(--line-2);
    background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: var(--shadow); }
}
.glance-head { display: flex; justify-content: space-between; align-items: center; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--text-2); }
.live .dot { width: 6px; height: 6px; box-shadow: 0 0 0 3px var(--accent-soft); }
.glance-block { display: flex; flex-direction: column; gap: 10px; padding-top: var(--s-3); border-top: 1px solid var(--line); }
.glance-label { font-size: var(--t-sm); font-weight: 600; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; height: 120px; }
.hist li { display: flex; flex-direction: column; align-items: stretch; gap: 6px; height: 100%; justify-content: flex-end; }
.h-bar { position: relative; height: calc(var(--h) * 82px + 4px); border-radius: 5px 5px 2px 2px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 55%, transparent)); }
html[data-theme="light"] .h-bar { background: linear-gradient(var(--accent-ink), color-mix(in srgb, var(--accent-ink) 60%, transparent)); }
.h-bar b { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font-size: .72rem; font-weight: 500; color: var(--text-2); }
.h-x { text-align: center; font-size: .72rem; color: var(--muted); }
.confbar-lg { width: 100%; height: 12px; border-radius: 6px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--t-xs); color: var(--text-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .mono { color: var(--muted); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cats a { display: grid; grid-template-columns: 8.5em minmax(0, 1fr) 1.5em; align-items: center; gap: 10px; min-height: 26px; font-size: var(--t-xs); color: var(--text-2); text-decoration: none; }
.cats .mono { text-align: right; color: var(--muted); }
.c-bar { height: 6px; width: calc(var(--w) * 100%); border-radius: 3px; background: var(--line-2); transition: background .2s; }
@media (hover: hover) { .cats a:hover { color: var(--text); } .cats a:hover .c-bar { background: var(--accent); } }
.feature-steps { margin-top: 4px; max-width: 60ch; }


/* ===== v3: Grok Field Guide information architecture ===== */
.tabs a span { white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lvl, .auto { display: inline-flex; align-items: center; gap: 6px; font: 600 .72rem/1 var(--sans); letter-spacing: .01em; padding: 6px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line-2); color: var(--text-2); }
.lvl::before { content: ""; width: 14px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, currentColor var(--lv, 25%), var(--line-2) 0); }
.lvl-start-here { --lv: 25%; color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 40%, transparent); }
.lvl-everyday { --lv: 50%; }
.lvl-level-up { --lv: 75%; }
.lvl-advanced { --lv: 100%; color: var(--text); }
.auto { background: var(--surface-2); border-color: var(--line); }
.auto svg { width: 14px; height: 14px; stroke-width: 2.2; }
.auto-reads, .auto-drafts { color: var(--text-2); }
.auto-on-its-own { color: var(--warn); background: var(--warn-soft); border: 1px dashed color-mix(in srgb, var(--warn) 60%, transparent); font-weight: 700; }
.card-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); box-shadow: inset 3px 0 0 var(--warn); }
.card-top .eyebrow { text-align: right; }
.card-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--t-xs); color: var(--muted); }
.card-facts span + span::before { content: "· "; }
.chip svg { width: 14px; height: 14px; stroke-width: 2.2; }
.chip-warn { border-style: dashed; }
.chip-warn:not([aria-pressed="true"]) { color: var(--warn); }
.chip-warn[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: var(--bg); }
.fact-note { display: block; margin-top: 6px; }

/* Collections (home) */
.colls { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .colls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .colls { grid-template-columns: repeat(6, minmax(0, 1fr)); } .coll { grid-column: span 2; } .coll:nth-child(-n+2) { grid-column: span 3; } }
.coll { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.coll:first-child { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, var(--surface)) 0%, var(--surface) 60%); border-color: color-mix(in srgb, var(--accent-ink) 30%, var(--line)); }
.coll h3 { font-size: var(--t-xl); letter-spacing: -.03em; }
.coll .muted { font-size: var(--t-sm); }
.coll .eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.coll .eyebrow svg { width: 14px; height: 14px; }
.coll-warn { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.coll-warn .eyebrow { color: var(--warn); }

/* Shelf strip (home) */
.shelf-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .shelf-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-5); } }
.shelf-strip a { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; grid-template-areas: "n name c" "n desc c"; gap: 2px 12px; align-items: center; padding: 14px 0; min-height: 56px; border-bottom: 1px solid var(--line); text-decoration: none; }
.shelf-strip .num { grid-area: n; font-size: var(--t-sm); vertical-align: 0; margin: 0; }
.sh-name { grid-area: name; font-weight: 620; font-size: var(--t-lg); letter-spacing: -.02em; }
.sh-desc { grid-area: desc; font-size: var(--t-sm); }
.sh-n { grid-area: c; font-size: var(--t-sm); color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; }
@media (hover: hover) { .shelf-strip a:hover .sh-name { color: var(--accent-ink); } .coll .tile-list a:hover { color: var(--text); } }

/* Independence line */
.indep { font-size: var(--t-sm); color: var(--text-2); max-width: 70ch; margin-bottom: 8px; }
.indep strong { color: var(--text); }
.indep-lg { font-size: var(--t-md); padding: var(--s-3) var(--s-4); border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); margin-bottom: var(--s-3); }
.key-wide li { grid-template-columns: minmax(140px, 190px) minmax(0, 1fr); }
.key-wide .lvl, .key-wide .auto { justify-self: start; }

/* A-Z */
.az-jump { position: sticky; top: calc(var(--head-h) + env(safe-area-inset-top)); z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 0; margin-bottom: var(--s-4);
  background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--line); }
.az-jump a, .az-jump span { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; border-radius: 8px; font: 600 var(--t-sm) var(--mono); text-decoration: none; }
.az-jump a { color: var(--text); border: 1px solid var(--line-2); background: var(--surface); }
.az-jump span { color: var(--line-2); }
@media (pointer: coarse) { .az-jump a, .az-jump span { min-width: 44px; min-height: 44px; } }
@media (hover: hover) { .az-jump a:hover { border-color: var(--accent-ink); color: var(--accent-ink); } }
.az-cols { columns: 1; column-gap: var(--s-6); }
@media (min-width: 900px) { .az-cols { columns: 2; } }
@media (min-width: 1500px) { .az-cols { columns: 3; } }
.az-sec { break-inside: avoid; margin-bottom: var(--s-5); scroll-margin-top: calc(var(--head-h) + 80px); }
.az-sec h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(2.25rem, 1.6rem + 2vw, 3.5rem); color: var(--accent-ink); line-height: 1; margin-bottom: 8px; }
.az-list { list-style: none; margin: 0; padding: 0; }
.az-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.az-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; min-height: 44px; text-decoration: none; min-width: 0; }
.az-k { font-weight: 620; }
.az-t { font-size: var(--t-xs); color: var(--muted); }
.az-s { font-size: .7rem; color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; }
@media (hover: hover) { .az-list a:hover .az-k { color: var(--accent-ink); text-decoration: underline; } }

/* Entry pages */
.entry { padding-block: var(--s-4) var(--s-6); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--t-xs); font-family: var(--mono); color: var(--muted); margin-bottom: var(--s-4); }
.crumbs a { color: var(--text-2); min-height: 32px; display: inline-flex; align-items: center; }
.entry-grid { display: grid; gap: var(--s-5); }
@media (min-width: 1000px) { .entry-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); column-gap: var(--s-6); align-items: start; } .entry-side { position: sticky; top: calc(var(--head-h) + 20px); } }
.entry-main { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.entry-main > * { max-width: var(--measure); }
.entry h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem); letter-spacing: -.04em; line-height: 1.04; max-width: 22ch; }
.entry .dr-sec h2 { font: 600 var(--t-xs)/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; gap: 8px; }
.entry-side { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font: 500 var(--t-xs) var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 5px; }
.facts dd { margin: 0; font-size: var(--t-sm); }
.facts dd a { color: var(--accent-ink); }
.facts-inline { padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.side-block { display: flex; flex-direction: column; gap: 10px; padding-top: var(--s-3); border-top: 1px solid var(--line); }
.warnbox { display: flex; gap: 12px; align-items: flex-start; padding: var(--s-3); border-radius: var(--r-sm); border: 1px dashed color-mix(in srgb, var(--warn) 60%, transparent); background: var(--warn-soft); color: var(--text); font-size: var(--t-sm); }
.warnbox svg { width: 22px; height: 22px; flex: none; color: var(--warn); stroke-width: 2; }
.warnbox strong { color: var(--warn); }
.pager { display: grid; gap: var(--s-3); grid-template-columns: 1fr; margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line); }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pn { display: flex; flex-direction: column; gap: 6px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; min-height: 44px; }
.pn-next { text-align: right; }
@media (hover: hover) { .pn:hover { border-color: var(--line-2); } .pn:hover span:last-child { color: var(--accent-ink); } }

/* Changelog prose */
.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.prose h2 { font-size: var(--t-xl); margin: var(--s-5) 0 var(--s-2); }
.prose ul { padding-left: 1.2em; display: grid; gap: 8px; color: var(--text-2); }
.prose p { color: var(--text-2); margin: 8px 0; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
@media print { .entry-side { position: static; } }
.cats a { grid-template-columns: 10em minmax(0, 1fr) 1.5em; }
.drawer-pos { white-space: nowrap; }
@media (max-width: 420px) { .drawer-pos { display: none; } }
@media (max-width: 639px) { .az-jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; } .az-jump::-webkit-scrollbar { display: none; } .az-jump a, .az-jump span { flex: none; } }
