/* @staxd/design 0.3.6. Generated by scripts/build.mjs from tokens/tokens.json: edit that, not this. */
/* Geist and Geist Mono, SIL Open Font License 1.1 (fonts/OFL-*.txt). Served from the tool's own origin. */
@font-face { font-family: "Geist Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("./fonts/geist-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("./fonts/geist-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("./fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("./fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* @staxd/design 0.3.6. Generated by scripts/build.mjs from tokens/tokens.json: edit that, not this. */

:root {
  color-scheme: light dark;
  --font: "Geist Variable", Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono Variable", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-2xl: 20px;
  --fs-3xl: 24px;
  --fs-4xl: 32px;
  --fs-display: clamp(32px, 4.4vw, 44px);
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-body: 1.5;
  --lh-loose: 1.6;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 650;
  --ls-caps: .04em;
  --ls-tight: -.015em;
  --ls-display: -.035em;
  --sp-2: 2px;
  --sp-4: 4px;
  --sp-6: 6px;
  --sp-8: 8px;
  --sp-10: 10px;
  --sp-12: 12px;
  --sp-14: 14px;
  --sp-16: 16px;
  --sp-20: 20px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-40: 40px;
  --sp-48: 48px;
  --sp-64: 64px;
  --sp-96: 96px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --radius-2xl: 12px;
  --radius-full: 999px;
  --control-sm: 28px;
  --control-md: 32px;
  --control-lg: 40px;
  --motion-fast: .12s;
  --motion-base: .2s;
  --motion-ease: cubic-bezier(.16, 1, .3, 1);
  --layout-max: 1280px;
  --layout-narrow: 720px;
  --layout-gutter: 32px;
  --layout-gutter-sm: 16px;
  --layout-header: 56px;
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F5F5F5;
  --surface-3: #FAFAFA;
  --hover: #F2F2F2;
  --border: #E8E8E8;
  --border-soft: #F0F0F0;
  --border-strong: #D6D6D6;
  --border-hover: #A8A8A8;
  --text: #171717;
  --text-2: #5C5C5C;
  --text-3: #6B6B6B;
  --accent: #3A5BC7;
  --accent-strong: #2A449E;
  --accent-bg: #171717;
  --accent-bg-hover: #383838;
  --on-accent: #FFFFFF;
  --focus: #3A5BC7;
  --danger-bg: #B42318;
  --danger-bg-hover: #912018;
  --on-danger: #FFFFFF;
  --header-bg: #FFFFFF;
  --header-text: #171717;
  --header-nav: #5C5C5C;
  --header-hover: #F2F2F2;
  --header-active: #EDEDED;
  --header-muted: #6B6B6B;
  --header-pill: #F5F5F5;
  --header-pill-text: #5C5C5C;
  --header-avatar: #E8E8E8;
  --header-focus: #3A5BC7;
  --muted-bg: #F2F2F2;
  --muted-text: #525252;
  --ok-bg: #EDF5EE;
  --ok-text: #2B6B34;
  --info-bg: #EEF2FC;
  --info-text: #2F4BA8;
  --info-border: #D9E1F7;
  --warn-bg: #FBF4E4;
  --warn-text: #805300;
  --warn-border: #EFDDB2;
  --bad-bg: #FBEEEE;
  --bad-text: #A1302B;
  --bad-border: #F1D3D2;
  --state-active: #2B7A3A;
  --state-grace: #805300;
  --state-read-only: #B42318;
  --mark: #6B6B6B;
  --mark-warn: #B87800;
  --mark-bad: #C4302B;
  --shadow: 0 1px 2px rgba(10, 10, 10, .04), 0 6px 20px rgba(10, 10, 10, .06);
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, .06);
  --fw-body: 400;
  /* Neutral until a tone-* class sets them */
  --tool: var(--text-3);
  --tint: var(--muted-bg);
  --ink: var(--text-2);
}
:root[data-theme="light"] { color-scheme: light; }
/* Touch screens get taller controls */
@media (pointer: coarse) { :root { --control-sm: 36px; --control-md: 40px; --control-lg: 44px; } }
.tone-assent { --tool: #4A5FA8; --tint: #EEF0F8; --ink: #34437A; --mark: #4A5FA9; }
.tone-vitals { --tool: #3F7D5C; --tint: #ECF4EF; --ink: #2C5A42; --mark: #1E774E; }
.tone-dials { --tool: #9A5F28; --tint: #F7EFE6; --ink: #75461C; --mark: #72665E; }
.tone-weave { --tool: #7856A3; --tint: #F2EEF8; --ink: #573D78; --mark: #7856A3; }
.tone-warden { --tool: #A34A5E; --tint: #F8EDEF; --ink: #7A3444; --mark: #7A5F64; }
.tone-relay { --tool: #4F6F7D; --tint: #EDF2F4; --ink: #39525D; --mark: #4F6F7D; }
.tone-roster { --tool: #3B7774; --tint: #EBF3F2; --ink: #2A5553; --mark: #3B7774; }
.tone-muted, .tone-other { --tool: #6B6B6B; --tint: #F2F2F2; --ink: #4A4A4A; --mark: #6B6B6B; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0A;
    --surface: #111111;
    --surface-2: #181818;
    --surface-3: #141414;
    --hover: #1C1C1C;
    --border: #262626;
    --border-soft: #1E1E1E;
    --border-strong: #363636;
    --border-hover: #565656;
    --text: #EDEDED;
    --text-2: #A3A3A3;
    --text-3: #8F8F8F;
    --accent: #9EB1FF;
    --accent-strong: #C3CEFF;
    --accent-bg: #EDEDED;
    --accent-bg-hover: #FFFFFF;
    --on-accent: #0A0A0A;
    --focus: #9EB1FF;
    --danger-bg: #C4352F;
    --danger-bg-hover: #A62B26;
    --on-danger: #FFFFFF;
    --header-bg: #0A0A0A;
    --header-text: #EDEDED;
    --header-nav: #A3A3A3;
    --header-hover: #1A1A1A;
    --header-active: #222222;
    --header-muted: #8F8F8F;
    --header-pill: #181818;
    --header-pill-text: #A3A3A3;
    --header-avatar: #2A2A2A;
    --header-focus: #9EB1FF;
    --muted-bg: #1F1F1F;
    --muted-text: #A3A3A3;
    --ok-bg: #12231A;
    --ok-text: #8FD19E;
    --info-bg: #151C31;
    --info-text: #B4C3F5;
    --info-border: #26304F;
    --warn-bg: #262010;
    --warn-text: #E8C477;
    --warn-border: #4A3A1A;
    --bad-bg: #2A1515;
    --bad-text: #F0A3A0;
    --bad-border: #4D2222;
    --state-active: #6FCF83;
    --state-grace: #E8C477;
    --state-read-only: #F2827F;
    --mark: #797979;
    --mark-warn: #BB8B22;
    --mark-bad: #C93B36;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .5);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .6);
    --fw-body: 360;
  }
  :root:not([data-theme="light"]) .tone-assent { --tool: #98A8E6; --tint: #1A1E2E; --ink: #C3CDF2; --mark: #7D8ED9; }
  :root:not([data-theme="light"]) .tone-vitals { --tool: #86C29F; --tint: #15211A; --ink: #BFE0CC; --mark: #41AA75; }
  :root:not([data-theme="light"]) .tone-dials { --tool: #D9A06A; --tint: #261C12; --ink: #EDCDAE; --mark: #797979; }
  :root:not([data-theme="light"]) .tone-weave { --tool: #B79BDB; --tint: #201A2B; --ink: #DACBEE; --mark: #9C7BCF; }
  :root:not([data-theme="light"]) .tone-warden { --tool: #DE97A6; --tint: #2A171C; --ink: #F0C7D0; --mark: #867276; }
  :root:not([data-theme="light"]) .tone-relay { --tool: #92B2C0; --tint: #162024; --ink: #C6D9E1; --mark: #7A99A7; }
  :root:not([data-theme="light"]) .tone-roster { --tool: #8CC7C2; --tint: #152322; --ink: #C2E2DF; --mark: #67A09B; }
  :root:not([data-theme="light"]) .tone-muted, :root:not([data-theme="light"]) .tone-other { --tool: #9A9A9A; --tint: #1F1F1F; --ink: #C8C8C8; --mark: #797979; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0A0A;
  --surface: #111111;
  --surface-2: #181818;
  --surface-3: #141414;
  --hover: #1C1C1C;
  --border: #262626;
  --border-soft: #1E1E1E;
  --border-strong: #363636;
  --border-hover: #565656;
  --text: #EDEDED;
  --text-2: #A3A3A3;
  --text-3: #8F8F8F;
  --accent: #9EB1FF;
  --accent-strong: #C3CEFF;
  --accent-bg: #EDEDED;
  --accent-bg-hover: #FFFFFF;
  --on-accent: #0A0A0A;
  --focus: #9EB1FF;
  --danger-bg: #C4352F;
  --danger-bg-hover: #A62B26;
  --on-danger: #FFFFFF;
  --header-bg: #0A0A0A;
  --header-text: #EDEDED;
  --header-nav: #A3A3A3;
  --header-hover: #1A1A1A;
  --header-active: #222222;
  --header-muted: #8F8F8F;
  --header-pill: #181818;
  --header-pill-text: #A3A3A3;
  --header-avatar: #2A2A2A;
  --header-focus: #9EB1FF;
  --muted-bg: #1F1F1F;
  --muted-text: #A3A3A3;
  --ok-bg: #12231A;
  --ok-text: #8FD19E;
  --info-bg: #151C31;
  --info-text: #B4C3F5;
  --info-border: #26304F;
  --warn-bg: #262010;
  --warn-text: #E8C477;
  --warn-border: #4A3A1A;
  --bad-bg: #2A1515;
  --bad-text: #F0A3A0;
  --bad-border: #4D2222;
  --state-active: #6FCF83;
  --state-grace: #E8C477;
  --state-read-only: #F2827F;
  --mark: #797979;
  --mark-warn: #BB8B22;
  --mark-bad: #C93B36;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .6);
  --fw-body: 360;
}
:root[data-theme="dark"] .tone-assent { --tool: #98A8E6; --tint: #1A1E2E; --ink: #C3CDF2; --mark: #7D8ED9; }
:root[data-theme="dark"] .tone-vitals { --tool: #86C29F; --tint: #15211A; --ink: #BFE0CC; --mark: #41AA75; }
:root[data-theme="dark"] .tone-dials { --tool: #D9A06A; --tint: #261C12; --ink: #EDCDAE; --mark: #797979; }
:root[data-theme="dark"] .tone-weave { --tool: #B79BDB; --tint: #201A2B; --ink: #DACBEE; --mark: #9C7BCF; }
:root[data-theme="dark"] .tone-warden { --tool: #DE97A6; --tint: #2A171C; --ink: #F0C7D0; --mark: #867276; }
:root[data-theme="dark"] .tone-relay { --tool: #92B2C0; --tint: #162024; --ink: #C6D9E1; --mark: #7A99A7; }
:root[data-theme="dark"] .tone-roster { --tool: #8CC7C2; --tint: #152322; --ink: #C2E2DF; --mark: #67A09B; }
:root[data-theme="dark"] .tone-muted, :root[data-theme="dark"] .tone-other { --tool: #9A9A9A; --tint: #1F1F1F; --ink: #C8C8C8; --mark: #797979; }

/* Staxd shared components. Every value comes from a token; test/rules.test.mjs fails on a raw colour or font size here.
   Works under a 'self'-only CSP: no inline styles, so a tool's colour comes from a tone-* class.
   The language: ink does the work, hairlines separate, color only means state or names a tool. */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  font-feature-settings: "calt", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text); text-decoration-color: var(--text); }
a.link-accent { color: var(--accent); text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; font-weight: var(--fw-semibold); text-wrap: balance; }
p { text-wrap: pretty; }
code, kbd, samp, pre { font-family: var(--mono); }
kbd {
  display: inline-flex; align-items: center; min-width: 20px; height: 20px; padding: 0 var(--sp-4);
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-2); font-size: var(--fs-2xs);
}
::selection { background: var(--info-bg); color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--sp-16); top: -48px; z-index: 30;
  padding: var(--sp-8) var(--sp-12); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); text-decoration: none;
  box-shadow: var(--shadow);
}
.skip:focus { top: var(--sp-8); }

/* Layout */
.wrap {
  max-width: var(--layout-max); margin: 0 auto;
  padding-left: max(var(--layout-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--layout-gutter), env(safe-area-inset-right, 0px));
}
.main { padding-top: var(--sp-40); padding-bottom: var(--sp-64); }
.narrow { max-width: var(--layout-narrow); }
.stack { display: flex; flex-direction: column; gap: var(--sp-24); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.rule { border: 0; border-top: 1px solid var(--border); margin: 0; }
.eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-3); }

/* Page heading */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-16) var(--sp-24); }
.page-title { font-size: var(--fs-3xl); line-height: var(--lh-tight); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); }
.display { font-size: var(--fs-display); line-height: var(--lh-tight); font-weight: var(--fw-semibold); letter-spacing: var(--ls-display); }
.lede { margin: var(--sp-8) 0 0; color: var(--text-2); font-size: var(--fs-lg); line-height: var(--lh-loose); max-width: 62ch; }
.note { margin: 0; padding: var(--sp-12) var(--sp-16); border: 1px solid var(--warn-border); border-radius: var(--radius-lg); background: var(--warn-bg); color: var(--warn-text); font-size: var(--fs-sm); }

/* Buttons: ink for the one main action, hairline for the rest */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-6);
  min-height: var(--control-md); padding: 0 var(--sp-12); border-radius: var(--radius-md);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-sm);
  font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--motion-fast), border-color var(--motion-fast), transform var(--motion-fast);
}
.btn:hover { background: var(--hover); border-color: var(--border-hover); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-sm { min-height: var(--control-sm); padding: 0 var(--sp-10); font-size: var(--fs-xs); }
.btn-lg { min-height: var(--control-lg); padding: 0 var(--sp-16); font-size: var(--fs-md); }
.btn-primary { background: var(--accent-bg); border-color: var(--accent-bg); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-bg-hover); border-color: var(--accent-bg-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--danger-bg); border-color: var(--danger-bg); color: var(--on-danger); }
.btn-danger:hover { background: var(--danger-bg-hover); border-color: var(--danger-bg-hover); color: var(--on-danger); }
.btn-danger-quiet { color: var(--bad-text); }
.btn-danger-quiet:hover { background: var(--bad-bg); border-color: var(--bad-border); color: var(--bad-text); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8); margin: 0; }
.actions form { display: inline-flex; margin: 0; }

/* Badges, status and tags */
.pill {
  display: inline-flex; align-items: center; gap: var(--sp-6);
  height: 22px; padding: 0 var(--sp-8); border-radius: var(--radius-md);
  background: var(--muted-bg); color: var(--muted-text);
  font-size: var(--fs-xs); font-weight: var(--fw-medium); white-space: nowrap;
}
.pill-muted { background: var(--muted-bg); color: var(--muted-text); }
.pill-ok { background: var(--ok-bg); color: var(--ok-text); }
.pill-info { background: var(--info-bg); color: var(--info-text); }
.pill-warn { background: var(--warn-bg); color: var(--warn-text); }
.pill-bad { background: var(--bad-bg); color: var(--bad-text); }
.pill-tone { background: var(--tint); color: var(--ink); }
.pill-outline { background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.status { display: inline-flex; align-items: center; gap: var(--sp-8); font-size: var(--fs-sm); color: var(--text); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: none; }
.status-ok::before { background: var(--state-active); }
.status-warn::before { background: var(--state-grace); }
.status-bad::before { background: var(--state-read-only); }
.status-info::before { background: var(--accent); }
.tag {
  display: inline-flex; align-items: center; height: 18px; margin-left: var(--sp-6); padding: 0 var(--sp-4); border-radius: var(--radius-sm);
  border: 1px solid var(--border); color: var(--text-2); font-family: var(--mono); font-size: var(--fs-2xs); font-weight: var(--fw-medium); vertical-align: 1px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tool); flex: none; }
.mark { width: 8px; height: 8px; border-radius: 2px; background: var(--tool); flex: none; }

/* Header: the Staxd mark, every tool one click away, then the current tool's own pages. Same in every tool.
   Row one is the tool bar (icon and name, a count when something needs you, dashed when a tool in the plan isn't
   installed). Row two names the current tool and lists its pages. On phones the tool bar becomes a bottom tab bar. */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--border);
}
.top-row { display: flex; align-items: center; gap: var(--sp-8) var(--sp-16); min-height: var(--layout-header); padding-top: var(--sp-8); padding-bottom: var(--sp-8); }
.brand {
  display: inline-flex; align-items: center; gap: var(--sp-8); height: var(--control-md); flex: none;
  color: var(--header-text); font-size: var(--fs-md); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); text-decoration: none;
}
.brand:hover { color: var(--header-text); }
.brand-mark {
  width: 22px; height: 22px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--header-text); color: var(--header-bg);
}
.brand-mark svg { width: 14px; height: 14px; }
.tool-bar { display: flex; align-items: center; gap: var(--sp-2); flex: 1 1 auto; min-width: 0; padding-left: var(--sp-16); border-left: 1px solid var(--border); }
.tool-link {
  position: relative; display: inline-flex; align-items: center; gap: var(--sp-8); flex: none;
  height: var(--control-md); padding: 0 var(--sp-10) 0 var(--sp-6); border-radius: var(--radius-md);
  color: var(--header-nav); font-size: var(--fs-sm); font-weight: var(--fw-medium); text-decoration: none; white-space: nowrap;
  transition: background-color var(--motion-fast), color var(--motion-fast);
}
.tool-link:hover { background: var(--header-hover); color: var(--header-text); }
.tool-link.is-active, .tool-link[aria-current] { background: var(--header-active); color: var(--header-text); }
.tool-link-icon {
  width: 22px; height: 22px; border-radius: var(--radius-sm); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tint); color: var(--tool);
}
.tool-link-icon svg { width: 14px; height: 14px; }
.tool-link.is-active .tool-link-icon, .tool-link[aria-current] .tool-link-icon { background: var(--tool); color: var(--header-bg); }
.tool-link.is-off { color: var(--text-3); }
.tool-link.is-off .tool-link-icon { background: transparent; color: var(--text-3); border: 1px dashed var(--border-strong); }
.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 var(--sp-6);
  border-radius: var(--radius-full); background: var(--header-text); color: var(--header-bg);
  font-size: var(--fs-2xs); font-weight: var(--fw-semibold); line-height: 1; font-variant-numeric: tabular-nums;
}
.top-meta { display: flex; align-items: center; gap: var(--sp-12); flex: none; margin-left: auto; }
.pill-top { height: 22px; background: var(--header-pill); color: var(--header-pill-text); font-family: var(--mono); font-size: var(--fs-2xs); }
.top-host { font-family: var(--mono); font-size: var(--fs-xs); color: var(--header-muted); }
/* header.js marks a tool bar too full for its row, one step at a time: .is-snug drops the host name, then .is-tight
   the tool names and .is-cramped the "Jump to" label (both below) */
.top-row.is-snug .top-host { display: none; }
.jump {
  display: inline-flex; align-items: center; gap: var(--sp-8); height: var(--control-sm); padding: 0 var(--sp-4) 0 var(--sp-10);
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-3);
  font: inherit; font-size: var(--fs-xs); text-decoration: none; cursor: pointer;
  transition: border-color var(--motion-fast), color var(--motion-fast);
}
.jump:hover { border-color: var(--border-hover); color: var(--text-2); }
.jump svg { width: 14px; height: 14px; flex: none; }
.jump kbd { height: 18px; min-width: 18px; padding: 0 var(--sp-4); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--header-avatar); color: var(--header-text); font-size: var(--fs-2xs); font-weight: var(--fw-semibold);
}
.sub-row { border-top: 1px solid var(--border-soft); }
.sub-inner { display: flex; align-items: stretch; gap: var(--sp-24); min-height: 44px; overflow-x: auto; scrollbar-width: none; }
.sub-inner::-webkit-scrollbar { display: none; }
.sub-title {
  display: inline-flex; align-items: center; gap: var(--sp-8); flex: none; padding-right: var(--sp-24); border-right: 1px solid var(--border-soft);
  color: var(--header-text); font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-decoration: none;
}
.sub-title:hover { color: var(--header-text); }
.sub-title svg { width: 16px; height: 16px; color: var(--tool); }
.sub-nav { display: flex; gap: var(--sp-20); }
.sub-link {
  display: inline-flex; align-items: center; gap: var(--sp-6); flex: none; border-bottom: 2px solid transparent;
  color: var(--header-nav); font-size: var(--fs-sm); font-weight: var(--fw-medium); text-decoration: none; white-space: nowrap;
  transition: color var(--motion-fast), border-color var(--motion-fast);
}
.sub-link:hover { color: var(--header-text); }
.sub-link.is-active, .sub-link[aria-current="page"] { color: var(--header-text); border-bottom-color: var(--header-text); }
.tool-link:focus-visible, .sub-title:focus-visible, .sub-link:focus-visible { outline-offset: -2px; }

/* Banners: the license state and other platform-wide news, under the header */
.banner { border-bottom: 1px solid; font-size: var(--fs-sm); }
.banner-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4) var(--sp-12); padding-top: var(--sp-10); padding-bottom: var(--sp-10); }
.banner-row strong { font-weight: var(--fw-semibold); }
.banner-row .btn { margin-left: auto; }
.banner-info { background: var(--info-bg); color: var(--info-text); border-color: var(--info-border); }
.banner-warn { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); }
.banner-bad { background: var(--bad-bg); color: var(--bad-text); border-color: var(--bad-border); }

