/* ============================================================
   PrometheX Docs — design system
   Purple on pure black, per brand screenshot.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Noto+Sans+SC:wght@400;500;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* color */
  --bg: #050506;
  --bg-raise: #0b0b0f;
  --card: #0e0e14;
  --card-2: #121219;
  --code-bg: #0c0c12;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.16);
  --text: #ededf2;
  --muted: #9c9cac;
  --dim: #62626f;
  --accent: #8b78ff;
  --accent-bright: #b6a8ff;
  --accent-ink: #100a26;
  --accent-soft: rgba(139,120,255,.12);
  --accent-line: rgba(139,120,255,.35);
  --good: #5cd992;
  --warn: #f5c462;
  --shadow: 0 16px 48px rgba(0,0,0,.5);
  /* type */
  --sans: 'Hanken Grotesk', 'Noto Sans SC', -apple-system, 'PingFang SC', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  /* layout */
  --side-w: 280px;
  --toc-w: 208px;
  --content-w: 740px;
  --radius: 12px;
  font-size: 16px; /* designer 15px; bumped per founder readability */
}

html[data-theme="light"] {
  --bg: #fbfbfd;
  --bg-raise: #f4f4f8;
  --card: #ffffff;
  --card-2: #f6f5fb;
  --code-bg: #16131f;            /* code stays dark in light theme */
  --border: rgba(20,16,40,.10);
  --border-strong: rgba(20,16,40,.22);
  --text: #18141f;
  --muted: #5b5768;
  --dim: #8d8999;
  --accent: #6d4fe0;
  --accent-bright: #6d4fe0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(109,79,224,.09);
  --accent-line: rgba(109,79,224,.35);
  --shadow: 0 16px 48px rgba(40,30,90,.10);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent-soft); }

html[data-lang="en"] .lang-zh { display: none !important; }
html[data-lang="zh"] .lang-en { display: none !important; }

/* ============ announce bar ============ */
.announce {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; font-size: .8rem; color: var(--muted);
  border-bottom: 1px solid var(--border); background: var(--bg);
  position: sticky; top: 0; z-index: 40;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.announce .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex: none; }
.announce a { color: var(--text); font-weight: 600; }
.announce a span { color: var(--accent-bright); }

/* ============ app frame ============ */
.frame { display: flex; min-height: calc(100vh - 38px); }

/* ============ sidebar ============ */
.side {
  width: var(--side-w); flex: none;
  border-right: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: var(--announce-h, 38px);
  height: calc(100dvh - var(--announce-h, 38px));
  display: flex; flex-direction: column;
  padding: 20px 14px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 0; overflow: hidden; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--accent) 0%, #6450d8 100%);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: .9rem;
}
.brand .name { font-weight: 800; font-size: 1.06rem; letter-spacing: -.02em; white-space: nowrap; }
.brand .name span { color: var(--dim); font-weight: 600; margin-left: 5px; font-size: .85rem; }

.search-btn {
  margin: 16px 0 6px; display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 12px;
  background: var(--bg-raise); border: 1px solid var(--border); border-radius: 10px;
  color: var(--dim); font-size: .85rem; transition: border-color .15s;
}
.search-btn:hover { border-color: var(--border-strong); color: var(--muted); }
.search-btn svg { flex: none; }
.search-btn .keys { margin-left: auto; display: flex; gap: 4px; }
.search-btn kbd {
  font-family: var(--sans); font-size: .7rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px;
  background: var(--bg);
}

.nav-scroll { overflow-y: auto; flex: 1; margin: 8px -6px 0; padding: 0 6px; scrollbar-width: thin; }

.nav-item, .group-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; background: none; border-radius: 9px;
  color: var(--muted); font-size: .89rem; font-weight: 500; text-align: left;
  transition: background .12s, color .12s;
}
.nav-item:hover, .group-head:hover { color: var(--text); background: var(--bg-raise); }
.nav-item.active { color: var(--accent-bright); background: var(--accent-soft); font-weight: 600; }
.nav-item svg, .group-head svg.ico { flex: none; opacity: .75; }
.group-head .chev { margin-left: auto; transition: transform .18s; opacity: .5; }
.nav-group.open .group-head .chev { transform: rotate(90deg); }
.nav-group.open .group-head { color: var(--text); }

.group-kids { display: none; padding: 2px 0 4px; }
.nav-group.open .group-kids { display: block; }
.kid {
  display: block; width: calc(100% - 21px); margin-left: 21px;
  padding: 6px 12px; border: 0; background: none; text-align: left;
  border-left: 1px solid var(--border); border-radius: 0 8px 8px 0;
  color: var(--dim); font-size: .85rem; transition: color .12s;
}
.kid:hover { color: var(--text); }
.kid.active { color: var(--accent-bright); border-left-color: var(--accent); font-weight: 600; background: linear-gradient(90deg, var(--accent-soft), transparent 80%); }

