/* ltrace.css — one hand-written stylesheet. Semantic HTML gets defaults;
   ~38 classes add variants. Tokens on :root, dark via OS or [data-theme]. */

:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f2f2f4;
  --border: #e4e4e8;
  --border-strong: #d1d1d7;
  --text: #17171a;
  --text-2: #4f4f57;
  --text-3: #6b6b74;
  --accent: oklch(0.49 0.15 262);
  --accent-fg: #ffffff;
  --success: oklch(0.50 0.13 150);
  --warning: oklch(0.55 0.13 70);
  --danger: oklch(0.52 0.19 27);
  --info: var(--accent);
  --muted: #6b6b74;
  --shadow-sm: 0 1px 2px rgb(16 16 20 / 0.05);
  --shadow: 0 1px 2px rgb(16 16 20 / 0.04), 0 4px 12px rgb(16 16 20 / 0.06);
  --shadow-lg: 0 12px 40px rgb(16 16 20 / 0.18);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #131316;
  --surface-2: #1b1b1f;
  --border: #26262c;
  --border-strong: #34343b;
  --text: #f3f3f5;
  --text-2: #b4b4bc;
  --text-3: #8d8d97;
  --accent: oklch(0.74 0.12 262);
  --accent-fg: #0b0b0d;
  --success: oklch(0.78 0.14 150);
  --warning: oklch(0.82 0.13 80);
  --danger: oklch(0.72 0.16 25);
  --muted: #8d8d97;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 12px 40px rgb(0 0 0 / 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0b0d; --surface: #131316; --surface-2: #1b1b1f; --border: #26262c; --border-strong: #34343b;
    --text: #f3f3f5; --text-2: #b4b4bc; --text-3: #8d8d97;
    --accent: oklch(0.74 0.12 262); --accent-fg: #0b0b0d;
    --success: oklch(0.78 0.14 150); --warning: oklch(0.82 0.13 80); --danger: oklch(0.72 0.16 25); --muted: #8d8d97;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4); --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.3); --shadow-lg: 0 12px 40px rgb(0 0 0 / 0.6);
  }
}

:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: 0.75rem; --fs-sm: 0.8125rem; --fs: 0.875rem; --fs-lg: 1rem; --fs-xl: 1.25rem; --fs-2xl: 1.625rem;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 4px; --r: 6px; --r-lg: 10px;
  --row: 40px;
}

/* ---------- base ---------- */
html, [data-theme] {
  background: var(--bg); color: var(--text);
  font: 400 var(--fs)/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); line-height: 1.2; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs); }
p { margin: 0; text-wrap: pretty; }
small { font-size: var(--fs-xs); color: var(--text-3); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
code, kbd, .mono { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 1px 5px; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--r-sm); padding: 0 5px; }
pre { margin: 0; font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.6;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r);
  padding: var(--s4); overflow: auto; max-height: 360px; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s5) 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- shell ---------- */
.app { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; }
.sidebar {
  flex: 1 1 232px; max-width: 100%;
  display: flex; flex-direction: column; gap: var(--s5);
  padding: var(--s5) var(--s3);
  background: var(--surface); border-inline-end: 1px solid var(--border);
  container-type: inline-size;
}
.sidebar nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex; align-items: center; gap: var(--s3); min-height: 36px; padding: 0 var(--s3);
  border-radius: var(--r); color: var(--text-2); font-weight: 500;
}
.sidebar nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sidebar nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.sidebar nav a[aria-current="page"] svg { color: var(--accent); }
.sidebar svg { width: 16px; height: 16px; flex: none; }
.brand { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3); font-weight: 650; font-size: var(--fs-lg); letter-spacing: -0.02em; color: var(--text); }
.brand svg { width: 22px; height: 22px; color: var(--accent); }
.user { margin-top: auto; display: flex; align-items: center; gap: var(--s2); padding: var(--s3); border-top: 1px solid var(--border); }
.user > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.user form { margin: 0; }
@container (min-width: 420px) {
  /* sidebar wrapped above content (phone/tablet): becomes a top bar */
  .sidebar nav ul { flex-direction: row; overflow-x: auto; }
  .sidebar nav a { white-space: nowrap; }
}
.content { flex: 999 1 560px; min-width: 0; padding: var(--s6) var(--s6) var(--s7); }
.content > * + * { margin-top: var(--s5); }
.content > .page-header + * { margin-top: var(--s5); }
.wrap { max-width: 1200px; }

