:root {
  color-scheme: light;
  --canvas: #f7f7f2;
  --surface: #ffffff;
  --ink: #1e3537;
  --muted: #506467;
  --teal: #145e63;
  --teal-dark: #0b454a;
  --tint: #eaf3ef;
  --line: #d4ded9;
  --error: #a02832;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
a { color: var(--teal); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-dark); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.wrap { max-width: 1168px; margin: auto; padding: 0 32px 32px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 98px; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-size: 1.4rem; font-weight: 750; letter-spacing: -.06em; text-decoration: none; line-height: 1.2; max-width: 280px; flex-shrink: 0; }
.brand span { display: block; color: var(--teal); font-weight: 450; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .875rem; text-decoration: none; border-bottom: 2px solid transparent; }
nav a:hover, nav .active { color: var(--teal); }
nav .active { font-weight: 650; border-bottom-color: var(--teal); }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(2rem, 4.6vw, 3.15rem); letter-spacing: -.04em; line-height: 1.12; margin: 42px 0 18px; max-width: 950px; text-wrap: balance; }
h2 { font-size: 1.2rem; line-height: 1.35; letter-spacing: -.025em; font-weight: 650; margin: 0 0 18px; }
h3 { font-size: 1rem; line-height: 1.4; margin: 28px 0 10px; }
p { margin: 0 0 16px; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
.lede { max-width: 780px; color: var(--muted); font-size: 1rem; margin-bottom: 30px; }
.page-intro { margin: 38px 0 32px; }
.page-intro h1 { margin: 10px 0 18px; }
.page-intro .lede { margin-bottom: 0; }
.eyebrow { color: var(--teal); font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.calculator-layout { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 28px; }
.card, .result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-width: 0; }
.card > :last-child, .result > :last-child { margin-bottom: 0; }
.result, .result-panel { background: var(--tint); border-color: #bfd3cb; min-height: 140px; }
.result-panel > .result { padding: 0; border: 0; background: transparent; border-radius: 0; min-height: 0; }
.result-panel > h2 { font-size: .9rem; color: var(--muted); letter-spacing: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; }
/* Shared label/input/error tracks align paired controls as labels and errors wrap. */
.row > .field { display: flex; flex-direction: column; }
.row > .field > label { flex-grow: 1; }
@supports (grid-template-rows: subgrid) {
  .row > .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  .row > .field > label { grid-row: 1; }
  .row > .field > input, .row > .field > select { grid-row: 2; }
  .row > .field > .error { grid-row: 3; }
}
.field { margin-bottom: 23px; min-width: 0; }
label { display: block; font-size: .875rem; font-weight: 650; line-height: 1.5; margin-bottom: 8px; }
input, select { display: block; width: 100%; min-width: 0; min-height: 48px; border: 1px solid #7b918b; background: var(--surface); color: var(--ink); padding: 11px 13px; border-radius: 5px; line-height: 1.5; }
input::placeholder { color: #637771; opacity: 1; }
input[inputmode="decimal"], input[inputmode="numeric"] { font-variant-numeric: tabular-nums; }
select { padding-right: 24px; }
input[type="range"] { padding: 10px 0; accent-color: var(--teal); background: transparent; }
input[type="checkbox"], input[type="radio"] { display: inline-block; width: 20px; height: 20px; min-height: 0; padding: 0; vertical-align: middle; accent-color: var(--teal); }
button { min-height: 48px; background: var(--teal); color: white; border: 1px solid var(--teal); border-radius: 5px; padding: 11px 20px; font-weight: 650; line-height: 1.5; cursor: pointer; }
button:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
button:active { background: #083b3f; }
button:disabled { color: #506467; background: #e3e9e4; border-color: #b6c4bd; cursor: not-allowed; }
input:disabled, select:disabled { opacity: 1; background: #edf1ed; color: var(--muted); border-color: #b6c4bd; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
input:focus-visible, select:focus-visible { outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--error); }
.error { display: block; color: var(--error); font-size: .85rem; margin-top: 7px; }
.error:empty { display: none; }
.sub, .note, .muted { color: var(--muted); font-size: .875rem; line-height: 1.6; }
.field .note, .field .muted { margin: 8px 0 0; font-size: .8125rem; }
form > .note, form > .muted { margin-top: 6px; }
form button[type="submit"] { margin-top: 6px; }
.form-section { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.form-section + .form-section { border-top: 1px solid var(--line); padding-top: 24px; }
.form-section > h2 { font-size: 1rem; margin-bottom: 20px; }
.form-section legend { font-size: 1rem; font-weight: 650; padding: 0 0 18px; }
.section-heading { margin: 26px 0 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.section-heading:first-child { padding-top: 0; margin-top: 0; border: 0; }
.k { font-weight: 650; font-size: .9rem; }
.v { font-size: clamp(2.1rem, 5vw, 3rem); font-weight: 700; letter-spacing: -.05em; line-height: 1.15; margin: 14px 0; }
.result, .v, .pill, dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pill { background: #ffffffb3; border: 1px solid #c4d7cf; border-radius: 4px; padding: 6px 9px; font-size: .8rem; }
dl { margin: 0; }
dt { color: var(--muted); font-size: .875rem; }
dd { margin: 0; font-weight: 650; }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: baseline; gap: 10px 18px; border-top: 1px solid #c4d7cf; padding: 13px 0; }
.result-row dd { text-align: right; font-size: .95rem; }
.result-row--primary { display: block; border-top: 0; padding: 8px 0 24px; }
.result-row--primary dt { color: var(--teal); font-weight: 650; }
.result-row--primary dd { text-align: left; margin-top: 9px; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.2; letter-spacing: -.045em; }
.result-row--refund dt, .result-row--refund dd { color: #24643b; }
.result-row--balance-due dt, .result-row--balance-due dd { color: var(--error); }
.result-panel dl + p { margin-top: 20px; font-size: .8125rem; color: var(--muted); }
dl:not(:has(.result-row)) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); column-gap: 20px; }
dl:not(:has(.result-row)) dt, dl:not(:has(.result-row)) dd { padding: 11px 0; border-bottom: 1px solid #c4d7cf; }
dl:not(:has(.result-row)) dd { text-align: right; }
.content-section { margin-top: 28px; }
.content-section.card { padding: 32px; }
.content-section p, .content-section li { max-width: 78ch; }
.content-section > h2:not(:first-child) { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.content-section > h2:first-child { margin-top: 0; }
.related-tools ul { display: flex; flex-wrap: wrap; list-style: none; gap: 10px 28px; padding: 0; margin: 0; }
.related-tools li { margin: 0; }
.related-tools a { display: inline-block; padding: 9px 0; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
th { font-weight: 650; }
thead th { background: #f0f4f0; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
caption { color: var(--ink); text-align: left; font-weight: 650; line-height: 1.5; padding-bottom: 18px; }
footer { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; color: var(--muted); font-size: .8125rem; }
footer p { margin: 0; }
.skip-link { position: fixed; z-index: 10; top: 10px; left: 16px; padding: 12px 18px; color: white; background: var(--teal); border-radius: 5px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); color: white; }

/* The directory is a compact index; calculator pages use the same quiet surfaces. */
.home-intro { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: center; margin: 48px 0 42px; }
.home-intro h1 { font-size: clamp(2.35rem, 4.5vw, 3.6rem); max-width: 660px; margin: 13px 0 20px; }
.home-intro .lede { max-width: 610px; margin-bottom: 0; }
.quick-start { padding: 7px 0 7px 28px; border-left: 1px solid var(--line); }
.quick-start h2 { margin-bottom: 10px; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.quick-start a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; font-size: .875rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.quick-start a::after { content: "↗"; color: var(--teal); }
.quick-start a:last-child { border-bottom: 0; }
.quick-start a:hover { text-decoration: underline; }
.directory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 26px; margin-bottom: 18px; }
.directory-heading h2 { margin: 0; font-size: 1.125rem; }
#directory-count { font-size: .8125rem; color: var(--muted); margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.directory-controls { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) auto; align-items: end; gap: 18px; margin-bottom: 24px; }
.directory-controls label { font-size: .8125rem; }
.directory-controls input, .directory-controls select { background: var(--surface); }
.directory-controls button { background: transparent; color: var(--teal); border-color: #7b918b; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.directory-controls button:hover { background: var(--tint); }
.tool-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-card { position: relative; padding: 23px 24px; border-radius: 6px; }
.tool-card h2 { font-size: 1.075rem; margin: 12px 0 13px; line-height: 1.4; }
.tool-card h2 a { color: var(--ink); text-decoration: none; }
.tool-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.tool-card p:not(.category-label) { color: var(--muted); font-size: .875rem; line-height: 1.6; margin: 0; }
.tool-card:hover { border-color: #8baaa0; background: #fcfefa; }
.tool-card:hover h2 a { color: var(--teal); text-decoration: underline; }
.tool-card:focus-within { outline: 3px solid var(--teal); outline-offset: 3px; }
.tool-card h2 a:focus-visible { outline: none; text-decoration: underline; }
.category-label { color: var(--teal); font-size: .6875rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin: 0; }
#directory-empty { padding: 28px; border: 1px dashed #7b918b; border-radius: 6px; color: var(--muted); }
.directory-method { margin-top: 28px; max-width: 83ch; }
.directory-method .note { font-size: .8125rem; }
@media (max-width: 980px) {
  .home-intro { gap: 32px; grid-template-columns: minmax(0, 1fr) 250px; }
  .tool-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calculator-layout { gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .card, .result { padding: 24px; }
}
@media (max-width: 900px) {
  .calculator-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 22px 28px; }
  .top { display: block; padding: 22px 0 15px; min-height: 0; }
  .brand { display: inline-block; margin-bottom: 10px; }
  nav { gap: 0 21px; }
  .home-intro { display: block; margin: 32px 0; }
  .home-intro h1 { max-width: 600px; }
  .quick-start { display: none; }
  .page-intro { margin: 30px 0 25px; }
  .grid, .calculator-layout { grid-template-columns: minmax(0, 1fr); }
  .directory-controls { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
  .directory-controls button { justify-self: start; }
  .content-section.card { padding: 26px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 18px 24px; }
  nav { gap: 0 18px; }
  nav a { font-size: .8125rem; }
  .home-intro h1 { font-size: 2.5rem; }
  .home-intro { margin: 28px 0 30px; }
  .home-intro .eyebrow { font-size: .6875rem; }
  .home-intro .lede { font-size: .9375rem; }
  .directory-heading { align-items: flex-start; gap: 14px; padding-top: 22px; }
  .directory-heading h2 { font-size: 1rem; }
  .directory-controls { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 20px; }
  .directory-controls button { padding: 8px 15px; min-height: 44px; }
  .tool-directory { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tool-card { padding: 21px 23px; }
  .tool-card h2 { margin: 8px 0 10px; }
  .card, .result, .content-section.card { padding: 22px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .row > .field { display: block; grid-row: auto; }
  .field { margin-bottom: 22px; }
  .result-row { gap: 10px 14px; }
  .result-row--primary dd { font-size: 2.35rem; }
  .content-section { margin-top: 22px; }
  footer { margin-top: 32px; }
  th, td { padding: 10px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
