/* Mercury website, in the Enthara Research look: a serif voice in roman and italic, a mono for
   labels, two inks (paper and ink), dithered details. One stylesheet; fonts are served from this
   server (strict CSP, nothing third-party). */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/newsreader.woff2") format("woff2-variations"), url("/static/newsreader.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url("/static/newsreader-italic.woff2") format("woff2-variations"), url("/static/newsreader-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/plex-mono-500.woff2") format("woff2"); }

:root {
  --paper: #ecebe6; --ink: #1a1a19;
  --band: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAADCAYAAABbGge9AAAAPklEQVR42mOQkpL8z4AEBoo/nGkYJsQfCMwwEsBwTqSUJi4mWgUyrSKBnEh59uw5IzX4lNLk2o+PJja8cAEA1z7xr/451skAAAAASUVORK5CYII="); --band-wide: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAADCAYAAADiK9bcAAAAZElEQVR42mOQkpL8z4AERvnk8dFpQvKj9MihYZjWfHRMSH4Uo+bVUTAKsAJCCWW0Ehot3Gld+NOqcGcaqplsqGbSoZjpnz17zkiK/EDx0WlC8kONplX4kRrflKRHcvmk5ndiAQBiU2ZdvgNuSAAAAABJRU5ErkJggg==");
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --radius: 0px;
  color-scheme: light;
}
/* dark: follows the system unless the reader picked light or dark (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #121211; --ink: #e8e7e1; --band: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAADCAYAAABbGge9AAAAPklEQVR42mN48fzhfwYkMFD84UzDMCH+QGCGkQCGcyKlNHEx0SqQaRUJ5ESKhKQ8IzX4lNLk2o+PJja8cAEAS+g4yKCv8JMAAAAASUVORK5CYII="); --band-wide: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAADCAYAAADiK9bcAAAAZElEQVR42mN48fzhfwYkMMonj49OE5IfpUcODcO05qNjQvKjGDWvjoJRgBUQSiijldBo4U7rwp9WhTvTUM1kQzWTDsVMLyEpz0iK/EDx0WlC8kONplX4kRrflKRHcvmk5ndiAQDme5RpbXUS6QAAAABJRU5ErkJggg=="); color-scheme: dark; }
}
:root[data-theme="dark"] { --paper: #121211; --ink: #e8e7e1; --band: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAADCAYAAABbGge9AAAAPklEQVR42mN48fzhfwYkMFD84UzDMCH+QGCGkQCGcyKlNHEx0SqQaRUJ5ESKhKQ8IzX4lNLk2o+PJja8cAEAS+g4yKCv8JMAAAAASUVORK5CYII="); --band-wide: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAADCAYAAADiK9bcAAAAZElEQVR42mN48fzhfwYkMMonj49OE5IfpUcODcO05qNjQvKjGDWvjoJRgBUQSiijldBo4U7rwp9WhTvTUM1kQzWTDsVMLyEpz0iK/EDx0WlC8kONplX4kRrflKRHcvmk5ndiAQDme5RpbXUS6QAAAABJRU5ErkJggg=="); color-scheme: dark; }
/* every other colour is the ink, or the ink thinned on the paper */
:root, :root[data-theme] {
  --bg: var(--paper); --surface: var(--paper); --fg: var(--ink); --body: var(--ink);
  --surface-2: color-mix(in srgb, var(--ink) 6%, var(--paper));
  --muted: color-mix(in srgb, var(--ink) 72%, var(--paper));
  --faint: color-mix(in srgb, var(--ink) 55%, var(--paper));
  --rule: color-mix(in srgb, var(--ink) 22%, var(--paper));
  --rule-dash: color-mix(in srgb, var(--ink) 40%, var(--paper));
  --accent: var(--ink); --accent-fg: var(--paper); --accent-soft: var(--surface-2);
  --good: var(--ink); --good-soft: var(--surface-2); --warn: var(--ink); --warn-soft: var(--surface-2);
  --bad: var(--ink); --bad-soft: var(--surface-2); --code-bg: var(--surface-2); --code-fg: var(--ink);
  --btn: var(--ink); --btn-fg: var(--paper);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1.0625rem/1.6 var(--sans); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { color: var(--fg); font-weight: 500; margin: 0 0 .5em; }
h1 { font-size: clamp(2.05rem, 4vw, 3.15rem); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.4rem, 2vw, 1.65rem); line-height: 1.25; letter-spacing: -0.018em; }
h3 { font-size: 1.06rem; line-height: 1.4; letter-spacing: -0.008em; }
p { margin: 0 0 1em; }
b, strong { font-weight: 600; color: var(--fg); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: .85rem; }

