* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  --background: #0b0b0d;
  --surface: #101013;
  --raised: #161619;
  --field: #19191d;
  --line: #2a2a30;
  --text: #f5f5f7;
  --muted: #aaaab3;
  --accent: #d9e2ff;
  --action: #f6f6f8;
  --on-action: #17171b;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
body { margin: 0; background: var(--background); color: var(--text); font: 15px/1.55 var(--sans); }
:where(h1, h2, h3, h4, p, figure, dl, dd) { margin: 0; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(2.65rem, 5.4vw, 5rem); font-weight: 560; letter-spacing: -.062em; text-wrap: balance; }
h2 { font-size: clamp(1.55rem, 3vw, 2.65rem); font-weight: 590; text-wrap: balance; }
h3 { font-size: 1.125rem; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
input, select { accent-color: var(--accent); }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { opacity: .52; cursor: not-allowed; }
fieldset { border: 0; margin: 0; min-inline-size: 0; padding: 0; }
legend { padding: 0; }
summary { cursor: pointer; }
summary::marker { color: var(--accent); }
code { font-family: var(--mono); overflow-wrap: anywhere; }
section[id], form[id], div[id] { scroll-margin-top: 1rem; }
.sr-only, .visually-hidden, .skip-link:not(:focus), .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus, .skip:focus { position: fixed; z-index: 5; top: .5rem; left: .5rem; padding: .65rem 1rem; background: var(--action); color: var(--on-action); }
.shell, .wrap { width: min(100% - clamp(2rem, 8vw, 9rem), 1240px); margin-inline: auto; }
.topbar, .masthead, .nav-shell { min-height: 66px; display: flex; align-items: center; gap: clamp(1.1rem, 4vw, 3.5rem); }
.topbar nav, .masthead nav, .nav-shell nav { flex: 1; display: flex; align-items: center; gap: clamp(.7rem, 2vw, 1.65rem); }
.topbar nav a, .masthead nav a, .nav-shell nav a { color: var(--muted); font-size: .82rem; text-decoration: none; white-space: nowrap; }
.topbar nav a:hover, .masthead nav a:hover, .nav-shell nav a:hover { color: var(--text); }
.wordmark, .brand { display: inline-flex; align-items: center; gap: .48rem; color: var(--text); text-decoration: none; font-size: 1.12rem; font-weight: 660; letter-spacing: -.04em; white-space: nowrap; }
.wordmark img, .brand img { width: 25px; height: 25px; border-radius: 6px; }
button, .action, .button, .pro-action {
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
  border-radius: 8px;
  padding: .5rem .78rem;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.3;
}
button:hover:not(:disabled), .action:hover, .button:hover, .pro-action:hover { border-color: var(--muted); }
button[aria-pressed="true"] { background: var(--field); border-color: var(--accent); color: var(--text); }
.hero-cta, .nav-cta, .pro-action { display: inline-flex; width: fit-content; align-items: center; justify-content: center; gap: .55em; text-decoration: none; }
.hero-cta, .pro-action, :is(.topbar, .masthead, .nav-shell) nav .nav-cta { background: var(--action); color: var(--on-action); border: 1px solid transparent; border-radius: 999px; }
.hero-cta { padding: .65rem 1rem; font-size: .85rem; font-weight: 640; }
:is(.topbar, .masthead, .nav-shell) nav .nav-cta { margin-inline-start: auto; padding: .46rem .72rem; font-size: .77rem; font-weight: 640; }
.hero-cta:hover, .pro-action:hover, :is(.topbar, .masthead, .nav-shell) nav .nav-cta:hover { background: var(--accent); color: var(--on-action); }
.pro-action { padding-inline: .9rem; text-align: center; }
.budgethub-hint { flex-basis: 100%; width: 0; color: var(--muted); font-size: .8rem; }
#save-budgethub:not([href]) + .budgethub-hint { display: none; }
input:not([type="checkbox"], [type="range"]), select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: .52rem .63rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  color: var(--text);
  font-size: .88rem;
}
input[type="range"] { display: block; width: 100%; margin-inline: 0; }
input::placeholder { color: var(--muted); }
label { color: var(--text); font-size: .83rem; font-weight: 570; }
small { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .8rem clamp(.75rem, 2vw, 1.4rem); text-align: right; }
th:first-child { text-align: left; }
thead { background: var(--raised); color: var(--muted); font-size: .77rem; }
tbody tr { border-top: 1px solid var(--line); }
tbody th, tbody td { font-size: .84rem; }
tbody td { font-family: var(--mono); }
.table-wrap, .table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
:is(.table-wrap, .table-scroll):focus-visible { outline-offset: -2px; }
footer { margin-top: clamp(3rem, 7vw, 6rem); padding-block: 2.1rem; border-top: 1px solid var(--line); }
footer h2 { font-size: 1.12rem; }
footer ul { list-style: none; padding: 0; margin: 1rem 0 1.25rem; display: flex; flex-wrap: wrap; gap: .65rem 1.3rem; }
footer a, footer p { color: var(--muted); font-size: .8rem; }
.footer-inner { padding-top: .9rem; border-top: 1px solid var(--line); }

