/* Moxie design tokens — memeta's layout, Moxie's colours (spec §5, plans/aeo-dashboard-revamp-2026-09-15.md).

   Memeta is stock Tailwind v3; sizes, radii and spacing are copied from its screenshots and every
   colour ROLE is re-mapped to Moxie. Flat: no shadows, 1px borders, radii <= 8px.

   TOKEN NAMES ARE FROZEN. SEO and Strategy templates write var(--border|--accent|--faint|--muted|
   --ink|--p5|--accent-data) inline, so values change and new tokens are added; none is renamed.

   Contrast, measured (WCAG, every text token against every ground it sits on — surface, page,
   border-soft, own-row, low-row, gap-bg, accent-soft): all >= 4.5:1 in both themes. Three spec
   values failed and were darkened here: --faint #9A968B (2.95:1 on white) -> #6E6A60 (4.69 worst),
   --muted #6E6A60 -> #625E55 to keep it a step above faint, and --up #108474 (3.99 on border-soft)
   -> #0D7566 (4.86 worst). --accent stays #108474: it is the DATA colour (bars, lines, donut
   slice 1, 3:1 is the bar for graphics) and passes 4.59 on white where SEO links still use it.
   Acid lime is a FILL only — ink on lime is 15.1:1; lime on anything is illegible.

   Themes: base.html stamps data-theme (light default), so dark is a token swap, never a fork. */
:root{
  color-scheme:light;
  /* grounds + rules */
  --page:#FAF8F1; --surface:#FFFFFF; --border:#E8E4D5; --border-soft:#F2EFE4; --row-sep:#F7F5EC;
  --control:#D6D1C1;
  /* text, darkest first */
  --ink:#1C1C1C; --body:#3A3833; --secondary:#55524A; --muted:#625E55; --faint:#6E6A60;
  /* brand + state */
  --accent:#108474; --accent-data:#0C6B5E; --accent-soft:#E7F3F1; --link:#3A55A8;
  --lime:#EBFC68; --on-lime:#1C1C1C; --own-row:#FBFDEB;
  --up:#0D7566; --down:#C4362F; --mid:#8F6200; --warn:#8F6200;
  --gap-bg:#FDF1EF; --gap-border:#F6DEDA; --low-row:#FEF8F7; --bar-muted:#AAA597;
  --p1:#108474; --p2:#4F6FD1; --p3:#5E9C84; --p4:#97739D; --p5:#B5760B;
  /* badges: bg / text / border */
  --mentioned-bg:#E7F3F1; --mentioned-fg:#0C6B5E; --mentioned-bd:#B9DDD6;
  --notfound-bg:#FAF8F1;  --notfound-fg:#625E55;  --notfound-bd:#E8E4D5;
  --manual-bg:#EDF1FC;    --manual-fg:#3A55A8;    --manual-bd:#C9D4F3;
  --competitor-bg:#FEF4E6; --competitor-fg:#8F6200; --competitor-bd:#F2D9A8;
  --cited-bg:#EAF0FB;     --cited-fg:#3A55A8;     --cited-bd:#C9D4F3;
  --info-bg:#EDF1FC; --info-bd:#DBE3F8; --info-fg:#3A55A8; --info-icon:#4F6FD1;
  /* platforms: brand colour (bars) + chip tint */
  --plat-chatgpt:#10A37F; --plat-gemini:#4285F4; --plat-ai_mode:#34A853; --plat-claude:#D97757;
  --plat-ai_overview:#EA4335; --plat-perplexity:#20808D;
  --pc-chatgpt-bg:#E8F6F1; --pc-chatgpt-fg:#0B6E55; --pc-gemini-bg:#EBF2FE; --pc-gemini-fg:#2159C4;
  --pc-ai_mode-bg:#EAF6ED; --pc-ai_mode-fg:#1E7B38; --pc-claude-bg:#FBEFEA; --pc-claude-fg:#A4492A;
  --pc-ai_overview-bg:#FDEDEC; --pc-ai_overview-fg:#B3261E;
  --pc-perplexity-bg:#E6F3F4; --pc-perplexity-fg:#17666F;
  /* chart palettes — Moxie teal is brand 1 and never repeats (memeta wrapped brand 6 to "You") */
  --cmp-1:#108474; --cmp-2:#9A968B; --cmp-3:#C9BFA6; --cmp-4:#97739D; --cmp-5:#6E6A60;
  --cmp-6:#5E9C84; --cmp-7:#B5760B; --cmp-8:#4F6FD1;
  --src-1:#108474; --src-2:#4F6FD1; --src-3:#97739D; --src-4:#B5760B; --src-5:#5E9C84;
  --src-6:#C4362F; --src-7:#3A8FB7; --src-8:#D98E04; --src-9:#7A5C8F; --src-10:#2F6F5E;
  --src-11:#E07A5F; --src-12:#6B8E23; --src-13:#8C6D4F; --src-14:#A33F6F; --src-15:#4A7C9B;
  --src-16:#C9A227; --src-other:#D6D1C1;
  /* metrics */
  --r:6px; --r-card:8px; --row:40px; --rail:224px; --content:1216px;
  --font-display:Poppins,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --font-body:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,monospace;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --page:#14150F; --surface:#1C1D16; --border:#2E2F26; --border-soft:#24251C; --row-sep:#22231B;
  --control:#45463B;
  --ink:#F3F0E2; --body:#DDD9CA; --secondary:#CAC6B7; --muted:#B8B4A6; --faint:#A09C90;
  --accent:#4FC7B2; --accent-data:#6FD3C1; --accent-soft:#1F3430; --link:#9DB2F0;
  --own-row:#23261A;
  --up:#4FC7B2; --down:#FF8A7E; --mid:#E8B54D; --warn:#E8B54D;
  --gap-bg:#2E1E1B; --gap-border:#4A2C27; --low-row:#251C19; --bar-muted:#6B685D;
  --p1:#4FC7B2; --p2:#8CA4EC; --p3:#91C0AD; --p4:#C4A3CB; --p5:#E8B54D;
  --mentioned-bg:#1F3430; --mentioned-fg:#6FD3C1; --mentioned-bd:#2B4A44;
  --notfound-bg:#14150F;  --notfound-fg:#B8B4A6;  --notfound-bd:#2E2F26;
  --manual-bg:#1E2538;    --manual-fg:#9DB2F0;    --manual-bd:#2F3B5C;
  --competitor-bg:#33291A; --competitor-fg:#E8B54D; --competitor-bd:#4D3C1F;
  --cited-bg:#1E2538;     --cited-fg:#9DB2F0;     --cited-bd:#2F3B5C;
  --info-bg:#1E2538; --info-bd:#2F3B5C; --info-fg:#9DB2F0; --info-icon:#8CA4EC;
  --pc-chatgpt-bg:#1B3129; --pc-chatgpt-fg:#6FD6B3; --pc-gemini-bg:#1C2740; --pc-gemini-fg:#8DB3F7;
  --pc-ai_mode-bg:#1C3122; --pc-ai_mode-fg:#7FD196; --pc-claude-bg:#3A261D; --pc-claude-fg:#EFA383;
  --pc-ai_overview-bg:#3A1F1C; --pc-ai_overview-fg:#F59489;
  --pc-perplexity-bg:#183234; --pc-perplexity-fg:#6CC5CF;
  --cmp-1:#4FC7B2; --src-1:#4FC7B2; --src-other:#45463B;
}