/* ---------------------------------------------------------------- shell: sidebar + page */
.shell { display: grid; grid-template-columns: minmax(290px, 1fr) minmax(0, 980px) minmax(0, .45fr); min-height: 100vh; }
.sidebar { border-right: 1px solid var(--rule); }
.sb-inner { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; width: 100%; max-width: 330px;
  margin-left: auto; padding: 64px 40px 40px 44px; scrollbar-width: thin; }
.sb-top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-size: 1.42rem; font-weight: 600;
  letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.sb-menu { display: none; }
.mode { display: inline-flex; gap: 2px; margin: 0; padding: 4px; border: 1px solid var(--rule); border-radius: 11px;
  background: var(--surface-2); }
.mode-btn { padding: 4px 12px; border-radius: 8px; color: var(--muted); font-size: .82rem; font-weight: 500; }
.mode-btn:hover { color: var(--fg); text-decoration: none; }
.mode-btn.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--rule); }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav a, .sb-account > a:not(.btn) { position: relative; display: block; padding: 5px 0; color: var(--muted); font-size: 1rem; }
.sb-nav a:hover, .sb-account > a:not(.btn):hover { color: var(--fg); text-decoration: none; }
.sb-nav a[aria-current="page"], .sb-account a[aria-current="page"] { color: var(--fg); }
.sb-nav a[aria-current="page"]::before, .sb-account a[aria-current="page"]::before { content: ""; position: absolute;
  left: -22px; top: 50%; width: 7px; height: 7px; margin-top: -3px; background: var(--accent); }
.sb-nav a.ext::after { content: "\2197"; margin-left: 6px; font-size: .9em; color: var(--faint); }
.sb-account { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; }
.toc-wrap { margin-top: 30px; padding-top: 30px; border-top: 1px dashed var(--rule-dash); }
.toc-label, .label { font: 500 .74rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.toc { position: relative; margin-top: 16px; padding-left: 26px;
  background: repeating-linear-gradient(to bottom, var(--rule-dash) 0 1px, transparent 1px 9px) left top / 8px 100% no-repeat; }
.toc a { position: relative; display: block; padding: 4px 0; color: var(--muted); font-size: .92rem; line-height: 1.35; }
.toc a::before { content: ""; position: absolute; left: -26px; top: 50%; width: 14px; height: 1px; background: var(--rule-dash); }
.toc a:hover { color: var(--fg); text-decoration: none; }
.toc a.on { color: var(--fg); }
.toc a.on::before { width: 18px; height: 2px; margin-top: -1px; background: var(--accent); }
.toc-group { margin: 14px 0 2px; font: 500 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.toc-group:first-child { margin-top: 0; }

.page { min-width: 0; padding: 60px 64px 40px; }
.page > .agent-view { display: none; }
body.agent .page > :not(.agent-view) { display: none; }
body.agent .page > .agent-view { display: block; }
.agent-view .label { display: block; margin-bottom: 10px; }
.agent-view p { color: var(--muted); font-size: .95rem; }
.agent-view pre { white-space: pre-wrap; word-break: break-word; font-size: .82rem; line-height: 1.6; max-height: none; }

/* ---------------------------------------------------------------- page typography */
.hero { padding-bottom: 8px; }
.hero h1 { max-width: 14em; }
.lead { font-size: 1.12rem; line-height: 1.72; color: var(--body); max-width: 38em; }
.page p, .page li { color: var(--body); }
.page p b, .page li b { color: var(--fg); }
.statement { font-size: 1.1rem; color: var(--fg) !important; }
section.block { border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 44px; }
.section-head { max-width: 44em; margin-bottom: 26px; }
.section-head p { font-size: 1.04rem; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.page ul, .page ol { padding-left: 1.25em; margin: 0 0 1em; }
.page li { margin-bottom: .4em; }
ul.plain { padding-left: 1.2em; }
h3.mt { margin-top: 32px; }

/* ---------------------------------------------------------------- buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 9px; border: 1px solid var(--rule); background: var(--surface); color: var(--fg);
  font: 500 .93rem var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--faint); }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-fg); }
.btn.primary:hover { opacity: .88; }
.btn.small { height: 30px; padding: 0 11px; font-size: .82rem; border-radius: 7px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.sb-account .btn { height: 36px; }
input[type=email], input[type=password], input[type=text] { width: 100%; height: 44px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--fg); font: 1rem var(--sans); }
input:focus, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; font-size: .86rem; font-weight: 500; margin: 16px 0 6px; color: var(--fg); }

/* ---------------------------------------------------------------- tables: mono headers, dashed under the head */
table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0 0 1.2em; }
th { text-align: left; padding: 10px 14px 10px 0; font: 500 .74rem var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); border-bottom: 1px dashed var(--rule-dash); vertical-align: bottom; }
td { text-align: left; padding: 14px 14px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--body); }
td:first-child { color: var(--fg); font-weight: 500; }
.table-wrap { overflow-x: auto; margin: 6px 0 1.4em; }
.table-wrap table { margin: 0; }
.price-table td:last-child, .price-table th:last-child { text-align: right; white-space: nowrap; padding-right: 0; }

