/* Haystash DB console.
   Two materials carry the meaning everywhere: readable values sit on stone (the page), and
   ciphertext sits on steel. Waiting values, still readable, are marked with an ochre hatch.
   Fonts are local files under the SIL Open Font License 1.1 (see README). */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/instrument-sans-var.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/jetbrains-mono-var.woff2) format('woff2');
}

:root {
  --removed: repeating-linear-gradient(90deg, var(--danger-bg) 0 3px, color-mix(in srgb, var(--danger) 45%, var(--danger-bg)) 3px 4px);
  --ground: #f3f4f1;
  --surface: #fbfbfa;
  --sunk: #eaece8;
  --ink: #17212b;
  --ink-2: #44505d;
  --ink-3: #5c6773;
  --rule: #d9ddd7;
  --rule-strong: #b5bcb6;
  --steel: #e1e8f0;
  --steel-2: #eef2f7;
  --steel-edge: #bfcddd;
  --cipher: #29466b;
  --verdigris: #0a6b57;
  --verdigris-bg: #dcefe8;
  --ochre: #7f5000;
  --ochre-bg: #faecc9;
  --ochre-edge: #d9ab55;
  --danger: #a3311c;
  --danger-bg: #f8e4de;
  --focus: #2b62a6;
  --on-ink: #f6f7f4;
  --shadow: 0 1px 0 rgba(23, 33, 43, .04), 0 24px 64px -24px rgba(23, 33, 43, .32);
  --hatch: repeating-linear-gradient(-45deg, var(--ochre-bg) 0 5px, color-mix(in srgb, var(--ochre-edge) 55%, var(--ochre-bg)) 5px 7px);

  --sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 6px;
  --r-lg: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --ground: #11161d;
    --surface: #171e27;
    --sunk: #1f2833;
    --ink: #e6eaee;
    --ink-2: #b1bbc6;
    --ink-3: #939eaa;
    --rule: #28323e;
    --rule-strong: #3c4957;
    --steel: #182a3f;
    --steel-2: #15212f;
    --steel-edge: #2b4566;
    --cipher: #a9c7ec;
    --verdigris: #63ceb1;
    --verdigris-bg: #10312a;
    --ochre: #eabb62;
    --ochre-bg: #2b2213;
    --ochre-edge: #6b5124;
    --danger: #f2927d;
    --danger-bg: #361c17;
    --focus: #7fb0ec;
    --on-ink: #11161d;
    --shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 24px 64px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --ground: #11161d;
  --surface: #171e27;
  --sunk: #1f2833;
  --ink: #e6eaee;
  --ink-2: #b1bbc6;
  --ink-3: #939eaa;
  --rule: #28323e;
  --rule-strong: #3c4957;
  --steel: #182a3f;
  --steel-2: #15212f;
  --steel-edge: #2b4566;
  --cipher: #a9c7ec;
  --verdigris: #63ceb1;
  --verdigris-bg: #10312a;
  --ochre: #eabb62;
  --ochre-bg: #2b2213;
  --ochre-edge: #6b5124;
  --danger: #f2927d;
  --danger-bg: #361c17;
  --focus: #7fb0ec;
  --on-ink: #11161d;
  --shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 24px 64px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---- Base ------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: 'ss01' 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -0.012em; }
h1 { font-size: 30px; letter-spacing: -0.022em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }
a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; font-variant-ligatures: none; }
h1.mono, h1 .mono { font-size: 1em; font-weight: 600; letter-spacing: -0.03em; }
h2 .mono { font-size: .95em; }
:not(pre) > code { background: var(--sunk); border-radius: 4px; padding: 1px 5px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
::selection { background: color-mix(in srgb, var(--focus) 30%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.strong { font-weight: 600; }
.icon { width: 16px; height: 16px; flex: none; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--ink); color: var(--on-ink); padding: 8px 12px; border-radius: var(--r); }
.skip:focus { top: 12px; }
.noscript { padding: 40px; }

/* ---- Controls -------------------------------------------------------------------------- */
.btn { display: inline-flex; vertical-align: middle; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; min-height: 36px; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--ink); font: 500 14px/1.2 var(--sans); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color .12s, border-color .12s, opacity .12s; }
.btn.small { padding: 5px 10px; min-height: 30px; font-size: 13px; gap: 6px; }
.btn.small .icon { width: 14px; height: 14px; }
.btn.wide { width: 100%; }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 86%, var(--ground)); }
.btn.secondary { background: var(--surface); border-color: var(--rule-strong); }
.btn.secondary:hover:not(:disabled) { border-color: var(--ink-3); background: var(--ground); }
.btn.quiet { color: var(--ink-2); }
.btn.quiet:hover:not(:disabled) { background: var(--sunk); color: var(--ink); }
.btn.danger { background: var(--danger); color: var(--on-ink); }
.btn.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 88%, var(--ink)); }
.btn.danger-quiet { color: var(--danger); }
.btn.danger-quiet:hover:not(:disabled) { background: var(--danger-bg); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.busy { cursor: progress; opacity: .7; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r); background: none; color: var(--ink-3); cursor: pointer; }
.icon-btn:hover { background: var(--sunk); color: var(--ink); }

