:root {
  color-scheme: dark;
  --bg: #0d1014;
  --surface: #171b21;
  --border: #2a3039;
  --text: #f2f4f6;
  --muted: #9aa4af;
  --accent: #e8c15a;
  --on-accent: #17130a;
  --pos: #62d6a0;
  --neg: #ff8d85;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
main {
  max-width: 520px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}
h1 { margin: 2px 0 16px; font-size: 42px; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
h2 { margin: 0 0 12px; font-size: 18px; }
p { margin: 0; }
small, .muted, .label, label { color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.totals div { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.totals small { display: block; font-size: 12px; margin-bottom: 4px; }
.totals strong { font-size: 14px; overflow-wrap: anywhere; }
section { margin-top: 28px; }
label { display: block; margin: 14px 0 6px; }
input:not([type=checkbox]):not([type=file]) {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #6e7884;
  border-radius: 10px;
  font-size: 17px;
}
button, .file {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 14px 0 0;
  padding: 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented button { margin: 0; }
.segmented [aria-pressed=true] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
#importFile { position: absolute; width: 1px; height: 1px; opacity: 0; }
#importFile:focus-visible + .preview, .file:focus-within { outline: 2px solid var(--accent); }
.message { min-height: 20px; margin-top: 10px; color: var(--pos); font-size: 14px; }
.message.error { color: var(--neg); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
ul { margin: 0; padding: 0; list-style: none; }
li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
li div { min-width: 0; flex: 1; }
li strong { display: block; overflow-wrap: anywhere; }
li > span { font-weight: 600; white-space: nowrap; }
.icon { flex: none; width: 44px; min-height: 44px; margin: 0; padding: 0; font-size: 20px; }
.preview { margin-top: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--accent); border-radius: 10px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 0; color: var(--text); font-size: 15px; border-bottom: 1px solid var(--border); }
.checks input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
