:root {
  --bg: #f4f6f8; --card: #fff; --ink: #1b2430; --muted: #5d6b7a; --line: #dde3ea;
  --accent: #0f766e; --accent-soft: #d9f1ee; --warn: #b45309; --warn-soft: #fef3c7; --bad: #b91c1c;
  --old: #6d28d9; --new: #0f766e; --good: #15803d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
code { background: #eef1f5; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 28px; background: #0b3b3a; color: #fff; }
.top h1 { margin: 0; font-size: 22px; letter-spacing: .3px; }
.top p { margin: 2px 0 0; color: #b6d9d6; }
.actions { display: flex; gap: 8px; }
button { font: inherit; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 6px 14px; border-radius: 6px; }
button:hover { filter: brightness(1.1); }
button.ghost { background: transparent; color: inherit; border-color: currentColor; }
.top button.ghost { color: #fff; }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; padding: 20px 28px; align-items: start; }
aside, main { min-width: 0; }
aside details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
aside summary { padding: 10px 14px; font-weight: 600; cursor: pointer; }
aside .fields { padding: 0 14px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
aside label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; }
aside label.wide { grid-column: 1 / -1; }
aside label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }
input, select { font: inherit; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); width: 100%; }
input[type=checkbox] { width: auto; }
nav#tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
nav#tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 8px 14px; margin-bottom: -2px; }
nav#tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.card .k { color: var(--muted); font-size: 12px; }
.card .v { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.card .s { color: var(--muted); font-size: 12px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; overflow-x: auto; }
.box h2, .box h3 { margin: 0 0 8px; font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
tr.sub td { color: var(--muted); }
td.pos { color: var(--good); } td.neg { color: var(--bad); }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pill.old { background: #ede9fe; color: var(--old); }
.notice { background: var(--warn-soft); border: 1px solid #f3d27a; color: #78350f; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.win { background: var(--accent-soft); border: 1px solid #9fd6cf; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
ul.changes { margin: 6px 0 0; padding-left: 18px; }
ul.changes li { margin-bottom: 6px; }
.disclaimer { color: var(--muted); font-size: 12px; margin-top: 24px; }
svg text { font: 11px system-ui, sans-serif; fill: var(--ink); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; padding: 12px; } .grid2 { grid-template-columns: 1fr; } .top { padding: 14px 12px; } }
@media print {
  body { background: #fff; }
  .top, aside, nav#tabs, .toolbar, .disclaimer button { display: none !important; }
  .layout { display: block; padding: 0; }
  .box, .card { break-inside: avoid; border-color: #bbb; }
  .disclaimer { display: block; }
}