.field { width: 100%; font: 15px/1.3 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r); padding: 9px 11px; min-height: 40px; }
.field.mono { font: 14px/1.3 var(--mono); }
.field:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.field:disabled { background: var(--sunk); color: var(--ink-3); cursor: not-allowed; }
select.field { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(-45deg, transparent 50%, var(--ink-3) 50%); background-size: 5px 5px; background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-repeat: no-repeat; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 0 0 6px; }
.help { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.help.warn { color: var(--ochre); }
.form-error { color: var(--danger); font-size: 14px; min-height: 0; }
.form-error:empty { display: none; }
.phrase { font-weight: 600; color: var(--ink); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }

/* ---- Shell ----------------------------------------------------------------------------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.rail-slot { border-right: 1px solid var(--rule); background: var(--ground); }
.rail { position: sticky; top: 0; display: flex; flex-direction: column; gap: 6px; height: 100vh; padding: 22px 16px 18px 20px; overflow-y: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.mark { display: inline-flex; width: 22px; height: 22px; border: 1.75px solid var(--ink); border-radius: 5px; overflow: hidden; flex: none; }
.mark span { flex: 1; }
.mark span + span { background: var(--cipher); border-left: 1.75px solid var(--ink); }
.rail-project { margin: 2px 0 18px 32px; font-size: 12px; color: var(--ink-3); }
.rail-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.rail-link { display: flex; align-items: center; padding: 7px 10px; margin-left: -10px; border-radius: var(--r); text-decoration: none; color: var(--ink-2); font-weight: 500; }
.rail-link:hover { background: var(--sunk); color: var(--ink); }
.rail-link[aria-current=page] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.rail-tables { list-style: none; margin: 2px 0 8px; padding: 0 0 0 10px; border-left: 1px solid var(--rule); }
.rail-table { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; border-radius: 4px; text-decoration: none; color: var(--ink-2); font-size: 13px; }
.rail-table .mono { font-size: 12.5px; }
.rail-table:hover { color: var(--ink); background: var(--sunk); }
.rail-table[aria-current=page] { color: var(--ink); font-weight: 600; background: var(--sunk); }
.rail-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.rail-dot.locked { background: var(--cipher); }
.rail-dot.locking { background: var(--hatch); box-shadow: inset 0 0 0 1px var(--ochre-edge); }
.rail-foot { margin-top: auto; display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--rule); }
.rail-foot .btn { justify-self: start; margin-left: -10px; }
.rail-meta { font-size: 12.5px; color: var(--ink-3); }
.theme-switch { border: 0; margin: 0; padding: 2px; display: inline-flex; background: var(--sunk); border-radius: 7px; justify-self: start; }
.theme-switch label { position: relative; }
.theme-switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.theme-switch span { display: block; padding: 3px 9px; font-size: 12px; border-radius: 5px; color: var(--ink-3); }
.theme-switch input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); }
.theme-switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }

.main { min-width: 0; outline: none; }
.page { max-width: 1120px; padding: 40px 48px 80px; }
.page.wide { max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.lede { font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 66ch; margin-bottom: 30px; }
.loading { color: var(--ink-3); padding: 40px 48px; }
.sheet-body .loading, p.loading { padding: 8px 0; }
.empty { color: var(--ink-3); padding: 18px 0; }
.empty-state { border: 1px dashed var(--rule-strong); border-radius: var(--r-lg); padding: 40px; display: grid; gap: 10px; justify-items: start; max-width: 620px; }
.empty-state p { color: var(--ink-2); }

.block { margin-top: 40px; }
.block-head { display: grid; gap: 4px; margin-bottom: 14px; }
.block-head .help { max-width: 70ch; }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; }
.split > .block { margin-top: 0; }
.row-split { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.row-split p { max-width: 68ch; color: var(--ink-2); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--sunk); color: var(--ink-2); font-size: 14px; }
.notice .icon { margin-top: 2px; }
.notice.error { background: var(--danger-bg); color: var(--danger); }
.notice.error h2 { font-size: 16px; margin-bottom: 4px; color: var(--ink); }
.notice.ok { background: var(--verdigris-bg); color: var(--ink); }
.notice.ok .icon { color: var(--verdigris); }
.notice h2 + p, .notice p + .btn { margin-top: 6px; }
.notice .retry { margin-top: 12px; }

/* The table's access rules were changed outside the server: users are refused it. */
.policy-alert { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin: 0 0 22px; padding: 16px 18px; border-left: 3px solid var(--danger); background: var(--danger-bg); border-radius: 0 var(--r) var(--r) 0; }
.policy-alert h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--danger); margin-bottom: 4px; }
.policy-text { display: grid; gap: 6px; max-width: 72ch; }
.policy-text > p { font-size: 14px; color: var(--ink-2); }
.policy-text .help strong { color: var(--ink); font-weight: 600; }
.policy-alert .btn { flex: none; }
.policy-flag { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12.5px; color: var(--danger); }
.policy-flag .icon { width: 13px; height: 13px; }

