/* Agent Bazaar — Saylor Innovations design system
   Tokens are lifted from saylorinnovations.com (navy / gold / silver, Sora,
   Manrope, JetBrains Mono) and extended with one cool signal colour for live
   state. No inline styles anywhere (CSP forbids them). */

:root {
  --navy-950: #06121F; --navy-900: #0A1A2F; --navy-800: #0F2540; --navy-700: #163356; --navy-600: #1F4670;
  --gold: #C9A14A; --gold-bright: #E6C45F; --gold-deep: #A8842E;
  --silver: #C7CBD4; --silver-soft: #9AA3B2; --off-white: #F4F1EA;

  --bg: #050F1A;
  --surface: #0A1A2F;
  --surface-2: #0D2139;
  --surface-3: #112947;
  --code: #030B14;
  --line: rgba(199, 203, 212, .09);
  --line-2: rgba(199, 203, 212, .17);
  --text: #F4F1EA;
  --text-2: #C7CBD4;
  --muted: #8E98A8;
  --accent: var(--gold);
  --accent-2: var(--gold-bright);
  --signal: #62D2E3;
  --violet: #A597F2;
  --ok: #5CC98C;
  --warn: #E6C45F;
  --bad: #EE7A6F;

  --f-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r-sm: 6px; --r: 12px; --r-lg: 18px;
  --maxw: 1200px;
  --gutter: 24px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text-2);
  font: 400 16px/1.6 var(--f-body);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 70% -10%, rgba(31, 70, 112, .35), transparent 60%),
    linear-gradient(rgba(199, 203, 212, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(199, 203, 212, .028) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  background-attachment: scroll;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--text); text-decoration-color: rgba(201, 161, 74, .5); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--text); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 600; }