/* Facts: label over value, divided by hairlines inside one card */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; }
.fact { padding: var(--sp-16) var(--sp-20); min-width: 0; background: var(--surface); }
.facts > .card { border: 0; border-radius: 0; }
.fact-value { margin-top: var(--sp-6); font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fact-note { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--text-2); overflow-wrap: anywhere; }
.fact-mono { margin-top: var(--sp-6); font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); overflow-wrap: anywhere; }
.state-active { color: var(--state-active); }
.state-grace { color: var(--state-grace); }
.state-read_only { color: var(--state-read-only); }
.state-unknown { color: var(--text-2); }

/* Tables: no boxes, no stripes, hairline rows */
.table-card { min-width: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-4) var(--sp-16); padding: var(--sp-16) var(--sp-20) var(--sp-12); }
.card-head h2 { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.card-head p { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.card-empty { margin: 0; padding: var(--sp-4) var(--sp-20) var(--sp-20); color: var(--text-2); }
.table-scroll { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  height: 36px; padding: 0 var(--sp-12); text-align: left; white-space: nowrap; vertical-align: middle;
  font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-3);
  border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border);
}
th:first-child, td:first-child { padding-left: var(--sp-20); }
th:last-child, td:last-child { padding-right: var(--sp-20); }
td { padding: var(--sp-12); border-bottom: 1px solid var(--border-soft); font-size: var(--fs-sm); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color var(--motion-fast); }
tbody tr:hover { background: var(--surface-3); }
td.mono, td.muted { font-size: var(--fs-xs); }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-name { font-weight: var(--fw-medium); color: var(--text); }
.row-sub { margin-top: var(--sp-2); font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
.row-action { text-align: right; white-space: nowrap; }
.row-action form { display: inline-flex; margin: 0; }
.table-foot { margin: 0; padding: var(--sp-12) var(--sp-20); border-top: 1px solid var(--border-soft); font-size: var(--fs-xs); color: var(--text-3); }

/* List: rows of things inside one card, the quiet alternative to a grid of cards */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: var(--sp-16); padding: var(--sp-14) var(--sp-20); border-bottom: 1px solid var(--border-soft); }
.list > li:last-child { border-bottom: 0; }
.list a.list-row { display: flex; align-items: center; gap: var(--sp-16); flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.list > li:has(a.list-row:hover) { background: var(--surface-3); }

/* Section heading: a title with a quiet note on the right */
.sec { display: flex; flex-direction: column; gap: var(--sp-12); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-4) var(--sp-16); }
.sec-head h2 { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.sec-head p { margin: 0; font-size: var(--fs-xs); color: var(--text-3); }

/* Tool cards: the portal's home. A tone rule on top, the tool's mark, a live figure and its main pages. */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-16); }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: var(--sp-16); min-width: 0; padding: var(--sp-20);
  border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); overflow: hidden;
  transition: border-color var(--motion-fast);
}
.tool-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--tool); }
.tool-card:hover { border-color: var(--border-hover); }
.tc-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-12); }
.tc-icon {
  width: 40px; height: 40px; border-radius: var(--radius-lg); flex: none;
  display: inline-flex; align-items: center; justify-content: center; background: var(--tint); color: var(--tool);
}
.tc-icon svg { width: 20px; height: 20px; }
.tc-path { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); }
.tc-name { display: block; color: var(--text); font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); text-decoration: none; }
.tc-name:hover { color: var(--text); }
a.tc-name::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-xl); }
a.tc-name:focus-visible { outline: none; }
a.tc-name:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; }
.tc-verb { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--text-2); }
.tc-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-4) var(--sp-10); min-height: 32px; }
.tc-num { font-size: var(--fs-3xl); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); line-height: 1; font-variant-numeric: tabular-nums; }
.tc-label { align-self: center; font-size: var(--fs-sm); color: var(--text-3); }
.tc-links {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: var(--sp-6) var(--sp-16); margin-top: auto;
  padding-top: var(--sp-12); border-top: 1px solid var(--border-soft); font-size: var(--fs-xs);
}
.tc-links a { color: var(--text-2); text-decoration: none; }
.tc-links a:hover { color: var(--text); text-decoration: underline; }
.tool-card.is-dim::before { background: var(--border-strong); }
.tool-card.is-dim .tc-icon { background: var(--muted-bg); color: var(--text-3); }
.tool-card.is-off { background: transparent; border-style: dashed; }
.tool-card.is-off::before { display: none; }
.tool-card.is-off .tc-icon { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-3); }
.tool-card.is-off .tc-name { color: var(--text-2); }

