@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}

/* Slate neutrals with one blue for everything interactive. The meerkat mark keeps the brand's amber, and severity
   hues stay apart from the blue. A signed-in user's theme choice sets data-theme on <html>; with none, the system
   setting decides. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-hover: #f2f4f7;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --link: #1d4ed8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --on-primary: #ffffff;
  --focus: #2563eb;

  --critical: #c42b31;
  --high: #d4581b;
  --medium: #a8780a;
  --low: #2c70b3;
  --info: #6b7487;
  --ok: #1d8455;

  --sidebar-bg: #ffffff;
  --sidebar-border: #e4e7ec;
  --sidebar-text: #344054;
  --sidebar-strong: #101828;
  --sidebar-muted: #98a2b3;
  --sidebar-hover: #f2f4f7;
  --sidebar-active: #eff4ff;
  --sidebar-active-text: #1d4ed8;
  --brand-accent: #c9800f;
  --avatar-bg: #dbeafe;
  --avatar-text: #1d4ed8;
  --scrim: rgba(16, 24, 40, 0.45);

  --code-bg: #101828;
  --code-text: #e4e7ec;

  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);

  --radius: 10px;
  --radius-sm: 6px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --surface: #171a1f;
    --surface-2: #1b1f25;
    --surface-hover: #20252c;
    --border: #272c34;
    --border-strong: #363c46;
    --text: #e8eaed;
    --text-2: #c4c9d1;
    --muted: #8c94a1;
    --link: #7aa7ff;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --on-primary: #ffffff;
    --focus: #60a5fa;

    --critical: #ff7070;
    --high: #ff9b5e;
    --medium: #e3bd4a;
    --low: #72b2f0;
    --info: #9aa4b8;
    --ok: #4fc58c;

    --sidebar-bg: #13161a;
    --sidebar-border: #23272e;
    --sidebar-text: #c4c9d1;
    --sidebar-strong: #f2f4f7;
    --sidebar-muted: #6f7783;
    --sidebar-hover: #1d2127;
    --sidebar-active: #1c2a45;
    --sidebar-active-text: #ffffff;
    --brand-accent: #f6c266;
    --avatar-bg: #1e3a8a;
    --avatar-text: #dbeafe;
    --scrim: rgba(0, 0, 0, 0.55);

    --code-bg: #0b0d10;
    --code-text: #dfe3e8;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a1f;
  --surface-2: #1b1f25;
  --surface-hover: #20252c;
  --border: #272c34;
  --border-strong: #363c46;
  --text: #e8eaed;
  --text-2: #c4c9d1;
  --muted: #8c94a1;
  --link: #7aa7ff;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --on-primary: #ffffff;
  --focus: #60a5fa;

  --critical: #ff7070;
  --high: #ff9b5e;
  --medium: #e3bd4a;
  --low: #72b2f0;
  --info: #9aa4b8;
  --ok: #4fc58c;

  --sidebar-bg: #13161a;
  --sidebar-border: #23272e;
  --sidebar-text: #c4c9d1;
  --sidebar-strong: #f2f4f7;
  --sidebar-muted: #6f7783;
  --sidebar-hover: #1d2127;
  --sidebar-active: #1c2a45;
  --sidebar-active-text: #ffffff;
  --brand-accent: #f6c266;
  --avatar-bg: #1e3a8a;
  --avatar-text: #dbeafe;
  --scrim: rgba(0, 0, 0, 0.55);

  --code-bg: #0b0d10;
  --code-text: #dfe3e8;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--text); letter-spacing: -0.015em; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0; font-weight: 700; }
h2 { font-size: 1.05rem; margin: 0; font-weight: 650; }
h3 { font-size: 0.95rem; margin: 1.25rem 0 0.5rem; font-weight: 650; }
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 0.85em; }
code { padding: 0.1em 0.35em; border-radius: 4px; background: var(--surface-hover); border: 1px solid var(--border); }
ul, ol { padding-left: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }

/* ---------- shells ---------- */
.shell-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.shell-public { min-height: 100vh; display: flex; flex-direction: column; }

