/* RevAnalytic: white paper, black ink, editorial serif numbers. Private-bank restraint.
   One elevated surface per page: the result. Everything else sits flat on white. */

@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/assets/fonts/newsreader-latin-opsz-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/assets/fonts/newsreader-latin-ext-opsz-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/geist-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/assets/fonts/geist-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #ffffff;
  --ink: #121212;
  --graphite: #5c5f66;
  --faint: #8b8e95;
  --hair: #e8e6e2;
  --mist: #f6f5f2;
  --emerald: #0f5a44;
  --gold: #b0905a;
  --gain: #17734a;
  --loss: #a3392b;
  --focus: #0f5a44;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 66ch;
  --r-lg: 16px;
  --r-md: 10px;
  --lift: 0 1px 2px rgba(18, 18, 18, 0.04), 0 18px 40px -18px rgba(18, 18, 18, 0.16);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: var(--hair); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color 0.15s; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
table, input, output, .stats dd, .amt { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* ---------- Header ---------- */
.site-head { border-bottom: 1px solid var(--hair); background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(8px); position: sticky; top: 0; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; min-height: 72px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 26px; font-weight: 450; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; line-height: 1; }
.brand b { font-weight: 450; }
.brand span { color: var(--gold); font-weight: 450; }
.nav { display: flex; gap: 4px 26px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--graphite); font-size: 14.5px; font-weight: 450; padding: 6px 0; position: relative; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--ink); }
.nav a[aria-current='page']::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); }
@media (max-width: 560px) { .site-head { position: static; } .site-head .wrap { padding-top: 14px; padding-bottom: 10px; } .nav { gap: 4px 20px; } }

/* ---------- Type ---------- */
h1, h2, h3 { color: var(--ink); }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 58px); line-height: 1.04; letter-spacing: -0.025em; margin: 0 0 18px; max-width: 18ch; font-variation-settings: 'opsz' 72; }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -0.015em; margin: 72px 0 14px; font-variation-settings: 'opsz' 48; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 17px; line-height: 1.35; margin: 32px 0 8px; letter-spacing: -0.005em; }
p { margin: 0 0 16px; }
strong { font-weight: 600; }
.lede { font-size: 19px; line-height: 1.6; color: var(--graphite); max-width: 58ch; margin-bottom: 36px; }
.prose { max-width: var(--measure); }
.prose li { margin-bottom: 8px; }
.prose blockquote { margin: 24px 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--gold); color: var(--graphite); }
.small { font-size: 13.5px; color: var(--faint); line-height: 1.55; }
.crumbs { font-size: 13.5px; color: var(--faint); margin: 36px 0 18px; }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
main { padding-bottom: 96px; }
.page-head { padding: 0 0 4px; }
.byline { font-size: 14px; color: var(--faint); margin: -4px 0 36px; }
article.prose h1 { max-width: 22ch; font-size: clamp(32px, 4.4vw, 50px); }
article.prose > p:first-of-type + p { font-size: 18px; }

/* ---------- Calculator ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; margin: 4px 0 56px; }
@media (max-width: 880px) { .calc { grid-template-columns: 1fr; gap: 20px; } }
.inputs { background: var(--mist); border-radius: var(--r-lg); padding: 28px; }
@media (max-width: 520px) { .inputs { padding: 20px 18px; } }
.inputs fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.inputs fieldset + fieldset { border-top: 1px solid var(--hair); padding-top: 22px; margin-top: 6px; }
.inputs legend { font-family: var(--serif); font-weight: 450; font-size: 20px; padding: 0; margin-bottom: 16px; color: var(--ink); }
.field { margin-bottom: 18px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 7px; }
.field label .hint { color: var(--faint); font-size: 12.5px; font-weight: 400; }
.field input[type='number'], .field select {
  width: 100%; font: inherit; font-size: 17px; font-weight: 500; color: var(--ink); background: var(--paper);
  border: 1px solid var(--hair); border-radius: var(--r-md); padding: 11px 14px; min-height: 48px;
  transition: border-color 0.15s, box-shadow 0.15s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235c5f66' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field input[type='number'] { -moz-appearance: textfield; }
.field input[type='number']::-webkit-inner-spin-button, .field input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type='number']:hover, .field select:hover { border-color: #d5d2cc; }
.field input[type='number']:focus, .field select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 4px rgba(18, 18, 18, 0.06); }
.field .words { font-size: 12.5px; color: var(--faint); margin-top: 6px; min-height: 1.2em; }

/* Range slider */
.field input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 10px 0 0; cursor: pointer; }
.field input[type='range']::-webkit-slider-runnable-track { height: 2px; background: #cfcbc3; border-radius: 2px; }
.field input[type='range']::-moz-range-track { height: 2px; background: #cfcbc3; border-radius: 2px; }
.field input[type='range']::-moz-range-progress { height: 2px; background: var(--ink); }
.field input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); margin-top: -8px; box-shadow: 0 1px 3px rgba(18, 18, 18, 0.15); }
.field input[type='range']::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }

