/* Finolar local console. Tokens first; dark mode follows the system unless forced. */
:root {
  /* the sky look: a calm blue gradient, translucent surfaces, dark navy text (contrast is checked in tests/test_theme.py) */
  --sky: linear-gradient(180deg, #cde7ff 0%, #e6f3ff 45%, #f6fbff 100%);
  --bg: #e6f3ff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-2: rgba(255, 255, 255, 0.65);
  --text: #0b2545;
  --muted: #3a5675;
  --line: #bcd6ee;
  --accent: #0f5fc2;
  --accent-ink: #ffffff;
  --accent-soft: #dbeafe;
  --good: #0b6b34;
  --good-soft: #e3f6ea;
  --warn: #8a4b00;
  --warn-soft: #fff1d6;
  --bad: #a61b13;
  --bad-soft: #fde8e6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 37, 69, 0.06), 0 2px 8px rgba(11, 37, 69, 0.08);
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: linear-gradient(180deg, #0a1c33 0%, #0f2a4a 100%);
    --bg: #0f2a4a;
    --surface: #12294a;
    --surface-2: #183560;
    --text: #e8f3ff;
    --muted: #a8c1db;
    --line: #27456b;
    --accent: #8ccaff;
    --accent-ink: #06223f;
    --accent-soft: #1b3a63;
    --good: #55c97f;
    --good-soft: #14301f;
    --warn: #f0b24d;
    --warn-soft: #34270f;
    --bad: #ff7b72;
    --bad-soft: #3a1815;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --sky: linear-gradient(180deg, #0a1c33 0%, #0f2a4a 100%);
  --bg: #0f2a4a; --surface: #12294a; --surface-2: #183560; --text: #e8f3ff; --muted: #a8c1db;
  --line: #27456b; --accent: #8ccaff; --accent-ink: #06223f; --accent-soft: #1b3a63;
  --good: #55c97f; --good-soft: #14301f; --warn: #f0b24d; --warn-soft: #34270f;
  --bad: #ff7b72; --bad-soft: #3a1815; --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); background-image: var(--sky); background-attachment: fixed; min-height: 100vh; color: var(--text); font: 14px/1.5 var(--sans); }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 14px 0 6px; }
p { margin: 0 0 8px; }
a { color: var(--accent); }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px; }
.skip:focus { left: 8px; z-index: 50; }

.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; margin: 0 6px 18px; flex-wrap: wrap; }
.brand small { color: var(--muted); font-weight: 400; font-size: 11px; flex-basis: 100%; margin-left: 36px; margin-top: -6px; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
#nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
#nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
#nav a:hover { background: var(--surface-2); }
#nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
#nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; color: var(--muted); font-size: 12px; padding: 8px; }

main { padding: 24px 28px 48px; max-width: 1280px; width: 100%; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sub { color: var(--muted); margin: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.grow { flex: 1 1 auto; }
.stack { display: grid; gap: 12px; align-content: start; }
.cols > *, .card, .stack > * { min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.stat .note { color: var(--muted); font-size: 12px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }

button, .btn { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
button:hover { background: var(--surface-2); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
button.ghost { border-color: transparent; background: transparent; color: var(--accent); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
td button { white-space: nowrap; }
details.multi { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
details.multi > summary { padding: 7px 10px; cursor: pointer; list-style: none; color: var(--text); }
details.multi > summary::after { content: " \25BE"; color: var(--muted); }
.multi-panel { border-top: 1px solid var(--line); padding: 8px; display: grid; gap: 6px; }
.multi-list { max-height: 240px; overflow: auto; display: grid; gap: 2px; }
.multi-opt { padding: 2px 4px; border-radius: 4px; }
.multi-opt:hover { background: var(--surface-2); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; }
input[type="checkbox"] { padding: 0; }
label.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
label.field > input, label.field > select, label.field > textarea { font-size: 14px; color: var(--text); }
label.check { display: inline-flex; align-items: center; gap: 6px; }
.hint { color: var(--muted); font-size: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; position: sticky; top: 0; background: var(--surface); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }
tr.clickable { cursor: pointer; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.narr { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }

.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.debit { color: var(--text); } .credit { color: var(--good); }

.banner { border-radius: var(--radius); padding: 10px 14px; border: 1px solid var(--line); background: var(--surface-2); }
.banner.good { background: var(--good-soft); border-color: transparent; }
.banner.warn { background: var(--warn-soft); border-color: transparent; }
.banner.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; max-width: 420px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.bad { background: var(--bad); color: #fff; }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 80; padding: 16px; }
.modal { background: var(--surface); border-radius: 12px; padding: 20px; width: min(560px, 100%); max-height: 90vh; overflow: auto; border: 1px solid var(--line); }
.drawer { width: min(720px, 100%); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* categorise workbench */
.bench { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.queue { max-height: calc(100vh - 220px); overflow: auto; padding: 6px; }
.queue button.qi { display: block; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; padding: 8px 10px; border-radius: 8px; }
.queue button.qi:hover { background: var(--surface-2); }
.queue button.qi[aria-current="true"] { background: var(--accent-soft); border-color: var(--accent); }
.queue button.qi.done { opacity: .55; }
.queue .qn { font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.queue .qm { color: var(--muted); font-size: 12px; }
.suggest { display: grid; gap: 6px; }
.suggest button { text-align: left; display: flex; gap: 10px; align-items: baseline; }
.suggest .score { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 38px; }
.suggest .why { color: var(--muted); font-size: 12px; }
.cluster { border-left: 3px solid var(--accent); }
.parts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; font-size: 13px; }
.parts .p { font-family: var(--mono); font-size: 12.5px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 110px; gap: 10px; align-items: center; margin: 5px 0; }
.bar { height: 12px; background: var(--accent); border-radius: 3px; min-width: 2px; }
.bar.neg { background: var(--bad); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 8px 12px; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
details > summary { cursor: pointer; color: var(--accent); }
.sidepanel { border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
svg.chart { width: 100%; height: 190px; }
svg.chart text { fill: var(--muted); font-size: 10px; }
svg.chart .a { fill: var(--accent); } svg.chart .b { fill: var(--bad); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px; }
  .brand { margin: 0 8px 0 0; } .brand small { display: none; }
  .shell { min-width: 0; }
  .side { min-width: 0; max-width: 100vw; }
  #nav { grid-auto-flow: column; overflow-x: auto; flex: 1 1 100%; min-width: 0; max-width: 100%; }
  #nav a { white-space: nowrap; }
  .side-foot { display: none; }
  main { padding: 16px; }
  .bench { grid-template-columns: 1fr; }
  .queue { max-height: 220px; }
  .bar-row { grid-template-columns: 110px 1fr 90px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* subsections of Categorise */
.subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.subnav .tab { padding: 8px 14px; text-decoration: none; color: var(--text); border-bottom: 2px solid transparent; }
.subnav .tab:hover { background: var(--surface-2); }
.subnav .tab[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
a.btn { display: inline-block; text-decoration: none; }

/* the order of precedence */
.prec-toolbar { margin: 12px 0; }
.prec-list { display: grid; gap: 6px; }
.prec-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.prec-row.user { border-left: 3px solid var(--accent); }
.prec-row.open { box-shadow: var(--shadow); }
.prec-row.dragging { opacity: .45; }
.prec-row.drop-over { outline: 2px dashed var(--accent); outline-offset: 1px; }
.prec-head { display: grid; grid-template-columns: 18px 64px auto auto minmax(0, 1fr) minmax(160px, 260px) 28px auto; gap: 10px; align-items: center; padding: 8px 10px; }
.prec-row .handle { cursor: grab; color: var(--muted); user-select: none; letter-spacing: -2px; }
.prec-row .handle.off { cursor: default; }
.prec-row .num-in { width: 64px; padding: 4px 6px; text-align: right; }
.prec-row .num-fixed { width: 64px; text-align: right; padding-right: 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prec-row .stepper { display: inline-flex; flex-direction: column; line-height: 1; }
.prec-row .stepper button { padding: 0 4px; font-size: 10px; }
.lock-btn { padding: 0 6px; font-size: 14px; line-height: 1.4; }
.prec-tags { display: inline-flex; gap: 4px; flex-wrap: nowrap; white-space: nowrap; }
.prec-main { min-width: 0; }
.prec-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prec-patterns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.prec-patterns .pat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prec-cat { text-align: left; min-width: 0; }
.prec-body { border-top: 1px solid var(--line); padding: 12px 14px 14px 28px; }
@media (max-width: 860px) {
  .prec-head { grid-template-columns: 64px auto minmax(0, 1fr) 28px auto; }
  .prec-head .handle, .prec-head .stepper, .prec-head .prec-cat { display: none; }
}

/* search-and-select box: the list always opens straight below the field, on an opaque surface */
.combo { position: relative; display: block; min-width: 220px; }
.combo input { width: 100%; }
.combo-panel { position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 30; max-height: 260px; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--accent); border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.25); padding: 4px; }
.combo-panel[hidden] { display: none; }
.combo-item { padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.combo-item:hover, .combo-item.active { background: var(--accent-soft); color: var(--text); }
.combo-empty { padding: 8px; color: var(--muted); }

/* sortable, filterable table headings and their tags */
th.hcell { position: relative; white-space: nowrap; }
.sortbtn { font: inherit; font-weight: 600; padding: 2px 4px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.sortbtn.on { color: var(--accent); }
.colfilter { padding: 0 4px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.colfilter.on { color: var(--accent); font-weight: 700; }
.colfilter-panel { position: absolute; top: 100%; left: 0; z-index: 25; min-width: 240px; max-width: 360px; background: var(--surface); color: var(--text); border: 1px solid var(--accent); border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.25); padding: 8px; display: grid; gap: 6px; text-transform: none; font-weight: 400; white-space: normal; }
.colfilter-panel[hidden] { display: none; }
.tags { gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 2px; }
.tag-x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; }

.page-host { display: contents; }

/* notifications: floating notices that leave after three seconds, the bell, the history */
.toast { transition: opacity 0.3s ease, transform 0.3s ease; }
.toast.leaving { opacity: 0; transform: translateY(6px); }
.side-bell { margin-top: auto; padding: 4px 0; }
.side-bell + .side-foot { margin-top: 0; }
.bell { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); cursor: pointer; }
.bell:hover { background: var(--surface-2); }
.bell .badge { margin-left: auto; }
.note-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.note-row.bad { border-color: var(--bad); }

/* rules review and conflicts */
.pair-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.pair-mid { text-align: center; display: grid; gap: 4px; }
.pair.disagree { border-color: var(--warn); }
.conflict { border-top: 1px solid var(--line); padding-top: 8px; }
@media (max-width: 720px) { .pair-grid { grid-template-columns: 1fr; } }

/* search box with a large, square clear button (the browser's own cross is a few pixels wide) */
input[type="search"]::-webkit-search-cancel-button { display: none; }
.clearable { position: relative; display: inline-flex; align-items: stretch; min-width: 160px; }
.clearable input { flex: 1 1 auto; padding-right: 38px; min-width: 0; }
.clear-btn { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 34px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.clear-btn:hover, .clear-btn:focus-visible { background: var(--surface-2); color: var(--text); }
.clear-btn[hidden] { display: none; }

.req { color: var(--bad); font-weight: 700; }
.field-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px; }
.field-help { font-weight: 400; }

.matched { color: var(--accent); }

/* an insight links to its record, and acceptance is a tick or a cross in place */
.record-link { color: var(--accent); text-decoration: none; }
.record-link:hover { text-decoration: underline; }
.chip-link { padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; }
button.tick, button.cross { min-width: 36px; min-height: 36px; padding: 0 10px; font-size: 18px; line-height: 1; border-radius: 8px; }
button.tick { color: var(--good, #1a7f37); border-color: var(--good, #1a7f37); }
button.cross { color: var(--bad, #cf222e); border-color: var(--bad, #cf222e); }

/* keep / break: an icon with a small word under it, always at the bottom right of its box */
.row.decide { justify-content: flex-end; margin-top: 4px; }
.icon-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 6px 10px; line-height: 1; }
.icon-btn .icon { display: inline-flex; }
.icon-btn .icon-text { font-size: 11px; text-transform: lowercase; }
.icon-btn.keep { color: var(--good, #1a7f37); border-color: var(--good, #1a7f37); }
.icon-btn.break { color: var(--bad, #cf222e); border-color: var(--bad, #cf222e); }

/* how much of a card's limit is used */
.meter { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 4px; min-width: 120px; }
.meter-fill { height: 100%; background: var(--accent); }

/* what a pattern does not cover: collapsed, muted, clearly labelled */
details.left-out { opacity: .85; border-style: dashed; }
details.left-out summary { cursor: pointer; font-weight: 600; color: var(--warn, #9a6700); }

/* narrations coloured by what each part is */
.seg { border-radius: 3px; padding: 0 2px; }
.seg-mode { color: var(--seg-mode, #6e7bd8); font-weight: 600; }
.seg-recipient { color: var(--seg-recipient, #2f9e6f); font-weight: 600; }
.seg-handle { color: var(--seg-handle, #a066d3); }
.seg-bank { color: var(--seg-bank, #d9822b); }
.seg-id { color: var(--seg-id, #8a8f98); font-size: .92em; }
.seg-remarks { color: var(--seg-remarks, #c9a227); font-style: italic; }
.seg-place { color: var(--seg-place, #d4568f); }
.seg-legend { display: inline-flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.narr.big { font-size: 15px; word-break: break-all; margin: 6px 0; }

/* The hidden attribute must win over display rules such as .stack (the join page's setup step). */
[hidden] { display: none !important; }

/* Sign-in, joining and the legal pages */
body.auth { display: grid; place-items: start center; padding: 32px 16px; min-height: 100vh; }
.auth-card, .legal { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 12px; align-content: start; }
.auth-card code.big { display: block; font-size: 16px; letter-spacing: 1px; word-break: break-all;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.legal { max-width: 760px; margin: 24px auto; padding: 24px 28px; display: block; line-height: 1.6; }
.legal h1 { font-size: 22px; margin: 0 0 12px; }
.legal h2 { font-size: 16px; margin: 22px 0 6px; }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 10px; }
.legal li { margin-bottom: 4px; }
.legal table { border-collapse: collapse; width: 100%; margin: 8px 0 12px; font-size: 13px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.legal blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--accent); color: var(--muted); }
.legal-text { white-space: pre-wrap; }

.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; font-size: 13px; }
.ack-state { color: var(--muted); font-size: 12px; margin-left: 4px; }
.ack-state.done { color: var(--good); font-weight: 600; }
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ack-box { margin: 18px 0 6px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* T-158: on a phone-width screen the transaction table becomes a list of cards, each field labelled. */
@media (max-width: 640px) {
  table.cards, table.cards tbody { display: block; }
  table.cards thead { position: absolute; left: -9999px; }
  table.cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.cards td { display: block; border: 0; padding: 2px 0; min-width: 0; }
  table.cards td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
  table.cards td.narr { grid-column: 1 / -1; }
  table.cards td:first-child:not([data-label]) { grid-column: 1 / -1; }
  .page-head { flex-wrap: wrap; gap: 8px; }
  .cols { grid-template-columns: 1fr; }
}

.logo-img { width: 30px; height: 30px; display: block; }