/* ---------------------------------------------------------------- code, notices */
code { font: .86em var(--mono); background: var(--code-bg); color: var(--code-fg); padding: .14em .4em; border-radius: 5px;
  border: 1px solid var(--rule); }
pre { position: relative; margin: 0 0 1.2em; background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; font: .82rem/1.65 var(--mono); }
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
pre .copy { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; }
pre:hover .copy, pre .copy:focus { opacity: 1; }
@media (hover: none) { pre .copy { opacity: 1; } }
.notice { border-left: 2px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; padding: 12px 16px;
  margin: 0 0 1.2em; font-size: .94rem; color: var(--body); }
.notice.warn { border-left-color: var(--warn); }
.notice.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.notice.good { border-left-color: var(--good); background: var(--good-soft); }
.footnote { font-size: .82rem; color: var(--faint) !important; line-height: 1.6; }

/* ---------------------------------------------------------------- home */
.sheet { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--surface); margin: 8px 0 10px; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px dashed var(--rule-dash);
  font: 500 .78rem var(--mono); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-dash); }
.sheet-body { padding: 16px 18px; font: .82rem/1.75 var(--mono); color: var(--body); overflow-x: auto; }
.sheet-body .q { color: var(--fg); margin-bottom: 8px; }
.sheet-sec { color: var(--faint); margin-top: 10px; }
.tag { display: inline-block; font: 600 .68rem var(--sans); padding: 1px 7px; border-radius: 5px; margin-right: 6px; vertical-align: 1px; }
.tag.cur { color: var(--good); background: var(--good-soft); }
.tag.old { color: var(--muted); background: var(--surface-2); }
.tag.ext { color: var(--warn); background: var(--warn-soft); }
.tag.ask { color: var(--accent); background: var(--accent-soft); }
.strike { color: var(--faint); }
.features { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.feature { border-top: 1px solid var(--rule); padding: 20px 0 22px; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; font-size: .98rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  margin: 10px 0 12px; }
.stat { padding: 20px 18px 18px 0; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--rule); }
.stat b { display: block; font-size: 1.75rem; font-weight: 500; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: .88rem; line-height: 1.45; display: block; }
.connect { display: grid; gap: 22px; }
.connect h3 { margin-bottom: 4px; }
.connect p { margin-bottom: 10px; }
.foot { margin-top: 72px; padding: 22px 0 8px; border-top: 1px solid var(--rule); display: flex; gap: 16px; flex-wrap: wrap;
  justify-content: space-between; color: var(--faint); font-size: .85rem; }
.foot a { color: var(--muted); }