.side-sep { height: 1px; background: var(--border); margin: 10px 8px; flex: none; }
.side-foot { flex: none; display: flex; gap: 8px; padding-top: 12px; }
.foot-btn {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 10px; background: var(--bg-raise);
  border: 1px solid var(--border); border-radius: 9px;
  color: var(--muted); font-size: .82rem; font-weight: 600;
  transition: border-color .15s, color .15s;
}
.foot-btn:hover { border-color: var(--border-strong); color: var(--text); }
.foot-btn.icon { flex: 0 0 auto; width: 34px; height: 34px; padding: 0; }
.foot-btn .ico-sun, .foot-btn .ico-moon { display: none; }
html[data-theme="dark"] .foot-btn .ico-sun { display: block; }
html[data-theme="light"] .foot-btn .ico-moon { display: block; }

/* ============ main / content ============ */
.main { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 48px; padding: 0 48px; }
.content { width: 100%; max-width: var(--content-w); padding: 56px 0 96px; min-width: 0; }

/* right toc */
.toc { width: var(--toc-w); flex: none; position: sticky; top: 0; height: 100vh; padding: 64px 0 0; }
.toc .toc-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.toc a {
  display: block; padding: 5px 0 5px 14px; font-size: .83rem; color: var(--dim);
  border-left: 1px solid var(--border); transition: color .12s, border-color .12s;
}
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.on { color: var(--accent-bright); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 1320px) { .toc { display: none; } }

/* ============ typography ============ */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-bright); margin-bottom: 18px;
}
.kicker::before { content: ""; width: 18px; height: 1px; background: var(--accent-line); }

h1.display {
  font-size: 3rem; line-height: 1.08; letter-spacing: -.035em; font-weight: 800;
  margin-bottom: 20px; text-wrap: balance;
}
h1.display.pg { font-size: 2.2rem; margin-bottom: 14px; }
.standfirst {
  font-size: 1.18rem; line-height: 1.6; color: var(--muted);
  max-width: 58ch; text-wrap: pretty; margin-bottom: 28px;
}
.standfirst strong { color: var(--text); font-weight: 600; }

.content h2 {
  font-size: 1.5rem; letter-spacing: -.02em; font-weight: 700;
  margin: 0 0 14px; scroll-margin-top: 32px; text-wrap: balance;
}
.content h3 { font-size: 1.08rem; font-weight: 700; margin: 28px 0 10px; scroll-margin-top: 32px; }
.content h4 { font-size: .95rem; font-weight: 700; margin: 20px 0 8px; }
.content p { color: var(--muted); margin-bottom: 14px; text-wrap: pretty; }
.content p strong, .content li strong { color: var(--text); font-weight: 600; }
.content section { margin-top: 72px; }
.content section.tight { margin-top: 48px; }

.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.sec-head .no { font-family: var(--mono); font-size: .8rem; color: var(--accent-bright); }

/* ============ buttons ============ */
.btn-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0;
  background: var(--accent-bright); color: var(--accent-ink);
  font-size: .92rem; font-weight: 700; transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }
.btn.ghost {
  background: none; color: var(--text); border: 1.5px solid var(--border-strong);
}
.btn.ghost:hover { border-color: var(--accent-line); filter: none; }
.link-cta { font-weight: 600; color: var(--text); font-size: .92rem; }
.link-cta:hover { color: var(--accent-bright); }

/* ============ hero ============ */
.hero { padding-top: 0; position: relative; }
.hero-rays {
  position: absolute; inset: -56px -48px auto auto; width: 46%; height: 380px;
  pointer-events: none; opacity: .5;
  background:
    linear-gradient(115deg, transparent 46%, rgba(139,120,255,.07) 46.5%, transparent 49%),
    linear-gradient(115deg, transparent 62%, rgba(139,120,255,.05) 62.5%, transparent 66%),
    radial-gradient(ellipse at 85% 0%, rgba(139,120,255,.10), transparent 60%);
}
html[data-theme="light"] .hero-rays { opacity: .6; }

/* ============ feature bullets ============ */
.feat-list { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 26px; padding: 0; list-style: none; }
.feat-list li { display: flex; gap: 13px; align-items: flex-start; color: var(--muted); font-size: .94rem; }
.feat-list .fico {
  width: 30px; height: 30px; flex: none; border-radius: 9px; margin-top: -2px;
  background: var(--accent-soft); color: var(--accent-bright);
  display: grid; place-items: center;
}
.feat-list b { color: var(--text); font-weight: 600; display: block; }