/* ── base ──────────────────────────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--page);color:var(--ink);font:400 14px/1.5 var(--font-body);
  -webkit-font-smoothing:antialiased;font-feature-settings:"cv11"}
a{color:inherit;text-decoration:none}
code{font-family:var(--font-mono);font-size:12px}
.num,td.num,th.num,.metric,.kpi-value,.count,.counter{font-variant-numeric:tabular-nums}
a:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,
[tabindex]:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.skip{position:absolute;left:12px;top:-60px;z-index:100;padding:8px 14px;border-radius:var(--r);
  background:var(--ink);color:var(--surface);font-weight:500}
.skip:focus{top:12px}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
.icon{flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;
  stroke-linejoin:round;vertical-align:middle}
.muted,td.muted{color:var(--muted)}
.link{color:var(--link)} a.link:hover,a.action:hover{text-decoration:underline}
.action{font-size:12px;font-weight:500;color:var(--accent-data)}

/* ── shell ─────────────────────────────────────────────────────────────────── */
.shell{display:flex;min-height:100vh}
.rail{width:var(--rail);flex:0 0 var(--rail);background:var(--surface);border-right:1px solid var(--border);
  display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.brand{height:68px;flex:0 0 68px;padding:0 24px;border-bottom:1px solid var(--border-soft);
  display:flex;align-items:center;gap:10px}
.wordmark{height:15px;width:auto;display:block}
:root[data-theme="dark"] .wordmark{filter:brightness(0) invert(1)}
.brandname{font-family:var(--font-display);font-weight:600;font-size:15px;letter-spacing:-.01em}
.nav{flex:1;overflow-y:auto;padding:16px 12px;display:flex;flex-direction:column;gap:2px}
.nav a{display:flex;align-items:center;gap:12px;height:36px;flex:0 0 36px;padding:0 12px;
  border-radius:var(--r-card);color:var(--secondary);font-size:14px}
.nav a:hover{background:var(--border-soft);color:var(--ink)}
.nav a.on{background:var(--ink);color:var(--surface);font-weight:500}
.nav .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav .count{font-size:12px;color:var(--faint)}
.nav a.on .count{color:var(--surface)}
.railfoot{border-top:1px solid var(--border-soft);padding:12px;display:flex;flex-direction:column;gap:2px}
.viewswitch{display:flex;gap:4px;margin-bottom:6px}
.viewswitch a{flex:1;height:28px;border-radius:var(--r);display:flex;align-items:center;
  justify-content:center;font-size:12px;font-weight:500;color:var(--muted)}
.viewswitch a:hover{background:var(--border-soft);color:var(--ink)}
.viewswitch a.on{background:var(--ink);color:var(--surface)}
.railitem{display:flex;align-items:center;gap:10px;width:100%;height:34px;padding:0 12px;border:0;
  border-radius:var(--r-card);background:none;color:var(--muted);font:inherit;font-size:13px;
  text-align:left;cursor:pointer}
.railitem:hover{background:var(--border-soft);color:var(--ink)}
.railitem.on{background:var(--border-soft);color:var(--ink);font-weight:500}
.railitem .chip{margin-left:auto}
.railitem .dot{margin:0 4px 0 5px}
.whoami{display:flex;align-items:center;gap:8px;height:34px;padding:0 12px;font-size:12px;color:var(--faint)}
.whoami span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.whoami a{display:inline-flex;color:var(--muted)}
.whoami a:hover{color:var(--down)}
.authoff{background:var(--gap-bg);color:var(--down);border-radius:var(--r);padding:6px 10px;
  font-size:12px;font-weight:500;margin-bottom:6px}
.main{flex:1;min-width:0;padding:32px}
.main:focus{outline:none}
.content{max-width:var(--content)}

.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  min-height:38px;margin-bottom:24px}
.topmeta{font-size:14px;color:var(--muted)}
.topactions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pagehead{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  margin-bottom:24px}
h1{font-size:18px;font-weight:600;line-height:28px;letter-spacing:-.01em;margin:0}
h2{font-size:18px;font-weight:600;line-height:28px;margin:0 0 12px}
.sub{margin:2px 0 0;color:var(--muted);font-size:14px}
.headactions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.headactions:empty{display:none}
/* screen-level tabs (SEO · Strategy groups) — navigation between screens, underlined */
.tabs{display:flex;gap:4px;margin:-8px 0 24px;border-bottom:1px solid var(--border)}
.tabs a{padding:8px 12px;font-size:14px;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}
.tabs a:hover{color:var(--ink)}
.tabs a.on{color:var(--ink);border-bottom-color:var(--ink);font-weight:500}