/* ---------------------------------------------------------------- docs */
.docs section { padding-top: 4px; margin-bottom: 8px; }
.docs section + section { border-top: 1px solid var(--rule); margin-top: 44px; padding-top: 44px; }
.docs h3 { margin-top: 1.7em; }
.tabs { display: flex; gap: 2px; border-bottom: 1px dashed var(--rule-dash); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; margin-bottom: -1px;
  font: 500 .88rem var(--sans); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.tabpanel { display: none; }
.tabpanel.on { display: block; }

/* ---------------------------------------------------------------- updates and benchmark */
.updates-head { max-width: 44em; margin-bottom: 8px; }
.scores { border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 44px; }
.scores h2 { font-size: 1.3rem; }
.pill { font: 500 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--rule); color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.pill.on { color: var(--accent); border-color: var(--accent); }
.timeline { margin-top: 56px; border-top: 1px solid var(--rule); }
.release { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 32px; padding: 44px 0; border-bottom: 1px solid var(--rule); }
.release-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.release-meta time { font: 500 .78rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.ver { font-size: .95rem; font-weight: 500; color: var(--fg); }
.ver::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; vertical-align: 2px; background: var(--accent); }
.ver.platform::before { background: var(--faint); }
.release-body h2 { font-size: 1.3rem; }
.release-body li { margin-bottom: .55em; }
.result { font-size: .93rem; border-left: 2px solid var(--good); background: var(--surface-2); padding: 9px 14px;
  border-radius: 0 8px 8px 0; margin: 0; }
.bench-block { border-top: 1px solid var(--rule); margin-top: 52px; padding-top: 48px; }
.barchart { border-top: 1px dashed var(--rule-dash); border-bottom: 1px dashed var(--rule-dash); padding: 22px 0 14px; margin: 20px 0 24px; }
.bar-row, .bar-axis { display: grid; grid-template-columns: 150px minmax(0, 1fr) 56px; gap: 16px; align-items: center; }
.bar-row { margin-bottom: 12px; }
.bar-label { font-size: .95rem; color: var(--body); }
.bar-val { font: .9rem var(--mono); text-align: right; color: var(--fg); }
.bar-track { display: block; width: 100%; height: 20px; overflow: visible; }
.bar-track .bar { fill: var(--faint); opacity: .35; }
.bar-track .bar.mine { fill: var(--accent); opacity: 1; }
.bar-track .bar:hover { opacity: .6; }
.bar-track .bar.mine:hover { opacity: .85; }
.axis-scale { display: flex; justify-content: space-between; font: .72rem var(--mono); color: var(--faint);
  border-top: 1px solid var(--rule); padding-top: 4px; }
.bar-caption { font-size: .8rem; color: var(--faint) !important; margin: 10px 0 0; }
.bench-table td { font-variant-numeric: tabular-nums; }
.bench-table tr.mine td { color: var(--fg); }
.bench-table tr.mine td:first-child { box-shadow: inset 2px 0 0 var(--accent); padding-left: 12px; }
.bench-table.cats td:not(:first-child), .bench-table.cats th:not(:first-child) { text-align: right; }
.bench-table.results td, .bench-table.results th, .scores td, .scores th { white-space: nowrap; }
.findings { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; margin-top: 12px; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { border-top: 1px solid var(--rule); padding: 20px 0 6px; }
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- auth and dashboard */
.auth-page { max-width: 440px; padding-top: 8px; }
.auth-page h1 { font-size: 2.1rem; }
.auth-page .btn.primary { width: 100%; margin-top: 24px; height: 46px; }
.switch { margin-top: 18px; font-size: .92rem; color: var(--muted); }
.form-error { color: var(--bad); font-size: .9rem; margin-top: 12px; min-height: 1.2em; }
.hint { font-size: .8rem; color: var(--faint); margin-top: 6px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { font-size: 2.2rem; margin: 0; }
.dash .grid.two { align-items: start; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--rule); overflow: hidden; margin: 10px 0 6px; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; }
.big { font-size: 1.9rem; font-weight: 500; letter-spacing: -0.03em; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1; min-width: 160px; }
.keybox { margin: 14px 0 6px; padding: 14px; border-radius: 10px; border: 1px solid var(--good); background: var(--good-soft); color: var(--fg); }
.keybox code { display: block; word-break: break-all; margin: 8px 0 10px; padding: 8px 10px; background: var(--surface); }
.empty { color: var(--faint) !important; font-size: .92rem; font-weight: 400 !important; }
.spaces { list-style: none; padding: 0 !important; margin: 0 0 1em; }
.spaces li { padding: 8px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.table-wrap.mt { margin-top: 18px; }
.dash-row { margin-top: 28px; }
.dash pre { font-size: .76rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 270px minmax(0, 1fr); }
  .sb-inner { padding: 48px 28px 32px 32px; }
  .page { padding: 52px 48px 32px; }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 10; border-right: 0; border-bottom: 1px solid var(--rule);
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
  .sb-inner { position: static; max-width: none; max-height: none; padding: 12px 16px; overflow: visible; }
  .brand { font-size: 1.25rem; }
  .brand svg { width: 26px; height: 26px; }
  .sb-menu { display: block; }
  .sb-menu summary { list-style: none; cursor: pointer; width: 40px; height: 36px; display: flex; flex-direction: column;
    justify-content: center; align-items: center; gap: 5px; border: 1px solid var(--rule); border-radius: 9px; }
  .sb-menu summary::-webkit-details-marker { display: none; }
  .sb-menu summary span { display: block; width: 16px; height: 1.5px; background: var(--fg); }
  .sb-nav, .sb-account, .toc-wrap { display: none; }
  .sidebar:has(.sb-menu[open]) .sb-nav, .sidebar:has(.sb-menu[open]) .sb-account { display: flex; }
  .sidebar:has(.sb-menu[open]) .sb-nav { margin-top: 12px; }
  .sidebar:has(.sb-menu[open]) .sb-account { flex-direction: row; flex-wrap: wrap; align-items: center; margin: 8px 0 8px; }
  .sb-nav a[aria-current="page"]::before { left: -14px; }
  .page { padding: 32px 16px 24px; }
  .lead { font-size: 1.05rem; }
  section.block, .bench-block, .scores { margin-top: 40px; padding-top: 36px; }
  .features, .grid.two, .grid.three, .findings { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .release { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 32px 0; }
  .release-meta { flex-direction: row; align-items: center; gap: 14px; }
  .bar-row, .bar-axis { grid-template-columns: 104px minmax(0, 1fr) 46px; gap: 10px; }
  .bar-label, .bar-val { font-size: .84rem; }
}
/* grid children may shrink below their content (long code lines scroll inside <pre>) */
.grid > *, .shell > *, .features > *, .release > *, .connect > *, .page > * { min-width: 0; }
.eyebrow { display: block; margin-bottom: 20px; font: 500 .76rem var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); }
body[data-page="dashboard"] .mode, body[data-page="auth"] .mode { display: none; }

/* ---------------------------------------------------------------- reader controls: Human/Agent and light/dark */
.sb-controls { display: flex; align-items: center; gap: 8px; margin: 26px 0 30px; }
.theme-btn { display: none; width: 34px; height: 34px; padding: 0; align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
html.js .theme-btn { display: inline-flex; }
.theme-btn:hover { color: var(--fg); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
@media (max-width: 860px) { .sb-controls { margin: 12px 0 4px; } }
.page p, .page li { max-width: 46em; }        /* comfortable line length; tables and code use the full column */

/* ---------------------------------------------------------------- playground */
.pg-modes { margin-top: 30px; }
.pg-modes button { font-size: .95rem; }
.pg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-top: 26px; align-items: start; }
.pg-grid > * { min-width: 0; }
.pg-step-head { margin-bottom: 10px; }
.pg-step-title { font-size: 1.35rem; margin-bottom: 8px; }
.pg-step-text { font-size: 1rem; }
.pg-said { border: 1px solid var(--rule); border-left: 2px solid var(--fg); border-radius: 0 10px 10px 0; padding: 12px 16px;
  margin: 16px 0 18px; background: var(--surface); }
.pg-said.ask { border-left-color: var(--accent); }
.pg-said-meta { font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.pg-said-text { color: var(--fg); font-size: 1rem; line-height: 1.55; word-break: break-word; }
.pg-step-nav { margin: 6px 0 14px; }
.pg-field { margin-bottom: 4px; }
.pg-field-label { display: block; font-size: .86rem; font-weight: 500; margin: 0 0 6px; color: var(--fg); }
.pg-from { flex-wrap: wrap; }
.pg-from .mode-btn { border: 0; background: none; cursor: pointer; font-family: var(--sans); }
.pg-from .mode-btn.on { background: var(--surface); }
textarea { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--rule); background: var(--surface);
  color: var(--fg); font: 1rem/1.5 var(--sans); resize: vertical; min-height: 84px; }
textarea:focus, input[type=date]:focus, .chip:focus-visible, .linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=date] { height: 40px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--rule); background: var(--surface);
  color: var(--fg); font: .95rem var(--sans); }
.pg-send-row { margin-top: 10px; }
.pg-send-row .btn { margin-left: auto; }
label.pg-inline { margin: 0; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.chip { border: 1px dashed var(--rule-dash); background: var(--surface-2); color: var(--body); border-radius: 99px;
  padding: 3px 11px; font: .8rem var(--sans); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { color: var(--fg); border-color: var(--faint); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:disabled { color: var(--faint); cursor: default; text-decoration: none; }
.pg-foot { margin-top: 18px; margin-bottom: 4px; }
.pg-out + .pg-out { margin-top: 26px; }
.pg-out .label { display: block; margin-bottom: 10px; }
.pg-happened { list-style: none; padding: 0 !important; margin: 0; }
.pg-happened li { position: relative; padding: 0 0 8px 16px; margin: 0; color: var(--fg); font-size: .95rem; line-height: 1.5; }
.pg-happened li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--accent); }
.pg-happened li.empty::before { background: var(--rule-dash); }
.pg-sheet { margin: 0; }
.pg-sheet .sheet-body { margin: 0; border: 0; border-radius: 0; background: var(--surface); white-space: pre-wrap;
  word-break: break-word; max-height: 420px; overflow-y: auto; }
.pg-memory { border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 40px; }
.pg-mem-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; row-gap: 8px; }
.pg-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.pg-count { font: 500 .74rem var(--mono); color: var(--faint); }
.pg-group .footnote { margin: 0 0 6px; }
.pg-list { list-style: none; padding: 0 !important; margin: 0 0 22px; }
.pg-fact { position: relative; border-top: 1px solid var(--rule); padding: 10px 64px 10px 0; margin: 0 !important; }
.pg-fact.pg-ask { padding-right: 0; color: var(--fg); }
.pg-fact-text { margin: 0 0 4px; color: var(--fg) !important; word-break: break-word; }
.pg-fact-text.strike { color: var(--muted) !important; }
.pg-fact-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: .8rem; color: var(--faint); }
.pg-fact-meta .tag { margin-right: 0; }
.pg-forget { position: absolute; top: 10px; right: 0; font-size: .82rem; }
.tag.bad { color: var(--bad); background: var(--bad-soft); }
.pg-messages { list-style: none; padding: 0 !important; margin: 0; counter-reset: msg; }
.pg-msg { border-top: 1px solid var(--rule); padding: 10px 0; margin: 0 !important; }
.pg-msg-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: .8rem; color: var(--faint); margin-bottom: 2px; }
.pg-msg-meta .tag { margin-right: 0; }
.pg-msg-text { margin: 0; word-break: break-word; }
@media (max-width: 1100px) { .pg-grid { gap: 28px; } }
@media (max-width: 860px) {
  .pg-grid, .pg-mem-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-send-row .btn { margin-left: 0; }
}


