:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  --page: #070a12;
  --glass: rgba(10, 16, 30, 0.18);
  --control: rgba(6, 12, 24, 0.32);
  --top: rgba(5, 10, 22, 0.58);
  --line: rgba(152, 196, 232, 0.18);
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --success: #34d399;
  --warning: #fbbf24;
  --error: #e39198;
  --text: #eaf0fb;
  --muted: #94a6c4;
  --radius: 8px;
  --shell: min(1232px, 100% - 64px);
  background: var(--page);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  isolation: isolate;
  font-size: 1rem;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(7, 10, 18, .16), rgba(7, 10, 18, .16)),
    url("/assets/console-bg.jpg") center / cover no-repeat;
}
h1, h2, h3, p, dl { margin: 0; }
h1 { font-size: clamp(1.9rem, 4.1vw, 3.5rem); font-weight: 730; line-height: 1.06; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.17rem, 2vw, 1.45rem); line-height: 1.2; font-weight: 665; }
h3 { font-size: 1.04rem; font-weight: 660; }
p + p, h3 + p, h2 + p { margin-top: .55rem; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #a5f3fc; }
a, button, summary, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
button, input, select { font: inherit; color: inherit; min-width: 0; }
button, .button, select, .input-shell, .share-controls input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control);
}
button, .button { min-width: 44px; cursor: pointer; padding: .53rem .8rem; font-weight: 630; }
button:hover, .button:hover, .button[aria-current="true"] { color: var(--cyan); border-color: var(--cyan); }
.button { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.skip-link { position: absolute; left: 8px; top: 8px; padding: 12px; z-index: 3; background: var(--page); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.topbar { background: var(--top); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.topbar-inner { width: var(--shell); margin: auto; min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 710; white-space: nowrap; }
.brand-icon { display: inline-grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; color: var(--cyan); border-radius: 6px; border: 1px solid rgba(34, 211, 238, .38); background: rgba(34, 211, 238, .07); font-weight: 720; }
.topbar nav { display: flex; gap: clamp(.15rem, 2vw, 1.1rem); min-width: 0; }
.topbar nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding-inline: .38rem; color: var(--muted); font-size: .9rem; font-weight: 625; text-decoration: none; white-space: nowrap; border-bottom: 1px solid transparent; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--cyan); border-color: var(--cyan); }
main, .footer-inner { width: var(--shell); margin-inline: auto; }
main { padding-block: 26px 54px; }
.clarifier { display: flex; align-items: flex-start; gap: 11px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--top); color: var(--muted); font-size: .88rem; }
.clarifier strong { color: var(--text); }
.status-dot { width: 8px; height: 8px; flex: 0 0 8px; margin-top: .47rem; border-radius: 4px; background: var(--cyan); box-shadow: 0 0 12px rgba(34, 211, 238, .45); }
.page-title { margin: 22px 0 23px; }
.page-title > p:last-child { margin-top: .72rem; color: var(--muted); font-size: clamp(.95rem, 1.6vw, 1.05rem); max-width: 57rem; }
.eyebrow, .tag { color: var(--cyan); font-size: .75rem; font-weight: 710; line-height: 1.35; letter-spacing: .065em; text-transform: uppercase; }
.page-title .eyebrow { margin-bottom: 8px; }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: 5px; padding: .28rem .48rem; white-space: nowrap; }
.muted, .input-intro, .field small { color: var(--muted); }
[data-tone="success"] { color: var(--success) !important; }
[data-tone="warning"] { color: var(--warning) !important; }
[data-tone="error"], input:user-invalid { color: var(--error); }
.workspace, .tool-grid { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.workspace { grid-template-areas: "inputs result" "inputs breakdown"; grid-template-rows: auto 1fr; }
.inputs { grid-area: inputs; }
.result-top { grid-area: result; }
.result-detail { grid-area: breakdown; }
.panel { min-width: 0; padding: clamp(15px, 2vw, 25px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(13px); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.section-heading .eyebrow { margin-bottom: .24rem; }
.quiet { color: var(--muted); background: transparent; }
.input-intro { margin: .48rem 0 1rem; font-size: .9rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 12px 14px; }
.wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; align-self: start; font-size: .88rem; }
.field > label:first-child, .field > span:first-child { color: var(--text); font-weight: 620; line-height: 1.3; }
.field small { font-size: .77rem; line-height: 1.39; }
.field-value { min-height: 44px; display: flex; align-items: center; color: var(--cyan); font-size: 1rem; }
.input-shell { display: flex; gap: 7px; align-items: center; padding-left: .62rem; }
.input-shell > span { color: var(--muted); user-select: none; }
.input-shell input { width: 100%; min-height: 44px; border: 0; border-radius: var(--radius); padding: .43rem .62rem .43rem 0; background: transparent; font-size: 1rem; }
.input-shell input:first-child { padding-left: .62rem; }
.input-shell:focus-within { border-color: var(--cyan); }
select { width: 100%; padding-inline: .65rem; font-size: 1rem; }
option { background: #0c1426; }
.check { display: flex; align-items: center; min-height: 44px; gap: 9px; font-size: .88rem; line-height: 1.3; cursor: pointer; }
.check input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--cyan); }
details { min-width: 0; }
summary { min-height: 44px; padding: .59rem 0; cursor: pointer; color: var(--text); font-weight: 640; }
summary::marker { color: var(--cyan); }
.form-group { border-top: 1px solid var(--line); margin-top: 12px; }
.group-body { padding: .25rem 0 .5rem; }
.settlement { padding: .78rem 0 .86rem; border-bottom: 1px solid var(--line); }
.settlement .eyebrow { color: var(--muted); }
.result-number { margin-top: .14rem; line-height: 1; font-size: clamp(2.05rem, 5vw, 3.5rem); font-weight: 740; overflow-wrap: anywhere; }
.take-home { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: .5rem; margin-top: .7rem; }
.take-home dt { font-size: .78rem; color: var(--muted); }
.take-home dd { margin: 0; font-size: clamp(.9rem, 1.6vw, 1.16rem); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.metrics { display: grid; gap: .12rem; margin: .68rem 0; }
.metrics > div { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); align-items: baseline; gap: .6rem; padding-block: .35rem; border-bottom: 1px solid var(--line); }
.metrics dt, .metrics dd { font-size: .88rem; overflow-wrap: anywhere; }
.metrics dt { color: var(--muted); }
.metrics dd { margin: 0; text-align: right; font-weight: 655; }
.metrics.compact { margin-top: 0; }
.waterfall, .share { margin-top: 14px; border-top: 1px solid var(--line); }
.waterfall { padding-top: 12px; }
.waterfall .muted, .band-detail { font-size: .86rem; }
.bracket-scale { display: flex; min-height: 15px; margin-top: 10px; border-radius: 4px; overflow: hidden; background: var(--control); }
.band { flex-basis: 0; min-width: 0; background: var(--band); opacity: .82; cursor: pointer; }
.band + .band { border-left: 1px solid var(--page); }
.band-active { opacity: 1; box-shadow: inset 0 -3px rgba(255, 255, 255, .6); }
.band-10 { --band: #22d3ee; }
.band-12 { --band: #39bbed; }
.band-22 { --band: #648df3; }
.band-24 { --band: #8b5cf6; }
.band-32 { --band: #ad7af6; }
.band-35 { --band: #c296ef; }
.band-37 { --band: #e2a9fc; }
.empty-bar { padding-inline: 7px; color: var(--muted); font-size: .78rem; }
.bracket-keys { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 4px; margin-block: 8px; }
.band-key { padding: 0; font-size: .79rem; border-top: 2px solid var(--band); }
.band-key[aria-pressed="true"] { background: rgba(148, 166, 196, .16); color: var(--text); border-color: var(--band); }
.band-detail { min-height: 1.6rem; color: var(--muted); }
.gain-summary { margin: .4rem 0; }
.actions, .share-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.share-controls { flex-wrap: nowrap; }
.share-controls input { width: 100%; padding: .45rem .58rem; }
.share-controls button { flex: 0 0 auto; }
.share p { font-size: .86rem; color: var(--muted); }
.share #share-status:empty { display: none; }
.comparison { margin-top: 14px; }
.comparison .muted { margin-top: 10px; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; }
th, td { padding: .54rem .45rem; border-bottom: 1px solid var(--line); font-size: .88rem; text-align: right; overflow-wrap: anywhere; vertical-align: top; }
thead th { color: var(--cyan); font-weight: 680; }
th:first-child { text-align: left; }
.comparison-table { margin-top: .7rem; }
.comparison-table th:first-child { width: 38%; }
.delta, .sub-result { margin-top: .65rem; font-weight: 700; font-size: 1.1rem; }
.section-line { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 18px; }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.next-tools .related { margin-top: 12px; }
.related a { min-width: 0; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); min-height: 44px; padding: .67rem .85rem; text-decoration: none; background: var(--glass); }
.related a:hover { border-color: var(--cyan); }
.related small { color: var(--muted); font-size: .86rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details p { color: var(--muted); padding-bottom: .8rem; }
.notice { padding: .7rem 1rem; margin-bottom: .85rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--warning); }
.tool-grid .fields { margin-top: .85rem; }
.tool-grid .section-line { margin-top: 16px; padding-top: 13px; }
.tool-grid .muted { font-size: .9rem; }
.year-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .72rem; margin-block: .85rem; }
.year-metrics > div { display: grid; gap: .12rem; border-bottom: 1px solid var(--line); padding-bottom: .45rem; overflow-wrap: anywhere; }
.year-metrics span, .year-metrics small { color: var(--muted); font-size: .83rem; }
.year-metrics strong { font-size: clamp(1.2rem, 2.45vw, 2.03rem); }
input[type="range"] { accent-color: var(--cyan); min-height: 44px; width: 100%; margin: 0; cursor: pointer; }
#slider-label { color: var(--cyan); float: right; margin-left: .25rem; }
.reading { max-width: 54rem; overflow-wrap: anywhere; }
.reading p, .reading li { color: var(--muted); max-width: 76ch; }
.reading strong { color: var(--text); }
.reading p + h3 { margin-top: 1.05rem; }
.reading li + li { margin-top: .62rem; }
.bracket-table th:first-child { width: 25%; }
.bracket-table table { margin-block: .45rem; }
.bracket-table tfoot { color: var(--cyan); }
.site-footer { border-top: 1px solid var(--line); background: var(--top); padding: 17px 0 26px; }
.footer-inner { color: var(--muted); font-size: .88rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.footer-inner nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.footer-inner p { max-width: 52rem; }
.ad-slot { width: min(100%, 300px); margin: 2rem auto 0; text-align: center; }
.ad-slot-label { font-size: .73rem; color: var(--muted); }
.ad-slot-frame { height: 250px; width: 100%; overflow: hidden; }
@media (max-width: 323px) { .ad-slot { display: none; } }
:target { scroll-margin-top: 14px; }

@media (max-width: 900px) {
  :root { --shell: calc(100% - 36px); }
  .bracket-keys { grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); }
  .workspace, .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace { grid-template-areas: "result" "inputs" "breakdown"; grid-template-rows: auto auto auto; }
}
@media (max-width: 735px) {
  .result-number { font-size: clamp(2rem, 7vw, 3rem); }
  .result-top .take-home { margin-top: .5rem; }
}
@media (max-width: 540px) {
  :root { --shell: calc(100% - 24px); }
  .topbar-inner { flex-wrap: wrap; gap: 0; padding-top: 2px; }
  .topbar nav { width: 100%; justify-content: space-between; gap: 0; }
  .topbar nav a { font-size: .78rem; padding-inline: .22rem; }
  main { padding-top: 12px; }
  .clarifier { padding: 8px 10px; font-size: .78rem; }
  .page-title { margin-block: 14px 15px; }
  .page-title .eyebrow { margin-bottom: 4px; }
  .page-title > p:last-child { margin-top: .4rem; font-size: .9rem; }
  .panel { padding: 13px; }
  .settlement { padding: .53rem 0 .65rem; }
  .fields { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .field { font-size: .79rem; }
  .comparison-table th, .comparison-table td, .bracket-table th, .bracket-table td { font-size: .8rem; padding-inline: .26rem; }
}
@media (max-width: 345px) {
  .topbar nav { flex-wrap: wrap; justify-content: flex-start; }
}
@media print {
  :root { color-scheme: light; --text: #111; --muted: #333; --line: #ddd; --cyan: #15565a; --page: #fff; --glass: #fff; --control: #fff; --shell: 100%; }
  body, .panel { background: #fff; color: #111; backdrop-filter: none; }
  body::before { display: none; }
  .topbar, .site-footer, .no-print, .clarifier, .faq, .next-tools, .ad-slot { display: none !important; }
  [data-tone="success"], [data-tone="warning"] { color: #111 !important; }
  main { padding: 0; }
  .panel { break-inside: avoid; }
}
