/* ==========================================================================
   Webmaster Tools — design tokens + core components
   Plain CSS, no build step. Palette "Graphite & Amber": graphite chrome,
   amber accent (dark text on it), violet AI; Inter, 4px grid, inset buttons.
   Theme: <html data-theme="light|dark">; no attribute = follow the OS.
   Icons: Lucide, 24px viewBox, stroke 2, rendered at 16 (12/14/20 allowed).
   ========================================================================== */

/* Self-hosted variable fonts (latin subset, SIL OFL: static/fonts/LICENSE-*). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/static/fonts/inter-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('/static/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); }

:root {
  /* ---- Chrome (top bar) ---- */
  --chrome: #17181C;          /* graphite */
  --chrome-2: #24262D;        /* search field / pressed */
  --chrome-line: rgba(255,255,255,.12);
  --chrome-fg: #FFFFFF;
  --chrome-muted: #A3A7B3;

  /* ---- Surfaces ---- */
  --bg: #FFFFFF;              /* sheet */
  --sunk: #FAFAF9;            /* cards, table heads, code */
  --alt: #F4F4F2;             /* hover, selected nav, user bubble */
  --line: #EDEDEA;            /* hairlines */
  --line-2: #DEDDD8;          /* control borders */

  /* ---- Text ---- */
  --ink: #0B0B0C;
  --ink-2: #222224;
  --muted: #64656C;           /* 5.5:1 on --sunk */

  /* ---- Brand / action ---- */
  --accent: #F5A524;          /* brand amber: logo, dots, fills */
  --focus: #B97500;           /* focus outlines and active borders: 3.7:1 on white */
  --primary: #F5A524;         /* button fill, with dark text 9:1 */
  --primary-hover: #F7B53F;
  --primary-edge: #D68910;
  --primary-fg: #1A1300;
  --primary-ink: #9A5800;     /* amber as text on light surfaces: 5.6:1 */

  /* ---- Status (fg on bg ≥ 4.5:1) ---- */
  --pass: #0B6F4C;  --pass-bg: #D9F7E8;
  --warn: #A8440B;  --warn-bg: #FDF3E7;   /* DS #EA631B fails AA as text */
  --fail: #BE133F;  --fail-bg: #FCE8EA;
  --info: #1951B4;  --info-bg: #E9F0FB;

  /* ---- AI assistant ---- */
  --ai: #5B3FD6;    --ai-dot: #7C5CFF;  --ai-bg: #F3F0FF;  --ai-line: #DDD5FF;   /* violet */

  /* ---- Syntax ---- */
  --syn-key: #1951B4; --syn-str: #0B6F4C; --syn-num: #A8440B; --syn-lit: #BE133F; --syn-punc: #666D78;

  /* ---- Type ---- */
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --fs-xs: 12px;   --lh-xs: 16px;    /* meta, badges, table heads */
  --fs-sm: 13px;   --lh-sm: 20px;    /* secondary UI, table cells */
  --fs-base: 14px; --lh-base: 20px;  /* body, controls */
  --fs-md: 16px;   --lh-md: 24px;    /* lead paragraphs */
  --fs-lg: 18px;   --lh-lg: 24px;    /* section titles (700) */
  --fs-xl: 24px;   --lh-xl: 28px;    /* mobile page titles */
  --fs-2xl: 28px;  --lh-2xl: 32px;   /* page titles (700, -0.02em) */
  --fs-display: 44px; --lh-display: 48px; /* home hero, grades (700, -0.025em) */
  --fs-code: 13px; --lh-code: 21px;  /* editors */
  --fs-code-sm: 12.5px; --lh-code-sm: 20px; /* values in tables */

  /* ---- Spacing (4px grid) ---- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* ---- Radius ---- */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-2xl: 24px; --r-full: 9999px;

  /* ---- Elevation ---- */
  --shadow-inset: inset 0 2px 2px rgba(255,255,255,.4), inset 0 -2px 2px rgba(0,0,0,.17);
  --shadow-card: 0 1px 2px rgba(9,10,11,.04), 0 1px 1px rgba(9,10,11,.02);
  --shadow-pop: 0 24px 64px rgba(16,17,20,.28), 0 2px 8px rgba(16,17,20,.12);
  --scrim: rgba(16,17,20,.5);
  --ring: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--focus);

  /* ---- Sizes ---- */
  --topbar-h: 56px; --control-h: 40px; --control-h-sm: 32px; --input-h: 44px; --sidebar-w: 248px; --panel-w: 420px;
  --ease: cubic-bezier(.2,.8,.2,1); --dur: 160ms;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --chrome: #0E0F12; --chrome-2: #1A1C21; --chrome-line: rgba(255,255,255,.09); --chrome-fg: #EEEFF2; --chrome-muted: #8E929C;
  --bg: #131418; --sunk: #17181D; --alt: #1E2026; --line: #25272E; --line-2: #33363F;
  --ink: #EEEFF2; --ink-2: #CFD1D6; --muted: #8E929C;
  --accent: #FBBF24; --focus: #FBBF24; --primary: #FBBF24; --primary-hover: #FCD34D; --primary-edge: #D99E0B; --primary-fg: #1A1300; --primary-ink: #FCD34D;
  --pass: #4ADE9F; --pass-bg: #0E2A22;
  --warn: #F3A361; --warn-bg: #2E1D12;
  --fail: #FF7A93; --fail-bg: #33141C;
  --info: #7AA7FF; --info-bg: #14223F;
  --ai: #B4A3FF; --ai-dot: #A893FF; --ai-bg: #1E1A33; --ai-line: #3A3266;
  --syn-key: #7AA7FF; --syn-str: #4ADE9F; --syn-num: #F3A361; --syn-lit: #FF7A93; --syn-punc: #8F9BB0;
  --shadow-inset: inset 0 1px 1px rgba(255,255,255,.35), inset 0 -2px 2px rgba(0,0,0,.2);
  --shadow-card: 0 1px 2px rgba(0,0,0,.3);
  --shadow-pop: 0 24px 64px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.3);
  --scrim: rgba(0,0,0,.55);
  color-scheme: dark;
}
/* Follow the OS when no explicit choice was made: copy the dark block here. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --chrome: #0E0F12; --chrome-2: #1A1C21; --chrome-line: rgba(255,255,255,.09); --chrome-fg: #EEEFF2; --chrome-muted: #8E929C;
    --bg: #131418; --sunk: #17181D; --alt: #1E2026; --line: #25272E; --line-2: #33363F;
    --ink: #EEEFF2; --ink-2: #CFD1D6; --muted: #8E929C;
    --accent: #FBBF24; --focus: #FBBF24; --primary: #FBBF24; --primary-hover: #FCD34D; --primary-edge: #D99E0B; --primary-fg: #1A1300; --primary-ink: #FCD34D;
    --pass: #4ADE9F; --pass-bg: #0E2A22; --warn: #F3A361; --warn-bg: #2E1D12;
    --fail: #FF7A93; --fail-bg: #33141C; --info: #7AA7FF; --info-bg: #14223F;
    --ai: #B4A3FF; --ai-dot: #A893FF; --ai-bg: #1E1A33; --ai-line: #3A3266;
    --syn-key: #7AA7FF; --syn-str: #4ADE9F; --syn-num: #F3A361; --syn-lit: #FF7A93; --syn-punc: #8F9BB0;
    --shadow-inset: inset 0 1px 1px rgba(255,255,255,.35), inset 0 -2px 2px rgba(0,0,0,.2);
    --shadow-card: 0 1px 2px rgba(0,0,0,.3); --shadow-pop: 0 24px 64px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.3);
    --scrim: rgba(0,0,0,.55); color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 var(--fs-base)/var(--lh-base) var(--sans); color: var(--ink); background: var(--chrome); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-2xl); line-height: var(--lh-2xl); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-lg); line-height: var(--lh-lg); }
h3 { font-size: var(--fs-base); line-height: var(--lh-base); }
a { color: var(--info); text-underline-offset: 2px; }
code, kbd, pre, .mono { font-family: var(--mono); }
/* JetBrains Mono's coding ligatures merge // and :// into one glyph, which
   browsers redraw badly while typing ("https: /"); users type URLs, not code.
   !important because many rules set the font shorthand, which resets these. */