/* Two columns: the main column and an aside that drops below it on narrow screens */
.layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-24); }
.layout > .main-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-20); }
.layout > .side-col { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-20); }

/* Segmented control: a raised chip on a sunken track */
.segs { display: inline-flex; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--radius-lg); background: var(--muted-bg); }
.seg {
  display: inline-flex; align-items: center; height: var(--control-sm); padding: 0 var(--sp-10); border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--text-2); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-medium); text-decoration: none; cursor: pointer;
}
.seg:hover { color: var(--text); }
.seg.is-active, .seg[aria-current="true"], .seg[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Forms */
.form { display: flex; flex-direction: column; gap: var(--sp-20); padding: var(--sp-24); }
.form-danger { border-color: var(--bad-border); }
.field { display: flex; flex-direction: column; gap: var(--sp-6); }
.field label { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: var(--control-md); padding: var(--sp-6) var(--sp-10); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm);
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-hover); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in oklch, var(--focus) 22%, transparent);
}
.field select { max-width: 280px; }
.field textarea { resize: vertical; min-height: 96px; line-height: var(--lh-body); }
.hint { margin: 0; font-size: var(--fs-xs); color: var(--text-3); }
.form-error { margin: 0; padding: var(--sp-10) var(--sp-12); border: 1px solid var(--bad-border); border-radius: var(--radius-md); background: var(--bad-bg); color: var(--bad-text); font-size: var(--fs-sm); }
.field-error { margin: 0; font-size: var(--fs-xs); color: var(--bad-text); }