/* ---- Overview -------------------------------------------------------------------------- */
.facts { display: grid; grid-template-columns: repeat(6, minmax(0, auto)); justify-content: start; gap: 0; margin: 0 0 44px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts > div { padding: 14px 28px 14px 0; margin-right: 28px; border-right: 1px solid var(--rule); }
.facts > div:last-child { border-right: 0; margin-right: 0; }
.facts dt { font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }
.facts dd { margin: 0; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.facts dd .mono { font-size: 14.5px; }
.facts.small { grid-template-columns: repeat(auto-fit, minmax(130px, auto)); margin-bottom: 26px; }
.facts.small dd { font-size: 14px; }
.facts.small > div { padding: 10px 18px 10px 0; margin-right: 18px; }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ledger-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ledger-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ledger-name .mono { font-size: 14px; font-weight: 600; text-decoration: none; }
.ledger-name a.mono:hover { text-decoration: underline; }
.ledger-type { font-size: 13px; color: var(--ink-3); }
.ledger-state { display: flex; align-items: center; gap: 10px; }
.ledger-since { font-size: 13px; color: var(--ink-3); }
.ledger-progress { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.ledger-progress .bar { flex: 1; }
.ledger-row.dropped .ledger-name .mono { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule-strong); font-weight: 500; }
.signed { margin-top: 18px; }
.signed summary { cursor: pointer; font-size: 13.5px; color: var(--ink-2); width: fit-content; }
.signed summary:hover { color: var(--ink); }
.signed > .help { margin: 8px 0 0; max-width: 70ch; }
.signed .code pre { white-space: pre-wrap; word-break: break-all; max-height: 260px; font-size: 12px; }

.checklist { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 2px; }
.checklist li { counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.check-mark { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--rule-strong); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.check-mark:empty::before { content: counter(step); }
.checklist li.done .check-mark { background: var(--verdigris-bg); border-color: transparent; color: var(--verdigris); }
.checklist li.done .check-mark .icon { width: 14px; height: 14px; stroke-width: 2; }
.checklist a { font-weight: 600; text-decoration: none; }
.checklist a:hover { text-decoration: underline; }
.checklist li.done a { color: var(--ink-2); }
.checklist p { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }

.limits { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule); }
.limit-list { margin: 0; padding: 0 0 0 18px; columns: 2 340px; column-gap: 48px; color: var(--ink-2); font-size: 14px; }
.limit-list li { break-inside: avoid; margin-bottom: 12px; padding-left: 4px; }
.limit-list li::marker { color: var(--ink-3); }

/* ---- State marks ----------------------------------------------------------------------- */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 4px; white-space: nowrap; }
.tag::before { content: ''; width: 7px; height: 7px; border-radius: 2px; }
.tag.locked { color: var(--cipher); background: var(--steel); }
.tag.locked::before { background: var(--cipher); }
.tag.locking { color: var(--ochre); background: var(--ochre-bg); }
.tag.locking::before { background: var(--ochre); }
.tag.dropped { color: var(--ink-3); background: var(--sunk); }
.tag.dropped::before { background: var(--ink-3); opacity: .5; }
.tag.readable { color: var(--ink-3); padding-left: 0; background: none; font-weight: 500; }
.tag.readable::before { border: 1px solid var(--rule-strong); }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 2px 7px; border-radius: 4px; }
.chip .mono { font-size: 12.5px; }
.chip.locked { background: var(--steel); color: var(--cipher); }
.chip.locking { background: var(--ochre-bg); color: var(--ochre); }
.lock-summary { display: inline-flex; flex-wrap: wrap; gap: 6px; }