/* sidebar on phones: compact top bar */
@media (max-width: 760px) {
  .sidebar { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3);
    padding: var(--s3) var(--s4); border-inline-end: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { order: 3; flex-basis: 100%; margin-inline: calc(var(--s4) * -1); padding-inline: var(--s3); overflow-x: auto; }
  .sidebar nav ul { flex-direction: row; }
  .sidebar nav a { white-space: nowrap; min-height: 34px; }
  .sidebar nav a svg { display: none; }
  .user { margin: 0 0 0 auto; border: 0; padding: 0; }
  .user > span { display: none; }
  .content { padding: var(--s4) var(--s4) var(--s6); }
}

/* ---------- page header & breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0 0 var(--s2); padding: 0; font-size: var(--fs-sm); color: var(--text-3); }
.crumbs li + li::before { content: "/"; margin-inline-end: var(--s2); color: var(--border-strong); }
.crumbs a { color: var(--text-3); }
.crumbs [aria-current] { color: var(--text-2); }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s4); }
.page-header > div:first-child { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.page-header p { color: var(--text-2); }
.page-header > div:last-child:not(:first-child) { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ---------- card ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.card > header p { color: var(--text-3); font-size: var(--fs-sm); }
.card > section, .card > form, .card > div:not(.table-wrap) { padding: var(--s5); }
.card > footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: var(--s3) var(--s5); border-top: 1px solid var(--border); color: var(--text-3); font-size: var(--fs-sm); }
details.card > summary { cursor: pointer; padding: var(--s4) var(--s5); font-weight: 600; list-style: none; display: flex; align-items: center; gap: var(--s2); }
details.card > summary::before { content: "›"; display: inline-block; transition: transform .15s; color: var(--text-3); }
details.card[open] > summary::before { transform: rotate(90deg); }
details.card[open] > summary { border-bottom: 1px solid var(--border); }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: var(--s3); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm); }
.stat > span:first-child { color: var(--text-3); font-size: var(--fs-sm); font-weight: 500; }
.stat > strong { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat > small { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
.card > .table-wrap:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th { text-align: start; font-weight: 500; color: var(--text-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em;
  height: 36px; padding: 0 var(--s4); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
td { height: var(--row); padding: var(--s2) var(--s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in oklab, var(--surface-2) 60%, transparent); }
th:first-child, td:first-child { padding-inline-start: var(--s5); }
th:last-child, td:last-child { padding-inline-end: var(--s5); }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.actions { text-align: end; white-space: nowrap; }
td.actions > * + * { margin-inline-start: var(--s1); }
td.actions form { display: inline; }
td small { display: block; }
.truncate { display: inline-block; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.empty { text-align: center; color: var(--text-3); padding: var(--s7) var(--s4) !important; height: auto; }
.empty strong { display: block; color: var(--text); font-weight: 500; margin-bottom: var(--s1); }

/* toolbar: header row above a table; filters drop in later */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--border); }
.toolbar > :last-child { margin-inline-start: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 36px; padding: 0 var(--s4); border-radius: var(--r);
  font: 500 var(--fs)/1 var(--font); white-space: nowrap; cursor: pointer;
  background: var(--accent); color: var(--accent-fg); border: 1px solid transparent; box-shadow: var(--shadow-sm);
  text-decoration: none !important;
}
.btn:hover { background: color-mix(in oklab, var(--accent) 88%, var(--text)); }
.btn svg { width: 15px; height: 15px; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
[data-theme="dark"] .btn-danger { color: #160707; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-danger { color: #160707; }
}
.btn-danger:hover { background: color-mix(in oklab, var(--danger) 85%, black); }
.btn-ghost.btn-danger { background: transparent; color: var(--danger); }
.btn-ghost.btn-danger:hover { background: color-mix(in oklab, var(--danger) 10%, transparent); }
.btn-sm { height: 28px; padding: 0 var(--s3); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 28px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* ---------- badges ---------- */
.badge {
  --tone: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500; line-height: 1; white-space: nowrap;
  color: color-mix(in oklab, var(--tone) 92%, var(--text));
  background: color-mix(in oklab, var(--tone) 11%, transparent);
  border: 1px solid color-mix(in oklab, var(--tone) 26%, transparent);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
.badge-success { --tone: var(--success); }
.badge-warning { --tone: var(--warning); }
.badge-danger  { --tone: var(--danger); }
.badge-info    { --tone: var(--info); }
.badge-muted   { --tone: var(--muted); }
.badge-muted::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--tone); }
.badge-warning::before { animation: none; }

/* ---------- alerts & toast ---------- */
.alert { --tone: var(--info); display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4);
  border: 1px solid color-mix(in oklab, var(--tone) 35%, var(--border)); border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--tone) 7%, var(--surface)); }
