:root {
  color-scheme: light;
  --paper: #f7f6f0;
  --surface: #fffefa;
  --ink: #172824;
  --muted: #495d55;
  --rule: #d0d9d1;
  --field-rule: #a7b6ab;
  --forest: #153a31;
  --forest-rule: #719587;
  --receipt-text: #f3f7f1;
  --receipt-muted: #c9e1d6;
  --link: #195745;
  --focus: #956020;
  --error: #9f3027;
  --selected: #e8f1e9;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --receipt-strong: #e8f3ee;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.6 var(--font-body);
}
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .12em; }
a:active { text-decoration-thickness: .16em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.shell { width: min(100% - 3rem, 68rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-row, .footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.header-row { min-height: 3.5rem; }
.wordmark { color: var(--ink); font-weight: 750; text-decoration: none; white-space: nowrap; }
.header-row nav a, .site-footer nav a { font-size: .875rem; white-space: nowrap; }
.header-row nav { column-gap: 1.25rem; }
.header-row nav a {
  font-size: .9375rem;
  font-weight: 550;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.header-row nav a:hover { border-bottom-color: var(--link); }
.header-row a, .site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-main { padding-block: 2rem 4rem; }
.site-footer {
  padding-block: 1.5rem 2rem;
  color: var(--muted);
  font-size: .875rem;
  border-top: 1px solid var(--rule);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.site-footer p { margin: .5rem 0 0; }
.site-footer .footer-calculators { align-items: center; margin-top: .25rem; }
.footer-calculators span { font-weight: 700; color: var(--ink); margin-right: .25rem; }
.header-row nav { display: flex; flex-wrap: wrap; column-gap: 1rem; }
#calculators { scroll-margin-top: 1rem; }

h1, h2, h3 { margin: 0; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
h1, h2 { font-family: var(--font-heading); font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.03em; font-weight: 600; }
h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); letter-spacing: -.015em; }
h3 { font-size: 1rem; }
.tool-heading { margin-bottom: 1.5rem; }
.tool-heading p { margin: .5rem 0 0; color: var(--muted); }

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.calculator-form, .receipt { padding: clamp(1rem, 3vw, 2rem); min-width: 0; }
.calculator-form fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.form-field { min-width: 0; }
.form-field label { display: block; margin-bottom: .25rem; font-size: .875rem; font-weight: 700; }
.form-field small { display: block; color: var(--muted); margin-top: .25rem; font-size: .8125rem; }
.rate-details { margin-top: .5rem; font-size: .8125rem; }
.rate-details summary { min-height: 44px; color: var(--link); }
.rate-details p { margin: 0 0 .5rem; color: var(--muted); overflow-wrap: anywhere; }
.form-field input, .form-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--field-rule);
  border-radius: var(--radius);
  background: #fcfcfa;
  color: var(--ink);
  padding: .5rem .75rem;
  font: inherit;
}
.form-field select { cursor: pointer; }
.form-field input:hover, .form-field select:hover { border-color: var(--ink); }
.form-field input:active, .form-field select:active { border-color: var(--link); }
.form-field :disabled { color: var(--muted); cursor: default; }
.form-field input[aria-invalid="true"] { border-color: var(--error); }
.money-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.platform-field + .money-grid, .platform-options:not(:empty) { margin-top: 1rem; }
.platform-options > * + * { margin-top: .75rem; }
.money-input { position: relative; }
.money-input span { position: absolute; inset: 50% auto auto .75rem; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.money-input input { padding-left: 1.75rem; font-variant-numeric: tabular-nums; }
.order-options { margin-top: .75rem; border-top: 1px solid var(--rule); }
.order-options .money-grid { padding-bottom: .25rem; }
summary { cursor: pointer; padding-block: .625rem; font-weight: 700; }
summary:hover { color: var(--link); }
summary:active { text-decoration: underline; }
.order-options summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  color: var(--ink);
  font-size: .875rem;
  min-height: 44px;
  margin-top: .5rem;
  padding: .5rem .875rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.order-options summary::-webkit-details-marker { display: none; }
.order-options summary::after { content: "+"; font-size: 1rem; color: var(--link); font-weight: 600; }
.order-options[open] summary::after { content: "–"; }
.order-options summary:hover { color: var(--ink); background: var(--selected); border-color: var(--field-rule); }
.field-error { color: var(--error); font-size: .875rem; margin: .5rem 0 0; }
.field-error:empty { margin: 0; }
.calculator-form noscript p { font-size: .875rem; margin: .75rem 0 0; }

.receipt {
  color: var(--receipt-text);
  background: var(--forest);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.receipt h2 {
  font-family: var(--font-body);
  font-size: .875rem;
  letter-spacing: 0;
  font-weight: 650;
  color: var(--receipt-muted);
}
.receipt-amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .125rem .5rem;
  margin: .125rem 0 .875rem;
}
.receipt-amount output {
  font-size: clamp(2rem, 5.3vw, 3.5rem);
  line-height: 1.1;
  font-weight: 720;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  overflow-wrap: anywhere;
}
.receipt-amount span { color: var(--receipt-muted); font-size: .8125rem; }
.receipt-lines { margin: 0; font-size: .875rem; }
.receipt-lines:empty { display: none; }
.receipt-lines div {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding-block: .1875rem;
}
.receipt-lines dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt-lines .receipt-total {
  border-top: 1px dashed var(--forest-rule);
  padding-top: .5rem;
  margin-top: .375rem;
  font-weight: 700;
}
.rate-source, .rate-note { font-size: .875rem; color: var(--receipt-muted); }
.rate-note { color: var(--receipt-strong); }
.rate-source { display: flex; flex-wrap: wrap; gap: .125rem .875rem; margin: .875rem 0 0; }
.rate-source a { color: var(--receipt-text); }
.rate-source a:focus-visible { outline-color: var(--receipt-text); }
.rate-note { margin: .375rem 0 0; }

.guide { margin-top: clamp(2rem, 6vw, 4rem); }
.prose { max-width: 68ch; }
.prose :is(p, ul, ol) { margin: .75rem 0 0; }
.prose h2:not(:first-child), .comparison, .faq { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.25rem; }
.prose li + li { margin-top: .375rem; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 1.125rem; margin-top: .5rem; line-height: 1.65; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: .375rem;
  height: .375rem;
  border-radius: 50%;
  background: var(--forest-rule);
}
.prose a { overflow-wrap: anywhere; }
.document { min-height: 45vh; }
.breadcrumbs ol {
  padding: 0;
  margin: 0 0 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  color: var(--muted);
  font-size: .875rem;
}
.breadcrumbs li + li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .5rem; }
.comparison { max-width: 53rem; scroll-margin-top: 1rem; }
.comparison p { margin: .5rem 0 0; max-width: 68ch; }
.comparison .comparison-order { margin: .875rem 0 .5rem; font-size: .875rem; font-weight: 650; }
.comparison table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
}
.comparison th, .comparison td {
  padding: .625rem .875rem;
  border-bottom: 1px solid var(--rule);
  text-align: right;
  overflow-wrap: anywhere;
}
.comparison th:first-child { text-align: left; }
.comparison thead th { font-size: .875rem; color: var(--muted); }
.comparison tbody th { font-weight: 550; }
.comparison .selected-row { background: var(--selected); font-weight: 700; }
.comparison .comparison-note { font-size: .875rem; color: var(--muted); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq h2 { margin-bottom: .5rem; }
.faq details p { margin: 0 0 .875rem; }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  z-index: 1;
  inset: .5rem auto auto .5rem;
  background: var(--surface);
  padding: .5rem .75rem;
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 2rem); }
  .site-main { padding-top: 1.25rem; }
  .header-row { column-gap: .625rem; row-gap: 0; }
  .wordmark { font-size: .875rem; }
  .header-row nav a { font-size: .8125rem; }
  .tool-heading { margin-bottom: 1rem; }
  h1 { font-size: clamp(1.625rem, 7.5vw, 2rem); letter-spacing: -.025em; }
  h2 { font-size: clamp(1.25rem, 5vw, 1.5rem); }
  .tool-heading p { font-size: .9375rem; line-height: 1.45; max-width: 34ch; }
  .calculator { grid-template-columns: minmax(0, 1fr); }
  .receipt { border-radius: 0 0 var(--radius) var(--radius); }
  .comparison th, .comparison td { padding-inline: .5rem; font-size: .875rem; }
  .footer-row { row-gap: 0; }
}