/* Segmented control */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--hair); border-radius: 999px; }
.seg label { padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--graphite); cursor: pointer; margin: 0; display: block; border-radius: 999px; transition: background 0.15s, color 0.15s; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--ink); color: var(--paper); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
details.more { margin-top: 4px; }
details.more summary { cursor: pointer; color: var(--graphite); font-size: 14px; font-weight: 500; padding: 6px 0 14px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+'; display: inline-block; width: 18px; color: var(--ink); }
details.more[open] summary::before { content: '\2212'; }

/* ---------- Result: the one elevated surface ---------- */
.result { position: sticky; top: 96px; background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-lg); box-shadow: var(--lift); padding: 30px 30px 24px; }
@media (max-width: 880px) { .result { position: static; } }
@media (max-width: 520px) { .result { padding: 22px 20px 18px; } }
.result .label { font-size: 14px; color: var(--graphite); margin: 0 0 10px; }
.big {
  display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 6.4vw, 72px); line-height: 1;
  letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; font-variation-settings: 'opsz' 72;
  padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--gold); word-break: break-word;
}
.big-words { font-size: 15px; color: var(--graphite); margin: 0 0 22px; }
.verdict { font-size: 15.5px; line-height: 1.55; margin: 0 0 18px; color: var(--ink); }
.verdict strong { color: var(--emerald); }
.stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--hair); }
.stats div { padding: 14px 0 12px; border-bottom: 1px solid var(--hair); }
.stats div:nth-child(odd) { padding-right: 16px; }
.stats div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--hair); }
.stats div:nth-last-child(-n+2) { border-bottom: 0; }
.stats dt { font-size: 12.5px; color: var(--faint); }
.stats dd { margin: 3px 0 0; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }

/* Bars */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 128px; margin: 22px 0 8px; border-bottom: 1px solid var(--hair); }
.bars span { flex: 1; background: #ebe4d6; position: relative; min-height: 1px; border-radius: 2px 2px 0 0; }
.bars span i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ink); border-radius: 2px 2px 0 0; }
.bars-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--faint); }
.bars-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--ink); vertical-align: 0; }
.bars-legend span.soft::before { background: #ebe4d6; }

/* Tax compare */
.compare { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--hair); border-radius: var(--r-md); overflow: hidden; margin-bottom: 18px; }
.compare > div { padding: 14px 16px; position: relative; }
.compare > div + div { border-left: 1px solid var(--hair); }
.compare .win { background: #f3f8f5; }
.compare .win .ch::after { content: 'Lower'; margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--emerald); background: #e2efe8; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; }
.compare .ch { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--graphite); }
.compare .amt { font-family: var(--serif); font-size: 28px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 20px 0 32px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 13px 16px 13px 0; border-bottom: 1px solid var(--hair); white-space: nowrap; }
th:last-child, td:last-child { padding-right: 0; }
th { font-weight: 500; color: var(--faint); font-size: 13px; border-bottom-color: var(--ink); }
td.r, th.r { text-align: right; }
td.r + td, th.r + th { padding-left: 16px; }
tbody tr:hover td { background: var(--mist); }
caption { caption-side: bottom; text-align: left; padding: 12px 0 0 !important; font-size: 13px !important; color: var(--faint); white-space: normal; }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding: 72px 0 40px; }
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 24px; } }
.hero h1 { font-size: clamp(42px, 6vw, 76px); max-width: 12ch; }
.sentence { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 27px); line-height: 1.7; margin: 0 0 22px; font-variation-settings: 'opsz' 36; letter-spacing: -0.01em; }
.sentence select, .sentence input {
  font: inherit; color: var(--ink); background: transparent; border: 0;
  border-bottom: 1px solid var(--gold); padding: 0 2px; border-radius: 0; width: auto; appearance: none; -webkit-appearance: none; cursor: pointer;
}
.sentence select { padding-right: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23b0905a' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 2px center; }
.nowrap { white-space: nowrap; }
.sentence input { width: 2.7ch; text-align: center; -moz-appearance: textfield; }
.sentence input::-webkit-inner-spin-button, .sentence input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sentence select:focus, .sentence input:focus { outline: none; border-bottom: 2px solid var(--ink); }

/* Rate strip */
.ticker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--hair); margin: 40px 0 10px; }
.ticker > * { padding: 22px 20px 20px 0; text-decoration: none; color: var(--ink); }
.ticker > * + * { padding-left: 20px; border-left: 1px solid var(--hair); }
a.ticker-item:hover .v, .ticker a:hover .v { color: var(--emerald); }
.ticker .v { font-family: var(--serif); font-size: clamp(32px, 3.6vw, 44px); font-weight: 400; display: block; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: lining-nums; transition: color 0.15s; }
.ticker .k { font-size: 13px; color: var(--graphite); display: block; margin-top: 6px; }
@media (max-width: 760px) {
  .ticker { grid-template-columns: 1fr 1fr; }
  .ticker > :nth-child(3) { border-left: 0; padding-left: 0; }
  .ticker > :nth-child(n+3) { border-top: 1px solid var(--hair); }
}

