:root { color-scheme: dark; --bg: #0d1320; --card: #161f2f; --field: #111928; --edge: #2b3a52; --text: #f3f6fb; --muted: #aebed6; --ok: #58d5ae; --bad: #ffbf6b; --link: #b1d0ff; font: 15px/1.5 system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
main { max-width: 1360px; margin: auto; padding: 28px clamp(16px, 3vw, 42px); }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(23px, 4vw, 32px); letter-spacing: -.03em; }
h1 span { display: block; font-size: .55em; color: var(--muted); letter-spacing: 0; font-weight: 550; }
h2 { font-size: 18px; margin-bottom: 12px; }
h3 { font-size: 14px; margin: 18px 0 4px; }
a { color: var(--link); }
form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; border: 1px solid var(--edge); padding: 14px; background: var(--card); }
label { font-size: 13px; color: var(--muted); }
select, button { display: block; min-height: 38px; padding: 6px 10px; font: inherit; border-radius: 3px; }
select { margin-top: 4px; min-width: 104px; border: 1px solid var(--edge); background: var(--field); color: var(--text); }
button { cursor: pointer; border: 1px solid transparent; background: var(--link); color: #152236; font-weight: 650; }
button.secondary { background: transparent; color: var(--link); border-color: var(--edge); }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }
#status { color: var(--muted); min-height: 24px; margin: 10px 0; }
#totals, .columns { display: grid; gap: 12px; margin-bottom: 12px; }
#totals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.columns { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card, .total { border: 1px solid var(--edge); background: var(--card); padding: 16px 18px; min-width: 0; }
.total span, .total small, #legend, footer { color: var(--muted); }
.total strong { display: block; font-size: clamp(20px, 3vw, 34px); line-height: 1.25; font-variant-numeric: tabular-nums; }
.total small { display: block; margin-top: 5px; }
#insights p { margin: 0 0 10px; }
#insights p:last-child { margin-bottom: 0; }
#legend { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.dot.bad { margin-left: 8px; background: var(--bad); }
canvas { display: block; width: 100%; height: 210px; margin: 10px 0; }
details { font-size: 13px; }
summary { cursor: pointer; color: var(--link); }
table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 6px; border-bottom: 1px solid var(--edge); text-align: right; }
th:first-child, td:first-child { text-align: left; }
td:first-child { overflow-wrap: anywhere; }
th { color: var(--muted); font-weight: 600; }
footer { font-size: 13px; }
#logout { border: 0; padding: 0; background: none; }
.login { max-width: 530px; margin: clamp(32px, 13vh, 140px) auto 0; padding: 24px; }
.login h1 { margin-bottom: 14px; }
.login p { margin: 8px 0 14px; color: var(--muted); }
.login code { display: block; width: fit-content; padding: 7px 12px; margin: 9px 0; border: 1px solid var(--edge); color: var(--text); font: 24px ui-monospace, monospace; letter-spacing: .13em; }
.login a { margin-right: 12px; }
@media (max-width: 820px) { .columns { grid-template-columns: 1fr; } #totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .card, .total { padding: 12px; } form { gap: 9px; } }