.bar { display: flex; gap: 2px; height: 8px; border-radius: 3px; overflow: hidden; background: var(--sunk); min-width: 80px; }
.bar.large { height: 14px; border-radius: 4px; }
.bar-seg { display: block; height: 100%; transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.bar-seg.cipher { background: var(--cipher); }
.bar-seg.waiting { background: var(--hatch); box-shadow: inset 0 0 0 1px var(--ochre-edge); }
.bar-seg[style*='width: 0%'] { display: none; }
.bar.uncounted { background: repeating-linear-gradient(90deg, var(--sunk) 0 6px, transparent 6px 9px); box-shadow: inset 0 0 0 1px var(--rule); }
.bar-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--ink-2); margin-top: 8px; font-variant-numeric: tabular-nums; }
.key { display: inline-flex; align-items: center; gap: 7px; }
.key::before { content: ''; width: 10px; height: 10px; border-radius: 2px; }
.key.cipher::before { background: var(--cipher); }
.key.waiting::before { background: var(--hatch); box-shadow: inset 0 0 0 1px var(--ochre-edge); }

/* ---- Grids ----------------------------------------------------------------------------- */
.table-wrap { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th, .grid td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.grid thead th { font-size: 12.5px; font-weight: 500; color: var(--ink-3); padding-top: 10px; padding-bottom: 10px; white-space: nowrap; background: var(--surface); }
.grid tbody tr:last-child > * { border-bottom: 0; }
.grid tbody th { font-weight: 500; }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.grid .center { text-align: center; }
.grid .actions { text-align: right; white-space: nowrap; }
.grid .actions .btn + .btn { margin-left: 4px; }
.grid a.mono { text-decoration: none; }
.grid a.mono:hover { text-decoration: underline; }
.tables-grid tbody tr:hover { background: var(--ground); }

.columns-grid .role { margin-left: 8px; font-size: 12px; color: var(--ink-3); }
.columns-grid .was { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.columns-grid td.default code { font-size: 12px; background: none; padding: 0; color: var(--ink-2); }
.columns-grid .default { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.since { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.columns-grid tr.is-locked > *, .columns-grid tr.is-locking > * { border-bottom: 0; }
.columns-grid tr.is-locked > th:first-child { box-shadow: inset 3px 0 0 var(--cipher); }
.columns-grid tr.is-locking > th:first-child { box-shadow: inset 3px 0 0 var(--ochre-edge); }
.detail-row > td { padding-top: 0 !important; }
.detail-row.locked > td { box-shadow: inset 3px 0 0 var(--cipher); }
.detail-row.locking > td { box-shadow: inset 3px 0 0 var(--ochre-edge); }
.cell-counts { font-size: 13px; color: var(--ink-3); }
.locking-panel { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; padding: 14px 16px 16px; margin: 2px 0 4px; background: var(--ground); border-radius: var(--r); }
.locking-main > p:last-child { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); max-width: 70ch; }
.locking-side { display: grid; gap: 10px; align-content: start; justify-items: start; padding-left: 24px; border-left: 1px solid var(--rule); }

.add-column .inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; }
.add-column .inline-form > div { display: grid; }
.add-column .inline-form .field { width: 220px; }
.add-column .check { min-height: 40px; }
.add-column .help { margin-top: 10px; }
.add-column .form-error { margin-top: 8px; }
.danger-zone .block-head h2 { color: var(--danger); }

/* ---- Table page ------------------------------------------------------------------------ */
.table-head { align-items: flex-start; margin-bottom: 18px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-3); text-decoration: none; margin: 0 0 8px -3px; }
.crumb:hover { color: var(--ink); }
.crumb .icon { width: 14px; height: 14px; }
.table-head h1 { font-size: 34px; }
.table-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.table-meta span + span::before { content: ''; display: inline-block; width: 1px; height: 12px; background: var(--rule-strong); margin: 0 12px; vertical-align: -1px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 2px; margin-right: 22px; text-decoration: none; color: var(--ink-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current=page] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---- What the database holds ----------------------------------------------------------- */
.held-intro { display: grid; gap: 6px; margin-bottom: 18px; }
.held-intro p { color: var(--ink-2); max-width: 74ch; }
.legend { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.legend li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 3px 12px; padding: 14px 20px 14px 0; font-size: 13.5px; align-items: baseline; }
.legend li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.legend .legend-line { grid-column: 2; }
.legend .sample { justify-self: start; text-align: center; font: 600 11.5px/1 var(--mono); padding: 6px 7px; border-radius: 4px; border: 1px solid; }
.legend .sample.device, .legend .sample.sealed { background: var(--steel); color: var(--cipher); border-color: var(--steel-edge); }
.legend .sample.waiting { background: var(--hatch); color: var(--ochre); border-color: var(--ochre-edge); border-style: dashed; }
.legend-line { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.held { max-height: calc(100vh - 300px); min-height: 280px; overflow: auto; }
.held-grid { font-size: 13px; }
.held-grid th, .held-grid td { padding: 7px 14px; white-space: nowrap; }
.held-grid thead th { position: sticky; top: 0; z-index: 1; box-shadow: inset 0 -1px 0 var(--rule); border-bottom: 0; }
.held-grid thead th .mono { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.held-grid thead th.locked-col { background: color-mix(in srgb, var(--steel) 70%, var(--surface)); }
.held-grid thead th.locked-col .mono { color: var(--cipher); font-weight: 600; }
.held-grid td.cell-td { background: var(--steel-2); padding-top: 5px; padding-bottom: 5px; }
.col-state { margin-left: 8px; font-size: 11.5px; font-weight: 500; color: var(--cipher); }
.col-state.locking { color: var(--ochre); }
.held-grid .plain { display: inline-block; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.held-grid .plain .json { color: var(--ink-2); }
.null { font: 500 11.5px var(--mono); color: var(--ink-3); letter-spacing: .02em; opacity: .85; }
.bool { color: var(--ink-2); }

.cell { display: inline-flex; align-items: center; max-width: 32ch; min-width: 0; font: 12.5px/1.5 var(--mono); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--steel-edge); background: var(--steel); color: var(--cipher); cursor: pointer; text-align: left; vertical-align: middle; }
.cell-prefix { font-weight: 650; flex: none; }
.cell-rest { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; opacity: .88; }
.cell:hover { border-color: var(--cipher); }
.cell.waiting { background: var(--ochre-bg); border-color: var(--ochre-edge); border-style: dashed; color: var(--ochre); }
.cell.waiting .cell-rest { opacity: 1; color: var(--ink); }
.cell.waiting:hover { border-color: var(--ochre); }
.cell-flag { flex: none; margin-left: 8px; font: 600 10.5px/1 var(--sans); padding: 3px 5px; border-radius: 3px; background: var(--hatch); color: var(--ochre); box-shadow: inset 0 0 0 1px var(--ochre-edge); }
.cell.bad { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.pager { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.form-banner { padding: 12px 14px; border-radius: var(--r); margin-bottom: 18px; background: var(--steel); color: var(--cipher); display: grid; gap: 3px; }
.form-banner p { color: var(--ink-2); font-size: 14px; }
.form-banner.waiting { background: var(--ochre-bg); color: var(--ochre); }
.cell-full { margin: 0; padding: 14px 16px; border-radius: var(--r); background: var(--steel); color: var(--cipher); border: 1px solid var(--steel-edge); white-space: pre-wrap; word-break: break-all; font-size: 13px; line-height: 1.6; max-height: 300px; overflow: auto; }
.cell-full .cell-prefix { color: var(--ink); }
.cell-full.waiting { background: var(--ochre-bg); color: var(--ink); border: 1px dashed var(--ochre-edge); }
.cell-full.waiting .cell-prefix { color: var(--ochre); }
.readable-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 14px; color: var(--ochre); }
.readable-note .icon { margin-top: 3px; }
.readable-note code { color: var(--ink); }
.sheet-body > .help { margin-top: 12px; }

/* ---- Access ---------------------------------------------------------------------------- */
.access-form { max-width: 720px; }
.choices { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.choices legend { padding: 0; margin-bottom: 16px; display: grid; gap: 4px; }
.choice { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; transition: border-color .12s; }
.choice:hover { border-color: var(--rule-strong); }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice input { margin-top: 3px; }
.choice.disabled { cursor: not-allowed; background: transparent; }
.choice.disabled .choice-title, .choice.disabled .choice-line { color: var(--ink-3); }
.choice-body { display: grid; gap: 3px; }
.choice-title { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.choice-line { color: var(--ink-2); font-size: 14px; }
.choice-why { font-size: 13px; color: var(--ochre); }
.current { font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 1px 6px; border: 1px solid var(--rule); border-radius: 4px; }
.choices.compact .choice { padding: 11px 14px; }
.choices.compact legend { margin-bottom: 6px; }
.sheet-body .choices { margin-bottom: 22px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }

/* ---- Users ----------------------------------------------------------------------------- */
.who { display: grid; }
.who-name { font-weight: 600; }
.who-email { font-size: 13px; color: var(--ink-3); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.status.active::before { background: var(--verdigris); }
.status.suspended { color: var(--danger); }
.status.suspended::before { background: var(--danger); }
.status.pending::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.risk { display: block; font-size: 12px; color: var(--ochre); margin-top: 2px; }
.device-list { list-style: none; margin: 8px 0 6px; padding: 0; border-top: 1px solid var(--rule); }
.device-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.device-name { font-weight: 500; }
.sheet-body > h3 { margin: 22px 0 6px; }
.account-actions { display: grid; border-top: 1px solid var(--rule); }
.action-line { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.action-line p { font-size: 14px; color: var(--ink-2); max-width: 52ch; }

/* ---- Connect --------------------------------------------------------------------------- */
.key-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); max-width: 760px; }
.key-line + .help { margin-top: 8px; }
.url { font-size: 15px; }
.key-mask { font-size: 15px; margin-bottom: 4px; }
.mask { color: var(--ink-3); letter-spacing: .08em; }
.code { max-width: 860px; margin-top: 14px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--rule); background: var(--surface); }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 16px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--ink-3); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.65; color: var(--ink); }
.code pre code { font-size: inherit; }
.code .comment { color: var(--ink-3); }
.secret { margin: 0 0 12px; padding: 14px 16px; border-radius: var(--r); background: var(--sunk); font-size: 14px; word-break: break-all; white-space: pre-wrap; }

/* ---- Sheets (dialogs) ------------------------------------------------------------------ */
dialog.sheet { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--rule-strong); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: auto; }
dialog.sheet.wide { width: min(760px, calc(100vw - 24px)); }
dialog.sheet::backdrop { background: rgba(14, 20, 28, .46); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: sheet-in .18s cubic-bezier(.2, .7, .2, 1); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(8px); } }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 20px 16px 26px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.sheet-head h2 { font-size: 20px; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.sheet-head h2 .mono { font-size: .92em; }
.sheet-sub { margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.sheet-body { padding: 22px 26px 22px; }
.sheet-body .prose { display: grid; gap: 10px; color: var(--ink-2); margin-bottom: 20px; }
.sheet-body .field-row { margin-bottom: 20px; display: grid; gap: 0; }
.sheet-body .field-row > .help { margin-top: 6px; }
.sheet-body .field-row > .btn { justify-self: start; margin-top: 6px; }
.sheet-body > .form-error, .sheet-body form > .form-error { margin-top: 10px; }
.sheet-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule); }
.col-editor { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
.col-editor th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 500; padding: 0 6px 6px 0; }
.col-editor td { padding: 0 6px 8px 0; }
.col-editor .center { text-align: center; width: 70px; }
.col-editor td:last-child { width: 36px; }
.col-editor select.field { min-width: 150px; }

/* ---- The lock flow --------------------------------------------------------------------- */
.lock-flow > section { margin-bottom: 28px; }
.lock-flow h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.blockers { border-left: 3px solid var(--danger); background: var(--danger-bg); padding: 16px 18px 6px 18px; border-radius: 0 var(--r) var(--r) 0; }
.blockers h3 { color: var(--danger); margin-bottom: 4px; }
.blockers > p { color: var(--ink-2); font-size: 14px; margin-bottom: 12px; }
.blockers ul { list-style: none; margin: 0; padding: 0; }
.blockers li { padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--danger) 20%, transparent); font-size: 14px; }
.blockers li p { color: var(--ink-2); margin-top: 2px; }
.blockers .fix { color: var(--ink); }
.blockers .detail { font-size: 13px; color: var(--ink-3); }
.blockers .detail::before { content: 'The server says: '; }
.partition { display: flex; gap: 3px; height: 30px; margin: 4px 0 16px; }
.partition .seg { display: block; border-radius: 3px; min-width: 6px; }
.partition .seg.cipher { background: var(--cipher); }
.partition .seg.waiting { background: var(--hatch); box-shadow: inset 0 0 0 1px var(--ochre-edge); }
.partition .seg.removed { background: var(--removed); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 55%, transparent); }
.partition .seg.blocked { background: repeating-linear-gradient(-45deg, var(--danger-bg) 0 4px, var(--danger) 4px 5px); box-shadow: inset 0 0 0 1px var(--danger); }
.partition .seg.empty { box-shadow: inset 0 0 0 1px var(--rule-strong); background: repeating-linear-gradient(90deg, transparent 0 3px, var(--sunk) 3px 4px); }
.outcomes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.outcome { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.outcome .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 10px; vertical-align: 1px; }
.outcome.blocked .swatch { background: var(--danger); }
.outcome.blocked .outcome-n { color: var(--danger); }
.outcome.cipher .swatch { background: var(--cipher); }
.outcome.waiting .swatch { background: var(--hatch); box-shadow: inset 0 0 0 1px var(--ochre-edge); }
.outcome.empty .swatch { box-shadow: inset 0 0 0 1px var(--rule-strong); }
.outcome.removed .swatch { background: var(--removed); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 55%, transparent); }
.outcome .loss { display: block; margin-top: 4px; color: var(--danger); font-weight: 600; }
.purge-steps { margin: 4px 0 6px; }
.purge-steps .outcome { grid-template-columns: 64px minmax(0, 1fr); }
.outcome-n { font-size: 20px; line-height: 1; font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.outcome-text { color: var(--ink-2); }
.outcome-text strong { color: var(--ink); font-weight: 600; }
.consequences { margin: 0; padding: 0 0 0 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
.consequences strong { color: var(--ink); }
.limit { margin: 0 0 28px; padding: 14px 16px; border-radius: var(--r); background: var(--sunk); }
.limit h3 { margin-bottom: 4px; font-size: 14px; }
.limit p { font-size: 14px; color: var(--ink-2); }
.confirm { padding-top: 22px; border-top: 1px solid var(--rule); }
.confirm .field { max-width: 420px; }
.confirm .help { margin-top: 8px; }
.confirm .form-error { margin-top: 8px; }

.steps { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: step; }
.step { counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding: 0 0 18px; position: relative; }
.step:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 1px; background: var(--rule-strong); }
.step-mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--rule-strong); color: var(--ink-3); font-size: 12.5px; font-weight: 600; background: var(--surface); position: relative; z-index: 1; }
.step-mark:empty::before { content: counter(step); }
.step.done .step-mark { background: var(--verdigris-bg); border-color: transparent; color: var(--verdigris); }
.step.done .step-mark .icon { stroke-width: 2; width: 15px; height: 15px; }
.step.now .step-mark { border-color: var(--cipher); color: var(--cipher); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cipher) 15%, transparent); animation: pulse 1.6s ease-in-out infinite; }
.step.wait .step-mark { background: var(--ochre-bg); border-color: var(--ochre-edge); color: var(--ochre); }
.step-title { font-weight: 600; padding-top: 3px; }
.step.todo .step-title { color: var(--ink-3); font-weight: 500; }
.step-detail { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--cipher) 6%, transparent); } }
.progress-slot { margin-bottom: 18px; }
.purge-offer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 16px; border-radius: var(--r); border: 1px dashed var(--ochre-edge); }
.purge-offer p { font-size: 14px; color: var(--ink-2); }

