/* FenceCalculator.us — "estimate sheet": warm paper, navy ink from the logo, one red accent.
   DM Sans (OFL, self-hosted), tabular figures for every price. Light/dark from prefers-color-scheme. */
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }

:root {
  --brand-navy: #0b2a5b;
  --brand-red: #c8102e;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --sunk: #f3f1ec;
  --tint: #eef2f8;
  --ink: #142033;
  --ink-2: #3c4a60;
  --ink-3: #5d6a7e;
  --line: #e2ded6;
  --line-2: #cfd6e2;
  --navy: #0b2a5b;
  --navy-2: #1d4486;
  --red: #c8102e;
  --green: #17703f;
  --on-navy: #ffffff;
  --focus: #1f6feb;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 2px rgba(20, 32, 51, .05), 0 8px 24px -12px rgba(20, 32, 51, .18);
  --font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand-navy: #2f5fb3;
    --paper: #0b1220;
    --surface: #111b2e;
    --sunk: #0e1727;
    --tint: #142443;
    --ink: #e8eef8;
    --ink-2: #b9c5d8;
    --ink-3: #8d9bb2;
    --line: #22304a;
    --line-2: #2b3b5a;
    --navy: #9cc0ff;
    --navy-2: #c3d8ff;
    --red: #ff6b7f;
    --green: #5fd38f;
    --on-navy: #0b1220;
    --focus: #79a8ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font); font-feature-settings: "tnum" 0; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; caret-color: var(--navy); }
::selection { background: color-mix(in srgb, var(--navy) 22%, transparent); color: inherit; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
html { scrollbar-color: var(--line-2) transparent; }
img, svg { display: block; max-width: 100%; }
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.9rem); font-weight: 750; letter-spacing: -.03em; margin: .35em 0 .45em; }
h2 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.7rem); font-weight: 700; margin: 2.4em 0 .7em; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 1.6em 0 .5em; }
p, ul, ol { margin: 0 0 1em; }
p, li { text-wrap: pretty; }
small { font-size: .82em; }
b, strong { font-weight: 650; }
.num, .t td, .big strong, .pick__price, .mat__price, .vs b { font-variant-numeric: tabular-nums; }
.i { width: 1.1em; height: 1.1em; flex: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: var(--on-navy); padding: 10px 16px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top__in { max-width: 1320px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-navy); }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__name { font-weight: 750; font-size: 1.12rem; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.brand__name span { color: var(--red); }
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--navy); background: var(--tint); }
.menu { display: none; margin-left: auto; align-items: center; gap: 8px; font: 600 .95rem var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
@media (max-width: 1020px) {
  .menu { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; padding: 8px 12px 14px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
}

/* ---------- Layout ---------- */
.layout { max-width: 1320px; margin: 0 auto; padding: 8px 20px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.content { min-width: 0; max-width: 900px; width: 100%; margin: 0 auto; }
.layout--narrow .content { max-width: 760px; }
.rail { display: none; }
@media (min-width: 1240px) {
  .layout:not(.layout--narrow) { grid-template-columns: minmax(0, 1fr) 260px; }
  .layout:not(.layout--narrow) .content { margin: 0; }
  .rail { display: block; position: sticky; top: 88px; align-self: start; padding-top: 24px; }
}
.content > p, .sec > p, .sec > ul, .sec > ol, .legal { max-width: 72ch; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--ink-3); margin-top: 20px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-3); }
.crumbs .i { width: 14px; height: 14px; }
.lead { font-size: 1.13rem; color: var(--ink-2); line-height: 1.55; }
.meta { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-3); margin: -.2em 0 1.4em; flex-wrap: wrap; }
.meta .i { width: 15px; height: 15px; }
.answer { background: var(--tint); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 18px; }
.answer p { margin: 0; max-width: 76ch; }
.note { font-size: .9rem; color: var(--ink-3); }