h3 { font-size: 1.08rem; font-weight: 600; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--f-mono); font-size: .86em; }
:not(pre) > code { background: rgba(199, 203, 212, .07); padding: .12em .38em; border-radius: 4px; color: var(--text); overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #111; padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.eyebrow { font: 500 .74rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: inline-flex; gap: 10px; align-items: center; }
.eyebrow::before { content: "//"; color: var(--muted); }
.lede { font-size: 1.12rem; color: var(--text-2); max-width: 64ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.small { font-size: .86rem; }
.xs { font-size: .76rem; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { :root { --gutter: 16px; } .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .section { padding: 48px 0; } }

/* ---------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(5, 15, 26, .86); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand img { width: 30px; height: 30px; border-radius: 6px; }
.brand-name { font: 700 1rem/1 var(--f-display); letter-spacing: -.01em; }
.brand-sub { display: block; font: 500 .62rem/1 var(--f-mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-2); text-decoration: none; font-size: .9rem; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(199, 203, 212, .06); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #0B1422; background: var(--gold); margin-left: 8px; }
.nav a.btn-primary:hover { background: var(--gold-bright); }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; font: 500 .8rem var(--f-mono); color: var(--text); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-panel { display: grid; }
.menu-panel { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--navy-950); border-bottom: 1px solid var(--line-2); padding: 12px 16px 20px; gap: 2px; }
.menu-panel a { padding: 12px 8px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .nav { display: none; } .menu { display: block; } }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 .92rem/1 var(--f-body); padding: 13px 20px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--text); background: transparent; text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.btn:hover { border-color: rgba(201, 161, 74, .6); color: var(--text); background: rgba(201, 161, 74, .06); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #0B1422; }
.btn-primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: #0B1422; }
.btn-sm { padding: 8px 12px; font-size: .8rem; border-radius: 8px; }
.btn-ghost { border-color: transparent; }
.link-arrow { font: 500 .85rem var(--f-mono); color: var(--accent); text-decoration: none; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { color: var(--accent-2); }

/* ---------- hero */
.hero { position: relative; padding: 88px 0 56px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: url("/assets/circuit.svg") right -120px top -40px / 900px auto no-repeat; opacity: .5; pointer-events: none; }
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero h1 { text-transform: uppercase; font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.02; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 1.14rem; margin-bottom: 14px; }
.motto { font: 500 .88rem/1 var(--f-mono); color: var(--text); letter-spacing: .06em; margin: 22px 0 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.motto span { color: var(--muted); }
.lineage { font: 500 .7rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }
.lineage a { color: var(--text-2); text-decoration: none; }
.lineage b { color: var(--accent); font-weight: 500; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; } .hero { padding-top: 56px; } }

/* ---------- terminal */
.term { background: var(--code); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 500 .72rem var(--f-mono); color: var(--muted); }
.term-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(98, 210, 227, .12); }
.term-bar .src { margin-left: auto; }
.term pre { margin: 0; padding: 18px 18px 20px; font-size: .8rem; line-height: 1.7; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.term .p { color: var(--accent); }
.term .c { color: var(--muted); }
.term .ok { color: var(--ok); }
.term .s { color: var(--signal); }
.term .w { color: var(--text); font-weight: 600; }
.term .ln { display: block; opacity: 0; animation: ln .01s linear forwards; }
.term .ln:nth-child(1) { animation-delay: .15s } .term .ln:nth-child(2) { animation-delay: .7s } .term .ln:nth-child(3) { animation-delay: 1.0s }
.term .ln:nth-child(4) { animation-delay: 1.2s } .term .ln:nth-child(5) { animation-delay: 1.35s } .term .ln:nth-child(6) { animation-delay: 1.5s }
.term .ln:nth-child(7) { animation-delay: 1.65s } .term .ln:nth-child(8) { animation-delay: 2.3s } .term .ln:nth-child(9) { animation-delay: 2.8s }
.term .ln:nth-child(10) { animation-delay: 3.2s } .term .ln:nth-child(11) { animation-delay: 3.6s } .term .ln:nth-child(n+12) { animation-delay: 3.9s }
@keyframes ln { to { opacity: 1; } }
.cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--accent); vertical-align: -.18em; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- stats */
.stats { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: rgba(10, 26, 47, .6); }
.stat { padding: 18px 16px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 600 1.45rem/1.1 var(--f-display); color: var(--text); font-variant-numeric: tabular-nums; }
.stat span { font: 500 .68rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat b.na { color: var(--muted); }
@media (max-width: 980px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stat:nth-child(4) { border-right: 0; } .stat:nth-child(-n+4) { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(2n) { border-right: 0; } .stat { border-bottom: 1px solid var(--line); } }

/* ---------- command bar */
.cmd { display: flex; align-items: center; gap: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 6px 6px 18px; transition: border-color .15s, box-shadow .15s; }
.cmd:focus-within { border-color: rgba(201, 161, 74, .7); box-shadow: 0 0 0 4px rgba(201, 161, 74, .12); }
.cmd .prompt { font: 600 .9rem var(--f-mono); color: var(--accent); margin-right: 10px; }
.cmd input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: 500 1rem var(--f-body); padding: 12px 0; outline: none; }
.cmd input::placeholder { color: var(--muted); }
.cmd .btn { flex-shrink: 0; }
.examples { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.examples a { font: 500 .76rem var(--f-mono); color: var(--text-2); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.examples a:hover { border-color: var(--line-2); color: var(--text); }

/* ---------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font: 600 .66rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 7px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.b-x402 { color: var(--gold-bright); border-color: rgba(201, 161, 74, .45); background: rgba(201, 161, 74, .07); }
.b-mcp { color: var(--signal); border-color: rgba(98, 210, 227, .4); background: rgba(98, 210, 227, .06); }
.b-a2a { color: var(--violet); border-color: rgba(165, 151, 242, .42); background: rgba(165, 151, 242, .07); }
.b-http { color: var(--silver); }
.b-net { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .72rem; }
.b-flag { color: var(--bad); border-color: rgba(238, 122, 111, .45); }
.vdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.vdot.passed, .vdot.up { background: var(--ok); box-shadow: 0 0 0 3px rgba(92, 201, 140, .14); }
.vdot.failed, .vdot.down { background: var(--bad); }
.vdot.not-checked, .vdot.unknown { background: transparent; border: 1px solid var(--muted); }
.vdot.not-applicable { background: var(--line-2); }
.price { font: 600 1.05rem/1 var(--f-display); color: var(--accent-2); font-variant-numeric: tabular-nums; }
.price small { font: 500 .72rem var(--f-mono); color: var(--muted); margin-left: 4px; }
.price.free { color: var(--ok); }

/* ---------- resource card */
.card { position: relative; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--surface), rgba(10, 26, 47, .7)); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 14px; min-width: 0; transition: border-color .18s, transform .18s, box-shadow .18s; }
.card:hover { border-color: rgba(201, 161, 74, .42); box-shadow: 0 0 0 1px rgba(201, 161, 74, .08), 0 18px 40px -24px rgba(201, 161, 74, .25); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 500 .68rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.card-top .v { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; }
.card h3 { margin: 0 0 6px; font-size: 1.02rem; overflow-wrap: anywhere; }
.card h3 a { text-decoration: none; color: var(--text); }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.card h3 a:hover { color: var(--text); }
.card .sum { font-size: .88rem; color: var(--text-2); margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .prov { font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.card .prov b { color: var(--text-2); font-weight: 600; }
.card .pricing { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.card .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.card .meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; margin-top: 12px; font: 400 .7rem/1.35 var(--f-mono); color: var(--muted); }
.card .meta b { display: block; color: var(--text-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .actions { position: relative; z-index: 2; display: flex; gap: 6px; margin-top: 14px; }
.card .actions a { font: 500 .72rem var(--f-mono); color: var(--text-2); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; }
.card .actions a:hover { border-color: var(--line-2); color: var(--text); }
.card.flagged { border-color: rgba(238, 122, 111, .35); }

/* ---------- compact rows (shelves) */
.shelf { border: 1px solid var(--line); border-radius: var(--r); background: rgba(10, 26, 47, .55); padding: 16px 16px 8px; min-width: 0; }
.shelf h3 { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; margin-bottom: 8px; }
.shelf h3 a { font: 500 .72rem var(--f-mono); color: var(--accent); text-decoration: none; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows a { color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.rows a:hover { color: var(--accent-2); }
.rows .p { font: 500 .78rem var(--f-mono); color: var(--accent-2); white-space: nowrap; }
.rows .p.free { color: var(--ok); }
.rows .sub { display: block; font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 28px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-family: var(--f-display); margin-bottom: 6px; }

/* ---------- panels, split */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; min-width: 0; }
.panel h2, .panel h3 { margin-top: 0; }
.panel hr { margin: 16px 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.duo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.duo > div { padding: 24px; border-right: 1px solid var(--line); }
.duo > div:last-child { border-right: 0; background: rgba(201, 161, 74, .05); }
.duo b { font-family: var(--f-display); color: var(--text); display: block; font-size: 1.05rem; margin-bottom: 6px; }
@media (max-width: 800px) { .duo { grid-template-columns: minmax(0, 1fr); } .duo > div { border-right: 0; border-bottom: 1px solid var(--line); } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.steps li { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: rgba(10, 26, 47, .5); }
.steps li::before { counter-increment: s; content: "0" counter(s); display: block; font: 600 .74rem var(--f-mono); color: var(--accent); margin-bottom: 8px; }
.steps b { display: block; color: var(--text); font-family: var(--f-display); margin-bottom: 4px; }
.steps span { font-size: .84rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- category tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-decoration: none; background: rgba(10, 26, 47, .45); transition: border-color .15s; min-width: 0; }
.tile:hover { border-color: rgba(201, 161, 74, .45); }
.tile b { display: block; color: var(--text); font: 600 .92rem var(--f-display); }
.tile span { font: 500 .72rem var(--f-mono); color: var(--muted); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- page head + breadcrumbs */
.page-head { padding-top: 44px; padding-bottom: 20px; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.crumbs { font: 500 .74rem var(--f-mono); color: var(--muted); margin-bottom: 18px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-2); }

/* ---------- browse layout + filters */
.browse { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.filters { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: rgba(10, 26, 47, .5); }
.filters fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.filters legend, .filters label.l { font: 600 .68rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: block; }
.filters select, .filters input[type="number"], .filters input[type="text"], .form input, .form textarea, .form select {
  width: 100%; background: var(--code); border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 9px 10px; font: 500 .86rem var(--f-body); }
.filters select:focus, .filters input:focus, .form input:focus, .form textarea:focus { border-color: rgba(201, 161, 74, .7); outline: none; box-shadow: 0 0 0 3px rgba(201, 161, 74, .12); }
.check { display: flex; gap: 8px; align-items: center; font-size: .86rem; padding: 3px 0; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--gold); width: 15px; height: 15px; }
.filters .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters-toggle { display: none; }
@media (max-width: 900px) {
  .browse { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; max-height: none; display: none; }
  .filters-toggle { display: block; margin-bottom: 12px; }
  .filters-toggle[open] + .filters, .filters.show { display: block; }
}
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: .88rem; }
.interp { font: 500 .74rem var(--f-mono); color: var(--muted); margin: -4px 0 14px; }
.interp b { color: var(--text-2); font-weight: 500; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pager a, .pager span { font: 500 .8rem var(--f-mono); padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text-2); }
.pager span[aria-current] { border-color: var(--gold); color: var(--text); }

/* ---------- detail page */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.detail aside { position: sticky; top: 80px; }
@media (max-width: 980px) { .detail { grid-template-columns: minmax(0, 1fr); } .detail aside { position: static; } }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0; font-size: .86rem; }
.kv dt, .kv dd { padding: 9px 0; border-top: 1px solid var(--line); margin: 0; }
.kv dt { font: 500 .72rem/1.9 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kv dd { color: var(--text); overflow-wrap: anywhere; }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.buybox .price { font-size: 1.8rem; }
.buybox .unit { font: 500 .8rem var(--f-mono); color: var(--muted); }
.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { padding: 7px 0 7px 24px; position: relative; border-top: 1px solid var(--line); font-size: .92rem; }
.list-check li:first-child { border-top: 0; }
.list-check li::before { content: "▸"; position: absolute; left: 4px; color: var(--accent); font-size: .8rem; top: 9px; }
.list-check.no li::before { content: "✕"; color: var(--bad); }
.list-check.yes li::before { content: "✓"; color: var(--ok); }
.vlist { list-style: none; padding: 0; margin: 0; }
.vlist li { display: grid; grid-template-columns: 14px 120px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); font-size: .84rem; }
.vlist li:first-child { border-top: 0; }
.vlist b { color: var(--text); font-weight: 600; }
.vlist .d { color: var(--muted); }
.anchors { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 8px 0 28px; }
.anchors a { font: 500 .78rem var(--f-mono); color: var(--text-2); text-decoration: none; padding: 10px 12px; border-bottom: 2px solid transparent; }
.anchors a:hover { color: var(--text); border-color: var(--gold); }
.block { margin-bottom: 40px; }
.block > h2 { font-size: 1.25rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.warnbox { border: 1px solid rgba(238, 122, 111, .4); background: rgba(238, 122, 111, .06); border-radius: var(--r); padding: 14px 16px; font-size: .9rem; color: var(--text); margin-bottom: 20px; }
.note { border-left: 2px solid var(--gold); padding: 4px 0 4px 14px; color: var(--text-2); font-size: .9rem; margin: 16px 0; }

/* ---------- code */
.codebox { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--code); overflow: hidden; margin: 0 0 16px; }
.codebox-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); font: 500 .72rem var(--f-mono); color: var(--muted); }
.codebox pre, pre.code { margin: 0; padding: 16px; overflow: auto; font-size: .8rem; line-height: 1.6; color: var(--text-2); max-height: 520px; }
.copy { font: 500 .7rem var(--f-mono); background: transparent; border: 1px solid var(--line-2); color: var(--text-2); border-radius: 6px; padding: 5px 9px; cursor: pointer; }
.copy:hover { color: var(--text); border-color: var(--gold); }
.copy.done { color: var(--ok); border-color: var(--ok); }
.tabs [role="tablist"] { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--code); border-radius: var(--r) var(--r) 0 0; border: 1px solid var(--line-2); border-bottom: 0; padding: 4px 4px 0; }
.tabs [role="tab"] { font: 500 .76rem var(--f-mono); background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 12px; cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-color: var(--gold); }
.tabs.js .codebox { border-top-left-radius: 0; border-top-right-radius: 0; }
.tabs.js [role="tabpanel"][hidden] { display: none; }
details.schema { border: 1px solid var(--line); border-radius: var(--r); background: rgba(3, 11, 20, .6); margin-bottom: 12px; }
details.schema summary { cursor: pointer; padding: 12px 14px; font: 500 .8rem var(--f-mono); color: var(--text); list-style: none; display: flex; justify-content: space-between; }
details.schema summary::after { content: "+"; color: var(--accent); }
details.schema[open] summary::after { content: "–"; }
details.schema pre { margin: 0; border-top: 1px solid var(--line); padding: 14px; max-height: 480px; overflow: auto; font-size: .78rem; color: var(--text-2); }
table.t { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.t th { text-align: left; font: 600 .68rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line-2); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); overflow-wrap: anywhere; }
table.t td code { font-size: .78rem; }
.tscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.tscroll table.t th:first-child, .tscroll table.t td:first-child { padding-left: 14px; }

/* ---------- probe */
.probe-out { margin-top: 10px; font: 500 .76rem/1.6 var(--f-mono); color: var(--text-2); }
.probe-out .ok { color: var(--ok); } .probe-out .bad { color: var(--bad); }
.skeleton { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, rgba(199,203,212,.06), rgba(199,203,212,.14), rgba(199,203,212,.06)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- article (guides/docs) */
.article { display: grid; grid-template-columns: 220px minmax(0, 720px) 1fr; gap: 40px; }
.article nav.side { position: sticky; top: 84px; align-self: start; font-size: .84rem; max-height: calc(100vh - 110px); overflow: auto; }
.article nav.side h2 { font: 600 .68rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.article nav.side ul { list-style: none; padding: 0; margin: 0 0 20px; }
.article nav.side a { display: block; padding: 5px 0 5px 10px; color: var(--text-2); text-decoration: none; border-left: 1px solid var(--line); }
.article nav.side a[aria-current="page"], .article nav.side a:hover { color: var(--text); border-color: var(--gold); }
.prose { font-size: 1.02rem; color: var(--text-2); min-width: 0; }
.prose h2 { margin-top: 2em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.6em; }
.prose a { color: var(--text); }
.prose pre { background: var(--code); border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px; overflow: auto; font-size: .82rem; line-height: 1.6; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); font-family: var(--f-display); font-weight: 600; font-size: .86rem; border-bottom-color: var(--line-2); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 16px; border-left: 2px solid var(--gold); color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose strong { color: var(--text); }
.article .aside-r { font-size: .84rem; }
@media (max-width: 1100px) { .article { grid-template-columns: 200px minmax(0, 1fr); } .article .aside-r { grid-column: 2; } }
@media (max-width: 800px) { .article { grid-template-columns: minmax(0, 1fr); } .article nav.side { position: static; max-height: none; order: 2; } .article .aside-r { grid-column: auto; } }

/* ---------- forms */
.form label { display: block; font: 600 .74rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.form textarea { min-height: 90px; resize: vertical; }
.form .help { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.stepper { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.stepper li { display: grid; grid-template-columns: 34px 150px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.stepper li:first-child { border-top: 0; }
.stepper .n { font: 600 .74rem var(--f-mono); color: var(--muted); }
.stepper .st { font: 600 .66rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; }
.st.passed, .st.ready { color: var(--ok); } .st.failed, .st.blocked { color: var(--bad); } .st.warning { color: var(--warn); } .st.skipped, .st.pending { color: var(--muted); }
@media (max-width: 640px) { .stepper li { grid-template-columns: 30px minmax(0, 1fr); } .stepper li > :last-child { grid-column: 2; } }

/* ---------- footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 56px 0 28px; background: linear-gradient(180deg, transparent, rgba(6, 18, 31, .9)); }
.foot { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot h2 { font: 600 .68rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 7px 0; }
.foot a { color: var(--text-2); text-decoration: none; font-size: .88rem; }
.foot a:hover { color: var(--accent-2); }
.foot .tag { font: 600 1rem var(--f-display); color: var(--text); margin: 14px 0 6px; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; font: 500 .72rem var(--f-mono); color: var(--muted); }
@media (max-width: 900px) { .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot > div:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .term .ln { opacity: 1; }
}
@media print { .site-header, .site-footer, .filters, .actions { display: none; } body { background: #fff; color: #000; } }

@media (max-width: 520px) { .kv { grid-template-columns: 96px minmax(0, 1fr); } .vlist li { grid-template-columns: 14px 96px minmax(0, 1fr); } .hero h1 { font-size: 2rem; } .cmd { padding-left: 12px; } .cmd .prompt { display: none; } }
.h3 { font-size: 1.08rem; }
table.t td:first-child code { white-space: nowrap; overflow-wrap: normal; }