code, kbd, pre, samp, .mono, input, textarea { font-variant-ligatures: none !important; font-feature-settings: "calt" 0, "liga" 0 !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-md); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.wrap-anywhere { overflow-wrap: anywhere; } /* long header values, tokens, TXT records */

/* ---------- App shell ---------- */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-5); background: var(--chrome); color: var(--chrome-fg); }
.topbar .btn { --btn-bg: transparent; --btn-fg: var(--chrome-fg); --btn-border: var(--chrome-line); height: 36px; box-shadow: none; font-size: var(--fs-sm); font-weight: 600; }
.topbar .switch { height: 36px; padding: 0 12px 0 8px; border: 1px solid var(--chrome-line); border-radius: var(--r-md); }
@media (max-width: 640px) { /* top bar collapses to icons; labels stay as accessible names */
  .topbar { gap: 4px; padding: 0 8px 0 16px; }
  .topbar .btn, .topbar .switch { width: 40px; padding: 0; gap: 0; justify-content: center; font-size: 0; }
}
.topbar-search { width: 400px; height: 36px; display: flex; align-items: center; gap: var(--s-2); padding: 0 6px 0 var(--s-3); border-radius: var(--r-md); border: 1px solid var(--chrome-line); background: var(--chrome-2); color: var(--chrome-muted); font: inherit; }
.app-body { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sheet { flex: 1; min-width: 0; background: var(--bg); border-radius: var(--r-xl) 0 0 0; display: flex; } /* white canvas tucked into the navy chrome */
.sidebar { width: var(--sidebar-w); flex-shrink: 0; border-right: 1px solid var(--line); padding: var(--s-5) var(--s-3); display: flex; flex-direction: column; gap: 2px; }
.page { flex: 1; min-width: 0; padding: 28px var(--s-10) var(--s-10); display: flex; flex-direction: column; gap: var(--s-6); }
.panel { width: var(--panel-w); flex-shrink: 0; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; } /* docked AI assistant */
@media (max-width: 1100px) { .panel { position: fixed; inset: var(--topbar-h) 0 0 auto; z-index: 30; box-shadow: var(--shadow-pop); background: var(--bg); } }
@media (max-width: 860px) { .sidebar { display: none; } .page { padding: var(--s-5) var(--s-4) var(--s-6); } .topbar-search { display: none; } }
@media (max-width: 480px) { .panel { width: 100%; } }

/* ---------- Buttons ---------- */
.btn { --btn-bg: var(--bg); --btn-fg: var(--ink); --btn-border: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--control-h); padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-fg);
  font: 700 var(--fs-base)/16px var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: var(--shadow-card); transition: background var(--dur) var(--ease), transform 80ms var(--ease); }
.btn:hover { background: var(--alt); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn--primary { --btn-bg: var(--primary); --btn-fg: var(--primary-fg); --btn-border: var(--primary-edge); box-shadow: var(--shadow-inset); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--ink-2); box-shadow: none; font-weight: 600; }
.btn--ai { --btn-bg: var(--ai-bg); --btn-fg: var(--ai); --btn-border: var(--ai-line); box-shadow: none; }
.btn--ai:hover { background: var(--ai-bg); border-color: var(--ai-dot); }
.btn--danger { --btn-fg: var(--fail); }
.btn--danger:hover { background: var(--fail-bg); }
.btn--sm { height: var(--control-h-sm); padding: 0 10px; font-size: var(--fs-sm); }
.btn--lg { height: var(--input-h); padding: 0 20px; }
.btn--icon { width: var(--control-h); padding: 0; }
.btn--icon.btn--sm { width: var(--control-h-sm); }
.btn--link { height: auto; padding: 0; border: 0; background: none; box-shadow: none; color: var(--info); font-size: var(--fs-sm); font-weight: 600; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.hint { font-size: var(--fs-xs); color: var(--muted); }
.input, .select, .textarea { width: 100%; height: var(--input-h); padding: 0 var(--s-3); border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 400 var(--fs-base) var(--sans); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.input--mono { font-family: var(--mono); }
.textarea { height: auto; min-height: 120px; padding: var(--s-3) 14px; font: 400 var(--fs-code)/var(--lh-code) var(--mono); resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.input[aria-invalid="true"] { border-color: var(--fail); }
.field-error { font-size: var(--fs-xs); color: var(--fail); font-weight: 600; }
.input-group { display: flex; align-items: center; gap: 10px; height: var(--input-h); padding: 0 var(--s-3); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); }
.input-group:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.input-group input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 var(--fs-base) var(--mono); }
.checkbox { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.askbar { display: flex; align-items: center; gap: var(--s-3); height: 64px; padding: 0 10px 0 var(--s-5); border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--bg); box-shadow: var(--shadow-card); }
.askbar:focus-within { border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent), var(--shadow-card); }
.askbar input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 400 17px var(--sans); color: var(--ink); }

/* ---------- Switch (Anonymize) ---------- */
.switch { display: inline-flex; align-items: center; gap: var(--s-2); background: none; border: 0; color: inherit; font: 600 var(--fs-sm) var(--sans); cursor: pointer; }
.switch__track { width: 28px; height: 16px; padding: 2px; border-radius: var(--r-full); background: var(--line-2); display: flex; transition: background var(--dur) var(--ease); }
.switch__thumb { width: 12px; height: 12px; border-radius: var(--r-full); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform var(--dur) var(--ease); }
.switch[aria-checked="true"] .switch__track { background: var(--accent); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(12px); }
.topbar .switch__track { background: rgba(255,255,255,.2); }
.masked { font-family: var(--mono); background: var(--alt); border-radius: var(--r-xs); padding: 0 3px; } /* j•••••@example.com */