/* --- 2026-11-28 refinement pass (round 2) --- */
.header-row nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.tool-heading h1, h1 { text-wrap: balance; }
.comparison table { width: 100%; max-width: 48rem; margin-inline: auto; border-collapse: collapse; }
.comparison table thead th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 600;
}
.comparison table th, .comparison table td {
  padding: .65rem .5rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.comparison table tbody th { font-weight: 600; }
.comparison table tbody tr:last-child th,
.comparison table tbody tr:last-child td { border-bottom: 0; }
.comparison-order {
  display: inline-block;
  margin: .25rem 0 .75rem;
  padding: .375rem .75rem;
  border-radius: 999px;
  background: var(--selected);
  color: var(--muted);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}
.faq details {
  margin-top: .625rem;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq summary::marker { color: var(--link); }
.faq details p { margin: .625rem 0 0; color: var(--muted); }
.guide .prose h2 { margin-top: 2.5rem; }
.guide .prose p:last-child, .guide .prose ul:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .tool-heading h1, h1 { font-size: 1.6875rem; line-height: 1.22; }
  .tool-heading p { font-size: .9375rem; line-height: 1.5; }
  .header-row nav a { font-size: .875rem; }
  .comparison table th, .comparison table td { padding: .55rem .25rem; font-size: .875rem; }
}
@media (min-width: 641px) {
  .guide .prose p, .guide .prose li { max-width: 68ch; }
}


/* Design pass 2026-11-29: receipt scanability, mobile header, details affordance */
.receipt-lines > div{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:baseline;font-variant-numeric:tabular-nums}
.receipt-lines > div + div{margin-top:8px}
.receipt-lines dt,.receipt-lines dd{margin:0;font-size:.98rem;line-height:1.5}
.receipt-lines dd{text-align:right;font-weight:500}
.receipt-lines .receipt-total{margin-top:12px;padding-top:12px;border-top:1px solid rgba(127,127,127,.35)}
.receipt-lines .receipt-total dt,.receipt-lines .receipt-total dd{font-size:1.05rem;font-weight:700}
.receipt{margin-top:16px;border-radius:14px}
.rate-source{display:flex;gap:8px;flex-wrap:wrap;align-items:baseline;margin-top:14px}
.tool-heading p{max-width:68ch;line-height:1.65}
.prose p{max-width:68ch}
.prose h2{margin-top:2.2rem}
.prose h3{margin-top:1.6rem}
.order-options{margin-top:4px}
.order-options summary{cursor:pointer;padding:10px 2px;font-weight:600}
.order-options summary:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:4px}
.order-options summary::marker{font-size:.9em}
.site-header{padding-block:12px}
.site-header nav{display:flex;gap:18px;flex-wrap:wrap;font-size:.95rem}
@media (max-width:640px){
  .site-header{padding-block:10px}
  .site-header .header-row{gap:6px}
  .site-header nav{gap:14px;font-size:.9rem}
  .tool-heading h1{font-size:1.7rem;line-height:1.15;letter-spacing:-0.02em}
  .tool-heading p{font-size:.95rem;line-height:1.6;margin-top:6px}
  .receipt{margin-top:20px;border-radius:16px}
  .prose h2{font-size:1.15rem;margin-top:1.8rem}
}