/* Description list: label left, value right; stacks on phones */
.dl { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; margin: 0; font-size: var(--fs-sm); }
.dl > div { display: contents; }
.dl dt, .dl dd { padding: var(--sp-12) var(--sp-20); border-bottom: 1px solid var(--border-soft); }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl > div:last-child dt, .dl > div:last-child dd { border-bottom: 0; }

/* Numbered steps and commands */
.steps { margin: 0; padding: var(--sp-8) var(--sp-20); list-style: none; counter-reset: step; }
.steps > li {
  counter-increment: step; position: relative; display: flex; flex-direction: column; gap: var(--sp-8);
  padding: var(--sp-16) 0 var(--sp-16) 40px; border-bottom: 1px solid var(--border-soft);
}
.steps > li:last-child { border-bottom: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 15px; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); color: var(--text-2); font-family: var(--mono); font-size: var(--fs-2xs); font-weight: var(--fw-medium);
}
.steps h2 { font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-snug); overflow-wrap: anywhere; }
.steps p { margin: 0; font-size: var(--fs-sm); }
.cmd {
  margin: 0; padding: var(--sp-10) var(--sp-12); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2);
  font-family: var(--mono); font-size: var(--fs-xs); line-height: var(--lh-loose); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text);
}
.cmd code { font: inherit; }
.cmd .prompt { color: var(--text-3); user-select: none; }