/* date-range popover, anchored to its button where the browser can */
.rangepop{margin:auto;padding:16px;width:min(320px,calc(100vw - 32px));border:1px solid var(--border);
  border-radius:var(--r-card);background:var(--surface);color:var(--ink)}
.rangepop:not(:popover-open){display:none}
.rangepop::backdrop{background:transparent}
.rangepresets{margin-bottom:16px}
.rangeform{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rangeform .field input{padding:0 10px}
.rangeform .btn{grid-column:1/-1;justify-content:center}
/* `bottom span-inline-start` mixes a physical row keyword with a logical span, which is
   invalid: the @supports never matched, so the panel was never anchored, and `margin:0`
   against the UA's `inset:0` pinned it to the top-left corner. Both keywords logical now,
   and the base margin is `auto` so a browser without anchor positioning centres it. */
@supports (position-area: block-end span-inline-start){
  .rangepop{position:absolute;margin:6px 0 0;position-area:block-end span-inline-start;
    position-try-fallbacks:flip-block,block-end span-inline-end}
}

/* ── buttons + form controls ───────────────────────────────────────────────── */
.btn{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 16px;border:1px solid var(--control);
  border-radius:var(--r);background:transparent;color:var(--body);font:inherit;font-size:14px;
  font-weight:500;white-space:nowrap;cursor:pointer}
.btn:hover{background:var(--surface);border-color:var(--faint);color:var(--ink)}
.btn.primary{background:var(--ink);border-color:var(--ink);color:var(--surface)}
.btn.primary:hover{background:var(--body);border-color:var(--body)}
.btn.sm{height:34px;padding:0 12px;border-radius:var(--r-card)}
.btn:disabled,.btn[aria-disabled="true"]{opacity:.3;cursor:not-allowed}
.iconbtn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;
  border:0;border-radius:var(--r);background:none;color:var(--faint);cursor:pointer}
.iconbtn:hover{background:var(--border-soft);color:var(--ink)}
.iconbtn.danger:hover{color:var(--down)}
button.ghost{height:28px;padding:0 10px;border:1px solid var(--border);border-radius:var(--r);
  background:none;color:var(--muted);font:inherit;font-size:12px;cursor:pointer}
button.ghost:hover{border-color:var(--down);color:var(--down)}
.field{display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:500;color:var(--ink)}
.field .hint{font-weight:400;color:var(--faint)}
.field input,.field select,.field textarea{height:42px;width:100%;padding:0 16px;border:1px solid var(--border);
  border-radius:var(--r-card);background:var(--surface);color:var(--ink);font:inherit;font-size:14px;font-weight:400}
.field textarea{height:auto;min-height:84px;padding:10px 16px}
input::placeholder,textarea::placeholder{color:var(--faint)}

/* segment tabs (Overall | Organic) · range segments · sort pills · filter chips */
.segtabs,.segments,.sortpills{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}
.segtabs a,.sortpills a{height:28px;padding:0 12px;border-radius:var(--r);display:inline-flex;
  align-items:center;font-size:12px;font-weight:500;color:var(--muted)}
.segtabs a:hover:not(.on),.sortpills a:hover:not(.on){background:var(--border-soft);color:var(--ink)}
.segments a{height:24px;padding:0 10px;border-radius:4px;display:inline-flex;align-items:center;
  font-size:12px;font-weight:500;background:var(--border-soft);color:var(--secondary)}
.segments a:hover:not(.on){color:var(--ink)}
.segtabs a.on,.segments a.on,.sortpills a.on{background:var(--ink);color:var(--surface)}
.content > .segtabs{display:flex;margin-bottom:24px}
.sortlabel{font-size:12px;color:var(--faint);margin-right:4px}
.fchips{display:flex;flex-wrap:wrap;gap:8px}
.fchip{height:30px;padding:0 12px;border:1px solid var(--border);border-radius:999px;display:inline-flex;
  align-items:center;gap:6px;font-size:12px;color:var(--secondary)}
.fchip:hover:not(.on){border-color:var(--control);color:var(--ink)}
.fchip.on{background:var(--ink);border-color:var(--ink);color:var(--surface);font-weight:500}

/* switch — <a class="switch"> filters (GET) or <button class="switch" aria-checked> writes (POST) */
.switch{display:inline-flex;align-items:center;gap:10px;padding:0;border:0;background:none;
  font:inherit;font-size:14px;color:var(--body);cursor:pointer}
.switch .track{position:relative;width:44px;height:24px;flex:0 0 auto;border-radius:999px;background:var(--control)}
.switch .knob{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#FFFFFF}
.switch.on .track,.switch[aria-checked="true"] .track{background:var(--ink)}
.switch.on .knob,.switch[aria-checked="true"] .knob{transform:translateX(20px);background:var(--surface)}
.switch.sm{font-size:12px;color:var(--muted)}
.switch.sm .track{width:36px;height:20px}
.switch.sm .knob{top:2px;left:2px;width:16px;height:16px}
.switch.sm.on .knob,.switch.sm[aria-checked="true"] .knob{transform:translateX(16px)}

/* ── cards ─────────────────────────────────────────────────────────────────── */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:24px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:24px}
.card{position:relative;min-width:0;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-card);--card-pad:20px;padding:var(--card-pad)}
.content > .card{margin-bottom:24px}
.card[data-kind="kpi"]{min-height:98px}
.card[data-kind="list"]{--card-pad:0;padding:0}
/* the card title: memeta's quiet 14px grey label, not an uppercase kicker */
.card > .eyebrow:first-child{display:flex;align-items:center;gap:4px;margin-bottom:4px;font-size:14px;
  font-weight:400;line-height:20px;text-transform:none;letter-spacing:0;color:var(--muted)}