/* ---------- Cards ---------- */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card--sunk { background: var(--sunk); }
.card--hero { border-radius: var(--r-xl); }
.card__head { display: flex; align-items: center; gap: var(--s-2); height: 44px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--sunk); font-weight: 700; font-size: var(--fs-sm); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.card__body { padding: var(--s-4); }
.grade { width: 88px; height: 88px; border-radius: var(--r-lg); display: grid; place-items: center; font-size: 48px; font-weight: 700; letter-spacing: -0.03em; }
.grade--a { background: var(--pass-bg); color: var(--pass); } .grade--c { background: var(--warn-bg); color: var(--warn); } .grade--f { background: var(--fail-bg); color: var(--fail); }
.meter { height: 8px; border-radius: var(--r-full); background: var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--warn); }

/* ---------- Tables ---------- */
/* Use a real <table> for data; on ≤640px each row becomes a stacked card (see .table--stack). */
.table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; font-size: var(--fs-sm); }
.table th { height: 40px; padding: 0 var(--s-4); background: var(--sunk); text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.table td { padding: 14px var(--s-4); border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.table tbody tr:hover td { background: var(--sunk); }
.table .cell-mono { font: 400 var(--fs-code-sm)/var(--lh-code-sm) var(--mono); overflow-wrap: anywhere; }
.table .cell-key { font: 600 var(--fs-sm)/22px var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.table--compact td { padding: 10px var(--s-4); }
@media (max-width: 640px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack td { border-top: 0; padding: 4px 14px; }
  .table--stack tr { border-top: 1px solid var(--line); padding: 10px 0; }
}

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-full); font: 600 var(--fs-xs)/1 var(--sans); white-space: nowrap; background: var(--alt); color: var(--ink-2); }
.badge .icon { width: 12px; height: 12px; }
.badge--pass { background: var(--pass-bg); color: var(--pass); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--fail { background: var(--fail-bg); color: var(--fail); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--ai   { background: var(--ai-bg); color: var(--ai); }
/* Always pair status color with an icon + word (Pass / Warn / Fail) — never color alone. */
.tag { font: 700 11px/1 var(--mono); padding: 3px 6px; border-radius: var(--r-xs); background: var(--info-bg); color: var(--info); } /* record types, HTTP methods */
.tag--get { background: var(--pass-bg); color: var(--pass); } .tag--put, .tag--patch { background: var(--warn-bg); color: var(--warn); } .tag--delete { background: var(--fail-bg); color: var(--fail); }
.kbd { display: inline-block; font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: var(--r-xs); border: 1px solid var(--line-2); background: var(--sunk); color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: var(--r-full); background: var(--accent); flex-shrink: 0; }
.dot--live { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { .dot--live { animation: none; } * { transition: none !important; } }

/* ---------- Code / output ---------- */
.code { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunk); overflow: hidden; }
.code__head { display: flex; align-items: center; gap: var(--s-2); height: 36px; padding: 0 6px 0 var(--s-3); border-bottom: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.code pre { margin: 0; padding: var(--s-3) 14px; font: 400 var(--fs-code)/var(--lh-code) var(--mono); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.code--editor { display: grid; grid-template-columns: auto 1fr; }
.code__gutter { padding: var(--s-3) 10px var(--s-3) 14px; text-align: right; color: var(--muted); opacity: .7; user-select: none; }
.tok-key { color: var(--syn-key); } .tok-str { color: var(--syn-str); } .tok-num { color: var(--syn-num); } .tok-lit { color: var(--syn-lit); } .tok-punc { color: var(--syn-punc); }
.hl-warn { background: var(--warn-bg); color: var(--warn); border-radius: 3px; padding: 0 2px; }
:not(pre) > code { font-size: 12.5px; background: var(--alt); border-radius: var(--r-xs); padding: 1px 5px; }

/* ---------- Tabs & segmented control ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--alt); }
.seg > button { height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink-2); font: 600 var(--fs-sm) var(--sans); cursor: pointer; }
.seg > button[aria-selected="true"], .seg > button[aria-checked="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(9,10,11,.08); }
.seg .count { color: var(--muted); font-weight: 500; margin-left: 2px; }
.tabs { display: flex; gap: var(--s-5); padding: 0 var(--s-4); border-bottom: 1px solid var(--line); }
.tabs > button { height: 40px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 var(--fs-sm) var(--sans); cursor: pointer; }
.tabs > button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }
.chip-tabs > button { height: 26px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid transparent; background: none; color: var(--muted); font: 600 var(--fs-xs) var(--sans); }
.chip-tabs > button[aria-selected="true"] { border-color: var(--line-2); background: var(--bg); color: var(--ink); }

/* ---------- Navigation ---------- */
.section-switch { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; margin-bottom: var(--s-2); border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 700 var(--fs-base) var(--sans); box-shadow: var(--shadow-card); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r-md); color: var(--ink-2); text-decoration: none; font-size: var(--fs-base); }
.nav-item:hover { background: var(--alt); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--alt); color: var(--ink); font-weight: 600; }
.nav-item[aria-current="page"]::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: var(--r-full); background: var(--accent); }
.nav-item--dim { color: var(--muted); }
.nav-label { padding: 0 10px 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.nav-divider { height: 1px; background: var(--line); margin: var(--s-4) 10px; }
/* Primary nav: navy sidebar, one <details> per section, so sections expand with zero JS.
   Server renders `open` + .has-current on the current section and aria-current on the current tool. */
.sidenav { width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; display: flex; flex-direction: column; padding: var(--s-4) 10px 0; background: var(--chrome); color: var(--chrome-fg); }
.sidenav summary { list-style: none; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 10px; border-radius: var(--r-md); font-size: var(--fs-base); font-weight: 600; white-space: nowrap; cursor: pointer; }
.sidenav summary::-webkit-details-marker { display: none; }
.sidenav summary:hover, .sidenav details.has-current:not([open]) > summary { background: var(--chrome-2); }
.sidenav summary .icon { opacity: .85; }
.sidenav .count { margin-left: auto; font-size: var(--fs-xs); font-weight: 500; color: var(--chrome-muted); }
.sidenav .chev { width: 14px; height: 14px; color: var(--chrome-muted); transition: transform var(--dur) var(--ease); }
.sidenav details[open] .chev { transform: rotate(90deg); }
.sidenav .tools { display: flex; flex-direction: column; gap: 1px; margin-left: 17px; padding: 2px 0 var(--s-2); border-left: 1px solid var(--chrome-line); }
.sidenav .tools a { display: flex; align-items: center; height: 32px; margin-left: var(--s-2); padding: 0 10px; border-radius: var(--r-sm); color: var(--chrome-muted); text-decoration: none; font-size: 13.5px; }
.sidenav .tools a:hover { background: var(--chrome-2); color: var(--chrome-fg); }
.sidenav .tools a[aria-current="page"] { background: var(--chrome-2); color: var(--chrome-fg); font-weight: 600; }
.sidenav .tools a[aria-current="page"]::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: var(--r-full); background: var(--accent); }
.sidenav__foot { margin: auto -10px 0; padding: var(--s-3) 10px var(--s-4); border-top: 1px solid var(--chrome-line); display: flex; flex-direction: column; gap: 2px; }
.sidenav__foot > button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--chrome-fg); font: 500 13.5px var(--sans); text-align: left; cursor: pointer; }
.sidenav__foot > button:hover { background: var(--chrome-2); }
.sidenav__foot .switch__track { background: rgba(255,255,255,.2); }
.sidenav__foot .switch[aria-checked="true"] .switch__track { background: var(--accent); }
.sidenav__foot a { color: var(--chrome-muted); font-size: var(--fs-xs); }
/* Hamburger: on desktop it hides the sidebar; at 860px and below the sidebar slides in over the page */
.nav-collapsed .sidenav { display: none; }
.nav-collapsed .sheet { border-radius: 0; }
@media (max-width: 860px) {
  .sidenav { position: fixed; z-index: 30; left: 0; top: var(--topbar-h); transform: translateX(-100%); transition: transform var(--dur) var(--ease); box-shadow: var(--shadow-pop); }
  .nav-open .sidenav { transform: none; }
  .sheet { border-radius: 0; }
}
/* Top-bar search is navigation only ("Jump to a tool"). Hide it on home, where the hero ask bar is the one input. */
.page-home .topbar-search { display: none; }