.alert svg { width: 18px; height: 18px; flex: none; color: var(--tone); margin-top: 1px; }
.alert strong { display: block; font-weight: 600; }
.alert p { color: var(--text-2); }
.alert-error { --tone: var(--danger); }
.alert-info { --tone: var(--info); }
.toast { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-lg);
  background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 500; width: max-content; max-width: 100%; }
.toast svg { width: 16px; height: 16px; color: var(--success); }
[data-theme="dark"] .toast svg { color: oklch(0.5 0.13 150); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toast svg { color: oklch(0.5 0.13 150); }
}

/* ---------- forms ---------- */
form { margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: var(--fs-sm); }
label > small, fieldset > small { font-weight: 400; }
input, select, textarea {
  height: 36px; width: 100%; padding: 0 var(--s3); border-radius: var(--r);
  font: 400 var(--fs) var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm);
}
textarea { height: auto; min-height: 76px; padding: var(--s2) var(--s3); resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--text-2); box-shadow: none; }
input[aria-invalid="true"] { border-color: var(--danger); }
input[aria-invalid="true"] + small { color: var(--danger); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); box-shadow: none; flex: none; }
label:has(> input[type="checkbox"]) { flex-direction: row; align-items: center; gap: var(--s2); font-weight: 400; font-size: var(--fs); }
label:has(> input:disabled) { color: var(--text-3); }
select { appearance: none; padding-inline-end: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
fieldset { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4); margin: 0; display: grid; gap: var(--s4); min-width: 0; }
legend { padding: 0 var(--s2); font-weight: 600; font-size: var(--fs-sm); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s4); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.span { grid-column: 1 / -1; }
form > .grid + *, form > fieldset + *, form > label + * { margin-top: var(--s4); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end; align-items: center; }
.form-actions > small { margin-inline-end: auto; }

