[hidden] { display: none !important; }
:root {
  --ink: #12211f; --muted: #5b6b68; --bg: #f6f4ee; --card: #ffffff; --line: #e3dfd3;
  --brand: #0f3d3e; --brand-2: #1f6f6b; --accent: #f2c14e; --good: #1d7a46; --warn: #a15c00; --bad: #b3261e;
  --sp: #2563eb; --bond: #7c3aed; --bill: #0d9488; --ss: #e2541b;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(15,61,62,.07);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand-2); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h3.inline { display: inline; font-size: 1.05rem; }

.site-header { background: var(--brand); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.brand .dot { color: var(--accent); }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--brand); font-size: 1rem; }
.site-header nav a { color: #d5e6e4; text-decoration: none; margin-left: 18px; font-size: .9rem; }
.site-header nav a:hover { color: #fff; }

.hero { padding: 40px 0 28px; background: linear-gradient(180deg, #e9efe9 0%, var(--bg) 100%); }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin: 0 0 12px; max-width: 820px; }
.lede { font-size: 1.1rem; max-width: 760px; color: #2c3d3a; margin: 0 0 20px; }

.privacy-banner { display: flex; gap: 14px; align-items: flex-start; background: #e7f4ec; border: 1px solid #b9e0c8; color: #14462a; padding: 14px 16px; border-radius: var(--radius); max-width: 820px; margin-bottom: 20px; }
.privacy-banner svg { width: 28px; height: 28px; flex: none; fill: var(--good); margin-top: 2px; }

.upload-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; max-width: 820px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed #b7c7c3; border-radius: 12px; padding: 30px 16px; cursor: pointer; text-align: center; transition: .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand-2); background: #f1f8f6; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-icon { font-size: 1.6rem; color: var(--brand-2); }
.dz-title { font-weight: 700; font-size: 1.1rem; }
.dz-sub { color: var(--muted); font-size: .9rem; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-top: 14px; }
.howto { flex: 1 1 260px; font-size: .92rem; }
.howto summary { cursor: pointer; color: var(--brand-2); font-weight: 600; padding: 8px 0; }
.error { margin-top: 12px; background: #fdecea; color: var(--bad); border: 1px solid #f5c2bd; border-radius: 10px; padding: 10px 12px; }

.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 10px 16px; border: 1px solid transparent; cursor: pointer; }
.btn-secondary { background: var(--brand); color: #fff; }
.btn-secondary:hover { background: var(--brand-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }

.results { padding: 28px 0 10px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.results-head h2 { margin: 0; font-size: 1.8rem; }
.eyebrow { margin: 0 0 4px; color: var(--brand-2); font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; }
.warnings { background: #fff6e5; border: 1px solid #f2d7a1; color: #6b4300; border-radius: 10px; padding: 10px 14px; margin: 14px 0; font-size: .9rem; }
.warnings ul { margin: 0; padding-left: 18px; }

.settings { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin: 18px 0; }
.settings > summary { cursor: pointer; font-weight: 700; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 18px; margin-top: 14px; }
.settings label { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--muted); position: relative; }
.settings label.check { flex-direction: row; align-items: flex-start; gap: 8px; grid-column: span 2; color: var(--ink); }
@media (max-width: 560px) { .settings label.check { grid-column: auto; } }
.settings select, .settings input[type=number], .settings input[type=date] { font: inherit; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
.settings .unit { position: absolute; right: 12px; bottom: 9px; color: var(--muted); }
.adv { margin-top: 12px; } .adv summary { cursor: pointer; font-size: .9rem; color: var(--brand-2); }

.headline { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 22px 24px; margin: 6px 0 16px; font-size: clamp(1.05rem, 2.4vw, 1.3rem); line-height: 1.5; }
.headline strong { color: var(--accent); }
.headline .sub { display: block; margin-top: 8px; font-size: .95rem; color: #cfe3e0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border-top: 4px solid var(--line); }
.card .label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.card .value { font-size: 1.65rem; font-weight: 800; margin: 2px 0; letter-spacing: -0.02em; }
.card .note { font-size: .82rem; color: var(--muted); }
.card.sp { border-top-color: var(--sp); } .card.bond { border-top-color: var(--bond); } .card.bill { border-top-color: var(--bill); } .card.ss { border-top-color: var(--ss); } .card.paid { border-top-color: #64748b; }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; min-width: 0; }
.panel h3 { margin: 0 0 6px; font-size: 1.1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel details > summary { cursor: pointer; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 300px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { font: inherit; font-size: .8rem; border: 0; background: #fff; padding: 6px 10px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--brand); color: #fff; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { white-space: normal; vertical-align: bottom; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #faf9f5; position: sticky; top: 0; }
table.data tr.hl td { background: #fff8e6; font-weight: 600; }
table.data.small { font-size: .82rem; }
table.data td.dim { color: #9aa6a3; }
.breakevens { margin-top: 12px; font-size: .92rem; }
.breakevens li { margin: 4px 0; }
.fair ul { padding-left: 18px; margin: 6px 0 0; font-size: .93rem; }
.fair li { margin-bottom: 8px; }
.pos { color: var(--good); } .neg { color: var(--bad); }

.info { padding: 30px 0; border-top: 1px solid var(--line); margin-top: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.steps li, .sources li { margin-bottom: 10px; }
.site-footer { background: #0b2a2b; color: #cfe0dd; padding: 24px 0; font-size: .92rem; }
.site-footer .muted { color: #93aaa6; }
@media (max-width: 560px) {
  .site-header nav { display: none; }
  .hero { padding-top: 26px; }
  .card .value { font-size: 1.4rem; }
  .chart-box { height: 260px; }
}