/* All-tools menu (top bar ▸ "All tools", shortcut T) */
.mega { position: absolute; left: var(--s-5); right: var(--s-5); top: calc(var(--topbar-h) + 8px); z-index: 40; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); }
.mega__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--s-4); padding: var(--s-5) var(--s-4) var(--s-4); }
@media (max-width: 1100px) { .mega__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mega__tool { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: var(--r-md); color: var(--ink); text-decoration: none; }
.mega__tool:hover, .mega__tool[aria-current="page"], .mega__tool.is-active { background: var(--alt); }
.mega__tool b { font-size: var(--fs-base); font-weight: 600; }
.mega__tool span { font-size: var(--fs-xs); color: var(--muted); }
.mega__tool[hidden] { display: none; } /* filter = toggle hidden in Alpine */

/* Command palette (⌘K) */
.palette { width: min(640px, calc(100vw - 32px)); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); overflow: hidden; }
.palette__row { display: flex; align-items: center; gap: var(--s-3); min-height: 52px; padding: 0 var(--s-3); border-radius: var(--r-md); color: var(--ink); text-decoration: none; }
.palette__row[aria-selected="true"] { background: var(--alt); }
.palette mark { background: var(--pass-bg); color: var(--pass); border-radius: 3px; padding: 0 1px; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 35; }