.sidebar {
  position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.1rem 0.85rem;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  overflow-y: auto;
}
.sidebar a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.15rem 0.5rem; color: var(--sidebar-strong); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-name { font-weight: 750; font-size: 1.05rem; letter-spacing: -0.02em; color: var(--sidebar-strong); }
.brand-name b { font-weight: 450; color: var(--brand-accent); }
.org { margin: 0.25rem 0.25rem 0; padding: 0.6rem 0.65rem; border-radius: var(--radius-sm); background: var(--sidebar-hover); border: 1px solid var(--sidebar-border); }
.org-label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sidebar-muted); }
.org-name { display: block; font-weight: 600; color: var(--sidebar-strong); font-size: 0.9rem; line-height: 1.3; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section { margin: 0.9rem 0.65rem 0.3rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sidebar-muted); }
.nav a {
  position: relative; display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0.65rem; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.92rem;
}
.nav a:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); }
.nav a[aria-current="page"] { background: var(--sidebar-active); color: var(--sidebar-active-text); font-weight: 600; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -0.85rem; top: 0.45rem; bottom: 0.45rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sidebar-foot { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--sidebar-border); display: flex; flex-direction: column; gap: 2px; }
.who { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.65rem; min-width: 0; }
.avatar { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--avatar-bg); color: var(--avatar-text); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; }
.who-text { min-width: 0; font-size: 0.82rem; line-height: 1.3; }
.who-text strong { display: block; color: var(--sidebar-strong); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text span { display: block; color: var(--sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav form { margin: 0; }
.nav button.nav-button {
  width: 100%; display: flex; align-items: center; gap: 0.65rem; margin: 0;
  padding: 0.5rem 0.65rem; border: 0; border-radius: var(--radius-sm);
  background: none; color: inherit; font: inherit; font-weight: 500; font-size: 0.92rem; text-align: left; cursor: pointer;
}
.nav button.nav-button:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); }

.topbar { display: none; }
.nav-scrim { display: none; }

.main { min-width: 0; padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; }
.container { max-width: 1180px; margin: 0 auto; }

.public-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 3vw, 2.5rem); background: var(--sidebar-bg); border-bottom: 1px solid var(--sidebar-border); }
.public-top nav a { color: var(--sidebar-strong); font-weight: 600; font-size: 0.92rem; }
.shell-public .main { flex: 1; width: 100%; }

/* Sign-in and other entrance pages: one centred card. */
.main.entrance { display: flex; align-items: flex-start; justify-content: center; padding-top: clamp(2rem, 8vh, 5rem); }
.main.entrance > .container { max-width: 420px; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 2rem; }
.main.entrance h1 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.main.entrance form { margin-top: 1.25rem; }
.main.entrance button[type="submit"] { width: 100%; justify-content: center; }

/* ---------- page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head .lede { margin: 0.35rem 0 0; color: var(--muted); max-width: 46rem; }
.crumbs { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); font-weight: 500; }
.crumbs a:hover { color: var(--text); }
.head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 0.65rem; color: var(--muted); font-size: 0.88rem; }
.head-meta .dot-sep::before { content: "·"; margin-right: 0.75rem; color: var(--border-strong); }
.page-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ---------- layout ---------- */
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.split > aside { display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: 1.25rem; }
.grid-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1.25rem; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }

/* ---------- card ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.15rem; border-bottom: 1px solid var(--border); }
.card-head h2 { display: flex; align-items: center; gap: 0.5rem; }
.card-head .count { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.card-head a { font-size: 0.85rem; font-weight: 600; }
.card-body { padding: 1rem 1.15rem; }
.card-body + .card-body { border-top: 1px solid var(--border); }
.card-foot { padding: 0.7rem 1.15rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); font-size: 0.85rem; }
.card > table:last-child tr:last-child td { border-bottom: 0; }
.card-note { padding: 0.75rem 1.15rem; color: var(--muted); font-size: 0.85rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }

/* ---------- stat tiles ---------- */
.stat { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.15rem; color: var(--text); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
a.stat:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.stat-label { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.stat-number { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 0.85rem; }
.stat-lines { list-style: none; margin: 0.1rem 0 0; padding: 0; font-size: 0.88rem; color: var(--text-2); }
.stat-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.1rem 0; }
.stat-lines b { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.stat.critical { border-color: color-mix(in srgb, var(--critical) 45%, var(--border)); }
.stat.critical .stat-number { color: var(--critical); }

.sev-bar { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-hover); }
.sev-bar rect.critical { fill: var(--critical); }
.sev-bar rect.high { fill: var(--high); }
.sev-bar rect.medium { fill: var(--medium); }
.sev-bar rect.low { fill: var(--low); }
.sev-bar rect.info { fill: var(--info); }
.sev-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 0.82rem; color: var(--text-2); }
.sev-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.sev-legend b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- severity and status ---------- */
.sev {
  --c: var(--info);
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.12rem 0.55rem 0.12rem 0.45rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
}
.sev::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.sev.critical { --c: var(--critical); }
.sev.high { --c: var(--high); }
.sev.medium { --c: var(--medium); }
.sev.low { --c: var(--low); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--info); }
.dot.critical { background: var(--critical); }
.dot.high { background: var(--high); }
.dot.medium { background: var(--medium); }
.dot.low { background: var(--low); }

.pill {
  --c: var(--muted);
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.1rem 0.55rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
  color: var(--c); background: var(--surface-hover); border: 1px solid var(--border);
}
.pill .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.pill.verified, .pill.ok, .pill.active { --c: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.pill.unverified, .pill.pending, .pill.stale { --c: var(--medium); background: color-mix(in srgb, var(--medium) 10%, transparent); border-color: color-mix(in srgb, var(--medium) 30%, transparent); border-style: dashed; }
.pill.rejected, .pill.disputed { --c: var(--critical); background: color-mix(in srgb, var(--critical) 9%, transparent); border-color: color-mix(in srgb, var(--critical) 26%, transparent); }
.pill.resolved, .pill.revoked, .pill.expired { --c: var(--muted); }
.pill.open { --c: var(--text-2); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 1.15rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface-2); white-space: nowrap; padding-top: 0.55rem; padding-bottom: 0.55rem; }
td { font-size: 0.92rem; }
td.fit, th.fit { width: 1%; white-space: nowrap; }
tbody tr { transition: background 0.1s; }
tr.row-link { position: relative; cursor: pointer; }
tr.row-link:hover { background: var(--surface-hover); }
a.stretch { color: var(--text); font-weight: 600; }
a.stretch::after { content: ""; position: absolute; inset: 0; }
tr.row-link:hover a.stretch { color: var(--link); text-decoration: none; }
.cell-title { display: flex; flex-direction: column; gap: 0.15rem; }
.cell-sub { display: block; font-size: 0.82rem; color: var(--muted); }
.cell-sub .mono { font-size: 0.78rem; }
.empty-row td { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
tr[hidden] { display: none; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 2.25rem 1rem; text-align: center; color: var(--muted); }
.empty .icon { width: 28px; height: 28px; color: var(--ok); }
.empty strong { color: var(--text); }

/* ---------- lists ---------- */
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li { position: relative; display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.8rem 1.15rem; border-bottom: 1px solid var(--border); }
.item-list li:last-child { border-bottom: 0; }
.item-list li:hover { background: var(--surface-hover); }
.item-list .item-main { min-width: 0; flex: 1; }
.item-list .item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; flex: none; text-align: right; }
.item-list .sev { margin-top: 0.1rem; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 0.55rem 1.15rem; border-bottom: 1px solid var(--border); display: flex; gap: 0.6rem; align-items: center; }
.link-list li:last-child { border-bottom: 0; }