/* copyable field: input + icon button glued */
.copy { display: flex; align-items: stretch; }
.copy > input, .copy > code { flex: 1; min-width: 0; border-start-end-radius: 0; border-end-end-radius: 0; font-family: var(--mono); font-size: var(--fs-sm); }
.copy > code { display: flex; align-items: center; height: 36px; padding: 0 var(--s3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.copy > .btn { border-start-start-radius: 0; border-end-start-radius: 0; margin-inline-start: -1px; box-shadow: none; }
td .copy > code { height: 28px; background: var(--surface-2); max-width: 30ch; }
td .copy > .btn { height: 28px; width: 28px; }

/* ---------- tabs & segmented ---------- */
.tabs { display: flex; gap: var(--s1); overflow-x: auto; border-bottom: 1px solid var(--border); }
.tabs a { display: inline-flex; align-items: center; gap: var(--s2); height: 38px; padding: 0 var(--s3); color: var(--text-2); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--text); }
.tabs a small { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; font-size: 11px; line-height: 16px; }
.tabs.segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); max-width: 100%; }
.tabs.segmented a { height: 28px; border: 0; margin: 0; border-radius: var(--r-sm); font-size: var(--fs-sm); padding: 0 var(--s3); }
.tabs.segmented a[aria-current] { background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
/* radio variant: same look, submits with its GET form (e.g. ?by=source) */
fieldset.tabs.segmented { margin: 0; min-width: 0; }
.tabs.segmented label { flex-direction: row; align-items: center; height: 28px; padding: 0 var(--s3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.tabs.segmented label:hover { color: var(--text); }
.tabs.segmented label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.tabs.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.tabs.segmented input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

/* ---------- key/value, chips ---------- */
.kv { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; margin: 0; }
.kv > dt, .kv > dd { padding: var(--s3) 0; border-bottom: 1px solid var(--border); margin: 0; }
.kv > dt { color: var(--text-3); font-size: var(--fs-sm); }
.kv > dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv > dt { border: 0; padding-bottom: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); list-style: none; margin: 0; padding: 0; }
.chips li { display: inline-flex; gap: 4px; height: 24px; align-items: center; padding: 0 8px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: var(--fs-xs); }
.chips li span { color: var(--text-3); }

/* ---------- tooltip (CSS only, from [data-tip]) ---------- */
[data-tip] { position: relative; cursor: help; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; inset-block-end: calc(100% + 6px); inset-inline-start: 50%; translate: -50% 0;
  width: max-content; max-width: 260px; padding: 6px 10px; border-radius: var(--r); background: var(--text); color: var(--bg);
  font-size: var(--fs-xs); font-weight: 400; line-height: 1.4; box-shadow: var(--shadow-lg); z-index: 10; white-space: normal;
}

/* ---------- dialog ---------- */
dialog { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--text); padding: 0; box-shadow: var(--shadow-lg); width: min(560px, calc(100% - 32px)); }
dialog::backdrop { background: rgb(10 10 12 / 0.45); }
dialog > header { padding: var(--s5) var(--s5) 0; display: flex; flex-direction: column; gap: var(--s1); }
dialog > header p { color: var(--text-2); }
dialog > form, dialog > div { padding: var(--s5); }
.scrim { position: fixed; inset: 0; background: rgb(10 10 12 / 0.45); display: grid; place-items: start center; padding-top: 80px; z-index: 20; overflow: auto; }
.scrim > dialog { position: static; display: block; margin: 0 0 80px; }
[hidden] { display: none !important; }

/* ---------- misc ---------- */
.muted { color: var(--text-3); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.pagination { display: flex; align-items: center; gap: var(--s1); }
.pagination a, .pagination span { min-width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-sm); padding: 0 6px; }
.pagination a[aria-current] { background: var(--surface); box-shadow: 0 0 0 1px var(--border-strong); color: var(--text); }

/* ---------- app additions (not on the canvas sheet) ---------- */
.toasts { position: fixed; inset-block-end: 24px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s2); z-index: 30; pointer-events: none; }
.toasts .toast { pointer-events: auto; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-size: 12px; color: var(--text-3); }
.facts dd { margin: 0; font-weight: 500; }
.bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.bar i { display: block; height: 100%; }
.share { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.share output { display: block; font-family: var(--mono); font-size: 13px; line-height: 1.55; word-break: break-all; color: var(--text); }
.share output b { font-weight: 500; color: var(--accent); }
.login-bg { background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0); background-size: 22px 22px; }
.ret-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.ret-icon svg { width: 24px; height: 24px; }
.stack { display: flex; flex-direction: column; gap: var(--s5); }
.row { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: flex-start; }
.row > .grow-3 { flex: 3 1 520px; min-width: 0; }
.row > .grow-2 { flex: 2 1 360px; min-width: 0; }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