/* hero feature chips */
.hero-chips {
  display: flex; flex-wrap: wrap; gap: 10px; list-style: none;
  padding: 0; margin: 18px 0 24px;
}
.hero-chips li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  background: none; border: 1px solid var(--border-strong);
  color: var(--muted); font-size: .82rem; font-weight: 500;
}
.hero-chips li svg { flex: none; opacity: .45; }

/* embed split layout */
.embed-grid { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); gap: 40px; align-items: start; }
@media (max-width: 1080px) { .embed-grid { grid-template-columns: 1fr; } }

/* ============ code card ============ */
.code-card {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
html[data-theme="light"] .code-card { border-color: rgba(20,16,40,.2); }
.code-tabs { display: flex; align-items: center; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.code-tab {
  padding: 7px 13px 9px; border: 0; background: none; color: #71718a;
  font-size: .84rem; font-weight: 600; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .12s;
}
.code-tab:hover { color: #c9c9da; }
.code-tab.on { color: #d9d2ff; border-bottom-color: var(--accent); }
.code-tabs .copy { margin-left: auto; }
.copy {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid rgba(255,255,255,.12); border-radius: 7px;
  color: #8e8ea4; font-size: .74rem; font-weight: 600; padding: 4px 9px;
  transition: color .12s, border-color .12s;
}
.copy:hover { color: #e6e6f2; border-color: rgba(255,255,255,.3); }
.copy.ok { color: var(--good); border-color: rgba(92,217,146,.4); }
pre.code {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  font-family: var(--mono); font-size: .83rem; line-height: 1.75; color: #c9c9da;
  scrollbar-width: thin;
}
pre.code .c-kw  { color: #b09aff; }
pre.code .c-tag { color: #9d8cff; }
pre.code .c-att { color: #8fb8ff; }
pre.code .c-str { color: #a8e2b8; }
pre.code .c-fn  { color: #ffd28f; }
pre.code .c-cm  { color: #5d5d72; font-style: italic; }
pre.code .c-pn  { color: #8a8aa0; }

/* widget preview strip inside code card */
.card-preview { border-top: 1px dashed rgba(255,255,255,.12); padding: 16px 20px 18px; }
.card-preview .pv-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #6c6c84; margin-bottom: 12px; display: flex; align-items: center; gap: 7px;
}
.card-preview .pv-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* mock MarketCard widget */
.widget {
  background: #131320; border: 1px solid rgba(255,255,255,.1); border-radius: 12px;
  padding: 16px 16px 14px; max-width: 380px; color: #ededf2;
}
.widget .w-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.widget .w-brand { font-size: .68rem; font-weight: 700; color: #7d6ee8; letter-spacing: .06em; }
.widget .w-vol { font-size: .7rem; color: #6c6c84; font-family: var(--mono); }
.widget .w-q { font-size: .92rem; font-weight: 700; line-height: 1.4; margin-bottom: 12px; letter-spacing: -.01em; }
.widget .w-bar { height: 7px; border-radius: 4px; overflow: hidden; display: flex; background: rgba(255,107,107,.32); margin-bottom: 8px; }
.widget .w-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.widget .w-odds { display: flex; justify-content: space-between; font-size: .76rem; font-family: var(--mono); color: #9c9cac; margin-bottom: 13px; }
.widget .w-odds b:first-child { color: #c3b6ff; }
.widget .w-odds b:last-child { color: #ff9a9a; }
.widget .w-btns { display: flex; gap: 8px; }
.widget .w-btns span {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 8px;
  font-size: .82rem; font-weight: 700;
}
.widget .w-yes { background: rgba(139,120,255,.18); color: #c3b6ff; border: 1px solid rgba(139,120,255,.35); }
.widget .w-no  { background: rgba(255,107,107,.10); color: #ff9a9a; border: 1px solid rgba(255,107,107,.25); }

/* ============ quick-nav cards ============ */
.qnav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
@media (max-width: 1080px) { .qnav { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .qnav { grid-template-columns: 1fr; } }
.qcard {
  display: flex; flex-direction: column; gap: 10px; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; transition: border-color .15s, transform .15s, background .15s;
}
.qcard:hover { border-color: var(--accent-line); transform: translateY(-2px); background: var(--card-2); text-decoration: none; }
.qcard .qico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-bright); display: grid; place-items: center; }
.qcard b { color: var(--text); font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.qcard small { color: var(--dim); font-size: .82rem; line-height: 1.55; }
.qcard .qgo { display: none; }

/* ============ pillars ============ */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.pillars.cols2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .pillars, .pillars.cols2 { grid-template-columns: 1fr; } }
.pillar { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.pillar .pno { font-family: var(--mono); font-size: .74rem; color: var(--accent-bright); display: block; margin-bottom: 10px; }
.pillar b { display: block; font-size: .95rem; margin-bottom: 6px; letter-spacing: -.01em; }
.pillar small { color: var(--dim); font-size: .83rem; line-height: 1.55; display: block; }
.pillar .plist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.pillar .plist li { font-size: .82rem; color: var(--dim); line-height: 1.55; padding-left: 15px; position: relative; }
.pillar .plist li::before { content: "—"; position: absolute; left: 0; color: var(--accent-bright); }

/* ============ stats ============ */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-card .n { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 5px; color: var(--text); }
.stat-card .l { display: block; color: var(--dim); font-size: .82rem; line-height: 1.5; }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr; } }

/* ============ platform scope ============ */
.scope-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 20px; }
.scope-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.scope-card > b { display: block; font-size: .95rem; letter-spacing: -.01em; margin-bottom: 11px; }
.scope-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.scope-tags > span { font-size: .78rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
@media (max-width: 640px) { .scope-grid { grid-template-columns: 1fr; } }

/* ============ vision quote ============ */
.vision {
  border-left: 2px solid var(--accent); padding: 6px 0 6px 26px; margin-top: 18px;
}
.vision p.q { font-size: 1.3rem; line-height: 1.55; color: var(--text); font-weight: 500; letter-spacing: -.015em; margin-bottom: 10px; text-wrap: balance; }
.vision .who { font-size: .82rem; color: var(--dim); }

/* ============ callouts ============ */
.callout {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; margin: 20px 0; font-size: .9rem;
}
.callout .cico { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; margin-top: 1px; }
.callout p { margin: 0; color: var(--muted); }
.callout b { color: var(--text); }
.callout.info { border-color: var(--accent-line); background: var(--accent-soft); }
.callout.info .cico { background: rgba(139,120,255,.2); color: var(--accent-bright); }
.callout.warn .cico { background: rgba(245,196,98,.14); color: var(--warn); }
.callout.good .cico { background: rgba(92,217,146,.13); color: var(--good); }

/* ============ steps ============ */
.step { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 18px; margin-top: 40px; }
.step .sno {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  border: 1px solid var(--accent-line); color: var(--accent-bright);
  font-family: var(--mono); font-size: .8rem; font-weight: 600;
  display: grid; place-items: center; background: var(--accent-soft);
  position: relative;
}
.step { position: relative; }
.step:not(.last)::after {
  /* connector spans this row's height plus the 40px gap to the next circle
     (was a fixed 120vh stripe that overshot past the last step) */
  content: ""; position: absolute; top: 38px; bottom: -44px; left: 17px; width: 1px;
  background: var(--border);
}
.step .sbody { min-width: 0; padding-bottom: 4px; }
.step h3 { margin-top: 2px !important; }

/* ============ tables ============ */
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; overflow-x: auto; margin: 18px 0 8px; }
table.props { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.props th {
  text-align: left; padding: 11px 16px; font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim); background: var(--bg-raise);
  border-bottom: 1px solid var(--border); font-weight: 700;
}
table.props td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
table.props tr:last-child td { border-bottom: 0; }
table.props code { font-family: var(--mono); font-size: .8rem; color: var(--accent-bright); background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
table.props .t { color: var(--dim); font-family: var(--mono); font-size: .78rem; white-space: nowrap; }
table.props .req { color: var(--warn); font-size: .72rem; font-weight: 700; margin-left: 6px; }
table.props td.f { color: var(--text); font-weight: 600; }
table.props td.ck { color: var(--good); font-weight: 700; }
table.props td.no2 { color: var(--dim); }
.fine { font-size: .78rem; color: var(--dim); line-height: 1.9; margin-top: 12px; }

/* doc lists (verbatim content lists) */
.doc-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 9px; }
.doc-list li { position: relative; padding-left: 19px; color: var(--muted); font-size: .94rem; line-height: 1.65; }
.doc-list li::before { content: ""; position: absolute; left: 2px; top: .58em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .85; }
.doc-list li strong { color: var(--text); font-weight: 600; }

/* inline code in prose */
.standfirst code { font-size: .9em; }
.content p code, .content li code {
  font-family: var(--mono); font-size: .82em; color: var(--accent-bright);
  background: var(--accent-soft); padding: 2px 7px; border-radius: 6px;
}

/* ============ breadcrumb & page footer ============ */
.crumb { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--dim); margin-bottom: 22px; }
.crumb .sep { opacity: .5; }
.crumb b { color: var(--muted); font-weight: 600; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 72px; }
.pager a {
  display: flex; flex-direction: column; gap: 5px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 18px; transition: border-color .15s;
}
.pager a:hover { border-color: var(--accent-line); text-decoration: none; }
.pager a.next { text-align: right; grid-column: 2; }
.pager small { font-size: .74rem; color: var(--dim); }
.pager b { color: var(--text); font-size: .92rem; font-weight: 700; }
.pager a:hover b { color: var(--accent-bright); }

/* ============ search modal ============ */
.search-veil {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center;
  padding: 12vh 20px 0;
}
.search-veil.open { display: flex; }
.search-box {
  width: 100%; max-width: 560px; background: var(--card);
  border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow);
}
.search-box .s-row { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--dim); }
.search-box input {
  flex: 1; background: none; border: 0; outline: none; color: var(--text);
  font-family: inherit; font-size: 1rem;
}
.search-box input::placeholder { color: var(--dim); }
.search-box .esc { font-size: .68rem; border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; color: var(--dim); }
.s-results { max-height: 46vh; overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.s-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border: 0; background: none; border-radius: 9px;
  color: var(--muted); font-size: .9rem; text-align: left;
}
.s-item small { color: var(--dim); margin-left: auto; font-size: .76rem; flex: none; }
.s-item:hover, .s-item.sel { background: var(--accent-soft); color: var(--text); }
.s-item .sico { color: var(--dim); flex: none; display: grid; place-items: center; }
.s-empty { padding: 26px 16px; text-align: center; color: var(--dim); font-size: .88rem; }

/* ============ stub page ============ */
.stub-note { margin-top: 26px; }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .main { padding: 0 22px; }
  h1.display { font-size: 2.2rem; }
  .side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .menu-fab {
    position: fixed; left: 16px; bottom: 16px; z-index: 55;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--accent-bright); color: var(--accent-ink); border: 0;
    display: grid; place-items: center; box-shadow: var(--shadow);
  }
}
@media (min-width: 901px) { .menu-fab { display: none; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ brand logo (real assets replace the placeholder mark) ============ */
.brand img.logo { height: 28px; width: auto; display: none; }
html[data-theme="dark"] .brand .logo-dark { display: block; }
html[data-theme="light"] .brand .logo-light { display: block; }

/* ============ changelog (Polymarket-style two-column timeline) ============ */
.cl-entry {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 30px;
  padding: 30px 0; border-top: 1px solid var(--border); margin-top: 0;
}
.cl-entry:first-of-type { border-top: 0; padding-top: 18px; }
.content h2.cl-date {
  display: inline-block; width: fit-content; margin: 0; padding: 4px 12px;
  font-size: .82rem; font-weight: 600; letter-spacing: 0;
  color: var(--accent-bright); background: var(--accent-soft);
  border: 1px solid var(--accent-line); border-radius: 8px;
}
.cl-title { margin: 12px 0 0; font-size: .95rem; font-weight: 600; color: var(--text); line-height: 1.5; }
.cl-body { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }
.cl-body li { color: var(--muted); font-size: .92rem; line-height: 1.7; }
.cl-body b { color: var(--text); }
@media (max-width: 860px) {
  .cl-entry { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
  .cl-title { margin-top: 10px; }
}

/* main-site entry pinned to the right edge of the announce bar */
.announce-main {
  position: absolute; left: calc(100% - 290px); top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent-bright); color: var(--accent-ink) !important;
  font-size: .76rem; font-weight: 700; white-space: nowrap;
  transition: filter .15s;
}
.announce-main:hover { filter: brightness(1.08); text-decoration: none; }
.announce-main .arr { font-weight: 600; }
@media (max-width: 1320px) { .announce-main { left: auto; right: 28px; } }
@media (max-width: 640px) { .announce-main { display: none; } }
/* the .announce a span accent rule (Skynet highlight) must not tint the pill */
.announce a.announce-main span { color: var(--accent-ink); }

/* external nav links (status page) — same row style as nav items */
a.nav-ext { text-decoration: none; }
a.nav-ext:hover { text-decoration: none; }
.nav-ext .ext-arr { margin-left: auto; font-size: .8rem; color: var(--dim); }

/* live status indicator — pulsing green dot, links to the status page */
.status-live {
  display: flex; align-items: center; gap: 7px;
  flex: 1; min-width: 0; padding: 8px 4px;
  font-size: .74rem; color: var(--dim); white-space: nowrap;
  overflow: hidden;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .45);
  animation: live-pulse 2.4s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}