/* ================================================================ the Enthara look
   Serif headings set in roman with italic for emphasis, mono labels and buttons, square corners,
   ink rules, dithered bands. Placed last so it settles every component above. */
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: var(--rule-dash); }
a:hover { text-decoration-color: var(--ink); }
.sb-nav a, .sb-account > a:not(.btn), .toc a, .brand, .btn, .mode-btn, .foot a, .tabs button { text-decoration: none; }
h1, h2, h3 { font-family: var(--sans); font-weight: 400; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -0.025em; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 2.2vw, 1.85rem); line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.005em; }
h1 em, h2 em, h3 em, .lead em { font-style: italic; font-weight: inherit; }
b, strong { font-weight: 600; }
.lead { font-size: 1.15rem; line-height: 1.65; }
.statement { font-style: italic; font-size: 1.2rem; }

/* the brand and a dithered band under it */
.brand { font-family: var(--sans); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.02em; }
.brand svg { width: 24px; height: 24px; }
.sb-top { position: relative; padding-bottom: 14px; }
.sb-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--band) right center / 256px 6px no-repeat;
  image-rendering: pixelated; }
.byline { display: block; margin-top: 18px; font: 400 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.byline a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule-dash); }
.byline a:hover { border-bottom-color: var(--ink); }

/* square, two-ink controls */
.btn, input[type=email], input[type=password], input[type=text], input[type=date], textarea, .mode, .mode-btn, .theme-btn,
.sheet, pre, code, .tag, .pill, .chip, .notice, .keybox, .result, .meter, .meter i, .sb-menu summary, .pg-said, .bar-track .bar { border-radius: 0; }
.btn { height: 38px; padding: 0 14px; font: 500 .74rem var(--mono); letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.btn:hover { border-color: var(--ink); background: var(--surface-2); }
.btn.primary { background: var(--ink); color: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 0 var(--ink);
  margin-right: 3px; }
.btn.primary:hover { opacity: 1; background: var(--paper); color: var(--ink); }
.btn.primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 var(--ink); }
.btn.small, .btn.tiny { height: 28px; padding: 0 10px; font-size: .68rem; }
.btn.danger { color: var(--ink); border-style: dashed; }
input[type=email], input[type=password], input[type=text], input[type=date], textarea {
  border: 1px solid var(--ink); background: var(--paper); font-family: var(--sans); }
