/* Sixty and Solvent — shared styles
   Brand: background #1F2A44, text #F7F3EA, positive #3FA36B, caution #E0A100, muted #8C97B0
   Font: Atkinson Hyperlegible (self-hosted, SIL Open Font License — see /fonts/OFL-LICENSE.txt) */

/* ---------- Font ---------- */
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/atkinson-hyperlegible-latin-400-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: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/atkinson-hyperlegible-latin-700-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: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #1F2A44;
  --surface: #26324F;      /* cards: a step lighter than the page */
  --field: #2E3B5C;        /* input boxes */
  --text: #F7F3EA;
  --positive: #3FA36B;
  --caution: #E0A100;
  --muted: #8C97B0;
  --line: #3D4A6B;
  --radius: 14px;
  --max: 68rem;
  --read: 38rem;           /* comfortable reading width */
  color-scheme: dark;
}

/* 1rem = 20px, and it still grows if the reader turns up their browser text size */
html { font-size: 125%; -webkit-text-size-adjust: 100%; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible", Verdana, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 1.9rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

a { color: var(--text); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: var(--caution); }

:focus-visible {
  outline: 4px solid var(--caution);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.lead { font-size: 1.2rem; max-width: var(--read); }
.muted { color: var(--muted); }

/* Skip link for keyboard and screen-reader users */
.skip-link {
  position: absolute; left: 1rem; top: -10rem;
  background: var(--text); color: var(--bg);
  padding: 0.75rem 1rem; border-radius: 8px; font-weight: 700; z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 5rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-weight: 700; font-size: 1.25rem; text-decoration: none;
  min-height: 48px;
}
.brand svg { width: 64px; flex: none; }
.header-link { font-weight: 700; min-height: 48px; display: inline-flex; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0.75rem 1.75rem;
  border: 0; border-radius: 12px;
  background: var(--positive); color: var(--bg);
  font: inherit; font-size: 1.15rem; font-weight: 700;
  text-decoration: none; cursor: pointer; text-align: center;
  width: 100%;
}
.btn:hover { background: #4DB57A; color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.7; cursor: wait; }
@media (min-width: 40rem) { .btn { width: auto; } }

.btn-secondary {
  background: transparent; color: var(--text);
  border: 2px solid var(--text);
}
.btn-secondary:hover { background: var(--text); color: var(--bg); }

/* ---------- Hero ---------- */
.hero { padding: 3rem 0 2.5rem; }
/* Phones: headline + buttons, then benefits. Wide screens: side by side. */
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 60rem) {
  .hero { padding: 4.5rem 0 3.5rem; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; column-gap: 4rem; }
}
.hero-actions { display: grid; gap: 1rem; margin-top: 2rem; max-width: 28rem; }
.btn-big { min-height: 64px; font-size: 1.25rem; width: 100%; }
.eyebrow { color: var(--positive); font-weight: 700; margin-bottom: 0.75rem; }

/* ---------- Cards and forms ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
@media (min-width: 40rem) { .card { padding: 2.25rem; } }

.field { margin-bottom: 1.25rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.field input {
  width: 100%; min-height: 56px;
  padding: 0.6rem 0.9rem;
  font: inherit; font-size: 1.1rem; color: var(--text);
  background: var(--field);
  border: 2px solid var(--muted); border-radius: 10px;
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:focus { border-color: var(--caution); outline: none; box-shadow: 0 0 0 3px rgba(224, 161, 0, 0.35); }
.field input[aria-invalid="true"] { border-color: var(--caution); }

.form-note { margin: 1rem 0 0; color: var(--text); font-size: 0.95rem; }
.form-error { color: var(--caution); font-weight: 700; margin: 0.4rem 0 0; }
.form-status { margin: 1rem 0 0; font-weight: 700; }
.form-status:empty { display: none; }

/* ---------- Benefits ---------- */
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.benefits li { display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.9rem; align-items: start; }
.benefits svg { width: 2.25rem; margin-top: 0.15rem; }
.benefits strong { display: block; }

/* ---------- Tool pictures ---------- */
.section { padding: 3rem 0; border-top: 1px solid var(--line); }
.tool-grid { display: grid; gap: 1.75rem; margin-top: 1.75rem; }
@media (min-width: 50rem) { .tool-grid { grid-template-columns: 1fr 1fr; } }
.tool-figure { margin: 0; }
.tool-figure .picture { background: var(--bg); border-radius: 10px; padding: 1rem; margin-bottom: 1.25rem; border: 1px solid var(--line); }
.tool-figure figcaption h3 { margin-bottom: 0.4rem; }
.tool-figure figcaption p { margin: 0; }

/* ---------- Newsletter ---------- */
.newsletter { max-width: 48rem; }
.form-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 44rem) { .form-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.25rem 0 2.75rem; }
.disclaimer { font-weight: 700; font-size: 1.05rem; margin-bottom: 1.25rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 48px; }
.footer-small { color: var(--muted); font-size: 0.9rem; margin: 1rem 0 0; }

/* ---------- Calculator pages ---------- */
.page-head { padding: 2.5rem 0 1.5rem; max-width: 46rem; }
.page-head h1 { margin-bottom: 0.5em; }
.muted-help { color: var(--muted); font-size: 0.95rem; }
.card .muted-help { color: var(--text); } /* grey is too faint on the lighter card */
.notice {
  background: var(--surface); border-left: 6px solid var(--caution);
  border-radius: 10px; padding: 1rem 1.25rem; font-weight: 700; margin: 0 0 1.5rem;
}

.calc-layout { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 64rem) {
  .calc-layout { grid-template-columns: minmax(0, 1fr) 21rem; column-gap: 3rem; }
  .result-col { position: sticky; top: 1.5rem; }
}

.env-row {
  display: grid; gap: 0 1rem;
  padding: 1rem 0 0.25rem; border-top: 1px solid var(--line);
}
.env-row .field { margin-bottom: 0.75rem; }
.env-name { font-weight: 700; font-size: 1.15rem; margin: 0 0 0.5rem; }
@media (min-width: 44rem) {
  .env-row { grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
  .env-name { padding-top: 2.1rem; margin: 0; }
  .env-row .row-error { grid-column: 2 / -1; }
  .env-row.is-custom { grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1.2fr); }
  .env-row.is-custom .btn-remove { grid-column: 1; }
}
.env-row .row-error { margin: -0.25rem 0 0.75rem; }
.env-row.has-error { border-left: 6px solid var(--caution); padding-left: 0.9rem; }

.field select {
  min-height: 56px; padding: 0.5rem 0.75rem;
  font: inherit; font-size: 1.1rem; color: var(--text);
  background: var(--field); border: 2px solid var(--muted); border-radius: 10px;
}
.field select:focus { border-color: var(--caution); outline: none; box-shadow: 0 0 0 3px rgba(224, 161, 0, 0.35); }
.money { position: relative; }
.money-sign { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); font-size: 1.1rem; color: var(--muted); pointer-events: none; }
.money input { padding-left: 2rem; }
.due-group { display: flex; gap: 0.5rem; }
.due-group input { flex: 1 1 5rem; min-width: 0; }
.due-group select { flex: 0 0 auto; }

