  :root {
    --bg: #f7f4ec;
    --panel: #fffdf7;
    --ink: #1c1a15;
    --muted: #6d675a;
    --line: #e4ddcc;
    --accent: #b8860b;
    --accent-soft: #f4b72822;
    --pos: #2f7d4a;
    --neg: #b3402f;
    --field: #ffffff;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #13110d;
      --panel: #1b1914;
      --ink: #efe9dc;
      --muted: #9a927f;
      --line: #2e2a21;
      --accent: #f4b728;
      --accent-soft: #f4b72818;
      --pos: #6fcf8e;
      --neg: #ef7a64;
      --field: #13110d;
    }
  }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 "IBM Plex Sans", system-ui, sans-serif;
  }
  .num, input, td, .big { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
  main { max-width: 980px; margin: 0 auto; padding: 40px 16px 64px; }
  header { margin-bottom: 28px; }
  .eyebrow { color: var(--accent); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
  h1 { font-size: 28px; font-weight: 600; margin: 6px 0 4px; letter-spacing: -.01em; }
  header p { margin: 0; color: var(--muted); }
  .grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
  @media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
  .grid > * { min-width: 0; }
  .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
  .panel h2 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
  .panel h2 + .field { margin-top: 0; }
  .section + .section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
  .field { display: grid; grid-template-columns: 1fr 132px; align-items: center; gap: 10px; margin-top: 10px; }
  .field label { font-size: 14px; }
  .field small { display: block; color: var(--muted); font-size: 12px; }
  input {
    width: 100%; padding: 7px 10px; font-size: 14px; text-align: right;
    background: var(--field); color: var(--ink);
    border: 1px solid var(--line); border-radius: 7px;
  }
  input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
  .live { font-size: 11px; font-weight: 500; color: var(--accent); }
  .live button { all: unset; cursor: pointer; text-decoration: underline; color: var(--accent); }
  .hero { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; margin-bottom: 18px; }
  .hero .label { color: var(--muted); font-size: 13px; }
  .big { font-size: 44px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
  .pos { color: var(--pos); }
  .neg { color: var(--neg); }
  .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
  @media (max-width: 520px) { .kpis { grid-template-columns: 1fr 1fr; } }
  .kpi { background: var(--accent-soft); border-radius: 9px; padding: 10px 12px; }
  .kpi .label { font-size: 12px; color: var(--muted); }
  .kpi .value { font-family: "IBM Plex Mono", monospace; font-size: 16px; margin-top: 2px; }
  .tablewrap { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
  th { text-align: right; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
  td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  th:first-child, td:first-child { text-align: left; font-family: inherit; }
  tr:last-child td { border-bottom: 0; }
  h3.sub { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 26px 0 6px; }
  .ledger td { white-space: normal; }
  .ledger td:first-child { color: var(--muted); }
  .ledger small { color: var(--muted); font-size: 12px; margin-left: 6px; }
  .ledger tr.total td { border-top: 1px solid var(--ink); font-weight: 500; color: var(--ink); }
  .note { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
  .note b { color: var(--ink); font-weight: 500; }
  .status { font-size: 13px; color: var(--muted); margin-top: 14px; }
  .status.err { color: var(--neg); }
  footer { margin-top: 28px; color: var(--muted); font-size: 12px; }
  footer a { color: inherit; }
  nav { display: flex; gap: 18px; margin-bottom: 22px; font-size: 13px; }
  nav a { color: var(--muted); text-decoration: none; }
  nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