/* Design pass 2 2026-11-29: prose measure, mobile header row, accordion affordance */
.prose{max-width:720px}
.prose > p,.prose > ul,.prose > ol{max-width:720px}
.order-options summary:hover{background:rgba(0,0,0,.035);border-radius:6px}
.order-options details[open] summary{background:rgba(0,0,0,.035);border-radius:6px}
.rate-source{color:var(--text,inherit)}
@media (max-width:640px){
  .site-header .header-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:10px}
  .site-header nav{gap:10px;font-size:.82rem;flex-wrap:nowrap}
  .receipt{position:sticky;bottom:12px;z-index:3;box-shadow:0 10px 26px rgba(0,0,0,.18)}
}


/* Design pass 3 2026-11-29: keep the receipt in flow on phones (it was covering the inputs), right-align nav on mobile */
@media (max-width:640px){
  .receipt{position:static;box-shadow:none;margin-top:20px}
  .site-header nav{margin-left:auto;justify-content:flex-end}
}


/* Design pass 4 2026-11-29: one input per row on phones */
@media (max-width:640px){
  .money-grid{grid-template-columns:1fr;gap:12px}
  .order-options .money-grid{margin-top:8px}
  .receipt-amount{font-size:2.1rem}
}


[data-pair] .receipt .comparison {
  margin-bottom: 1rem;
}
[data-pair] .receipt .comparison h2 {
  font-size: 1.125rem;
  color: var(--receipt-text);
}
[data-pair] .receipt .comparison p {
  color: var(--receipt-muted);
  font-size: .875rem;
}
[data-pair] .receipt .comparison .comparison-order {
  display: block;
  padding: 0;
  background: transparent;
}
[data-pair] .receipt .comparison table {
  color: var(--receipt-text);
  background: transparent;
}
[data-pair] .receipt .comparison thead th {
  color: var(--receipt-muted);
}
[data-pair] .receipt .comparison th,
[data-pair] .receipt .comparison td {
  border-color: var(--forest-rule);
}
[data-pair] .receipt .comparison td {
  white-space: nowrap;
}
[data-pair] .receipt .comparison a {
  color: inherit;
}
[data-pair] .receipt .comparison .selected-row {
  background: transparent;
}


.comparison-links a,
.side-by-side-links a {
  display: inline-block;
}