.btn-remove {
  min-height: 48px; padding: 0.5rem 1rem; margin-bottom: 0.75rem;
  background: transparent; color: var(--text); font: inherit; font-weight: 700;
  border: 2px solid var(--muted); border-radius: 10px; cursor: pointer; justify-self: start;
}
.btn-remove:hover { border-color: var(--caution); color: var(--caution); }
#add-row { margin: 1rem 0 0.5rem; }

.choice-group { border: 0; padding: 0; margin: 2rem 0 0; }
.choice-group legend { font-weight: 700; font-size: 1.25rem; padding: 0; margin-bottom: 0.25rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.choice {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 56px; padding: 0.5rem 1.25rem;
  border: 2px solid var(--muted); border-radius: 10px; cursor: pointer; font-weight: 700;
}
.choice input { width: 1.4rem; height: 1.4rem; accent-color: var(--positive); margin: 0; }
.choice:has(input:checked) { border-color: var(--positive); background: var(--surface); }
.choice:has(input:focus-visible) { outline: 4px solid var(--caution); outline-offset: 3px; }

.result-card h2 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.big-number { font-size: clamp(2.75rem, 7vw, 3.5rem); font-weight: 700; line-height: 1.1; margin: 0 0 0.5rem; }
.row-problems { color: var(--caution); font-weight: 700; }
.preview-next { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }

.email-box { margin-top: 3rem; max-width: 48rem; }
.sent-box { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; margin: 1.25rem 0 1.5rem; background: var(--bg); }
.sent-box h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.sent-box ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }
.sent-box li { margin-bottom: 0.3rem; }
.sent-box p:last-child { margin: 0; }

