:root {
    color-scheme: light;
    --bg: #E9EDEF;
    --surface: #FFFFFF;
    --surface-2: #F3F6F7;
    --surface-3: #E7ECEE;
    --ink: #0E1619;
    --ink-2: #43555C;
    --muted: #78898F;
    --line: #D5DDE0;
    --line-strong: #BCC8CC;
    --accent: #0C5C6B;
    --accent-ink: #0C5C6B;
    --accent-soft: rgba(12, 92, 107, 0.10);
    --pos: #1C7351;
    --pos-soft: rgba(28, 115, 81, 0.12);
    --neg: #A5382A;
    --neg-soft: rgba(165, 56, 42, 0.12);
    --warn: #8C6410;
    --warn-soft: rgba(140, 100, 16, 0.12);
    --shadow: 0 1px 2px rgba(14, 22, 25, .06), 0 8px 24px -12px rgba(14, 22, 25, .18);
    --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --bg: #080F12;
      --surface: #0F1B20;
      --surface-2: #14232A;
      --surface-3: #1B2E36;
      --ink: #E3ECEF;
      --ink-2: #A7B9C0;
      --muted: #7E9299;
      --line: #21343C;
      --line-strong: #2E464F;
      --accent: #4BC3D6;
      --accent-ink: #7FD8E6;
      --accent-soft: rgba(75, 195, 214, 0.14);
      --pos: #45BE92;
      --pos-soft: rgba(69, 190, 146, 0.15);
      --neg: #E77A63;
      --neg-soft: rgba(231, 122, 99, 0.15);
      --warn: #D5A343;
      --warn-soft: rgba(213, 163, 67, 0.15);
      --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    }
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #080F12;
    --surface: #0F1B20;
    --surface-2: #14232A;
    --surface-3: #1B2E36;
    --ink: #E3ECEF;
    --ink-2: #A7B9C0;
    --muted: #7E9299;
    --line: #21343C;
    --line-strong: #2E464F;
    --accent: #4BC3D6;
    --accent-ink: #7FD8E6;
    --accent-soft: rgba(75, 195, 214, 0.14);
    --pos: #45BE92;
    --pos-soft: rgba(69, 190, 146, 0.15);
    --neg: #E77A63;
    --neg-soft: rgba(231, 122, 99, 0.15);
    --warn: #D5A343;
    --warn-soft: rgba(213, 163, 67, 0.15);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
  }

  * { box-sizing: border-box; }
  body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: var(--font-ui); font-size: 15px; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  .wrap { max-width: 1240px; margin: 0 auto; padding: 22px 20px 72px; display: flex; flex-direction: column; gap: 18px; }

  /* ---------- masthead ---------- */
  .masthead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
  .brand { display: flex; flex-direction: column; gap: 2px; }
  .brand h1 { font-family: var(--font-display); font-size: clamp(30px, 4.4vw, 42px); font-weight: 400; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
  .brand h1 span { color: var(--accent-ink); }
  .brand p { margin: 0; color: var(--ink-2); font-size: 14px; }
  .eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

  .controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
  .field { display: flex; flex-direction: column; gap: 4px; }
  .field label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .field input, .field select {
    font: inherit; font-family: var(--font-mono); font-size: 14px;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 9px; min-width: 0;
  }
  .field input { width: 130px; }
  .field.sm input { width: 74px; }
  input:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
  }

  /* ---------- kpi strip ---------- */
  .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 12px; }
  .kpi {
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    padding: 13px 15px 14px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 3px; position: relative; overflow: hidden;
  }
  .kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); opacity: .75; }
  .kpi.is-pos::before { background: var(--pos); }
  .kpi.is-neg::before { background: var(--neg); }
  .kpi .k-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
  .kpi .k-value { font-family: var(--font-mono); font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
  .kpi .k-note { font-size: 12.5px; color: var(--ink-2); }
  .num-pos { color: var(--pos); }
  .num-neg { color: var(--neg); }
  .num-warn { color: var(--warn); }

  /* ---------- tabs ---------- */
  .tabs { display: flex; gap: 2px; align-items: flex-end; border-bottom: 1px solid var(--line); padding: 0 2px; flex-wrap: wrap; }
  .tab {
    font: inherit; font-size: 13.5px; cursor: pointer; background: transparent; color: var(--ink-2);
    border: 1px solid transparent; border-bottom: none; border-radius: 7px 7px 0 0;
    padding: 8px 15px 9px; margin-bottom: -1px; display: flex; align-items: center; gap: 8px;
  }
  .tab:hover { background: var(--surface-2); color: var(--ink); }
  .tab[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; border-color: var(--line); border-bottom: 1px solid var(--surface); }
  .tab .tab-key { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .1em; }
  .tab[aria-selected="true"] .tab-key { color: var(--accent-ink); }
  .tab .pip { font-family: var(--font-mono); font-size: 10px; background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 1px 6px; }

  .panel { display: none; flex-direction: column; gap: 16px; }
  .panel.is-active { display: flex; }

  .card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
  .card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
  .card-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 19px; letter-spacing: -0.01em; }
  .card-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
  .head-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }

  /* segmented control + toggles */
  .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 7px; overflow: hidden; }
  .seg button {
    font: inherit; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em;
    background: var(--surface); color: var(--ink-2); border: none; border-right: 1px solid var(--line); padding: 5px 10px; cursor: pointer;
  }
  .seg button:last-child { border-right: none; }
  .seg button:hover { background: var(--surface-3); color: var(--ink); }
  .seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
  :root[data-theme="dark"] .seg button[aria-pressed="true"] { color: #04181C; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { color: #04181C; } }
  .toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
  .toggle input { accent-color: var(--accent); width: 15px; height: 15px; }

  /* ---------- chart ---------- */
  .chart-wrap { position: relative; padding: 14px 16px 8px; }
  .chart-wrap svg { display: block; width: 100%; height: auto; }
  .tip {
    position: absolute; pointer-events: none; opacity: 0; transition: opacity .12s;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
    box-shadow: var(--shadow); padding: 8px 10px; min-width: 172px; max-width: 260px; font-size: 12.5px; z-index: 5;
  }
  .tip.on { opacity: 1; }
  .tip .t-date { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
  .tip .t-bal { font-family: var(--font-mono); font-size: 17px; font-variant-numeric: tabular-nums; }
  .tip ul { margin: 6px 0 0; padding-left: 14px; color: var(--ink-2); }
  .tip li { margin: 1px 0; }
  .legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 0 16px 14px; font-size: 12px; color: var(--muted); }
  .legend span { display: inline-flex; align-items: center; gap: 6px; }
  .legend i { width: 14px; height: 3px; border-radius: 2px; background: var(--accent); display: inline-block; }
  .legend i.neg { background: var(--neg); }
  .legend i.zero { background: transparent; height: 0; border-top: 2px dashed var(--line-strong); }
  .legend i.ghost { background: transparent; border-top: 2px dashed var(--muted); height: 0; }

  /* ---------- tables ---------- */
  .scroll { overflow-x: auto; }
  table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
  thead th {
    position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--muted);
    font-family: var(--font-mono); font-size: 10px; letter-spacing: .11em; text-transform: uppercase;
    font-weight: 500; text-align: left; padding: 8px 10px; white-space: nowrap; border-bottom: 1px solid var(--line-strong);
  }
  tbody td { padding: 4px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  tbody tr:hover td { background: var(--surface-2); }
  .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .sub { color: var(--muted); }
  tr.row-sec td { background: var(--surface-3); font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-2); padding: 7px 10px; }
  tr.row-sec:hover td { background: var(--surface-3); }
  tr.row-total td { border-top: 1px solid var(--line-strong); font-weight: 600; }
  tr.row-grand td { background: var(--accent-soft); font-weight: 600; }
  tr.row-grand:hover td { background: var(--accent-soft); }
  tr.is-event td { background: var(--surface-2); }
  tr.is-low td { box-shadow: inset 0 0 0 1px var(--warn-soft); }
  .empty { padding: 22px 16px; color: var(--muted); font-size: 13.5px; }

  .cell-in, .cell-sel {
    font: inherit; font-size: 13.5px; color: var(--ink); background: transparent;
    border: 1px solid transparent; border-radius: 5px; padding: 4px 6px; width: 100%;
  }
  .cell-in:hover, .cell-sel:hover { border-color: var(--line-strong); background: var(--surface); }
  .cell-in:focus { background: var(--surface); border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
  .cell-in.num { text-align: right; font-family: var(--font-mono); }
  .cell-sel {
    -webkit-appearance: none; appearance: none; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: right 9px center, right 5px center; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
    padding-right: 18px; text-overflow: ellipsis;
  }
  .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  /* items sheet grid */
  #items-table { table-layout: fixed; min-width: 1198px; }
  #items-table td, #items-table th { overflow: hidden; }
  #items-table td { padding-left: 6px; padding-right: 6px; }
  #items-table th { padding-left: 8px; padding-right: 8px; }
  #items-table td:first-child, #items-table th:first-child { padding-left: 10px; }
  #items-table tbody td:last-child:not([colspan]) { padding-right: 8px; text-align: right; }
  #items-table tr.row-sec td { text-align: left; }
  #items-table .cell-in[data-f="name"] { font-size: 13px; }
  #items-table .cell-in[data-f="when"], #items-table .cell-in[data-f="start"], #items-table .cell-in[data-f="end"] {
    font-family: var(--font-mono); font-size: 12px; padding-left: 5px; padding-right: 5px;
  }
  #items-table .cell-sel { font-size: 12.5px; }
  #items-table tbody td.num { font-size: 12px; color: var(--ink-2); }
  #items-table td.col-derived { border-left: 1px solid var(--line); }
  #items-table th.col-derived { border-left: 1px solid var(--line-strong); }
  #items-table th[data-sort] { cursor: pointer; user-select: none; }
  #items-table th[data-sort]:hover { color: var(--ink); }
  #items-table th .caret { color: var(--accent-ink); }
  tr.is-est .cell-in[data-f="name"] { font-style: italic; }
  #items-table tr[draggable="true"] { cursor: grab; }
  #items-table tr.is-dragging { opacity: .35; }
  #items-table td.c-name { white-space: nowrap; }
  #items-table .grip {
    display: inline-block; width: 12px; color: var(--muted); font-size: 12px;
    vertical-align: middle; cursor: grab; user-select: none;
  }
  #items-table .grip + .cell-in { width: calc(100% - 16px); display: inline-block; vertical-align: middle; }
  @media (max-width: 760px) { #items-table .grip { display: none; } #items-table .grip + .cell-in { width: 100%; } }
  #items-table tr.drop-into td { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft) !important; }
  #items-table .g-row { display: flex; align-items: center; gap: 10px; }
  #items-table .g-name {
    font: inherit; font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase;
    color: var(--ink-2); background: transparent; border: 1px solid transparent; border-radius: 4px;
    padding: 2px 5px; width: 190px; min-width: 0;
  }
  #items-table .g-name:hover { border-color: var(--line-strong); background: var(--surface); }
  #items-table .g-name:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 2px var(--accent-soft); }
  #items-table .g-meta { flex: 1; font-size: 11px; letter-spacing: 0; text-transform: none; }
  #items-table .g-del { opacity: 0; transition: opacity .12s; }
  #items-table tr.row-sec:hover .g-del, #items-table .g-del:focus-visible { opacity: 1; }
  #items-table tr.row-new td {
    color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
    border: 1px dashed var(--line-strong); border-radius: 6px; text-align: center; cursor: pointer; padding: 9px 10px;
  }
  #items-table tr.row-new:hover td { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
  #items-table tr.is-empty-group td { opacity: .72; }
  tr.is-ended { opacity: .5; }

  .btn {
    font: inherit; font-size: 13px; cursor: pointer; background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 12px;
  }
  .btn:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent-ink); }
  .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
  :root[data-theme="dark"] .btn.primary { color: #04181C; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #04181C; } }
  .btn.icon { padding: 4px 8px; font-family: var(--font-mono); color: var(--muted); }
  .btn.icon:hover { color: var(--neg); border-color: var(--neg); }
  .btn.sm { font-size: 12px; padding: 4px 9px; }
  .card-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
  .card-foot .spacer { flex: 1; }
  .undo-bar { display: none; align-items: center; gap: 10px; padding: 9px 16px; background: var(--warn-soft); color: var(--ink); font-size: 13px; border-top: 1px solid var(--line); }
  .undo-bar.on { display: flex; }

  .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); }
  .filters input[type="search"] {
    font: inherit; font-size: 13px; background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 9px; width: 190px;
  }
  .chip-btn {
    font: inherit; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; cursor: pointer;
    background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 11px;
  }
  .chip-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
  .chip-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

  /* what-if */
  .whatif { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 16px; }
  .whatif .field input { width: 118px; }
  .whatif .field input.wide { width: 168px; }
  .verdict { padding: 0 16px 16px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
  .verdict .v-head { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .verdict .v-line { font-size: 15px; }
  .verdict b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

  /* bars + notes + checks */
  .bars { display: grid; grid-template-columns: minmax(110px, auto) 1fr minmax(78px, auto); gap: 7px 12px; align-items: center; padding: 14px 16px 16px; }
  .bars .b-label { font-size: 13px; color: var(--ink-2); }
  .bars .b-track { height: 10px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
  .bars .b-fill { height: 100%; background: var(--accent); border-radius: 0 3px 3px 0; }
  .bars .b-fill.inc { background: var(--pos); }
  .bars .b-val { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }

  .orders { display: flex; flex-direction: column; }
  .order {
    display: grid; grid-template-columns: 132px 1fr auto; gap: 4px 16px; align-items: center;
    padding: 13px 16px; border-bottom: 1px solid var(--line);
  }
  .order:last-child { border-bottom: none; }
  .order .o-amt {
    font-family: var(--font-mono); font-size: 22px; font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em; color: var(--accent-ink); text-align: right;
  }
  .order .o-name { font-size: 15px; }
  .order .o-when { font-size: 13px; color: var(--ink-2); }
  .order .o-covers { font-size: 12.5px; }
  .order .o-year { font-family: var(--font-mono); font-size: 13px; text-align: right; color: var(--ink-2); white-space: nowrap; }
  @media (max-width: 620px) {
    .order { grid-template-columns: 1fr auto; }
    .order .o-amt { grid-column: 1 / -1; text-align: left; font-size: 26px; }
    .order .o-year { grid-column: 1 / -1; text-align: left; }
  }
  .pot-box { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

  .notes { padding: 6px 16px 18px; display: flex; flex-direction: column; gap: 11px; }
  .note { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
  .note .n-mark { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); padding-top: 3px; letter-spacing: .06em; }
  .note b { color: var(--ink); font-weight: 600; }
  .note code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
  .checks { display: flex; flex-direction: column; }
  .check { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: baseline; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
  .check:last-child { border-bottom: none; }
  .check b { color: var(--ink); font-weight: 600; }
  .sev { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; text-align: center; border: 1px solid; }
  .sev.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
  .sev.info { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
  .sev.ok { color: var(--pos); border-color: var(--pos); background: var(--pos-soft); }

  dialog {
    border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink);
    box-shadow: var(--shadow); padding: 0; width: min(620px, 92vw);
  }
  dialog::backdrop { background: rgba(6, 14, 17, .55); }
  dialog textarea {
    font-family: var(--font-mono); font-size: 12px; width: 100%; height: 220px; resize: vertical;
    background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  }
  .dlg-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
  .dlg-body p { margin: 0; font-size: 13px; color: var(--ink-2); }

  footer { color: var(--muted); font-size: 12.5px; text-align: center; padding-top: 4px; }

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

  /* ---------- phone: items become cards ---------- */
  @media (max-width: 760px) {
    .wrap { padding: 16px 12px 56px; }
    .kpi .k-value { font-size: 22px; }
    #items-table { min-width: 0; table-layout: auto; }
    #items-table thead { display: none; }
    #items-table, #items-table tbody, #items-table tr, #items-table td { display: block; width: auto; }
    #items-table tr.row-sec { padding: 0; }
    #items-table tr.row-sec td { border-radius: 6px; margin: 12px 10px 2px; }
    #items-table tr[data-id] {
      border: 1px solid var(--line); border-radius: 9px; margin: 10px; padding: 8px 10px 10px;
      display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; background: var(--surface);
    }
    #items-table tr[data-id]:hover td { background: transparent; }
    #items-table tr[data-id] td { border: none; padding: 3px 0; display: grid; grid-template-columns: 68px 1fr; gap: 8px; align-items: center; }
    #items-table tr[data-id] td::before {
      content: attr(data-label); font-family: var(--font-mono); font-size: 9.5px;
      letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
    }
    #items-table tr[data-id] td.c-name, #items-table tr[data-id] td.c-del { grid-column: 1 / -1; }
    #items-table tr[data-id] td.c-name { grid-template-columns: 1fr; }
    #items-table tr[data-id] td.c-name::before { display: none; }
    #items-table tr[data-id] td.c-name .cell-in { font-size: 15px; font-weight: 600; }
    #items-table tr[data-id] td.c-del { justify-items: end; }
    #items-table tr[data-id] td.c-del::before { display: none; }
    #items-table td.col-derived { border-left: none; }
    #items-table tbody td.num { text-align: left; }
  }


/* ---------- utilities (CSP blocks inline style attributes) ---------- */
.ta-right { text-align: right; }
.ta-left { text-align: left; }
.fw-600 { font-weight: 600; }
.ink { color: var(--ink); }
.sel-mode { width: 112px; }
.sel-fund { width: 104px; }
.sel-day { width: 84px; }
.sel-repeat { width: 150px; border-color: var(--line-strong); }
.moves { display: flex; flex-wrap: wrap; gap: 4px 10px; }

/* items grid: measured against the longest real content in each column */
#items-table col:nth-child(1)  { width: 220px; }
#items-table col:nth-child(2)  { width: 118px; }
#items-table col:nth-child(3)  { width: 76px; }
#items-table col:nth-child(4)  { width: 88px; }
#items-table col:nth-child(5)  { width: 96px; }
#items-table col:nth-child(6)  { width: 96px; }
#items-table col:nth-child(7)  { width: 96px; }
#items-table col:nth-child(8)  { width: 92px; }
#items-table col:nth-child(9)  { width: 46px; }
#items-table col:nth-child(10) { width: 63px; }
#items-table col:nth-child(11) { width: 86px; }
#items-table col:nth-child(12) { width: 93px; }
#items-table col:nth-child(13) { width: 28px; }
.ta-center { text-align: center; }
#items-table thead th a { color: inherit; text-decoration: none; }
#items-table thead th a:hover { color: var(--ink); }
.tabs .tab { text-decoration: none; }
.chip-btn { text-decoration: none; }

/* sign-in: a narrow column, and inputs that are not the 130px sheet fields */
.login-wrap { max-width: 420px; }
.login-card { margin-top: 6px; }
.login-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.login-body .field input { width: 100%; }
.login-error {
  margin: 0; padding: 9px 11px; border-radius: 7px; font-size: 13px;
  color: var(--neg); background: var(--neg-soft); border: 1px solid var(--neg);
}