/* ---------- AI chat ---------- */
.msg-user { align-self: flex-end; max-width: 75%; padding: var(--s-3) var(--s-4); border-radius: var(--r-lg) var(--r-lg) var(--r-xs) var(--r-lg); background: var(--alt); color: var(--ink); font-size: var(--fs-base); line-height: 1.5; }
.msg-ai { display: flex; gap: var(--s-3); font-size: var(--fs-base); line-height: 1.6; color: var(--ink-2); }
.msg-ai__avatar { width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--r-md); background: var(--ai-bg); border: 1px solid var(--ai-line); color: var(--ai); display: grid; place-items: center; }
.msg-ai__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.msg-ai__body b, .msg-ai__body strong { color: var(--ink); }
.toolrun { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--sunk); overflow: hidden; }
.toolrun__head { display: flex; align-items: center; gap: var(--s-2); padding: 10px 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.toolrun__row { display: grid; grid-template-columns: 20px minmax(120px, 170px) minmax(0, 1fr) auto auto; gap: var(--s-3); align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.toolrun__row a { font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (max-width: 640px) { .toolrun__row { grid-template-columns: 20px 1fr auto; } .toolrun__row > :nth-child(3), .toolrun__row > :nth-child(4) { grid-column: 2 / -1; } }
.suggestion { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px var(--s-3); border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2); font: 500 var(--fs-sm) var(--sans); text-align: left; cursor: pointer; }
.suggestion:hover { background: var(--ai-bg); border-color: var(--ai-line); }
.suggestion .icon { color: var(--ai-dot); }
.composer { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--shadow-card); }
.composer:focus-within { border-color: var(--focus); }
.composer textarea { border: 0; outline: none; resize: none; padding: var(--s-3) 14px var(--s-1); background: transparent; color: var(--ink); font: 400 var(--fs-base)/1.5 var(--sans); }

/* ==========================================================================
   App layer — shell pieces and helpers the tool pages share, built only from
   the tokens above. (Everything above this line is the design's stylesheet.)
   ========================================================================== */

[x-cloak], [hidden] { display: none !important; }
html { background: var(--chrome); }
body { min-height: 100vh; }
button { font-family: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

/* ---------- Top bar ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: var(--chrome-fg); text-decoration: none; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--chrome-fg); }
.brand__mark { width: 28px; height: 28px; border-radius: var(--r-md); background: var(--accent); color: var(--primary-fg); display: grid; place-items: center; box-shadow: var(--shadow-inset); }
.topbar__spacer { flex: 1; }
.topbar .btn:hover, .topbar .btn[aria-expanded="true"] { background: var(--chrome-2); }
.topbar .btn[aria-expanded="true"] { border-color: rgba(255,255,255,.3); }
.topbar .btn .caret { width: 14px; height: 14px; color: var(--chrome-muted); transition: transform var(--dur) var(--ease); }
.topbar .btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.topbar-search { cursor: pointer; text-align: left; }
.topbar-search:hover { border-color: rgba(255,255,255,.28); }
.topbar-search span { flex: 1; }
.topbar-search kbd { font: 500 11px var(--mono); padding: 3px 6px; border-radius: var(--r-xs); border: 1px solid var(--chrome-line); color: var(--chrome-muted); }
.topbar .switch { color: var(--chrome-fg); }
.topbar .btn--ask { --btn-border: rgba(167,139,250,.45); --btn-bg: rgba(167,139,250,.10); --btn-fg: #C4B5FD; font-weight: 700; }
.topbar .btn--ask:hover { background: rgba(167,139,250,.18); }
.topbar .btn--ask[aria-pressed="true"] { --btn-border: #A78BFA; --btn-bg: rgba(167,139,250,.22); --btn-fg: #DDD6FE; }
.topbar .only-mobile { display: none; }
@media (max-width: 860px) {
  /* Ask AI stays in the bar as an icon, next to search */
  .topbar .btn--ask { width: 44px; height: 44px; padding: 0; gap: 0; font-size: 0; justify-content: center; }
  .topbar .btn--ask .icon { width: 20px; height: 20px; }
  .topbar .only-mobile { display: inline-flex; }
  .topbar .only-mobile.btn { width: 44px; height: 44px; border: 0; font-size: 0; }
  .topbar .only-mobile .icon { width: 20px; height: 20px; }
  .topbar .brand { flex: 1; }
}

/* ---------- Sheet, sidebar, page ---------- */
.sheet { align-items: stretch; }
.sidebar { position: sticky; top: var(--topbar-h); align-self: flex-start; max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
.nav-item .icon { color: var(--muted); }
.nav-item[aria-current="page"] .icon { color: var(--primary-ink); }
.page { max-width: 1240px; }
.panel ~ .page, .has-panel .page { max-width: none; }

.page-head { display: flex; flex-direction: column; gap: var(--s-2); }
.crumb { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.page-head__row { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.page-head__row h1 { flex: 1; min-width: 0; }
.page-head p { margin: 0; max-width: 760px; color: var(--muted); font-size: var(--fs-base); line-height: 1.5; }
@media (max-width: 640px) { .page-head__row h1 { font-size: var(--fs-xl); line-height: var(--lh-xl); flex-basis: 100%; } }

.site-footer { margin-top: auto; padding-top: var(--s-10); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); font-size: var(--fs-xs); color: var(--muted); }
.site-footer .grow { flex: 1; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Command palette + finder rows (shared with the home ask bar) ---------- */
.palette-wrap { position: fixed; inset: 0; z-index: 45; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palette { position: relative; z-index: 1; }
.palette__input { display: flex; align-items: center; gap: var(--s-3); height: 60px; padding: 0 var(--s-4) 0 var(--s-5); border-bottom: 1px solid var(--line); }
.palette__input .icon { width: 20px; height: 20px; color: var(--muted); }
.palette__input input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 17px var(--sans); }
.palette__list { max-height: min(460px, 60vh); overflow-y: auto; padding: 6px; }
.palette__foot { display: flex; align-items: center; gap: var(--s-4); height: 40px; padding: 0 var(--s-4); border-top: 1px solid var(--line); background: var(--sunk); font-size: var(--fs-xs); color: var(--muted); }
.palette__foot span { display: inline-flex; align-items: center; gap: 6px; }
.finder__group { padding: 10px var(--s-3) 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.finder__row { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 52px; padding: 6px var(--s-3); border: 0; border-radius: var(--r-md); background: none; color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.finder__row[aria-selected="true"] { background: var(--alt); }
.finder__ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-md); background: var(--alt); color: var(--ink-2); display: grid; place-items: center; }
.finder__row[aria-selected="true"] .finder__ico { background: var(--bg); }
.finder__ico--ai { background: var(--ai-bg) !important; color: var(--ai); border: 1px solid var(--ai-line); }
.finder__ico--detect { background: var(--pass-bg) !important; color: var(--pass); }
.finder__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.finder__text b { font-size: var(--fs-base); font-weight: 600; overflow-wrap: anywhere; }
.finder__text span { font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.finder__meta { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.finder__row mark { background: var(--pass-bg); color: var(--pass); border-radius: 3px; padding: 0 1px; }
.finder__empty { padding: var(--s-5) var(--s-3); color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 640px) { .palette-wrap { padding-top: 8px; } .finder__meta { display: none; } }

/* ---------- Home ---------- */
.home { padding-top: var(--s-12); gap: var(--s-12); }
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); max-width: 820px; }
.eyebrow { font-size: var(--fs-xs); font-weight: 700; color: var(--primary-ink); }
.hero h1 { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: -0.025em; }
.hero > p { margin: 0; font-size: var(--fs-md); line-height: var(--lh-md); color: var(--muted); max-width: 640px; }
.hero__ask { position: relative; width: 100%; margin-top: var(--s-2); }
.askbar .ai-spark { width: 20px; height: 20px; color: var(--ai-dot); }
.askbar .kbd { margin-left: auto; }
.askbar .btn--icon { width: 44px; height: 44px; }
.finder-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 25; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 6px; max-height: 420px; overflow-y: auto; }
.qchips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.qchip { min-height: 36px; padding: 0 var(--s-3); border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2); font: 500 var(--fs-sm) var(--sans); cursor: pointer; text-align: left; }
.qchip:hover { background: var(--ai-bg); border-color: var(--ai-line); color: var(--ink); }
.hero .hint { display: flex; align-items: center; gap: 6px; }
.browse { display: flex; flex-direction: column; gap: var(--s-5); }
.browse__head { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.browse__head h2 { margin-right: var(--s-3); }
.browse__recent { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--muted); flex-wrap: wrap; }
.browse__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8) var(--s-10); }
@media (max-width: 1100px) { .browse__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.browse__sec h3 { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s-3); }
.browse__sec h3 a { color: var(--ink); text-decoration: none; }
.browse__sec h3 a:hover { color: var(--primary-ink); }
.browse__sec h3 .count { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.sec-ico { width: 32px; height: 32px; border-radius: var(--r-md); background: var(--alt); color: var(--ink-2); display: grid; place-items: center; flex-shrink: 0; }
.browse__links { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-left: 42px; }
.browse__links a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-base); line-height: 24px; }
.browse__links a:hover { color: var(--primary-ink); text-decoration: underline; }
/* mobile: sections become a list of rows */
.sec-list { display: none; flex-direction: column; border-bottom: 1px solid var(--line); }
.sec-row { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: 6px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sec-row b { display: block; font-size: 15px; font-weight: 600; }
.sec-row span.sub { display: block; font-size: var(--fs-xs); color: var(--muted); }
.sec-row .grow { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .home { padding-top: var(--s-6); gap: var(--s-8); }
  .hero h1 { font-size: var(--fs-2xl); line-height: var(--lh-2xl); }
  .hero > p { font-size: var(--fs-base); line-height: 1.5; }
  .askbar { height: 56px; padding: 0 6px 0 14px; }
  .askbar input { font-size: 16px; }
  .askbar .kbd { display: none; }
  .browse__grid { display: none; }
  .sec-list { display: flex; }
}

/* ---------- Section landing + generic tool cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-3); }
.tool-card { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.tool-card:hover { border-color: var(--line-2); background: var(--sunk); }
.tool-card b { display: block; font-weight: 600; }
.tool-card span.desc { display: block; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- AI assistant panel ---------- */
.panel { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); background: var(--bg); box-shadow: -8px 0 24px rgba(16,17,20,.06); }
@media (max-width: 1100px) { .panel { height: auto; } }
@media (max-width: 480px) { .panel { inset: 0; top: 0; z-index: 55; } }
.panel__head { height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 var(--s-3) 0 var(--s-4); border-bottom: 1px solid var(--line); }
.panel__head h2 { flex: 1; font-size: 15px; }
.ai-tile { width: 28px; height: 28px; border-radius: var(--r-md); background: var(--ai-bg); border: 1px solid var(--ai-line); color: var(--ai); display: grid; place-items: center; flex-shrink: 0; }
.ai-tile--lg { width: 44px; height: 44px; border-radius: var(--r-lg); }
.ai-tile--lg .icon { width: 22px; height: 22px; }
.panel__body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-5); }
.panel__empty { display: flex; flex-direction: column; gap: var(--s-4); padding-top: var(--s-5); }
.panel__empty h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
.panel__empty p { margin: 0; color: var(--muted); line-height: 1.5; }
.ctx { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--muted); }
.ctx__chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border-radius: var(--r-full); background: var(--alt); color: var(--ink-2); font-weight: 600; max-width: 100%; }
.ctx__chip .mono { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx__chip button { width: 18px; height: 18px; display: grid; place-items: center; border: 0; padding: 0; background: none; color: var(--muted); cursor: pointer; border-radius: var(--r-full); }
.ctx__chip button .icon { width: 12px; height: 12px; }
.suggestions { display: flex; flex-direction: column; gap: var(--s-2); }
.suggestions > .label { font-size: var(--fs-xs); color: var(--muted); }
.panel__foot { padding: 0 var(--s-4) var(--s-4); flex-shrink: 0; }
.composer__bar { display: flex; align-items: center; gap: var(--s-2); padding: 6px 8px 8px 12px; }
.composer__bar .state { flex: 1; display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.composer__bar .state .icon { width: 14px; height: 14px; }
.composer__bar .btn--icon { width: 36px; height: 36px; }
.msg-ai__body p { margin: 0; }
.msg-ai__body > div > * + * { margin-top: 10px; }
.msg-ai__body ul, .msg-ai__body ol { margin: 0; padding-left: 20px; }
.msg-ai__body pre { margin: 0; padding: var(--s-3); border-radius: var(--r-md); background: var(--sunk); border: 1px solid var(--line); overflow-x: auto; font: 400 12.5px/1.6 var(--mono); }
.msg-ai__body pre code { background: none; padding: 0; }
.msg-ai__body table { border-collapse: collapse; font-size: var(--fs-sm); }
.msg-ai__body th, .msg-ai__body td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.msg-ai__body .error { color: var(--fail); }
.toolrun__row .icon.ok { color: var(--pass); } .toolrun__row .icon.err { color: var(--fail); } .toolrun__row .icon.run { color: var(--muted); }
.toolrun__row .target { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ai-dot); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- Anonymize mode ---------- */
body.anon .page input:not([type=checkbox]):not([type=radio]):not(:focus), body.anon .page textarea:not(:focus) { filter: blur(5px); }

/* ---------- Helpers for tool pages ---------- */
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; gap: var(--s-3); align-items: flex-end; flex-wrap: wrap; }
.row > .grow, .grow { flex: 1 1 240px; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.form-card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); }
.form-row { display: flex; gap: var(--s-3); align-items: flex-end; flex-wrap: wrap; }
.form-row > .field { flex: 1 1 240px; min-width: 0; }
.form-row > .btn { height: var(--input-h); }
.toolbar { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.results:empty { display: none; }
.results { display: flex; flex-direction: column; gap: var(--s-5); }
.summary { display: flex; align-items: center; gap: var(--s-5); padding: var(--s-5); flex-wrap: wrap; }
.summary__score { font-size: var(--fs-2xl); font-weight: 700; line-height: 1; }
.summary__score small { font-size: var(--fs-base); font-weight: 400; color: var(--muted); }
.meta-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); font-size: var(--fs-xs); color: var(--muted); }
.meta-strip .mono { color: var(--ink-2); }
.stats { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.stat { min-width: 110px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--sunk); }
.stat b { display: block; font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { font-size: var(--fs-xs); color: var(--muted); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--info-bg); color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.5; }
.notice > .icon { margin-top: 2px; color: var(--info); }
.notice--pass, .notice.ok { background: var(--pass-bg); } .notice--pass > .icon, .notice.ok > .icon { color: var(--pass); }
.notice--warn, .notice.warn { background: var(--warn-bg); } .notice--warn > .icon, .notice.warn > .icon { color: var(--warn); }
.notice--fail, .notice.err { background: var(--fail-bg); } .notice--fail > .icon, .notice.err > .icon { color: var(--fail); }
.notice--ai { background: var(--ai-bg); } .notice--ai > .icon { color: var(--ai); }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 0; font-size: var(--fs-sm); }
dl.kv dt { color: var(--muted); font-weight: 500; }
dl.kv dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.output { margin: 0; padding: var(--s-3) 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunk); font: 400 var(--fs-code)/var(--lh-code) var(--mono); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 560px; overflow: auto; }
.table-wrap { overflow-x: auto; }
.small { font-size: var(--fs-xs); } .faint { color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.add { background: var(--pass-bg); } .del { background: var(--fail-bg); }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-flex; }
.htmx-request .htmx-hide { display: none; }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.empty { padding: var(--s-8) var(--s-4); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
/* JSON highlighting helper (wmt.highlightJSON) uses the syntax tokens */
.hl-key { color: var(--syn-key); } .hl-string { color: var(--syn-str); } .hl-number { color: var(--syn-num); } .hl-bool, .hl-null { color: var(--syn-lit); }

/* Image tools: drop zone and previews on a transparency checkerboard. */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); min-height: 150px; padding: var(--s-6); border: 2px dashed var(--line-2); border-radius: var(--r-lg); background: var(--sunk); color: var(--muted); text-align: center; cursor: pointer; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.dropzone:hover, .dropzone.is-over, .dropzone:focus-visible { border-color: var(--focus); background: var(--alt); outline: none; }
.dropzone svg { width: 28px; height: 28px; color: var(--ink-2); }
.dropzone b { color: var(--ink); font-size: var(--fs-base); }
.dropzone--compact { flex-direction: row; min-height: 0; padding: var(--s-3) var(--s-4); gap: var(--s-3); }
.dropzone--compact svg { width: 18px; height: 18px; }
.dropzone--compact .small { display: none; }
.color-field { display: flex; align-items: center; gap: var(--s-2); }
.color-field input[type=color] { width: 44px; height: 40px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); cursor: pointer; }
.color-field span { font: 500 var(--fs-sm) var(--mono); color: var(--ink-2); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.checker { background-color: #fff; background-image: linear-gradient(45deg, #e9ebee 25%, transparent 25%), linear-gradient(-45deg, #e9ebee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e9ebee 75%), linear-gradient(-45deg, transparent 75%, #e9ebee 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.img-preview { display: grid; place-items: center; min-height: 220px; max-height: 520px; padding: var(--s-4); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: auto; }
.img-preview img { max-width: 100%; max-height: 480px; height: auto; image-rendering: auto; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.img-stats { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--fs-sm); color: var(--muted); }
.img-stats b { color: var(--ink); font-weight: 600; }

/* Tool guide: the explanatory text under a tool (pages/content/<slug>.md). */
/* Reference pages listed under their tool (refpages.go). */
.ref-list { margin-top: var(--s-10); max-width: 760px; }
.ref-list h2 { margin: 0 0 var(--s-3); font-size: var(--fs-md); line-height: var(--lh-md); color: var(--ink); }
.ref-list ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s-1) var(--s-4); list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.guide { margin-top: var(--s-12); padding-top: var(--s-8); border-top: 1px solid var(--line-2); max-width: 760px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.guide h2 { margin: var(--s-8) 0 var(--s-3); font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.guide h2:first-child { margin-top: 0; }
.guide h3 { margin: var(--s-5) 0 var(--s-1); font-size: 15px; line-height: 1.5; font-weight: 600; color: var(--ink); }
.guide p, .guide ul, .guide ol, .guide pre { margin: 0 0 var(--s-3); }
.guide ul, .guide ol { padding-left: 1.4em; }
.guide li { margin: var(--s-1) 0; }
.guide code { font-family: var(--mono); font-size: 0.88em; background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.guide pre { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: var(--s-3) var(--s-4); overflow-x: auto; }
.guide pre code { background: none; border: 0; padding: 0; font-size: 13px; overflow-wrap: normal; }
.guide table { border-collapse: collapse; margin: 0 0 var(--s-3); font-size: var(--fs-sm); }
.guide th, .guide td { border: 1px solid var(--line-2); padding: 6px 10px; text-align: left; }
@media (max-width: 640px) { .guide { margin-top: var(--s-8); font-size: 14px; } }

/* Compatibility: older class names, kept so nothing breaks while pages migrate. */
.btn-primary { --btn-bg: var(--primary); --btn-fg: var(--primary-fg); --btn-border: var(--primary-edge); box-shadow: var(--shadow-inset); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-sm { height: var(--control-h-sm); padding: 0 10px; font-size: var(--fs-sm); }
.badge.ok { background: var(--pass-bg); color: var(--pass); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--fail-bg); color: var(--fail); } .badge.info { background: var(--info-bg); color: var(--info); }
.page :not(.input-group):not(.askbar):not(.composer) > input[type=text]:not([class]), .page :not(.input-group):not(.askbar):not(.composer) > input[type=url]:not([class]), .page :not(.input-group):not(.askbar):not(.composer) > input[type=search]:not([class]), .page :not(.input-group):not(.askbar):not(.composer) > input[type=number]:not([class]), .page :not(.input-group):not(.askbar):not(.composer) > input[type=password]:not([class]), .page :not(.input-group):not(.askbar):not(.composer) > input:not([type]):not([class]), .page :not(.input-group):not(.askbar):not(.composer) > select:not([class]), .page :not(.input-group):not(.askbar):not(.composer) > textarea:not([class]) {
  width: 100%; min-height: var(--input-h); padding: 0 var(--s-3); border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: 400 var(--fs-base) var(--sans); }
.page textarea:not([class]) { padding: var(--s-3) 14px; font: 400 var(--fs-code)/var(--lh-code) var(--mono); resize: vertical; min-height: 140px; }
.page input:not([class]):focus, .page select:not([class]):focus, .page textarea:not([class]):focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.page label:not([class]) { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
/* legacy token names used in older page-level styles */
:root, :root[data-theme] { --surface: var(--bg); --surface-2: var(--alt); --text: var(--ink); --text-muted: var(--muted); --text-faint: var(--muted); --border: var(--line); --border-strong: var(--line-2); --ok: var(--pass); --ok-soft: var(--pass-bg); --warn-soft: var(--warn-bg); --err: var(--fail); --err-soft: var(--fail-bg); --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent); --accent-hover: var(--primary-hover); --code-bg: var(--sunk); --radius: var(--r-lg); --radius-sm: var(--r-md); --font: var(--sans); }

/* ---------- Info pages ---------- */
.prose { max-width: 760px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.prose h1 { margin: 4px 0 6px; color: var(--ink); }
.prose h2 { margin: 32px 0 8px; color: var(--ink); }
.prose p, .prose ul { margin: 0 0 12px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose .lead { font-size: var(--fs-md); color: var(--muted); }
.prose .table { margin: 8px 0 4px; line-height: 1.5; }
.info-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.info-nav a { height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--line-2); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.info-nav a:hover { background: var(--alt); }
.info-nav a.active { background: var(--pass-bg); color: var(--pass); border-color: transparent; }
mark.todo { background: var(--warn-bg); color: var(--warn); padding: 0 4px; border-radius: 3px; font-weight: 600; }

/* Inputs embedded in composite controls carry no box of their own. */
.page .askbar input, .input-group input, .palette__input input { border: 0 !important; min-height: 0 !important; height: auto; padding: 0 !important; background: transparent !important; box-shadow: none !important; }
.askbar input:focus-visible, .input-group input:focus-visible, .palette__input input:focus-visible, .composer textarea:focus-visible, .mega__head input:focus-visible { box-shadow: none; }
.page .composer textarea, .panel .composer textarea { border: 0; box-shadow: none; min-height: 0; }
.hero > p.hint { font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--muted); }
.hero > p.hint .icon { width: 14px; height: 14px; }

/* ---------- Two-pane editors and status tiles (shared by the tool pages) ---------- */
.panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.pane { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); }
.pane:focus-within { border-color: var(--focus); }
.pane--out { background: var(--sunk); }
.pane__head { min-height: 40px; flex-shrink: 0; display: flex; align-items: center; gap: var(--s-2); padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); background: var(--sunk); }
.pane__head .label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.pane__head .sub { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane__head .grow { flex: 1; }
.pane__input { flex: 1; min-height: 420px; resize: vertical; border: 0; outline: none; margin: 0; padding: 14px 16px; background: transparent; color: var(--ink-2); font: 400 var(--fs-code)/var(--lh-code) var(--mono); }
.pane__input:focus-visible { box-shadow: none; }
.pane__body { flex: 1; min-height: 420px; max-height: 70vh; overflow: auto; }
.pane__pre { margin: 0; padding: 14px 16px; color: var(--ink-2); font: 400 var(--fs-code)/var(--lh-code) var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.pane .code--editor pre { margin: 0; padding: 14px 16px 14px 4px; color: var(--ink-2); font: 400 var(--fs-code)/var(--lh-code) var(--mono); white-space: pre; overflow-wrap: normal; }
.pane .code--editor .code__gutter { padding: 14px 10px 14px 14px; text-align: right; color: var(--muted); }
.pane .notice { margin: var(--s-4); }
.pane .empty { padding: var(--s-10) var(--s-4); }
.statusbar { display: flex; align-items: center; gap: var(--s-2) var(--s-5); flex-wrap: wrap; min-height: 32px; font-size: var(--fs-xs); color: var(--muted); }
.statusbar .mono { color: var(--ink-2); }
.statusbar .grow { flex: 1; }
.toolbar .select { width: auto; height: 36px; }
@media (max-width: 900px) {
  .panes { grid-template-columns: minmax(0, 1fr); }
  .pane__input, .pane__body { min-height: 220px; }
}
.status-tile { width: 72px; height: 72px; border-radius: var(--r-lg); display: grid; place-items: center; flex-shrink: 0; }
.status-tile .icon { width: 32px; height: 32px; }
.status-tile--pass { background: var(--pass-bg); color: var(--pass); }
.status-tile--warn { background: var(--warn-bg); color: var(--warn); }
.status-tile--fail { background: var(--fail-bg); color: var(--fail); }
.summary__text { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) { .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat { min-width: 0; } }
.toolrun__status { display: inline-flex; }
.panel .toolrun__row { grid-template-columns: 20px minmax(0, 1fr) auto auto; }
.toolrun__what { display: flex; flex-direction: column; min-width: 0; }
.toolrun__what b { font-weight: 600; }
.toolrun__row .small { white-space: nowrap; }

/* Centering: the page column centers in the space beside the sidebar; home follows the
   Main artboard (760px centered hero, 1120px browse column). Mobile stays left-aligned. */
.page { width: 100%; margin-inline: auto; }
@media (min-width: 641px) {
  .home { align-items: center; padding-top: 88px; }
  .home > .hero { width: min(760px, 100%); align-items: center; text-align: center; }
  .home > .hero > p { margin-inline: auto; }
  .home .qchips { justify-content: center; }
  .home > .browse, .home > .site-footer { width: min(1120px, 100%); }
}


/* Home: suggestion pills under the ask bar, separator above Browse tools */
.pill { height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: var(--r-full); background: var(--bg); border: 1px solid var(--line-2); color: var(--ink-2); font: 500 var(--fs-xs) var(--sans); text-decoration: none; cursor: pointer; }
.pill:hover { border-color: var(--muted); color: var(--ink); background: var(--alt); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.qlinks { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.qlinks .pill { height: 32px; padding: 0 14px; font-size: var(--fs-sm); color: var(--ink-2); }
.qlinks .pill:hover { background: var(--ai-bg); border-color: var(--ai-line); color: var(--ink); }
@media (max-width: 640px) { .qlinks { justify-content: flex-start; } }
.home > .hero { gap: var(--s-5); }


/* Slightly stronger container borders: cards, tables and code use --line-2; hairlines a touch darker. */
:root { --line: #E4E3DF; --line-2: #D6D5D0; }
:root[data-theme="dark"] { --line: #2A2C33; --line-2: #393C45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --line: #2A2C33; --line-2: #393C45; } }
.card, .table, .code, .stat, .tool-card, .toolrun, .form-card { border-color: var(--line-2); }

/* ---------- Sidenav: app additions (mobile slide-in, scrim, footer details) ---------- */
.topbar .menu-btn { width: 36px; --btn-border: var(--chrome-line); }
.topbar .topbar-search { margin-left: 28px; width: 360px; }
.sidenav summary .icon { width: 16px; height: 16px; }
.sidenav summary > span:first-of-type { flex: 1; min-width: 0; }
.sidenav summary .count { margin-left: 0; }
.sidenav .tools a:focus-visible, .sidenav summary:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.sidenav__foot .switch { font-weight: 500; }
.sidenav__foot .on-label { font-size: 11px; font-weight: 600; color: var(--accent); }
.sidenav__foot .theme-ico { display: inline-flex; margin: 0 6px; }
.sidenav__links { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 10px 0; }
.sidenav__links a:hover { color: var(--chrome-fg); }
.nav-scrim { display: none; }
@media (max-width: 860px) {
  .sidenav { height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); width: min(300px, 86vw); z-index: 40; }
  .nav-scrim { display: block; top: var(--topbar-h); z-index: 39; }
  body.nav-open { overflow: hidden; }
  .topbar .menu-btn { width: 44px; height: 44px; border: 0; }
  .topbar .menu-btn .icon { width: 20px; height: 20px; }
  .sidenav summary, .sidenav .tools a, .sidenav__foot > button { min-height: 44px; }
}

/* ---------- Home (v2): hero ask bar + grey browse band ---------- */
.page.home { padding: 0; gap: 0; max-width: none; }
.home > .hero { padding: 72px var(--s-16) var(--s-12); gap: 14px; }
.home > .hero h1 { font-size: var(--fs-display); line-height: 1.1; }
.home > .hero > p { margin: 0; }
.askbar--hero { height: 72px; margin-top: 18px; padding: 0 12px 0 22px; gap: 14px; border: 2px solid var(--accent); border-radius: var(--r-xl); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent), 0 8px 24px rgba(16,17,20,.08); }
.askbar--hero:focus-within { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent), 0 8px 24px rgba(16,17,20,.08); }
.askbar--hero .ai-spark { width: 22px; height: 22px; }
.askbar--hero input { font-size: 18px; }
.btn--go { height: 48px; padding: 0 18px; border-radius: 10px; font-size: 15px; }
.home .hero__ask .finder-pop { top: calc(100% + 10px); }
.qlinks .pill { height: 32px; padding: 0 14px; border-color: var(--ai-line); background: var(--ai-bg); color: var(--ai); font-weight: 600; }
.qlinks .pill:hover { border-color: var(--ai-dot); background: var(--ai-bg); color: var(--ai); }
.browse-band { flex: 1; background: var(--alt); border-top: 1px solid var(--line); padding: 36px var(--s-16) var(--s-8); display: flex; flex-direction: column; gap: var(--s-5); }
.browse-band__head { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.browse-band__head .pill { height: 28px; padding: 0 12px; font-weight: 600; }
.browse-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); align-items: start; }
.browse-stack { display: flex; flex-direction: column; gap: var(--s-4); }
.browse-card { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-4) 18px; display: flex; flex-direction: column; gap: 10px; }
.browse-card h3 { display: flex; align-items: center; gap: 10px; font-size: var(--fs-base); }
.browse-card h3 a { color: var(--ink); text-decoration: none; }
.browse-card h3 a:hover { color: var(--primary-ink); }
.browse-card h3 .count { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.browse-card .sec-ico { width: 28px; height: 28px; }
.browse-card__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-4); }
.browse-card__links a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-base); line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browse-card__links a:hover { color: var(--primary-ink); text-decoration: underline; }
.browse-hint { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) 18px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: none; color: var(--muted); font: 400 var(--fs-sm)/1.5 var(--sans); text-align: left; cursor: pointer; }
.browse-hint:hover { color: var(--ink-2); border-color: var(--muted); }
a.browse-hint { text-decoration: none; }
.browse-hint > svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary-ink); }
.browse-hint .kbd { background: var(--bg); color: var(--ink-2); }
.home .site-footer { padding: var(--s-5) var(--s-16) var(--s-6); margin: 0; background: var(--alt); width: 100%; }
@media (max-width: 1100px) { .browse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .home > .hero { padding: var(--s-6) var(--s-4) var(--s-8); align-items: stretch; text-align: left; }
  .askbar--hero { height: 56px; padding: 0 6px 0 14px; border-width: 1px; box-shadow: var(--shadow-card); }
  .btn--go { height: 44px; padding: 0 12px; }
  .browse-band { padding: var(--s-6) var(--s-4); background: var(--bg); border-top: 0; }
  .browse-grid { display: none; }
  .browse-band .browse__recent { display: none !important; }
  .home .site-footer { padding: var(--s-5) var(--s-4) var(--s-8); background: var(--bg); }
}
@media (min-width: 641px) { .home > .hero { width: min(calc(760px + 2 * var(--s-16)), 100%); } }
.kbd { white-space: nowrap; }
/* The palette's scrim must sit behind the dialog inside .palette-wrap's stacking context. */
.palette-wrap > .scrim { z-index: 0; }
.palette-wrap > .palette { z-index: 1; }