.full-plan { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); max-width: 52rem; }
.plan-total { font-size: 1.35rem; }
.plan-total strong { font-size: 1.6rem; }
.full-plan h3 { margin-top: 2rem; }

.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; align-items: center; }
.bar-label { font-weight: 700; }
.bar-value { text-align: right; grid-row: 1; grid-column: 2; font-weight: 700; }
.bar-track { grid-column: 1 / -1; height: 1.4rem; background: var(--surface); border-radius: 6px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--positive); border-radius: 6px; }

.table-wrap { overflow-x: auto; }
.plan-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.plan-table th, .plan-table td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.plan-table td:last-child, .plan-table thead th:last-child { text-align: right; white-space: nowrap; }
.plan-table thead th { color: var(--muted); font-size: 0.95rem; }
.plan-table tfoot th, .plan-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--text); }

.plan-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.print-head, .print-only { display: none; }

/* ---------- Retire-abroad page ---------- */
.section-gap { margin-top: 2.25rem; }
.income-grid { display: grid; gap: 0 1rem; }
@media (min-width: 44rem) { .income-grid { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); } }
.income-grid .field label { min-height: 1.6em; }

.cost-grid { margin-top: 0.5rem; }
.cost-head { display: none; }
.cost-row { display: grid; gap: 0 1rem; padding: 1rem 0 0.25rem; border-top: 1px solid var(--line); }
.cost-row .field { margin-bottom: 0.75rem; }
.cost-name { font-weight: 700; font-size: 1.15rem; margin: 0 0 0.5rem; }
@media (min-width: 30rem) {
  .cost-row { grid-template-columns: 1fr 1fr; }
  .cost-name { grid-column: 1 / -1; }
}
@media (min-width: 50rem) {
  .cost-head { display: grid; grid-template-columns: 13rem 1fr 1fr; gap: 1rem; font-weight: 700; color: var(--muted); padding-bottom: 0.4rem; }
  .cost-row { grid-template-columns: 13rem 1fr 1fr; align-items: center; padding-top: 0.75rem; }
  .cost-name { grid-column: auto; margin: 0 0 0.75rem; }
  /* the column titles above say "At home" and "Abroad", so the box labels can hide */
  .cost-row label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

.cushion-field { margin-top: 1.5rem; max-width: 22rem; }
.cushion-field label { font-size: 1.25rem; }
.cushion-field .muted-help { margin: 0 0 0.6rem; }
.pct { position: relative; }
.pct input { padding-right: 2.25rem; }
.pct-sign { position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); font-size: 1.1rem; color: var(--muted); pointer-events: none; }

.preset { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; margin: 1rem 0; }
.preset .field { margin-bottom: 0.5rem; }
.preset .field select { width: 100%; }
.preset-sources ul { padding-left: 1.25rem; margin: 0; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0.75rem 0; }
.compare-label { margin: 0; font-weight: 700; }
.compare-number { margin: 0; font-size: clamp(2rem, 5vw, 2.4rem); font-weight: 700; line-height: 1.15; }
.is-short { color: var(--caution); }