/* ---------- toolbar, tabs, filter ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-hover); border: 1px solid var(--border); }
.tabs a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.8rem; border-radius: 7px; color: var(--text-2); font-weight: 550; font-size: 0.88rem; text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs .count { min-width: 1.4rem; padding: 0 0.4rem; border-radius: 999px; background: var(--border); color: var(--text-2); font-size: 0.75rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.tabs a.active .count { background: var(--primary); color: var(--on-primary); }
.filter { position: relative; min-width: min(18rem, 100%); }
.filter .icon { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filter input { padding-left: 2.1rem; }

/* ---------- forms ---------- */
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-2); margin: 0.85rem 0 0.35rem; }
form > label:first-child, form > p:first-child label, .card-body > form > label:first-of-type { margin-top: 0; }
input, select, textarea {
  width: 100%; padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
textarea { min-height: 5rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--primary); }
.check { display: flex; gap: 0.55rem; align-items: baseline; margin: 0.55rem 0 0; font-weight: 500; color: var(--text); }
.check input { flex: none; transform: translateY(1px); }
.indent { margin: 0.15rem 0 0 1.6rem; }
.help, .helptext { display: block; margin-top: 0.3rem; font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.errorlist { list-style: none; margin: 0.35rem 0 0; padding: 0; color: var(--critical); font-size: 0.85rem; }
form p { margin: 0 0 0.25rem; }

button, .btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  margin-top: 1rem; padding: 0.55rem 1rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--primary); color: var(--on-primary);
  font: inherit; font-weight: 600; font-size: 0.9rem; line-height: 1.3;
  cursor: pointer; text-decoration: none; transition: background 0.15s;
}
button:hover, .btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn.sm { margin: 0; padding: 0.35rem 0.7rem; font-size: 0.82rem; }
button.link { margin: 0; padding: 0; border: 0; background: none; color: var(--link); font-weight: 500; }
button.link:hover { background: none; text-decoration: underline; }
button.link.danger { color: var(--critical); }
form.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.actions button { margin-top: 1rem; }
.actions a { margin-top: 1rem; font-weight: 500; }

details.disclosure > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.15rem; font-weight: 600; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform 0.15s; margin-right: 0.15rem; }
details.disclosure[open] > summary::before { transform: rotate(45deg); }
details.disclosure > summary:hover { background: var(--surface-hover); }
details.disclosure + details.disclosure { border-top: 1px solid var(--border); }
details.disclosure > form, details.disclosure > .disclosure-body { padding: 0 1.15rem 1.1rem; }

/* ---------- messages ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.messages li { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--ok); box-shadow: var(--shadow); font-weight: 500; }
.messages li.error { border-left-color: var(--critical); }
.messages li.warning { border-left-color: var(--medium); }

/* ---------- detail pages ---------- */
.prose { color: var(--text-2); font-size: 0.97rem; line-height: 1.65; }
.prose p { margin-bottom: 0.8rem; }
.callout { display: flex; gap: 0.85rem; padding: 1rem 1.15rem; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--border)); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.callout > .icon { color: var(--ok); margin-top: 0.15rem; width: 20px; height: 20px; }
.callout h2 { margin-bottom: 0.35rem; }
.callout .prose { color: var(--text); }

.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem 1rem; margin: 0; font-size: 0.87rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.kv .mono { font-size: 0.8rem; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.85rem; padding: 1rem 1.15rem; }
.step + .step { border-top: 1px solid var(--border); }
.step-num { counter-increment: step; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 0.85rem; }
.step-num::before { content: counter(step); }
.step:not(:last-child)::after { content: ""; position: absolute; left: calc(1.15rem + 1rem - 1px); top: 3.1rem; bottom: -1rem; width: 2px; background: var(--border); z-index: 0; }
.step-body > p { color: var(--text); margin-bottom: 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.55rem; border-radius: var(--radius-sm); background: var(--surface-hover); border: 1px solid var(--border); font-size: 0.8rem; color: var(--text-2); max-width: 100%; }
.chip .label { color: var(--muted); }
a.chip:hover { border-color: var(--border-strong); text-decoration: none; color: var(--text); }

