:root {
  --night: #081923;
  --night-2: #0e2531;
  --night-3: #183541;
  --paper: #f5f8f6;
  --white: #fff;
  --ink: #132d34;
  --muted: #556b71;
  --on-dark: #abc2c5;
  --accent: #c6fa78;
  --focus: #59bbef;
  --dark-line: #ffffff2e;
  --line: #cfdbd6;
  color-scheme: dark;
  font-family: Inter, Arial, system-ui, sans-serif;
  color: #f4f9f9;
  background: var(--night);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
a { color: inherit; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p, dl, dd, ol { margin: 0; }
p { line-height: 1.52; }
.wrap { width: min(91%, 1240px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 16px; border: 1px solid transparent;
  border-radius: 9px; font-size: 15px; font-weight: 700; text-decoration: none;
  text-align: center; line-height: 1.22;
}
.outline { background: transparent; color: #f3fbfb; border-color: var(--dark-line); }
.outline:hover { background: #ffffff13; border-color: #9dc9ce; }
.primary { background: var(--accent); color: #15291b; border-color: #a7d866; }
.primary:hover { background: #d3ff96; }
.dark { background: var(--night); color: white; }
.dark:hover { background: var(--night-3); }
.subtle { background: #edf2ef; color: var(--ink); border-color: var(--line); }
.subtle:hover { background: #dfece7; }
.full { width: 100%; }

.site-header { border-bottom: 1px solid var(--dark-line); }
.header-inner, .footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-block: 17px; }
.brand { display: inline-flex; align-items: center; gap: .12em; white-space: nowrap; font-size: clamp(20px, 2.45vw, 32px); font-weight: 850; text-decoration: none; letter-spacing: -.075em; }
.brand span { color: var(--accent); }
.brand i { width: .84em; height: .84em; margin-right: .18em; border: 1.5px solid var(--accent); border-radius: 50%; display: inline-grid; place-items: center; transform: rotate(38deg); }
.brand i::before { content: ''; width: 48%; height: 100%; border: 1.5px solid var(--accent); border-radius: 50%; }
.site-header nav { display: flex; gap: clamp(12px, 2.1vw, 28px); }
.site-header nav a { padding-block: 8px; color: #bfced3; font-size: 14px; text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    radial-gradient(ellipse at 30% 63%, #214853 0%, #143340 28%, transparent 58%),
    linear-gradient(160deg, #102a36 0%, var(--night) 61%);
  border-bottom: 1px solid var(--dark-line);
}
.hero::before {
  position: absolute; content: ''; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(#c0eef810 1px, transparent 1px), linear-gradient(90deg, #c0eef810 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 30% 54%, #0009, transparent 55%);
}
.hero-grid {
  display: grid; align-items: start; grid-template-columns: 1.12fr 1fr;
  column-gap: clamp(36px, 6vw, 100px); grid-template-areas: "title calc" "map calc";
  grid-template-rows: auto 1fr; padding-block: clamp(34px, 5vw, 72px);
}
.hero-copy { grid-area: title; z-index: 1; }
.hero-copy h1 { font-size: clamp(64px, 8.7vw, 134px); letter-spacing: -.085em; line-height: .83; font-weight: 780; }
.hero-copy h1 span { color: var(--accent); font-size: .73em; vertical-align: 8%; margin-left: .1em; }
.hero-copy p { margin-top: 21px; max-width: 360px; color: #c1d6d7; font-size: clamp(16px, 1.55vw, 19px); }
.calculator { grid-area: calc; align-self: center; min-width: 0; color-scheme: light; color: var(--ink); background: var(--paper); border: 1px solid #e1ebe4; border-radius: 21px; padding: clamp(20px, 2.65vw, 36px); box-shadow: 0 25px 65px #0005, inset 0 3px var(--accent); }
.calc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 12px; margin-bottom: 17px; }
.calc-top h2 { font-size: clamp(26px, 2.8vw, 41px); line-height: 1; letter-spacing: -.06em; }
.quote-kind { font-size: 12px; color: var(--muted); }
.segments { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; background: #e7eee9; padding: 4px; border-radius: 10px; }
.segments button { background: none; color: var(--ink); border: 0; border-radius: 7px; min-height: 44px; padding: 7px 4px; font-size: 14px; font-weight: 700; }
.segments button:hover { background: #dae7df; }
.segments button[aria-pressed=true] { background: var(--night-2); color: white; }
.segments small { margin-left: 4px; font-weight: 600; color: #496552; }
.segments button[aria-pressed=true] small { color: var(--accent); }
.amounts { position: relative; display: grid; gap: 8px; margin-top: 15px; }
.amount { background: white; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px 10px; }
.amount[data-source=true] { border-color: #507e66; }
.amount:focus-within { outline: 2px solid #497961; outline-offset: 1px; }
.amount label { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.input-origin { visibility: hidden; font-size: 11px; color: #42644b; }
.amount[data-source=true] .input-origin { visibility: visible; }
.amount div { display: flex; align-items: baseline; gap: 10px; }
.amount input { background: transparent; border: 0; outline: 0; min-width: 0; width: 100%; color: var(--ink); font-size: clamp(28px, 3.1vw, 46px); font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.045em; padding: 0; }
.amount strong { font-size: 16px; letter-spacing: .01em; }
#swap { position: absolute; z-index: 1; top: 50%; right: 68px; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; background: #eaf5e9; border: 1px solid #779a82; color: var(--ink); border-radius: 50%; font-size: 21px; }
#swap:hover { background: var(--accent); }
.cash-row { margin-top: 13px; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.cash-row > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.choices, .quick { display: flex; align-items: center; gap: 5px; }
.choices button, .quick button { min-height: 35px; border-radius: 7px; background: white; border: 1px solid var(--line); color: var(--ink); padding: 7px 9px; font-size: 13px; font-weight: 700; }
.choices button[aria-pressed=true] { background: #d6efca; border-color: #8eb28b; }
.choices button:hover, .quick button:hover { background: #e2efde; }
.quick { margin-top: 10px; }
.quick button { background: transparent; min-height: 33px; font-weight: 600; }
.breakdown { margin-top: 12px; border-block: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; }
.breakdown summary { display: flex; gap: 10px; justify-content: space-between; padding: 10px 0; font-size: 14px; list-style: none; }
summary::-webkit-details-marker { display: none; }
.breakdown summary::after { content: '+'; margin-left: -4px; }
.breakdown[open] summary::after { content: '−'; }
#spread { margin-left: auto; color: #426a4e; font-weight: 800; }
.breakdown-list { padding: 0 0 12px; font-size: 13px; }
.breakdown-list div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.breakdown-list dt { color: var(--muted); }
.breakdown-list dd { text-align: right; font-weight: 700; }
.note, .feedback { font-size: 13px; color: var(--muted); margin: 10px 0; }
.note[data-error=true] { color: #9b3024; }
.calc-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.calc-actions .primary { justify-content: space-between; padding-inline: 14px; }
.calc-city { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700; color: #245b50; text-underline-offset: 3px; }

.map-area { grid-area: map; min-width: 0; margin-top: 13px; }
.map-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.map-tools h2 { font-size: 16px; letter-spacing: -.02em; }
#revealMap { display: none; }
.map-visual { position: relative; isolation: isolate; margin: 0 -18px; }
.map-visual canvas { display: block; width: 100%; height: clamp(235px, 28vw, 395px); touch-action: none; cursor: grab; }
.map-visual canvas:active { cursor: grabbing; }
.orbit {
  position: absolute; z-index: -1; border: 1px solid #bcebf529; pointer-events: none;
  width: 91%; height: 54%; top: 21%; left: 4.5%; border-radius: 50%; transform: rotate(-20deg);
}
.orbit-two { transform: rotate(24deg); border-style: dashed; opacity: .5; }
.map-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; position: absolute; right: 10px; bottom: 4px; gap: 4px; }
.map-control {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; min-width: 38px;
  color: #e9f8f7; border: 1px solid #80a6ae6e; border-radius: 8px; background: #102b38;
  padding: 6px 10px; font-size: 12px; font-weight: 700;
}
.map-control:hover { border-color: var(--accent); }
.map-control.icon { font-size: 17px; }
.city-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 9px; }
.city-form input { width: 100%; min-width: 0; border: 1px solid #688f98; background: #091c27; color: #fff; padding: 11px 12px; border-radius: 9px; font-size: 14px; }
.city-form input::placeholder { color: #9bb9bf; }
.cities { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.cities button { padding: 7px 9px; min-height: 34px; border-radius: 7px; font-size: 13px; background: #17343e; color: #effafa; border: 1px solid #819faa65; }
.cities button:hover, .cities button[aria-pressed=true] { color: var(--accent); border-color: var(--accent); }
.city-card { margin-top: 10px; border-left: 2px solid var(--accent); padding: 7px 8px 7px 11px; display: flex; align-items: start; justify-content: space-between; gap: 10px; background: #091c2760; }
.city-card strong, .city-card p { overflow-wrap: anywhere; }
.city-card p { color: #c3d9db; font-size: 13px; }
.city-card a { color: var(--accent); font-size: 13px; white-space: nowrap; }

.section { padding-block: clamp(44px, 6.4vw, 90px); }
.section-grid { display: grid; align-items: start; grid-template-columns: 1fr 1.17fr; gap: clamp(23px, 6vw, 92px); }
.section h2, .comparison h2, .closing h2 {
  font-size: clamp(36px, 5.2vw, 74px); line-height: .99; letter-spacing: -.07em; font-weight: 760;
}
.section-intro { margin-top: 13px; color: var(--on-dark); max-width: 410px; }
.light, .examples { background: var(--paper); color: var(--ink); color-scheme: light; }
.light .section-intro, .examples .section-intro { color: var(--muted); }
.steps ol { padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 41px 1fr; gap: 13px; border-top: 1px solid var(--line); padding-block: 17px; }
.steps li::before { content: counter(step, decimal-leading-zero); font-size: 14px; font-variant-numeric: tabular-nums; color: #436e55; padding-top: 3px; font-weight: 750; }
.steps strong { font-size: clamp(19px, 2.15vw, 28px); letter-spacing: -.035em; }
.steps li p { margin-top: 4px; color: var(--muted); font-size: 15px; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.reviews { min-height: 260px; }
.filters { margin-top: 22px; display: flex; gap: 7px; flex-wrap: wrap; }
.filters select, .filters input, .activity select {
  max-width: 100%; min-width: 0; border: 1px solid #68828b;
  background: var(--night-2); color: white; border-radius: 8px; padding: 10px;
}
.filters input::placeholder { color: #b6c8cc; }
.review-grid, .compare-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.review, .compare-item { padding: 19px; border: 1px solid var(--dark-line); border-radius: 13px; background: var(--night-2); overflow-wrap: anywhere; }
.review h3, .compare-item h3 { margin: 0 0 7px; }
.review .stars { color: var(--accent); font-size: 14px; letter-spacing: .14em; }
.review small, .compare-item small { color: var(--on-dark); }
.review p, .compare-item p { margin-top: 9px; }
.review blockquote { border-left: 2px solid var(--accent); margin: 13px 0 0; padding-left: 9px; font-size: 14px; }
.review .body, .review blockquote { white-space: pre-line; }
#more { margin-top: 16px; }
.comparison { padding-block: 40px; }
.compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.examples { background: #e4eee6; }
.example-list, #feed { display: grid; gap: 7px; }
.example-list button, #feed button {
  width: 100%; background: white; border: 1px solid var(--line); color: var(--ink);
  padding: 17px; border-radius: 9px; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; text-align: left; font-size: clamp(16px, 2vw, 23px);
}
.example-list button:hover { border-color: #5a916d; }
.activity-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.review details { margin-top: 6px; }
.review summary { color: var(--accent); }
.compare-item .button { margin-top: 12px; }
#feed { margin-top: 20px; }
#feed button { background: var(--night-2); color: white; border-color: var(--dark-line); font-size: 15px; }
#feed button:hover { border-color: var(--accent); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding-block: 15px; font-size: clamp(17px, 2vw, 23px); letter-spacing: -.025em; }
.faq summary::after { content: '+'; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: var(--muted); padding: 0 18px 15px 0; }

.closing { background: var(--accent); color: var(--ink); padding-block: clamp(33px, 5vw, 54px); }
.closing-total { margin-bottom: 8px; color: #294d3a; font-weight: 700; overflow-wrap: anywhere; }
.closing h2 { font-size: clamp(36px, 5vw, 60px); }
.mobile-total { display: none; }

dialog {
  width: min(calc(100% - 24px), 515px); max-height: 88vh; overflow: auto;
  border: 1px solid var(--line); border-radius: 17px; padding: 24px;
  color: var(--ink); background: var(--white); color-scheme: light;
  box-shadow: 0 25px 80px #0006; overscroll-behavior: contain;
}
dialog::backdrop { background: #071724cc; backdrop-filter: blur(4px); }
body:has(dialog[open]) { overflow: hidden; }
dialog h2 { font-size: 30px; letter-spacing: -.06em; margin-right: 36px; }
dialog p, dialog label { margin-top: 9px; }
dialog .dismiss { float: right; border: 0; border-radius: 7px; background: #edf2ef; color: var(--ink); width: 40px; height: 40px; font-size: 24px; }
dialog label { display: grid; gap: 5px; font-size: 14px; font-weight: 650; }
dialog input, dialog select, dialog textarea { width: 100%; color: var(--ink); border: 1px solid #aebfb7; border-radius: 7px; background: #f7faf8; padding: 9px; min-height: 40px; }
dialog textarea { resize: vertical; }
dialog .full { margin-top: 13px; }
.dialog-total { background: #edf5ed; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-weight: 700; overflow-wrap: anywhere; }
.dialog-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.status-link { color: #245b50; display: inline-block; margin-top: 6px; font-weight: 700; }
#statusOffer { overflow-wrap: anywhere; white-space: pre-line; }
#calc, #geo, #reviews, #questions { scroll-margin-top: 18px; }

@media (max-width: 900px) {
  .hero-grid { column-gap: 24px; }
  .cash-row { flex-wrap: wrap; }
  .reviews .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .header-inner { flex-wrap: wrap; row-gap: 4px; padding-block: 10px; }
  .site-header nav { order: 2; justify-content: space-between; width: 100%; gap: 5px; }
  .site-header nav a { padding: 9px 3px; font-size: 13px; }
  .hero-grid { display: flex; flex-direction: column; gap: 18px; padding-block: 23px 34px; }
  .hero-copy h1 { font-size: clamp(46px, 11vw, 78px); line-height: .93; }
  .hero-copy h1 br { display: none; }
  .hero-copy p { margin-top: 12px; }
  .calculator, .map-area { width: 100%; }
  .calculator { padding: 18px; border-radius: 15px; }
  .map-visual { margin-inline: 0; }
  .map-visual canvas { height: min(79vw, 340px); }
  #revealMap { display: inline-flex; }
  .section-grid { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-wrap: wrap; }
  .closing .section-head { flex-direction: column; }
  .mobile-total { display: flex; position: fixed; z-index: 4; left: 4.5%; width: 91%; bottom: max(10px, env(safe-area-inset-bottom)); box-shadow: 0 4px 27px #0007; font-size: 14px; padding-inline: 8px; }
  body:has(dialog[open]) .mobile-total, body:has(input:focus, textarea:focus, select:focus) .mobile-total { display: none; }
  .footer { padding-bottom: 72px; }
  .calc-actions .subtle { padding-inline: 9px; }
}
@media (max-width: 420px) {
  .reviews .review-grid, .compare-grid { grid-template-columns: 1fr; }
  .calc-top h2 { font-size: 27px; }
  .segments button { font-size: 13px; }
  .segments small { display: block; margin: 2px 0 0; }
  .choices button { padding-inline: 7px; }
  .footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .choices button, .cities button { transition: background-color .18s, border-color .18s; }
  .hero-copy { animation: enter .45s ease-out both; }
  @keyframes enter { from { opacity: .5; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