.compare-table td, .compare-table thead th:not(:first-child) { text-align: right; white-space: nowrap; }
.compare-table tfoot th, .compare-table tfoot td { border-top: 1px solid var(--line); font-weight: 400; }
.compare-table tfoot tr:first-child th, .compare-table tfoot tr:first-child td { border-top: 2px solid var(--text); }
.compare-table tfoot .row-strong th, .compare-table tfoot .row-strong td { font-weight: 700; font-size: 1.1rem; }

.before-move { margin-top: 3rem; max-width: 52rem; }
.check-list { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 1.5rem; }
.check-list li { border-left: 4px solid var(--positive); padding-left: 1.1rem; }
.check-list h3 { margin-bottom: 0.3rem; }
.check-list p { margin-bottom: 0.4rem; }
.check-list a { font-weight: 700; display: inline-flex; align-items: center; min-height: 48px; }

/* ---------- Text pages (privacy) ---------- */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.25rem; }
.prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.short-version { margin-bottom: 1rem; }
.short-version h2 { margin-top: 0; }
.short-version ul { margin: 0; }

/* ---------- Thank-you page ---------- */
.thanks { max-width: 44rem; padding-top: 3rem; }
.thanks-icon { width: 4rem; margin-bottom: 1.25rem; }
.thanks-part { margin-top: 1.5rem; }
.thanks-part .btn { margin-top: 0.5rem; }
.thanks-tip { margin-top: 2.5rem; }
.thanks-tip h2 { font-size: 1.3rem; }
.thanks-tip p { margin: 0; }

/* ---------- Print: the full plan on one clean page ---------- */
@media print {
  @page { margin: 12mm; }
  html { font-size: 10pt; }
  body { background: #fff; color: #000; display: block; line-height: 1.35; }
  .site-header, .skip-link, .page-head, .notice, .calc-layout, .email-box,
  .before-move, .site-footer, .no-print { display: none !important; }
  .is-short { color: #000; }
  .compare-table tfoot th, .compare-table tfoot td { border-top-color: #999; }
  .wrap { max-width: none; padding: 0; }
  .full-plan:not([hidden]) { display: block; margin: 0; padding: 0; border: 0; max-width: none; }
  .print-head { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 0.3rem; margin-bottom: 0.8rem; }
  .print-head p { margin: 0; }
  .print-brand { font-weight: 700; }
  .print-only { display: block; }
  .print-disclaimer { margin-top: 0.8rem; font-weight: 700; }
  .full-plan h2 { font-size: 18pt; margin-bottom: 0.3rem; }
  .full-plan h3 { margin: 0.9rem 0 0.4rem; font-size: 12pt; }
  .full-plan p { margin-bottom: 0.4rem; }
  .plan-total { font-size: 13pt; }
  .plan-total strong { font-size: 15pt; }
  .muted-help, .plan-table thead th { color: #333; font-size: 9pt; }
  /* one line per bar: name | bar | amount */
  .bars { gap: 0.25rem; }
  .bars li { grid-template-columns: 11rem 1fr 8rem; gap: 0 0.75rem; }
  .bar-label { grid-column: 1; grid-row: 1; }
  .bar-track { grid-column: 2; grid-row: 1; background: #e6e6e6; height: 0.8rem; }
  .bar-value { grid-column: 3; grid-row: 1; }
  .bar, .bar-track { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bar { background: #2d7a4f; }
  .plan-table { font-size: 10pt; }
  .plan-table th, .plan-table td { border-color: #999; padding: 0.15rem 0.5rem; }
  .plan-table tfoot th, .plan-table tfoot td { border-top-color: #000; }
  .bars li, .plan-table tr { break-inside: avoid; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