.card > .eyebrow:first-child + :not(.metric):not(.kpi-value):not(.foot){margin-top:12px}
.cardtools{position:absolute;top:14px;right:20px;display:flex;align-items:center;gap:8px}
.card .metric{font-size:24px;font-weight:700;line-height:32px;letter-spacing:-.01em;margin:0 0 2px}
.card .foot{font-size:12px;color:var(--muted)}
.kpi-value{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;line-height:32px}
.kpi-value .kv{font-size:24px;font-weight:700;letter-spacing:-.01em;color:var(--ink)}
.delta{font-size:14px;font-weight:500;white-space:nowrap}
.delta.up{color:var(--up)} .delta.down{color:var(--down)} .delta.flat{color:var(--faint)}
.eyebrow{font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:.025em;color:var(--faint)}

/* ── panels + tables ───────────────────────────────────────────────────────── */
.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-card);
  margin-bottom:24px;overflow:hidden}
.panel > header,.listhead{padding:16px;border-bottom:1px solid var(--border-soft);display:flex;
  align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.panel > header h2,.listhead h2{margin:0;font-size:16px;line-height:24px}
.listhead > div{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.listhead input{height:34px;width:287px;max-width:100%;padding:0 12px;border:1px solid var(--border);
  border-radius:var(--r-card);background:var(--surface);color:var(--ink);font:inherit;font-size:14px}
.counter{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:999px;
  background:var(--border-soft);font-size:12px;color:var(--faint)}
.scroll{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:14px}
th{text-align:left;font-size:14px;font-weight:400;color:var(--muted);padding:0 16px 8px;
  border-bottom:1px solid var(--border-soft);white-space:nowrap;vertical-align:bottom}
td{height:var(--row);padding:8px 16px;border-bottom:1px solid var(--row-sep);color:var(--body);vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:color-mix(in srgb,var(--page) 55%,var(--surface))}
td.num,th.num{text-align:right}
/* D1: the "You" row and row hover run edge to edge. The table bleeds into the card's own
   padding and the edge cells put that padding back, so text lands exactly where it did
   while the row background now reaches both card edges. --card-pad is 0 on list cards,
   which have no padding to bleed into, so this is a no-op for them. */
.card .scroll,.card > table{margin-inline:calc(var(--card-pad) * -1);width:calc(100% + var(--card-pad) * 2)}
.card th:first-child,.card td:first-child{padding-left:var(--card-pad)}
.card th:last-child,.card td:last-child{padding-right:var(--card-pad)}
.panel th,table.bleed th{padding:12px 16px;background:var(--page);border-bottom:1px solid var(--border)}
tr.own td{height:42px;background:var(--own-row)}
tr.own td:first-child{font-weight:600;color:var(--ink)}
tr.low td{background:var(--low-row)}
.trunc{max-width:420px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
td.rowact{width:1%;white-space:nowrap;text-align:right}
td.rowact form{display:inline}
.rowactions{display:inline-flex;gap:4px;opacity:0}
tr:hover .rowactions,li:hover .rowactions,.rowactions:focus-within{opacity:1}
@media (hover:none){.rowactions{opacity:1}}

/* ── chips, dots, badges, pills ────────────────────────────────────────────── */
.chip{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:4px;
  font-size:11px;font-weight:500;background:var(--border-soft);color:var(--muted);white-space:nowrap}
.chip.accent{background:var(--accent-soft);color:var(--accent-data)}
.chip.up{background:var(--accent-soft);color:var(--up)}
.chip.down{background:var(--gap-bg);color:var(--down)}
.chip.warn{background:var(--competitor-bg);color:var(--mid)}
.chip.dark{background:var(--ink);color:var(--surface)}
.dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:6px;flex:0 0 auto}
.dot.ok{background:var(--up)} .dot.no{background:var(--faint)}
.dot.warn{background:var(--mid)} .dot.bad{background:var(--down)}
.you{display:inline-flex;align-items:center;height:22px;padding:0 6px;margin-left:6px;border-radius:4px;
  background:var(--lime);color:var(--on-lime);font-size:11px;font-weight:500;vertical-align:middle}
.tag{display:inline-flex;align-items:center;height:22px;padding:0 8px;border:1px solid var(--notfound-bd);
  border-radius:4px;background:var(--notfound-bg);color:var(--secondary);font-size:11px;font-weight:500;white-space:nowrap}
.tag.manual{background:var(--manual-bg);color:var(--manual-fg);border-color:var(--manual-bd)}
.tag.competitor,.tag.warn{background:var(--competitor-bg);color:var(--competitor-fg);border-color:var(--competitor-bd)}
.tag.cited{background:var(--cited-bg);color:var(--cited-fg);border-color:var(--cited-bd)}
.tag.mentioned,.tag.up{background:var(--mentioned-bg);color:var(--mentioned-fg);border-color:var(--mentioned-bd)}
.tag.down{background:var(--gap-bg);color:var(--down);border-color:var(--gap-border)}
.pill{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 10px;border:1px solid;
  border-radius:999px;font-size:11px;font-weight:500;white-space:nowrap}
.pill .pdot{width:6px;height:6px;border-radius:50%;background:currentColor}
.pill.named{background:var(--mentioned-bg);color:var(--mentioned-fg);border-color:var(--mentioned-bd)}
.pill.named .pdot{background:var(--accent)}
.pill.cited{background:var(--cited-bg);color:var(--cited-fg);border-color:var(--cited-bd)}
.pill.cited_named{background:var(--accent-data);color:var(--surface);border-color:var(--accent-data)}
.pill.absent{background:var(--notfound-bg);color:var(--notfound-fg);border-color:var(--notfound-bd)}
.pill.absent .pdot{background:var(--control)}
.pill.error{background:var(--competitor-bg);color:var(--competitor-fg);border-color:var(--competitor-bd)}
.pill.not_run{background:transparent;color:var(--faint);border:1px dashed var(--control)}
.pill.not_run .pdot{display:none}
.pchip{display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 8px;border-radius:999px;
  font-size:10px;font-weight:500;white-space:nowrap;background:var(--border-soft);color:var(--body)}
.pchip[data-platform="chatgpt"]{background:var(--pc-chatgpt-bg);color:var(--pc-chatgpt-fg)}
.pchip[data-platform="gemini"]{background:var(--pc-gemini-bg);color:var(--pc-gemini-fg)}
.pchip[data-platform="ai_mode"]{background:var(--pc-ai_mode-bg);color:var(--pc-ai_mode-fg)}
.pchip[data-platform="claude"]{background:var(--pc-claude-bg);color:var(--pc-claude-fg)}
.pchip[data-platform="ai_overview"]{background:var(--pc-ai_overview-bg);color:var(--pc-ai_overview-fg)}
.pchip[data-platform="perplexity"]{background:var(--pc-perplexity-bg);color:var(--pc-perplexity-fg)}
.plogo{display:inline-block;flex:0 0 auto;width:var(--s,16px);height:var(--s,16px);vertical-align:middle}
.plogo.mask{-webkit-mask:var(--src) center/contain no-repeat;mask:var(--src) center/contain no-repeat}
.logo-tile{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  width:var(--s,16px);height:var(--s,16px);border-radius:3px;background:#000000;vertical-align:middle}
.logo-tile img{width:74%;height:74%;filter:invert(1)}
:root[data-theme="dark"] .logo-tile{outline:1px solid var(--control)}

/* ── data viz ──────────────────────────────────────────────────────────────── */
.sbar,.bar{display:inline-block;width:80px;height:8px;border-radius:999px;background:var(--border-soft);
  overflow:hidden;vertical-align:middle}
.bar{display:block;width:auto;min-width:60px}
.sbar > i,.bar > span{display:block;height:100%;border-radius:inherit;background:var(--bar-muted)}
.sbar.own > i,.bar > span{background:var(--accent)}
.prow + .prow{margin-top:12px}
.prow-head{display:flex;align-items:center;gap:8px;height:20px;font-size:14px;color:var(--body)}
.prow-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prow-score{font-weight:600;color:var(--ink)}
.prow .delta{font-size:12px}
.prow-bar{margin-top:4px;height:10px;border-radius:999px;background:var(--border-soft);overflow:hidden}
.prow-bar > i{display:block;height:100%;border-radius:inherit;background:var(--pc,var(--accent))}
/* Score trend (metrics.md 1.7): a stretched SVG, HTML labels, strokes that never scale. */
.trendplot{position:relative;height:200px;margin:8px 96px 0 30px}
.trend{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.trend *{vector-effect:non-scaling-stroke}
.trend .grid{stroke:var(--border-soft);stroke-dasharray:3 3}
.trend .axis{stroke:var(--border)}
.trend .shade{fill:var(--border-soft);opacity:.55}
.trend .mark{stroke:var(--faint);stroke-dasharray:4 3}
.trend .line{fill:none;stroke-width:2.5px;stroke-linecap:round;stroke-linejoin:round}
.trend .dot{fill:none;stroke-width:7px;stroke-linecap:round;opacity:.45}
.trend .dot.hollow{opacity:.8}
.trend .dot-in{fill:none;stroke:var(--surface);stroke-width:3px;stroke-linecap:round}
.trend .col rect{fill:transparent;pointer-events:all;outline:none}
.trend .col .rule{stroke:var(--ink);stroke-width:1px;opacity:0;pointer-events:none}
.trend .col:hover .rule{opacity:.35}
.trend .col:focus-within .rule{opacity:1;stroke-width:2px}
.tlab{font-size:12px;color:var(--faint);pointer-events:none}
.tlab span{position:absolute;white-space:nowrap;line-height:1}
.ylab{position:absolute;top:0;bottom:0;left:-30px;width:24px}
.ylab span{right:0;transform:translateY(-50%)}
.bandlab{position:absolute;top:0;bottom:0;right:-96px;width:90px}
.bandlab span{left:6px;transform:translateY(-110%)}
.xlab{position:relative;height:18px;margin:6px 96px 0 30px}
.xlab span{transform:translateX(-50%)}
.markflag{position:absolute;top:-6px;width:10px;height:10px;margin-left:-5px;border-radius:2px;
  background:var(--faint)}
.trendlegend label{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.trendlegend input{width:14px;height:14px;margin:0;accent-color:var(--ink)}
.trendlegend .val{font-weight:600;color:var(--ink)}
@media (max-width:760px){.trendplot,.xlab{margin-right:12px}.bandlab{display:none}
  .xlab span:nth-last-child(even){display:none}}
.charttip{position:absolute;z-index:60;transform:translate(-50%,calc(-100% - 8px));padding:4px 8px;
  border-radius:var(--r);background:var(--ink);color:var(--surface);font-size:12px;white-space:pre;max-width:calc(100vw - 16px);pointer-events:none}
.donutwrap{display:flex;align-items:center;gap:32px;flex-wrap:wrap}
.donut{flex:0 0 auto;display:block;overflow:visible}
.donut .seg,.donut .track{fill:none}
.donut .track{stroke:var(--border-soft)}
.donut .seg:hover{opacity:.85}
.donut .sweep{fill:none;stroke:#FFFFFF;stroke-dasharray:1 1}
.donut-num{font-size:18px;font-weight:700;fill:var(--ink)}
.donut-cap{font-size:10px;fill:var(--faint)}
.legend{list-style:none;margin:0;padding:0;display:grid;column-gap:44px;flex:1;min-width:220px}
.legend.cols2{grid-template-columns:1fr 1fr}
.legend li{display:flex;align-items:center;gap:8px;min-height:30px;font-size:14px;color:var(--body)}
.legend .swatch{width:12px;height:12px;border-radius:2px;flex:0 0 auto}
.legend .lab{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.legend .val{font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.legend .cnt{color:var(--faint);font-variant-numeric:tabular-nums}
.legend.inline{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:8px}
.legend.inline li{min-height:20px;font-size:12px}
.legend.inline .swatch{width:10px;height:10px}
.hbars{display:flex;flex-direction:column;gap:12px}
.hbar{display:grid;grid-template-columns:130px 1fr 40px;align-items:center;gap:12px;height:24px;font-size:14px}
.hbar .lab{display:flex;align-items:center;min-width:0;color:var(--body)}
.hbar .lab .trunc{max-width:none;min-width:0}
.hbar .track{height:24px;border-radius:4px;background:var(--border-soft);overflow:hidden}
.hbar .track > i{display:block;height:100%;border-radius:4px;background:var(--bar-muted)}
.hbar.own .track > i{background:var(--accent)}
.hbar .val{text-align:right;color:var(--secondary);font-variant-numeric:tabular-nums}
.gaps{display:flex;flex-direction:column;gap:8px;list-style:none;margin:0;padding:0}
.gaprow{display:flex;align-items:center;gap:12px;min-height:38px;padding:8px 12px;border:1px solid var(--gap-border);
  border-radius:4px;background:var(--gap-bg);color:var(--body);font-size:14px}
.gaprow .logos{margin-left:auto;display:flex;align-items:center;gap:4px}
.stepper{display:inline-flex;gap:3px;align-items:center}
.stepper i{width:8px;height:8px;border-radius:50%;background:var(--control);display:block}
.stepper i.on{background:var(--accent)}

/* ── states + prose ────────────────────────────────────────────────────────── */
.empty{padding:36px 16px;text-align:center;color:var(--muted)}
.empty .what{font-weight:600;color:var(--ink);margin-bottom:4px}
.empty .need{font-size:12px;margin-top:8px}
.empty .btn{margin-top:16px}
.empty code,.spec code,.addbar code{background:var(--border-soft);padding:1px 5px;border-radius:3px;font-size:11px}
.callout{display:flex;gap:10px;align-items:flex-start;padding:12px 16px;margin-bottom:24px;border:1px solid var(--info-bd);
  border-radius:var(--r-card);background:var(--info-bg);color:var(--info-fg);font-size:12px;line-height:20px}
.callout .icon{color:var(--info-icon);margin-top:2px}
.callout p{margin:0}
/* legacy caption strip — the banners are gone; SEO/Strategy footers still use the class */
.prov{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--border);border-radius:var(--r-card);
  background:var(--surface);padding:12px 16px;margin-bottom:24px;font-size:12px;line-height:1.6;color:var(--muted)}
.prov strong{color:var(--ink);font-weight:600}
.flash{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--mentioned-bd);border-radius:var(--r-card);
  background:var(--mentioned-bg);padding:12px 16px;margin-bottom:24px;font-size:12px;color:var(--mentioned-fg)}
.flash strong{font-weight:600;white-space:nowrap}
.flash.err{border-color:var(--gap-border);background:var(--gap-bg);color:var(--down)}
.footnote{font-size:12px;color:var(--faint);margin-top:8px}
.hint{font-size:12px;color:var(--muted)}
.spec td:first-child{font-weight:600;width:230px;color:var(--ink)}
.spec td{color:var(--muted)}
.panelfoot{padding:16px;border-top:1px solid var(--border-soft)}
.panelfoot .hint{margin:6px 0 10px;max-width:70ch}
.panelfoot p:last-child{margin:0;line-height:2}

/* filter row owned by SEO · Pages (.filters) and the compact in-header row (.filterbar) */
.filters{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--r-card);padding:16px 20px;margin-bottom:24px}
.filters label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:500;color:var(--muted)}
.filters select,.filterbar input,.filterbar select,.addbar input,.addbar select{height:34px;padding:0 10px;
  border:1px solid var(--border);border-radius:var(--r);background:var(--surface);color:var(--ink);font:inherit;font-size:14px}
.filters select{min-width:150px}
.filters button,.filterbar button,.addbar button{height:34px;padding:0 14px;border:1px solid var(--ink);border-radius:var(--r);
  background:var(--ink);color:var(--surface);font:inherit;font-size:14px;font-weight:500;cursor:pointer}
.filters a.chip{height:34px}
.filterbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.filterbar input{min-width:180px;max-width:100%}
th a.sort{display:inline-block}
th a.sort:hover{color:var(--ink)}
th a.sort.on{color:var(--ink);font-weight:500}
.addbar{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;padding:16px;border-bottom:1px solid var(--border-soft);background:var(--page)}
.addbar label{display:flex;flex-direction:column;gap:6px;flex:1 1 180px;min-width:0;font-size:12px;font-weight:500;color:var(--muted)}
.addbar .hint{flex:1 1 100%;margin:2px 0 0;line-height:1.5}

/* ── glossary + term popovers ──────────────────────────────────────────────── */
.cardinfo{position:relative;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;
  padding:0;border:0;border-radius:50%;background:none;color:var(--faint);cursor:pointer;vertical-align:middle}
/* The glyph stays 14 px; the target grows around it — 28 px with a mouse, 44 px on touch. */
.cardinfo::after{content:"";position:absolute;inset:-6px}
@media (hover:none){.cardinfo::after{inset:-14px}}
.cardinfo:hover,.cardinfo:focus-visible{color:var(--ink)}
.glossary{width:min(760px,calc(100vw - 32px));max-height:min(80vh,720px);padding:0;border:1px solid var(--border);
  border-radius:var(--r-card);background:var(--surface);color:var(--ink);overflow:hidden}
.glossary:not(:popover-open){display:none}
.glossary::backdrop{background:rgba(28,28,28,.42)}
:root[data-theme="dark"] .glossary::backdrop{background:rgba(0,0,0,.6)}
.glossary > header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:16px 20px;border-bottom:1px solid var(--border-soft)}
.glossary h2{margin:0 0 2px;font-size:16px}
.glossary header p{margin:0;font-size:12px;color:var(--muted);max-width:52ch}
.glossary header code{background:var(--border-soft);padding:1px 5px;border-radius:3px;font-size:11px}
.glossbody{overflow-y:auto;max-height:calc(min(80vh,720px) - 74px);padding:4px 20px 20px}
.glossbody h3{position:sticky;top:0;z-index:1;margin:0;padding:14px 0 8px;background:var(--surface);
  font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:.025em;color:var(--faint)}
.glossbody .spec td{height:auto;padding:9px 0;vertical-align:top;border-bottom:0;border-top:1px solid var(--border-soft)}
.glossbody .spec td:first-child{width:170px;padding-right:18px}
.termpop{width:min(380px,calc(100vw - 24px));padding:14px 16px 12px;border:1px solid var(--border);
  border-radius:var(--r-card);background:var(--surface);color:var(--ink)}
.termpop:not(:popover-open){display:none}
.termpop::backdrop{background:transparent}
.termpop h4{margin:0 0 6px;font-size:14px;font-weight:600}
.termpop p{margin:0;font-size:12px;line-height:1.55;color:var(--muted)}
.termpop .gotcha{margin-top:8px;padding-top:8px;border-top:1px solid var(--border-soft)}
.termpop .gotcha strong{color:var(--mid);font-weight:600}
.termpop-all{margin-top:10px;padding:0;border:0;background:none;cursor:pointer;font:inherit;
  font-size:12px;font-weight:500;color:var(--accent-data)}
.termpop-all:hover{text-decoration:underline}
/* A popover opened by popovertarget has its invoker as implicit anchor; browsers without anchor
   positioning keep the centred popover, which is a working fallback, not a broken one. */
@supports (position-area: block-end span-inline-end){
  .termpop{position:absolute;margin:6px 0 0;position-area:block-end span-inline-end;
    position-try-fallbacks:flip-block,flip-inline,block-start span-inline-start;position-visibility:anchors-visible}
}

/* ── one stored answer (_answer.html): Drill-Down answer page + Performance open row ── */
.ans .dd-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:12px;color:var(--muted)}
.ans .dd-body{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:20px;margin-top:16px}
.ans .dd-text{max-height:320px;overflow:hidden;overflow-wrap:anywhere;font-size:14px;line-height:1.6;color:var(--body);
  -webkit-mask-image:linear-gradient(#000 75%,transparent);mask-image:linear-gradient(#000 75%,transparent)}
.ans .dd-text.short{-webkit-mask-image:none;mask-image:none}
.ans .dd-textwrap:has(> details[open]) > .dd-text{max-height:none;-webkit-mask-image:none;mask-image:none}
.ans .dd-text :is(p,ul,h4,table,hr){margin:0 0 8px}
.ans .dd-text h4{font-size:14px;font-weight:600;color:var(--ink);margin-top:12px}
.ans .dd-text ul{padding-left:20px}
.ans .dd-text hr{border:0;border-top:1px solid var(--row-sep)}
.ans .dd-text td{padding:4px 8px;border-bottom:1px solid var(--row-sep);font-size:13px}
.ans .dd-textwrap summary{margin-top:8px;font-size:12px;color:var(--accent-data);cursor:pointer;list-style:none}
.ans .dd-textwrap summary::-webkit-details-marker{display:none}
.ans details[open] .dd-open,.ans details:not([open]) .dd-close{display:none}
.ans .dd-sub{display:flex;align-items:center;gap:6px;margin:0 0 8px;font-size:14px;color:var(--muted)}
.ans .dd-urls{list-style:none;margin:0 0 16px;padding:0;max-height:360px;overflow:auto}
.ans .dd-urls li{padding:6px 0;border-bottom:1px solid var(--row-sep);min-width:0}
.ans .dd-urls li:last-child{border-bottom:0}
.ans .dd-dom{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--ink)}
.ans .dd-urls .trunc{max-width:100%;font-size:12px}
.ans .dd-chips{display:flex;flex-wrap:wrap;gap:6px}
@media (max-width:900px){ .ans .dd-body{grid-template-columns:minmax(0,1fr)} }
.dd-whyswitch{cursor:pointer;margin-right:12px}
.dd-whyswitch input{position:absolute;opacity:0;width:1px;height:1px}
.dd-whyswitch:has(input:checked) .track{background:var(--ink)}
.dd-whyswitch:has(input:checked) .knob{transform:translateX(16px);background:var(--surface)}
.dd-whyswitch:has(input:focus-visible) .track{outline:2px solid var(--accent-data);outline-offset:2px}
.ans .dd-why{display:none;margin:16px 0 0;padding:12px 16px;border-left:3px solid var(--border-soft)}
body:has(#dd-why:checked) .ans .dd-why{display:block}
.ans .dd-why ul{list-style:none;margin:0;padding:0}
.ans .dd-why li{padding:6px 0;border-bottom:1px solid var(--row-sep);font-size:13px;line-height:1.5;color:var(--body)}
.ans .dd-why li:last-child{border-bottom:0}
.ans .dd-why .dd-item{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:var(--ink);margin-bottom:2px}
.ans .dd-why p{margin:2px 0 0}

/* visually hidden, still read by screen readers */
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* ── dialog sheet: a centred modal on desktop, a bottom sheet on a phone ─────── */
dialog.sheet{width:min(520px,calc(100vw - 32px));padding:20px;border:1px solid var(--border);
  border-radius:var(--r-card);background:var(--surface);color:var(--ink);text-align:left;white-space:normal;
  font-weight:400}
dialog.sheet::backdrop{background:rgba(28,28,28,.42)}
dialog.sheet h2{margin:0 0 14px;font-size:16px}
dialog.sheet label{display:block;margin-bottom:6px;font-size:12px;font-weight:500;color:var(--muted)}
dialog.sheet input:not([type=hidden]),dialog.sheet textarea{width:100%;min-height:44px;padding:8px 12px;
  border:1px solid var(--control);border-radius:var(--r);background:var(--surface);color:var(--ink);
  font:inherit;font-size:16px}
dialog.sheet .flash{margin:12px 0 0}
dialog.sheet input + label{margin-top:12px}
.sheetfacts{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:16px 0 0;font-size:13px}
.sheetfacts dt{color:var(--muted)}
.sheetfacts dd{margin:0}
.sheetbtns{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
.sheetbtns .btn{min-height:44px}
@media (max-width:760px){
  dialog.sheet{width:100%;max-width:none;margin:auto 0 0;border-radius:var(--r-card) var(--r-card) 0 0}
  .sheetbtns .btn{flex:1;justify-content:center}
}

/* ── sign-in ───────────────────────────────────────────────────────────────── */
.loginbody{display:flex;align-items:center;justify-content:center;min-height:100vh;background:var(--page);padding:24px}
.loginbox{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-card);
  padding:34px 36px;max-width:400px;width:100%;text-align:center}
.loginbox .wordmark{height:17px;margin:0 auto 18px}
.loginbox h1{font-size:22px;margin:0 0 6px}
.loginbox .sub{margin:0 0 22px}
.loginbox .flash{text-align:left;margin-bottom:18px}
.gbtn{display:block;height:42px;line-height:40px;border:1px solid var(--ink);border-radius:var(--r-card);
  background:var(--ink);color:var(--surface);font-size:14px;font-weight:500}
.gbtn:hover{background:var(--surface);color:var(--ink)}

/* ── motion (memeta has none; this is ours) ───────────────────────────────────
   Transform and opacity only, all behind no-preference: reduced motion gets the final state
   instantly, because every rule below only ANIMATES towards what the base rules already paint.
   --i staggers siblings by index (capped at 7) and inherits, so a bar is delayed by its row. */
:is(.cards,.grid2,.content,tbody,.hbars,.gaps,.legend) > :nth-child(1){--i:0}
:is(.cards,.grid2,.content,tbody,.hbars,.gaps,.legend) > :nth-child(2){--i:1}
:is(.cards,.grid2,.content,tbody,.hbars,.gaps,.legend) > :nth-child(3){--i:2}
:is(.cards,.grid2,.content,tbody,.hbars,.gaps,.legend) > :nth-child(4){--i:3}
:is(.cards,.grid2,.content,tbody,.hbars,.gaps,.legend) > :nth-child(5){--i:4}
:is(.cards,.grid2,.content,tbody,.hbars,.gaps,.legend) > :nth-child(6){--i:5}
:is(.cards,.grid2,.content,tbody,.hbars,.gaps,.legend) > :nth-child(n+7){--i:6}
@media (prefers-reduced-motion: no-preference){
  @view-transition{navigation:auto}
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation-duration:180ms}
  .rail{view-transition-name:rail}
  /* one ui.tabs() per page: two elements sharing a view-transition-name skip the page cross-fade */
  .segtabs a.on{view-transition-name:segtab}
  .cards > *,.grid2 > *,.content > .card,.content > .panel{animation:mx-up .32s ease-out both;
    animation-delay:calc(var(--i,0) * 40ms)}
  .sbar > i,.bar > span,.prow-bar > i,.hbar .track > i{transform-origin:left;
    animation:mx-grow .5s ease-out both;animation-delay:calc(120ms + var(--i,0) * 40ms)}
  .trend .line{animation:mx-draw .7s ease-out both}
  .trend .area{animation:mx-fade .7s ease-out both}
  .trend .dot{transform-box:fill-box;transform-origin:center;animation:mx-pop .3s ease-out .45s both}
  .donut .sweep{animation:mx-sweep .6s ease-out both}
  .rangepop:popover-open{transform-origin:top right;animation:mx-popin .16s ease-out}
  .termpop:popover-open{transform-origin:top left;animation:mx-popin .14s ease-out}
  .switch .knob,.switch .track{transition:transform .2s ease,background-color .2s ease}
  a,button,td,.fchip{transition:background-color .15s,color .15s,border-color .15s}
  .rowactions{transition:opacity .15s}
}
@keyframes mx-up{from{opacity:0;transform:translateY(8px)}}
@keyframes mx-grow{from{transform:scaleX(0)}}
@keyframes mx-draw{from{stroke-dasharray:1;stroke-dashoffset:1}to{stroke-dasharray:1;stroke-dashoffset:0}}
@keyframes mx-fade{from{opacity:0}}
@keyframes mx-pop{from{transform:scale(0)}}
@keyframes mx-sweep{from{stroke-dashoffset:1}}
@keyframes mx-popin{from{opacity:0;transform:scale(.98)}}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* ── narrow screens ────────────────────────────────────────────────────────── */
@media (max-width:900px){.grid2{grid-template-columns:1fr}}
@media (max-width:760px){
  .shell{flex-direction:column}
  .rail{position:static;width:auto;flex:none;height:auto;border-right:0;border-bottom:1px solid var(--border)}
  .brand{height:56px;flex-basis:56px;padding:0 16px}
  .nav{flex-direction:row;overflow-x:auto;padding:8px 12px;gap:4px}
  .nav a{flex:0 0 auto}
  .railfoot{flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px;padding:8px 12px}
  .viewswitch{margin:0;flex:1 1 100%}
  .railitem{width:auto}
  .main{padding:20px 16px 48px}
  .cards{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
  .hbar{grid-template-columns:96px 1fr 36px}
  .legend.cols2{grid-template-columns:1fr}
  .cardtools{position:static;margin-bottom:12px}
  .glossbody .spec td{display:block;width:auto;border-top:0}
  .glossbody .spec tr{display:block;border-top:1px solid var(--border-soft);padding:6px 0}
  .glossbody .spec td:first-child{padding:0 0 2px}
}