/* Empty states, notices (no access, not found, upstream failed) and the footer */
.empty { padding: var(--sp-48) var(--sp-32); text-align: center; }
.empty h2 { font-size: var(--fs-lg); }
.empty p { margin: var(--sp-6) auto 0; max-width: 46ch; color: var(--text-2); font-size: var(--fs-sm); }
.notice {
  max-width: 560px; margin: var(--sp-48) auto; padding: var(--sp-48) var(--sp-32);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-12); text-align: center;
}
.notice h1 { font-size: var(--fs-2xl); line-height: var(--lh-snug); letter-spacing: var(--ls-tight); overflow-wrap: anywhere; }
.notice p { margin: 0; max-width: 44ch; color: var(--text-2); overflow-wrap: anywhere; }
.notice p.mono { font-size: var(--fs-xs); }
.notice .actions { justify-content: center; margin-top: var(--sp-8); }
.notice-icon {
  width: 40px; height: 40px; border-radius: 50%; flex: none; margin-bottom: var(--sp-4);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}
.notice-icon svg { width: 20px; height: 20px; }
.tool-icon {
  width: 36px; height: 36px; border-radius: var(--radius-lg); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--tool);
}
.tool-icon svg { width: 18px; height: 18px; }
.tone-text { color: var(--tool); }
.foot { display: flex; flex-wrap: wrap; gap: var(--sp-8) var(--sp-24); margin: 0; padding-top: var(--sp-20); border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--fs-xs); }

