/* Minimal scaffold styles. No framework yet: if Tailwind is adopted later it
   must be precompiled via CLI (cityparity lesson - never the runtime CDN). */
:root {
  --ink: #1a1a1a; --muted: #666; --accent: #b45309; --paper: #faf8f4;
  --line: #e5e0d8; --card: #fff; --neg: #b91c1c; --pos: #15803d;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, sans-serif; color: var(--ink); background: var(--paper); }
main { max-width: 940px; margin: 0 auto; padding: 2rem 1rem 4rem; }

.hero { margin-bottom: 1.25rem; }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; letter-spacing: -.01em; }
.lede { color: var(--muted); max-width: 62ch; margin: 0; }

.banner { background: #fef3c7; border: 1px solid #f59e0b; padding: .5rem .75rem; border-radius: 6px; font-size: .875rem; margin-bottom: 1rem; }
.banner-error { background: #fee2e2; border-color: #ef4444; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem 1rem; margin: 1rem 0 1.5rem; }
label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .15rem; }
input, select { width: 100%; padding: .45rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }

.headline-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.headline { font-size: 1.2rem; font-weight: 600; margin: 0 0 1rem; line-height: 1.35; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .75rem; border-left: 3px solid var(--line); }
.stat-trough { border-left-color: var(--neg); }
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stat-value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-trough .stat-value { color: var(--neg); }
.stat-sub { font-size: .75rem; color: var(--muted); }

.line-items { margin-bottom: 1.5rem; }
.line-items h2 { font-size: .95rem; margin: 0 0 .5rem; }
.line-items ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.line-items li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .85rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.line-items li:last-child { border-bottom: 0; }
.line-items .li-neg { color: var(--neg); font-variant-numeric: tabular-nums; }
.line-items .li-pos { color: var(--pos); font-variant-numeric: tabular-nums; }
.li-scenario { color: var(--muted); font-style: italic; }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .9rem; }
th, td { text-align: right; padding: .35rem .6rem; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
td.neg { color: var(--neg); }
td.pos { color: var(--pos); }
tr.is-trough { background: #fdf1f1; }
tr.is-trough td { font-weight: 600; }

.actions { margin-top: 1.25rem; }
button { font: inherit; font-weight: 600; padding: .5rem 1rem; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 6px; cursor: pointer; }
button:hover { filter: brightness(1.05); }

.note { color: var(--muted); font-size: .8rem; max-width: 68ch; }
[x-cloak] { display: none; }