/* Tool list */
.tools { list-style: none; padding: 0; margin: 12px 0 0; border-top: 1px solid var(--ink); }
.tools li { border-bottom: 1px solid var(--hair); }
.tools a { display: grid; grid-template-columns: minmax(0, 20rem) 1fr auto; align-items: baseline; gap: 6px 32px; padding: 24px 0; text-decoration: none; color: var(--ink); }
.tools a::after { content: ''; width: 9px; height: 9px; border-top: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); transform: rotate(45deg); align-self: center; transition: transform 0.2s, border-color 0.2s; }
.tools a:hover::after { border-color: var(--ink); transform: translateX(3px) rotate(45deg); }
.tools b { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -0.015em; line-height: 1.2; font-variation-settings: 'opsz' 36; }
.tools span { color: var(--graphite); font-size: 15.5px; }
@media (max-width: 680px) { .tools a { grid-template-columns: 1fr auto; } .tools span { grid-column: 1; } .tools a::after { grid-row: 1 / span 2; grid-column: 2; } }

/* Article list */
.articles { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.articles li { padding: 26px 0; border-bottom: 1px solid var(--hair); }
.articles a { font-family: var(--serif); font-size: clamp(21px, 2.2vw, 25px); font-weight: 400; line-height: 1.25; letter-spacing: -0.012em; text-decoration: none; color: var(--ink); display: block; max-width: 40ch; font-variation-settings: 'opsz' 36; }
.articles a:hover { color: var(--emerald); }
.articles p { margin: 8px 0 0; color: var(--graphite); font-size: 15px; max-width: 70ch; }
.articles p.small { color: var(--faint); font-size: 13px; }
.more-link { display: inline-block; margin-top: 22px; font-size: 14.5px; font-weight: 500; }

/* Goal index */
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 32px; }
.goal-grid h2 { grid-column: 1 / -1; font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 48px 0 8px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.goal-grid a { display: block; padding: 12px 0; border-bottom: 1px solid var(--hair); text-decoration: none; font-size: 15px; }
.goal-grid a:hover { color: var(--emerald); }

.note { border-left: 2px solid var(--gold); padding: 4px 0 4px 20px; margin: 28px 0; font-size: 15px; color: var(--graphite); max-width: var(--measure); }
.updated { display: block; font-size: 13.5px; color: var(--graphite); margin-bottom: 22px; }
.updated::before { content: ''; display: inline-block; vertical-align: 1px; margin-right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--gain); box-shadow: 0 0 0 3px #e2efe8; flex: none; }
.updated b { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.site-foot { background: var(--mist); padding: 56px 0 64px; font-size: 14px; color: var(--graphite); }
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr; gap: 24px; } }
.site-foot strong { font-family: var(--serif); font-weight: 450; font-size: 22px; color: var(--ink); letter-spacing: -0.02em; }
.site-foot a { color: var(--graphite); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 9px; }
.site-foot p { max-width: 52ch; }

@media (prefers-reduced-motion: no-preference) {
  .big { transition: opacity 0.25s ease; }
  .big.flash { opacity: 0.55; }
}
@media print { .site-head, .site-foot, .inputs { display: none; } .calc { display: block; } .result { box-shadow: none; } }