/* ---------- Calculator ---------- */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); margin: 6px 0 28px; scroll-margin-top: 80px; overflow: clip; }
.calc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.calc__title { margin: 0; font-size: 1.12rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modes { display: inline-flex; background: var(--sunk); border-radius: 12px; padding: 4px; gap: 4px; }
.modes button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--ink-2); font: 600 .92rem var(--font); padding: 8px 14px; border-radius: 9px; cursor: pointer; transition: background .2s var(--ease), color .2s; }
.modes button[aria-selected="true"] { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(20, 32, 51, .14); }
.modes .i { width: 17px; height: 17px; }
.calc__pane { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 780px) { .calc__pane:not(.wiz) { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); } }
.calc__form { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; align-content: start; }
.calc__out { padding: 20px; background: var(--sunk); border-top: 1px solid var(--line); }
@media (min-width: 780px) { .calc__out { border-top: 0; border-left: 1px solid var(--line); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--wide, .seg, .more, .hint--region { grid-column: 1 / -1; }
label, legend { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
input[type="text"], select { width: 100%; height: 46px; font: 500 1rem var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; transition: border-color .15s, box-shadow .15s; font-variant-numeric: tabular-nums; }
input[type="text"]:hover, select:hover { border-color: var(--ink-3); }
input[type="text"]:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
input[aria-invalid="true"] { border-color: var(--red); }
.select { position: relative; }
.select select { appearance: none; padding-right: 36px; cursor: pointer; }
.select__i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-3); width: 18px; height: 18px; }
.affix { position: relative; }
.affix input { padding-right: 52px; }
.affix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; font-size: .92rem; }
.affix--lg input { height: 54px; font-size: 1.35rem; font-weight: 650; }
.hint { font-size: .84rem; color: var(--ink-3); margin: 0; }
.hint--region { margin-top: -8px; }
.err { font-size: .86rem; color: var(--red); margin: 0; font-weight: 550; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 .85rem var(--font); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--navy); color: var(--navy); }
.stepper { display: grid; grid-template-columns: 46px 1fr 46px; }
.stepper input { text-align: center; border-radius: 0; border-left: 0; border-right: 0; }
.stepper__b { font: 600 1.2rem var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); cursor: pointer; }
.stepper__b:first-child { border-radius: 10px 0 0 10px; }
.stepper__b:last-child { border-radius: 0 10px 10px 0; }
.stepper__b:hover { background: var(--sunk); }
.seg { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg legend { margin-bottom: 6px; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg label span { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .93rem; cursor: pointer; background: var(--surface); text-align: center; padding: 0 8px; }
.seg input:checked + span { border-color: var(--navy); background: var(--tint); color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.seg input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.more { border: 1px dashed var(--line-2); border-radius: 12px; padding: 0 14px; }
.more summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 12px 0; font-weight: 600; font-size: .93rem; color: var(--ink-2); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary .i { color: var(--navy); }
.more[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.more__grid, .acre { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 14px; }
.acre .btn, .acre .hint, .checks { grid-column: 1 / -1; }
.checks { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check small { color: var(--ink-3); margin-left: auto; font-variant-numeric: tabular-nums; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); margin: 0; }
@media (max-width: 520px) { .calc__form, .more__grid, .acre { grid-template-columns: 1fr; } .calc__form > * { grid-column: 1 / -1; } }

/* Output */
@media (min-width: 780px) { .calc__out { position: relative; } }
.big { margin: 0 0 14px; display: flex; flex-direction: column; gap: 2px; }
.big__label { font-size: .86rem; font-weight: 650; color: var(--ink-3); text-transform: none; }
.big strong { font-size: clamp(2.3rem, 1.8rem + 2vw, 3.1rem); font-weight: 750; letter-spacing: -.035em; color: var(--navy); line-height: 1.05; }
.big__sub { color: var(--ink-2); font-size: .95rem; }
.vs { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.vs__row { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 10px; font-size: .9rem; margin-bottom: 6px; }
.vs__row span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.vs__row .i { width: 16px; height: 16px; }
.vs__bar { height: 10px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.vs__bar i { display: block; height: 100%; background: var(--navy); border-radius: 99px; transition: width .5s var(--ease); }
.vs__row:first-child .vs__bar i { background: var(--red); }
.vs__note { margin: 4px 0 0; font-size: .86rem; color: var(--ink-3); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs button { font: 600 .9rem var(--font); color: var(--ink-3); background: none; border: 0; border-bottom: 2.5px solid transparent; padding: 9px 10px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--red); }
.assume { padding-left: 18px; font-size: .9rem; color: var(--ink-2); margin: 10px 0; }
.assume li { margin-bottom: 4px; }
.deeper { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--tint); color: var(--navy); text-decoration: none; font-size: .92rem; }
.deeper span { flex: 1; }
.deeper:hover { background: color-mix(in srgb, var(--tint) 70%, var(--navy) 10%); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .9rem var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 13px; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, transform .15s var(--ease); }
.btn:hover { border-color: var(--navy); color: var(--navy); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .i { width: 16px; height: 16px; }
.btn--primary { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.btn--primary:hover { background: var(--navy-2); color: var(--on-navy); }
.btn--quiet { background: transparent; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.toast { margin: 10px 0 0; font-size: .88rem; color: var(--green); font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.t { width: 100%; border-collapse: collapse; font-size: .93rem; }
.t caption { text-align: left; font-weight: 650; font-size: .9rem; color: var(--ink-2); padding: 12px 14px; caption-side: top; border-bottom: 1px solid var(--line); }
.t th, .t td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.t thead th { font-size: .8rem; font-weight: 650; color: var(--ink-3); background: var(--sunk); white-space: nowrap; }
.t tbody th { font-weight: 600; }
.t tbody th small { display: block; font-weight: 400; color: var(--ink-3); }
.t tr:last-child > * { border-bottom: 0; }
.t .num { text-align: right; white-space: nowrap; }
.t .strong { font-weight: 650; color: var(--navy); }
.t--fill tbody tr { cursor: pointer; transition: background .12s; }
.t--fill tbody tr:hover, .t--fill tbody tr:focus-visible { background: var(--tint); }
.t--fill tbody tr:focus-visible { outline-offset: -2px; }
.t--result { font-size: .9rem; background: transparent; }
.t--result th, .t--result td { padding: 8px 2px; }
.t--result th { font-weight: 500; color: var(--ink-2); }
.t--result .total th, .t--result .total td { font-weight: 700; color: var(--ink); border-top: 1.5px solid var(--ink); }
.t--bom thead th { background: transparent; padding: 8px 2px; }
.t--matrix td { white-space: nowrap; }

/* Wizard */
.wiz { padding: 20px; }
.wiz__progress { display: flex; align-items: center; gap: 12px; font-size: .85rem; font-weight: 650; color: var(--ink-3); margin-bottom: 14px; }
.wiz__track { flex: 1; height: 6px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.wiz__track i { display: block; height: 100%; background: var(--navy); border-radius: 99px; transition: width .45s var(--ease); }
.wiz__step { border: 0; padding: 0; margin: 0; }
.wiz__step legend { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin-bottom: 14px; padding: 0; letter-spacing: -.01em; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; }
.opt span { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; font-weight: 600; font-size: .96rem; color: var(--ink); cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.opt span .i { color: var(--navy); width: 20px; height: 20px; }
.opt span:hover { border-color: var(--navy); }
.opt input:checked + span { border-color: var(--navy); background: var(--tint); box-shadow: inset 0 0 0 1px var(--navy); }
.opt input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.wiz__step .field { max-width: 240px; }
.wiz__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.wiz__nav [data-wiz="next"] { margin-left: auto; }
.wiz__h { font-size: 1.25rem; margin: 0 0 4px; }
.wiz__h:focus { outline: none; }
.wiz__sum { color: var(--ink-3); font-size: .9rem; }
.picks { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 12px; }
.pick { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.pick--top { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.pick__head { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 12px; }
.pick__rank { grid-column: 1 / -1; margin: 0; font-size: .78rem; font-weight: 700; color: var(--red); }
.pick h4 { font-size: 1.15rem; margin: 2px 0 6px; }
.pick__match { margin: 0; color: var(--ink-3); font-size: .9rem; }
.pick__match b { font-size: 1.15rem; color: var(--navy); }
.pick__price { margin: 0 0 6px; }
.pick__why { color: var(--green); font-size: .88rem; font-weight: 600; margin-bottom: 10px; }
.pick__a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.calc--wizard .wiz { padding-top: 16px; }

/* Content blocks */
.sec { scroll-margin-top: 84px; }
.sec h2 { scroll-margin-top: 84px; }
.mats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; border-top: 1px solid var(--line); margin-bottom: 14px; }
.mat { padding: 16px 0 18px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.mat h3 { margin: 0 0 4px; font-size: 1.12rem; }
.mat h3 span { font-weight: 500; color: var(--ink-3); font-size: .9rem; }
.mat__price { font-size: .93rem; color: var(--ink-2); margin-bottom: 6px; }
.mat__price b { color: var(--navy); }
.mat p { margin-bottom: 8px; }
.mat__go, .more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; color: var(--navy-2); }
.mat__go .i, .more-link .i { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.mat__go:hover .i, .more-link:hover .i { transform: translateX(3px); }
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 16px; }
.pc__h { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.pc__col ul, ul.pc__col { list-style: none; padding: 0; margin: 0; }
.pc__col li { position: relative; padding-left: 18px; margin-bottom: 6px; font-size: .95rem; }
.pc__col li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 2px; }
.pc__col--pro .pc__h, .pc__col--pro .pc__h .i { color: var(--green); }
.pc__col--con .pc__h, .pc__col--con .pc__h .i { color: var(--red); }
.pc__col--pro li::before { background: var(--green); }
.pc__col--con li::before { background: var(--red); }
.pc--sm li { font-size: .88rem; }
@media (max-width: 560px) { .pc { grid-template-columns: 1fr; } }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: .7em; padding-left: .3em; }
.steps li::marker { color: var(--red); font-weight: 700; }

/* FAQ */
.faq { margin-top: 2.4em; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; padding: 14px 0; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item h3 { margin: 0; font-size: 1.04rem; font-weight: 650; }
.faq__i { color: var(--ink-3); transition: transform .25s var(--ease); }
.faq__item[open] .faq__i { transform: rotate(180deg); }
.faq__a { padding: 0 0 14px; color: var(--ink-2); max-width: 72ch; }
.faq__a p:last-child { margin: 0; }

/* Share, hub, sources */
.share { margin: 3em 0 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share__t { font-size: 1rem; margin: 0 0 10px; }
.share__list { display: flex; flex-wrap: wrap; gap: 8px; }
.share__a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-decoration: none; font: 600 .88rem var(--font); cursor: pointer; transition: color .15s, border-color .15s; }
.share__a .i { width: 16px; height: 16px; }
.share__a--facebook:hover { color: #1877f2; border-color: #1877f2; }
.share__a--x:hover { color: var(--ink); border-color: var(--ink); }
.share__a--pinterest:hover { color: #e60023; border-color: #e60023; }
.share__a--reddit:hover { color: #ff4500; border-color: #ff4500; }
.share__a--whatsapp:hover { color: #1fa855; border-color: #1fa855; }
.share__a:hover { border-color: var(--navy); }
.hub h2 { font-size: 1.25rem; }
.hub ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 28px; border-top: 1px solid var(--line); }
.hub a { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.hub a > .i:first-child { color: var(--navy); width: 22px; height: 22px; }
.hub a span { flex: 1; display: flex; flex-direction: column; }
.hub small { color: var(--ink-3); }
.i--go { color: var(--ink-3); transition: transform .2s var(--ease); }
.hub a:hover .i--go { transform: translateX(3px); color: var(--navy); }
.sources h2 { font-size: 1.1rem; }
.sources ul { font-size: .9rem; padding-left: 1.2em; }
.sources p { font-size: .9rem; color: var(--ink-3); }
.toc__t { font-size: .78rem; font-weight: 700; color: var(--ink-3); margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0 0 20px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: .88rem; line-height: 1.35; }
.toc a:hover { color: var(--navy); }
.toc a.is-active { color: var(--navy); border-left-color: var(--red); font-weight: 600; }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.08rem; }
.legal h4 { font-size: 1rem; margin: 1.2em 0 .4em; }
.legal li { margin-bottom: .5em; }

/* Ads */
.ad { margin: 26px 0; text-align: center; min-height: 100px; }
.ad__label { display: block; font-size: .7rem; color: var(--ink-3); margin-bottom: 4px; }
.ad--empty { display: none; }
.ad--calc-side { margin: 10px 0 14px; }
.noads .ad { display: none; }

/* Footer */
.foot { background: #0b2a5b; color: #d7e1f2; margin-top: 40px; }
@media (prefers-color-scheme: dark) { .foot { background: #08101d; border-top: 1px solid var(--line); } }
.foot__in { max-width: 1240px; margin: 0 auto; padding: 44px 20px 20px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.foot a, .foot .linkbtn { color: #ffffff; text-decoration-color: rgba(255, 255, 255, .35); }
.foot__in > div:not(.foot__about) { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: .93rem; }
.foot__h { font-weight: 700; color: #fff; margin: 0 0 4px; font-size: .95rem; }
.brand--foot { --brand-navy: #ffffff; margin-bottom: 10px; }
.brand--foot .brand__mark rect { fill: #fff; }
.brand--foot .brand__mark g { fill: #0b2a5b; }
.brand--foot .brand__name { color: #fff; }
.brand--foot .brand__name span { color: #ff8fa3; }
.foot__about p { font-size: .93rem; max-width: 46ch; }
.disclaimer { max-width: 1240px; margin: 0 auto; padding: 18px 20px; display: flex; gap: 10px; font-size: .86rem; color: #c4d2ea; border-top: 1px solid rgba(255, 255, 255, .14); }
.disclaimer .i { margin-top: 3px; }
.foot__small { max-width: 1240px; margin: 0 auto; padding: 0 20px 28px; font-size: .8rem; color: #9fb1cf; }
@media (max-width: 760px) { .foot__in { grid-template-columns: 1fr; } }

/* Consent */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .35); padding: 14px 16px; display: grid; gap: 10px; }
.consent__t { margin: 0; font-size: .9rem; }
.consent__opts { display: flex; gap: 18px; }
.consent__a { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* Motion: one authored moment — the estimate number settles when it changes. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Print: the estimate sheet. */
@media print {
  .top, .rail, .ad, .share, .hub, .actions, .consent, .modes, .chips, .more, .deeper, .foot__in, .crumbs, .tabs, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .calc { box-shadow: none; border: 1px solid #999; }
  .calc__pane { grid-template-columns: 1fr 1fr !important; }
  [role="tabpanel"] { display: block !important; }
  .foot { background: none; color: #000; }
  .disclaimer { color: #000; }
}

/* Mobile result peek (sticky live total while filling the form) */
.peek { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-radius: 14px; background: var(--navy); color: var(--on-navy); text-decoration: none; box-shadow: 0 14px 34px -10px rgba(11, 42, 91, .55); }
.peek span:first-child { display: flex; flex-direction: column; line-height: 1.15; }
.peek small { opacity: .8; font-size: .75rem; font-weight: 600; }
.peek b { font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.peek__go { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: .9rem; }
@media (min-width: 780px) { .peek { display: none !important; } }
@media (max-width: 520px) {
  .modes { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .modes button { justify-content: center; padding: 9px 8px; }
  .calc__head { padding: 14px 16px; }
  .calc__form, .calc__out, .wiz { padding: 16px; }
}
@media print { .peek { display: none !important; } }

@media (max-width: 520px) { .seg label span .i { display: none; } .seg label span { font-size: .88rem; } }

/* Sticky 336x280 rail unit: only where the rail can be 336 px wide. */
.ad--rail { display: none; min-height: 0; margin: 8px 0 0; }
@media (min-width: 1340px) {
  .layout:not(.layout--narrow) { grid-template-columns: minmax(0, 1fr) 336px; }
  .ad--rail { display: block; }
}
.ad--calc-side { min-height: 0; }

/* ---------- Grouped navigation (dropdowns) ---------- */
.nav { align-items: center; }
.dd { position: relative; }
.dd summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 550; font-size: .95rem; cursor: pointer; white-space: nowrap; }
.dd summary::-webkit-details-marker { display: none; }
.dd summary:hover, .dd[open] summary { background: var(--sunk); color: var(--ink); }
.dd[data-current] summary { color: var(--navy); }
.dd__i { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.dd[open] .dd__i { transform: rotate(180deg); }
.dd__menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: grid; z-index: 40; }
.dd__menu a { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; }
.dd__menu a:hover { background: var(--tint); }
.dd__menu a[aria-current="page"] { background: var(--tint); color: var(--navy); }
.dd__menu .i { color: var(--navy); margin-top: 2px; }
.dd__menu span { display: flex; flex-direction: column; }
.dd__menu small { color: var(--ink-3); font-weight: 500; }
.nav > a { white-space: nowrap; }
@media (max-width: 1020px) {
  .nav { align-items: stretch; max-height: calc(100vh - 70px); overflow: auto; }
  .dd summary { width: 100%; justify-content: space-between; padding: 12px; font-size: 1rem; }
  .dd__menu { position: static; box-shadow: none; border: 0; padding: 0 0 6px 8px; min-width: 0; }
}

/* Hub grouped */
.hub__h { font-size: .82rem; font-weight: 700; color: var(--ink-3); margin: 18px 0 2px; letter-spacing: .01em; }
.hub__home { margin-bottom: 4px !important; }

/* Footer: about + 4 groups */
.foot__in { grid-template-columns: 1.3fr repeat(5, 1fr); gap: 24px; max-width: 1320px; }
.disclaimer, .foot__small { max-width: 1320px; }
@media (max-width: 1100px) { .foot__in { grid-template-columns: 1fr 1fr; } .foot__about { grid-column: 1 / -1; } }
@media (max-width: 560px) { .foot__in { grid-template-columns: 1fr; } }

/* Three-way segmented control */
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.calc--tool .seg label span { font-size: .9rem; }

/* Narrow phones: icon-only menu button, wrap long URLs */
.content { overflow-wrap: break-word; }
.legal a, .sources a { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .top__in { gap: 10px; padding: 10px 14px; }
  .menu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .menu { padding: 9px; }
  .brand__name { font-size: 1.02rem; }
  .layout { padding-left: 16px; padding-right: 16px; }
}

.top { z-index: 38; }