.evidence { margin: 0.5rem 0 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.evidence > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.7rem; font-size: 0.82rem; color: var(--text-2); background: var(--surface-2); }
.evidence > summary::-webkit-details-marker { display: none; }
.evidence > summary .icon { color: var(--muted); }
.evidence > summary .when { margin-left: auto; color: var(--muted); }
.evidence[open] > summary { border-bottom: 1px solid var(--border); }
.evidence pre { margin: 0; padding: 0.85rem 1rem; max-height: 26rem; overflow: auto; white-space: pre-wrap; word-break: break-word; background: var(--code-bg); color: var(--code-text); font-size: 0.8rem; line-height: 1.6; }
.evidence .hash { display: flex; white-space: nowrap; align-items: center; gap: 0.5rem; padding: 0.4rem 0.7rem; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--border); }
.evidence .hash .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.copy { display: inline-flex; align-items: center; gap: 0.3rem; margin: 0; padding: 0.15rem 0.45rem; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 0.75rem; font-weight: 500; cursor: pointer; }
.copy:hover { background: var(--surface-hover); color: var(--text); }
.copy[data-copied] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.id-row { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.id-row .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; }

.mark-status { display: flex; flex-direction: column; gap: 0.35rem; }
.mark-note { padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: 0.87rem; color: var(--text-2); }

.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; }
.facts .label { display: inline-block; min-width: 3.5rem; color: var(--muted); font-size: 0.78rem; font-weight: 600; }

.token { display: block; margin: 0.6rem 0; padding: 0.75rem 0.9rem; border-radius: var(--radius-sm); background: var(--code-bg); color: var(--code-text); font-family: var(--mono); font-size: 0.82rem; overflow-wrap: anywhere; }
.notice { padding: 0.9rem 1.15rem; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }

/* ---------- public landing ---------- */
.hero { padding: clamp(2rem, 8vh, 5rem) 0 2rem; max-width: 40rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.03em; line-height: 1.1; }
.hero p { margin-top: 1rem; font-size: 1.1rem; color: var(--text-2); }
.waitlist { max-width: 28rem; padding: 1.4rem; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > aside { position: static; }
}

@media (max-width: 860px) {
  .shell-app { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 1rem; background: var(--sidebar-bg); color: var(--sidebar-strong); border-bottom: 1px solid var(--sidebar-border);
  }
  .topbar .brand-mark { width: 28px; height: 28px; }
  .menu-button { margin: 0; padding: 0.4rem; background: none; border: 0; color: inherit; }
  .menu-button:hover { background: var(--sidebar-hover); }
  .sidebar {
    position: fixed; z-index: 40; left: 0; top: 0; width: min(280px, 85vw);
    transform: translateX(-100%); transition: transform 0.2s ease;
  }
  .shell-app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .shell-app.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 30; background: var(--scrim); }
  .main { padding-top: 1.25rem; }
  th, td { padding-left: 0.85rem; padding-right: 0.85rem; }
  .hide-sm { display: none; }
  table.list thead { display: none; }
  table.list tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.35rem 0.75rem; padding: 0.8rem 0.85rem; border-bottom: 1px solid var(--border); }
  table.list td { display: block; width: auto; padding: 0; border: 0; }
  table.list td.hide-sm, table.list .unset { display: none; }
  table.list td:nth-child(2) { flex: 1 1 12rem; min-width: 0; }
  table.list td:last-child { flex-basis: 100%; }
  table.list tr.empty-row td { flex-basis: 100%; }
  .filter { flex: 1 1 100%; }
}
.forgot { margin-top: 1.1rem; text-align: center; }

/* ---------- settings ---------- */
.setting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.seg { display: inline-flex; gap: 2px; margin: 0; padding: 3px; border-radius: 9px; background: var(--surface-hover); border: 1px solid var(--border); }
.seg button { margin: 0; padding: 0.35rem 0.8rem; border: 0; border-radius: 7px; background: none; color: var(--text-2); font-weight: 550; font-size: 0.88rem; }
.seg button:hover { background: none; color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.public-nav { display: flex; align-items: center; gap: 1rem; }
.seg.compact button { padding: 0.35rem 0.5rem; }
.exchange + .exchange { border-top: 1px solid var(--border); }
.exchange .label { padding: 0.45rem 1rem 0; font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.exchange pre { margin: 0; padding: 0.4rem 1rem 0.85rem; max-height: 26rem; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 0.8rem; line-height: 1.6; }
a.who { color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
a.who:hover, a.who:focus-visible { background: var(--sidebar-hover, rgba(127, 127, 127, 0.14)); }
