:root {
  color-scheme: light;
  --base: #eff2ec;
  --surface: #fbfcf8;
  --ink: #162b24;
  --muted: #4e635b;
  --border: #d5dfd7;
  --accent: #005b46;
  --soft: #dcece0;
  --amber: #774b00;
  font-family: ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--base); color: var(--ink); }
a { color: inherit; }
button, input, select { font: inherit; }
button, .button {
  background: var(--surface); color: var(--ink); border: 1px solid var(--border);
  border-radius: 12px; min-height: 44px; padding: 9px 14px; cursor: pointer;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #408f75; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .7; }
.primary { background: var(--accent); color: white; border-color: var(--accent); }
.danger { color: #8d2f35; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.frame { max-width: 720px; margin: auto; padding-inline: 18px; }
.top-inner { min-height: 61px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { text-decoration: none; font-weight: 760; font-size: 1.09rem; letter-spacing: -.04em; }
.mode-label, .tag { font-weight: 650; font-size: .78rem; border-radius: 2rem; background: var(--soft); padding: 4px 10px; }
main { padding-block: 16px 105px; }
#feedback:empty { display: none; }
#feedback { background: #fff3d6; color: #603900; border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; }
.welcome, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 18px; margin-bottom: 14px; }
.welcome { margin-top: min(12vh, 90px); padding: clamp(20px, 6vw, 44px); }
.welcome h1 { font-size: clamp(2.6rem, 10vw, 4.4rem); max-width: 10ch; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.045em; }
h1 { font-size: clamp(2rem, 7vw, 3.1rem); margin-bottom: 8px; }
h2 { font-size: 1.35rem; margin-bottom: 6px; }
h3 { font-size: 1rem; }
p { margin-block: 6px; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 18px; }
.heading > .tag { flex: 0 0 auto; }
.quiet, small { color: var(--muted); font-size: .88rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions > * { flex: 0 1 auto; }
.hero { background: #163d31; color: #f5fff6; border-color: #163d31; }
.hero .quiet { color: #b9d8c9; }
.money { font-weight: 700; font-size: clamp(2.15rem, 8vw, 3.5rem); letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 15px; }
.metric { min-width: 0; padding: 9px 8px; border-radius: 10px; background: var(--base); text-align: center; }
.metric strong { display: block; font-size: clamp(.85rem, 3.5vw, 1.12rem); white-space: nowrap; }
.chart { width: 100%; display: block; margin-block: 9px; }
.bar { fill: #487a61; }
.axis { fill: var(--muted); font: 10px system-ui; text-anchor: middle; }
.grid { stroke: #d3ded4; stroke-width: 1; }
.route-line { stroke: #26765e; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; fill: none; }
.track { stroke: #a8cfc0; stroke-width: 4; stroke-dasharray: 1 4; stroke-linecap: round; fill: none; }
.map-grid { stroke: #d6e1d4; stroke-width: .5; }
.map-bg { fill: #edf2e8; }
.map-dot { fill: #fba94d; stroke: #173e34; stroke-width: 1.3; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 11px; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row .tag { display: inline-block; margin-top: 4px; }
.estimated, .missing { color: var(--amber); background: #fff3d6; }
.formrow { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .91rem; font-weight: 600; }
input, select { background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px; padding: 8px; max-width: 100%; min-height: 44px; }
input[type=range] { width: 100%; padding: 0; accent-color: var(--accent); }
.tabs { position: fixed; bottom: 0; inset-inline: 0; padding: 8px 10px max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px 18px 0 0; }
.tabs button { border-color: transparent; border-radius: 10px; padding-inline: 2px; font-size: .89rem; }
.tabs [aria-current] { background: var(--soft); color: var(--accent); font-weight: 740; }
dialog { color: var(--ink); background: var(--surface); width: min(94vw, 540px); max-height: 91dvh; border: 1px solid var(--border); border-radius: 20px; padding: 15px; }
dialog::backdrop { background: #16352db8; }
dialog header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
@media (max-width: 365px) { .panel { padding: 13px; } .frame { padding-inline: 12px; } .metric { padding-inline: 4px; } }