/* ---- Toasts ---------------------------------------------------------------------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--ink); color: var(--on-ink); font-size: 14px; box-shadow: var(--shadow); max-width: 420px; animation: sheet-in .18s ease-out; transition: opacity .3s; }
.toast.error { background: var(--danger); }
.toast.note { background: var(--ink); max-width: 520px; }
.toast.note .icon { color: var(--ochre-edge); }
.toast.leaving { opacity: 0; }

/* ---- Sign in --------------------------------------------------------------------------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-column: 1 / -1; }
.signin-form { align-self: center; justify-self: center; width: min(400px, calc(100% - 48px)); display: grid; gap: 0; padding: 48px 0; }
.signin-form .brand { margin-bottom: 56px; }
.signin-form h1 { font-size: 28px; margin-bottom: 28px; }
.signin-form .help { margin: 10px 0 18px; }
.signin-form .form-error { margin-bottom: 14px; }
.signin-form .reset-hint { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); }
.reset-hint strong { color: var(--ink-2); font-weight: 600; }
.specimen { background: var(--steel); border-left: 1px solid var(--steel-edge); display: grid; align-items: center; padding: 56px clamp(32px, 6vw, 88px); overflow: hidden; }
.specimen figure { margin: 0; max-width: 520px; display: grid; gap: 30px; }
.spec-row { display: grid; gap: 10px; }
.spec-who { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.spec-plain { font-size: 24px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 500; color: var(--ink); background: var(--surface); padding: 16px 18px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--rule); }
.spec-cipher { font-size: 15px; line-height: 1.7; color: var(--cipher); word-break: break-all; padding: 16px 18px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--steel-edge); background: var(--steel-2); }
.spec-cipher .cell-prefix { color: var(--ink); }
.specimen figcaption { font-size: 13px; color: var(--ink-2); max-width: 46ch; }
@media (prefers-reduced-motion: no-preference) {
  .spec-cipher { animation: settle 1.4s .25s cubic-bezier(.3, .6, .2, 1) both; }
  @keyframes settle { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Narrow screens -------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .facts { grid-template-columns: repeat(3, minmax(0, auto)); }
  .facts > div:nth-child(3) { border-right: 0; }
  .facts > div:nth-child(n+4) { border-top: 1px solid var(--rule); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .split > .block + .block { margin-top: 40px; }
  .legend { grid-template-columns: minmax(0, 1fr); }
  .legend li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .locking-panel { grid-template-columns: minmax(0, 1fr); }
  .locking-side { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail-slot { border-right: 0; border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 10; }
  .rail { position: static; height: auto; padding: 12px 16px 0; gap: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .rail-project { display: none; }
  .rail-nav { grid-column: 1 / -1; grid-row: 2; display: flex; overflow-x: auto; gap: 2px; margin: 8px -16px 0; padding: 0 16px; scrollbar-width: none; }
  .rail-nav > li { flex: none; }
  .rail-link { margin: 0; padding: 9px 10px; border-radius: 0; border-bottom: 2px solid transparent; }
  .rail-link[aria-current=page] { background: none; box-shadow: none; border-bottom-color: var(--ink); }
  .rail-tables { display: none; }
  .rail-foot { grid-column: 2; grid-row: 1; margin: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 6px; }
  .rail-meta, .theme-switch { display: none; }
  .rail-foot .btn { margin: 0; }
  .page { padding: 24px 16px 64px; }
  .loading { padding: 24px 16px; }
  h1 { font-size: 26px; }
  .table-head h1 { font-size: 28px; }
  .lede { font-size: 16px; margin-bottom: 22px; }
  .page-head { flex-wrap: wrap; align-items: center; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div, .facts > div:nth-child(3) { border-right: 0; margin-right: 0; padding-right: 12px; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .facts.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-split, .action-line, .purge-offer, .key-line, .policy-alert { flex-direction: column; align-items: flex-start; gap: 12px; }
  .limit-list { columns: 1; }

  /* Lists become stacked records; the stored-rows grid keeps scrolling sideways. */
  .stack-grid thead { display: none; }
  .stack-grid, .stack-grid tbody, .stack-grid tr, .stack-grid th, .stack-grid td { display: block; }
  .stack-grid tr { padding: 12px 14px; border-bottom: 1px solid var(--rule); }
  .stack-grid tbody tr:last-child { border-bottom: 0; }
  .stack-grid th, .stack-grid td { border: 0 !important; padding: 2px 0; text-align: left !important; }
  .stack-grid tbody th { padding-bottom: 6px; }
  .stack-grid td[data-label] { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; }
  .stack-grid td[data-label]::before { content: attr(data-label); color: var(--ink-3); }
  .stack-grid td.actions { padding-top: 8px; }
  .stack-grid .detail-row { padding-top: 0; }
  .columns-grid tr.is-locked, .columns-grid tr.is-locking { border-bottom: 0; }
  .columns-grid tr.is-locked > th:first-child, .columns-grid tr.is-locking > th:first-child, .detail-row > td { box-shadow: none; }
  .columns-grid tr.is-locked, .columns-grid tr.detail-row.locked { box-shadow: inset 3px 0 0 var(--cipher); }
  .columns-grid tr.is-locking, .columns-grid tr.detail-row.locking { box-shadow: inset 3px 0 0 var(--ochre-edge); }
  .columns-grid .default { max-width: none; }
  .held-grid tr { padding: 10px 14px; }
  .held-grid td[data-label] { align-items: center; font-size: 12.5px; padding: 3px 0; }
  .held-grid td[data-label]::before { font-family: var(--mono); font-size: 12px; flex: none; }
  .held-grid td.cell-td { background: none; padding: 3px 0; }
  .held-grid td.cell-td::before { color: var(--cipher); font-weight: 600; }
  .held-grid .plain { max-width: 62vw; text-align: right; }
  .held-grid .cell { max-width: 66vw; }

  .signin { grid-template-columns: minmax(0, 1fr); }
  .signin-form { padding: 32px 0 36px; }
  .signin-form .brand { margin-bottom: 36px; }
  .specimen { border-left: 0; border-top: 1px solid var(--steel-edge); padding: 32px 24px 40px; }
  .spec-plain { font-size: 19px; }
  .spec-cipher { font-size: 13px; }

  dialog.sheet, dialog.sheet.wide { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; border-bottom: 0; }
  .sheet-head { padding: 16px 12px 12px 18px; }
  .sheet-body { padding: 18px 18px 22px; }
  .outcome { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
  .outcome .swatch { margin-right: 6px; }
  .legend li { padding: 10px 0; grid-template-columns: 52px minmax(0, 1fr); }
  .legend .legend-line { display: none; }
  .held { max-height: none; }
  .outcome-n { font-size: 17px; }
  .add-column .inline-form .field { width: 100%; }
  .add-column .inline-form > div { width: 100%; }
  .col-editor select.field { min-width: 0; }
  .toasts { left: 12px; right: 12px; bottom: 12px; justify-items: stretch; }
}