input:focus, textarea:focus, .btn:focus-visible, a:focus-visible, summary:focus-visible, .chip:focus-visible, .linkbtn:focus-visible {
  outline: 2px dashed var(--ink); outline-offset: 3px; }
label { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
label .opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--faint); margin-left: 6px; }
.form-error:not(:empty)::before { content: "\00D7  "; }
.mode { padding: 0; border: 1px solid var(--ink); background: transparent; gap: 0; }
.mode-btn { font: 500 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; color: var(--ink); }
.mode-btn.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.theme-btn { border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.sb-nav a { font-size: 1.05rem; color: var(--muted); }
.sb-nav a[aria-current="page"], .sb-account a[aria-current="page"] { color: var(--ink); font-style: italic; }
.sb-nav a.ext::after { color: var(--muted); }

/* tables, code and notices */
th { font-family: var(--mono); color: var(--muted); border-bottom: 1px solid var(--ink); }
td { border-bottom: 1px solid var(--rule); }
td:first-child { font-weight: 500; }
code { border: 0; background: var(--surface-2); }
pre { border: 1px solid var(--ink); background: var(--paper); }
.notice, .result { border-left: 2px solid var(--ink); background: var(--surface-2); }
.notice.bad { border-left-style: double; border-left-width: 4px; }

/* labels on memories: state is carried by fill and border, not colour */
.tag { font: 500 .66rem var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border: 1px solid var(--ink); }
.tag.cur { background: var(--ink); color: var(--paper); }
.tag.old { background: transparent; color: var(--muted); border-style: dashed; border-color: var(--faint); }
.tag.ext { background: transparent; color: var(--ink); }
.tag.ask { background: transparent; color: var(--ink); border-style: dotted; }
.tag.bad { background: var(--ink); color: var(--paper); }
.pill { border-color: var(--rule-dash); }
.pill.on { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.sheet { border: 1px solid var(--ink); }
.sheet-head { border-bottom: 1px solid var(--ink); font-family: var(--mono); }
.dot { border-radius: 0; background: var(--ink); width: 6px; height: 6px; }
.chip { border-style: dashed; border-color: var(--ink); background: transparent; font-family: var(--sans); }
.keybox { border: 2px solid var(--ink); background: var(--surface-2); }
.meter { border: 1px solid var(--ink); background: transparent; }
.meter i { background: var(--ink); }
.stat b { font-family: var(--sans); font-weight: 400; font-size: 2rem; }
.big { font-family: var(--sans); font-weight: 400; }
.bar-track .bar { fill: var(--ink); opacity: .22; }
.bar-track .bar.mine { fill: var(--ink); opacity: 1; }
.feature h3, .card h3 { font-weight: 500; }

/* page ends: an ink rule, and a dithered band above the footer */
.foot { position: relative; border-top: 1px solid var(--ink); font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 6px; background: var(--band-wide) right center / 640px 6px no-repeat;
  image-rendering: pixelated; }
.foot a { color: var(--ink); }
.eyebrow { color: var(--muted); }
@media (max-width: 860px) {
  .sidebar { background: color-mix(in srgb, var(--paper) 94%, transparent); }
  .sb-top { padding-bottom: 12px; }
  .byline { display: none; }
  .sidebar:has(.sb-menu[open]) .byline { display: block; }
}
.pg-from .mode-btn.on { background: var(--ink); color: var(--paper); }
@media (max-width: 860px) { .sb-top::after { display: none; } }