@media (max-width: 620px) {
  .topbar, .masthead, .nav-shell { min-height: 54px; gap: .65rem 1rem; flex-wrap: wrap; padding-block: .62rem; }
  .topbar nav, .masthead nav, .nav-shell nav { gap: .8rem; justify-content: flex-end; }
  :is(.topbar, .masthead, .nav-shell) nav .nav-cta { display: none; }
}
@media (max-width: 360px) {
  .topbar nav, .masthead nav, .nav-shell nav { gap: .6rem; }
}

:root { --accent: #d0dbff; }
.site-header { border-bottom: 1px solid #ffffff10; }
.masthead nav { position: relative; justify-content: center; padding-inline-end: 8.6rem; }
.masthead nav .nav-cta { position: absolute; right: 0; }
.intro { padding: clamp(3.65rem, 8vw, 7rem) 0 clamp(2.6rem, 5vw, 4.9rem); text-align: center; }
.intro h1 { margin: clamp(.85rem, 2.5vw, 1.8rem) auto 0; }
.eyebrow { font-size: .8rem; font-weight: 620; color: var(--muted); letter-spacing: 0; }
.intro .eyebrow { display: inline-flex; align-items: center; gap: .48rem; color: #d2d3d9; }
.status-dot { width: .4rem; height: .4rem; background: var(--accent); border-radius: 100%; }
.intro-lede { max-width: 53ch; margin: 1rem auto 0; color: var(--muted); font-size: clamp(.96rem, 1.35vw, 1.1rem); text-wrap: pretty; }
.hero-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .75rem 1.1rem; margin-top: 1.4rem; }
.hero-actions > a:not(.hero-cta) { font-size: .84rem; text-decoration: none; }
.hero-budgethub { margin-top: .65rem; }
.hero-budgethub a {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  max-width: 100%;
  min-height: 44px;
  padding: .4rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  font-size: .85rem;
  font-weight: 600;
}

.calculator {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: .48rem;
  background: linear-gradient(140deg, #222329, #141417 39%);
  box-shadow: 0 24px 56px #0008;
}
.calculator::before { content: ""; position: absolute; z-index: -1; inset: -15px -15px 42%; border: 1px solid #26272c; border-radius: 30px 30px 0 0; mask-image: linear-gradient(#000, transparent 68%); pointer-events: none; }
.section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1.1rem; }
.section-heading > p { color: var(--muted); }
.workspace-heading { padding: .68rem clamp(.65rem, 2vw, 1.3rem) .9rem; align-items: center; }
.workspace-heading h2 { font-size: 1.25rem; }
.jump-result { color: var(--muted); text-decoration: none; font-size: .78rem; }
.jump-result strong { margin-inline: .2rem; color: var(--accent); }
.rate-sheet { padding: .85rem clamp(.75rem, 2vw, 1.45rem) 1rem; background: #121215; border: 1px solid var(--line); border-radius: 12px; }
.rate-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem .75rem; align-items: center; margin-bottom: .65rem; }
.rate-heading h2 { font-size: .84rem; }
.rate-heading a { font-size: .76rem; }
.rate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.rate-grid > div, .key-totals > div { padding: .55rem .72rem; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; }
.rate-grid dt, .key-totals dt { font-size: .75rem; color: var(--muted); }
.rate-grid dd { font: .72rem var(--mono); color: var(--muted); margin-top: .26rem; }
.rate-grid dd span { font: 650 1.15rem var(--sans); color: var(--text); letter-spacing: -.035em; }
.preset-bar { padding: .85rem clamp(.6rem, 2vw, 1.3rem); display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.1rem; }
.presets, .export-actions { display: flex; flex-wrap: wrap; gap: .43rem; }
.presets button { min-height: 36px; }
.workspace { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); gap: .5rem; }
.input-panel, .result-panel { padding: clamp(1rem, 2.4vw, 1.8rem); min-width: 0; border: 1px solid var(--line); border-radius: 12px; }
.input-panel { background: #111114; }
.input-panel legend, .runway h4 { font-size: .98rem; font-weight: 640; }
.run-fields, .override-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .68rem; margin-block: .65rem .4rem; }
.run-fields label, .override-fields label { display: grid; align-content: start; gap: .24rem; }
.balance-field { grid-column: 1 / -1; }
.balance-field small { display: inline; font-weight: 400; }
.quantity { display: flex; min-width: 0; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--field); }
.quantity input { border: 0; background: transparent; }
.quantity > span { padding-inline: .54rem; color: var(--muted); font: .7rem var(--mono); }
.field-note { color: var(--muted); font-size: .78rem; margin-top: .55rem; }
.enrichment, .overrides { margin-top: 1rem; }
.contact-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .24rem .5rem; margin-top: .4rem; }
.check-label, .hit-label { display: flex; align-items: center; gap: .43rem; }
.check-label input { margin: 0; width: 16px; height: 16px; }
.hit-label { color: var(--muted); font-size: .75rem; }
.hit-label .quantity { width: 6rem; }
.overrides { border-top: 1px solid var(--line); padding-top: .75rem; }
.overrides summary { font-size: .88rem; }
.rate-mode { color: var(--muted); font-size: .73rem; margin-left: .35rem; }
.text-button { margin-top: .45rem; }
.result-panel { background: radial-gradient(ellipse at top right, #252735, transparent 72%), #17171b; }
.result-topline { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.currency-tag { padding: .18rem .4rem; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: .72rem var(--mono); }
.run-total { font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 580; line-height: 1.1; letter-spacing: -.065em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.line-items { margin-top: .75rem; }
.line-items > div, .runway dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .5rem; border-bottom: 1px solid var(--line); padding: .38rem 0; font-size: .84rem; }
.line-items small { margin-inline-start: .2rem; }
.result-panel dd { font-family: var(--mono); overflow-wrap: anywhere; }
.key-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-top: .85rem; }
.key-totals dd { margin-top: .25rem; font-size: 1.08rem; color: var(--accent); }
.runway { padding: .74rem .85rem; border: 1px solid #373744; background: #111115; border-radius: 8px; margin-top: .7rem; }
.runway p { color: var(--muted); margin-top: .3rem; font-size: .79rem; }
.export-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; padding: .78rem clamp(.4rem, 1.8vw, 1.25rem) .44rem; }
.export-bar > p { color: var(--muted); font-size: .76rem; }
.export-bar .export-error { position: static; width: auto; height: auto; clip-path: none; overflow: visible; white-space: normal; }
.no-script, .empty-panel { padding: .85rem; color: var(--muted); }
.projection, .reference { margin-top: clamp(2.7rem, 7vw, 5.5rem); }
.projection .table-scroll { margin-top: 1.25rem; }
.projection table { min-width: 38rem; }
.current-scale { background: #20232f; }
.current-scale th { box-shadow: inset 3px 0 #9aaaf0; }
.projection tbody td:nth-child(5) { color: var(--accent); }
.scroll-note { display: none; }
.reference { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: 1.5rem 4rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.reference p { color: var(--muted); margin-top: .45rem; }
.source-links { padding: 0; list-style: none; }
.source-links li, .questions details { padding-block: .45rem; }
.questions details { border-bottom: 1px solid var(--line); }
.questions summary { font-weight: 600; }

@media (max-width: 760px) {
  .workspace, .reference { grid-template-columns: minmax(0, 1fr); }
  .rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scroll-note { display: block; font-size: .76rem; }
}
@media (max-width: 620px) {
  .masthead nav { position: static; justify-content: flex-end; padding-inline-end: 0; }
  .intro { padding-top: 3.2rem; }
  .calculator::before { inset: -7px -6px 42%; border-radius: 24px 24px 0 0; }
}