/* Medium screens: the tool bar keeps its icons and counts, and the names go to screen readers and tooltips */
@media (max-width: 1080px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-host { display: none; }
}
/* Tool names go to tooltips and screen readers between 721 and 1080px, and on wider screens when the bar is too full */
@media (min-width: 721px) and (max-width: 1080px) {
  .tool-link { padding: 0 var(--sp-6); }
  .tool-link-name {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}
@media (min-width: 721px) {
  .top-row.is-tight .tool-link { padding: 0 var(--sp-6); }
  .top-row.is-tight .tool-link-name, .top-row.is-cramped .jump span {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .top-row.is-cramped .jump { padding: 0 var(--sp-8); }
  .top-row.is-cramped .jump kbd { display: none; }
}

/* Phones: one breakpoint. The tool bar is a tab bar along the bottom; the page row scrolls sideways. */
@media (max-width: 720px) {
  .wrap { padding-left: max(var(--layout-gutter-sm), env(safe-area-inset-left, 0px)); padding-right: max(var(--layout-gutter-sm), env(safe-area-inset-right, 0px)); }
  .main { padding-top: var(--sp-24); }
  .top-row { min-height: 52px; }
  .jump { display: none; }
  .tool-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; gap: 0;
    padding: var(--sp-4) max(var(--sp-4), env(safe-area-inset-right, 0px)) calc(var(--sp-4) + env(safe-area-inset-bottom, 0px)) max(var(--sp-4), env(safe-area-inset-left, 0px));
    border-left: 0; border-top: 1px solid var(--border); background: var(--header-bg);
  }
  .tool-link {
    flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: var(--sp-4);
    height: auto; min-height: 52px; padding: var(--sp-4) var(--sp-2); font-size: var(--fs-2xs);
  }
  .tool-link-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tool-link .count { position: absolute; top: var(--sp-2); left: calc(50% + var(--sp-6)); min-width: 16px; height: 16px; padding: 0 var(--sp-4); }
  body:has(.tool-bar) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .sub-inner { gap: var(--sp-16); min-height: 40px; }
  .sub-title { padding-right: var(--sp-16); }
  .tool-grid { gap: var(--sp-10); }
  .tool-card { gap: var(--sp-8); padding: var(--sp-14); }
  .tc-icon { width: 32px; height: 32px; }
  .tc-icon svg { width: 18px; height: 18px; }
  .tc-path, .tc-verb, .tc-links { display: none; }
  .tc-name { font-size: var(--fs-md); }
  .tc-num { font-size: var(--fs-xl); }
  .notice { margin: var(--sp-16) auto; padding: var(--sp-32) var(--sp-20); }
  .dl { grid-template-columns: 1fr; }
  .dl dt { padding-bottom: 0; border-bottom: 0; }
  .dl dd { padding-top: var(--sp-2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
