/* ==========================================================================
   Mortgage Home Loan Calculator
   Tokens: navy ink, cool paper, eucalypt green, wattle yellow (results only)
   Type: Bricolage Grotesque (display), Instrument Sans (text)
   ========================================================================== */

:root {
  --ink: #14213D;
  --ink-2: #22335A;
  --paper: #F5F7FA;
  --surface: #FFFFFF;
  --line: #D7DEE6;
  --line-strong: #B7C2CF;
  --muted: #55627A;
  --eucalypt: #2F7D6B;
  --eucalypt-deep: #1F5C4E;
  --mint: #8FD3BF;
  --wattle: #F2C14E;
  --wattle-soft: #FBEFC9;
  --danger: #A33A2C;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-text: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem);
  --step-4: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem);

  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --max: 1200px;
  --prose: 70ch;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--eucalypt-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--wattle); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--wattle); color: var(--ink); padding: 0.6rem 1rem; z-index: 100; font-weight: 600; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header ----------------------------------------------------------------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.logo-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.05; display: flex; flex-direction: column; }
.brand-name span { font-weight: 500; color: var(--eucalypt-deep); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav-list a { display: block; padding: 0.55rem 0.8rem; border-radius: var(--radius-s); text-decoration: none; color: var(--ink); font-weight: 500; }
.nav-list a:hover, .nav-list .current-menu-item > a, .nav-list .current_page_item > a { background: var(--paper); }
.nav-list .current-menu-item > a, .nav-list .current_page_item > a { box-shadow: inset 0 -2px 0 var(--eucalypt); border-radius: var(--radius-s) var(--radius-s) 0 0; }
.nav-toggle { display: none; align-items: center; gap: 0.5rem; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 0.5rem 0.75rem; font: inherit; color: var(--ink); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform 0.2s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); display: none; padding: 0.5rem var(--gutter) 1rem; }
  .nav-open .site-nav { display: block; }
  .nav-list { flex-direction: column; }
  .nav-list a { padding: 0.8rem 0.5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-open .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
}

/* Dropdown menus (v1.0.3) ------------------------------------------------ */
.nav-list > li { position: relative; }
.nav-list .menu-item-has-children { display: flex; align-items: center; flex-wrap: wrap; }
.sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: -0.45rem; padding: 0; background: none; border: 0; border-radius: var(--radius-s); color: var(--ink); cursor: pointer; }
.sub-toggle span { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.2s; }
.is-open > .sub-toggle span { transform: translateY(2px) rotate(-135deg); }
.sub-toggle:hover { background: var(--paper); }
.sub-menu { list-style: none; margin: 0; padding: 0.4rem; }
.sub-menu a { display: block; padding: 0.6rem 0.8rem; border-radius: var(--radius-s); text-decoration: none; color: var(--ink); font-weight: 500; white-space: nowrap; }
.sub-menu a:hover, .sub-menu .current-menu-item > a { background: var(--paper); color: var(--eucalypt-deep); }
.nav-list .sub-menu .current-menu-item > a { box-shadow: none; border-radius: var(--radius-s); }
@media (min-width: 861px) {
  .sub-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 18rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 18px 40px -18px rgba(20, 33, 61, 0.35); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s; z-index: 30; }
  .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
  .nav-list > li:hover > .sub-menu, .nav-list > li:focus-within > .sub-menu, .nav-list > li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
  .nav-list > li:hover > .sub-toggle span { transform: translateY(2px) rotate(-135deg); }
}
@media (max-width: 860px) {
  .nav-list .menu-item-has-children > a { flex: 1; }
  .sub-toggle { width: 44px; height: 44px; margin-left: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .sub-menu { display: none; width: 100%; padding: 0 0 0.5rem 1rem; }
  .is-open > .sub-menu { display: block; }
  .sub-toggle:hover { background: none; }
  .sub-menu a { padding: 0.7rem 0.5rem; white-space: normal; }
}

/* Page head -------------------------------------------------------------- */
.page-head { padding-top: clamp(1.5rem, 3vw, 2.75rem); padding-bottom: 1.25rem; }
.page-head h1 { max-width: 22ch; }
.lead { font-size: var(--step-1); color: var(--ink-2); max-width: 60ch; line-height: 1.5; }
.reviewed { font-size: var(--step--1); color: var(--muted); margin-top: 0.25rem; }
.byline { color: var(--muted); font-size: var(--step--1); }
.crumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: var(--step--1); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line-strong); }
.crumbs a { color: var(--muted); }

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(1.75rem, 4vw, 3.5rem) 0 2.5rem; background:
  linear-gradient(180deg, var(--surface) 0, var(--surface) 55%, var(--paper) 55%); }

/* Homepage: photo background behind header and hero (v1.0.1) */
.home .site-header {
  position: absolute; top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}
.admin-bar.home .site-header { top: 32px; }
.home .nav-list a:hover, .home .nav-list .current-menu-item > a, .home .nav-list .current_page_item > a { background: rgba(255, 255, 255, 0.7); }
.home .hero {
  padding-top: calc(68px + clamp(1.75rem, 4vw, 3.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  background-color: #DCE9F8;
  background-image:
    linear-gradient(180deg, rgba(245, 247, 250, 0) 70%, var(--paper) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.35) 38%, rgba(255, 255, 255, 0) 60%),
    url("../img/hero-bg.webp");
  background-size: auto, auto, cover;
  background-position: center, center, right top;
  background-repeat: no-repeat;
}
.home .hero .lead { color: var(--ink); }
.home .hero .calc { box-shadow: 0 24px 60px -24px rgba(20, 33, 61, 0.35); }
@media (max-width: 860px) {
  .home .site-header { background: rgba(255, 255, 255, 0.8); }
  .home .site-nav { background: var(--surface); }
}
@media (max-width: 782px) {
  .admin-bar.home .site-header { top: 46px; }
}
@media (max-width: 700px) {
  .home .hero {
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.25) 45%, rgba(245, 247, 250, 0) 70%, var(--paper) 100%),
      url("../img/hero-bg-sm.webp");
    background-size: auto, cover;
    background-position: center, 70% top;
  }
}
.hero-copy { max-width: 46rem; margin-bottom: 1.75rem; }
.hero-copy h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.25rem); letter-spacing: -0.03em; line-height: 1.02; max-width: 16ch; }
.hero .reviewed { margin-top: 1rem; }

/* Calculator ------------------------------------------------------------- */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  margin: 0 0 2.5rem;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(20, 33, 61, 0.35);
}
.calc-inputs { padding: clamp(1.25rem, 2.5vw, 2rem); margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; align-content: start; min-width: 0; }
.calc-inputs > * { min-width: 0; }
.calc-results {
  background: var(--ink);
  color: #E8EDF5;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
}
.result-label { margin: 0 0 0.25rem; color: #B9C4D6; font-weight: 500; }
.result-figure {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 1.6rem + 4.5vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--wattle);
  margin: 0 0 0.75rem;
  overflow-wrap: anywhere;
}
.result-figure small { font-family: var(--font-text); font-size: 1rem; font-weight: 500; letter-spacing: 0; color: #B9C4D6; }
.result-sub { color: #DDE4EE; margin-bottom: 1rem; }
.result-sub strong { color: #fff; }
.result-list { margin: 1.25rem 0; display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,0.14); }
.result-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
.result-list dt { color: #B9C4D6; }
.result-list dd { margin: 0; font-weight: 600; color: #fff; text-align: right; }
.calc-results .note { font-size: var(--step--1); color: #B9C4D6; margin: 0.75rem 0 0; }
.calc-results .note.warn { color: var(--wattle-soft); border-left: 3px solid var(--wattle); padding-left: 0.75rem; }
.calc-results a { color: var(--mint); }

.chart { margin: 1.25rem 0 0; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: rgba(255,255,255,0.1); stroke-width: 1; }
.chart .axis { fill: #8E9BB2; font-size: 12px; font-family: var(--font-text); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.primary { stroke: var(--mint); }
.chart .line.muted { stroke: #6C7A94; stroke-dasharray: 5 5; }
.chart .area.primary { fill: rgba(143, 211, 191, 0.14); stroke: none; }
.chart figcaption { font-size: var(--step--1); color: #8E9BB2; margin-top: 0.4rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.key-muted { background: #6C7A94; }
.key-primary { background: var(--mint); margin-left: 0.75rem; }

.schedule { margin-top: 1.25rem; }
.schedule summary { cursor: pointer; color: var(--mint); font-weight: 600; }
.schedule table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-size: var(--step--1); }
.schedule th, .schedule td { text-align: right; padding: 0.4rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.schedule th:first-child, .schedule td:first-child { text-align: left; }
.schedule th { color: #B9C4D6; font-weight: 500; }
.table-scroll { overflow-x: auto; max-height: 420px; }

/* Fields */
.field { display: grid; gap: 0.4rem; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { font-weight: 600; font-size: 0.95rem; padding: 0; }
.input-wrap { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s; }
.input-wrap:focus-within { border-color: var(--eucalypt); box-shadow: 0 0 0 3px rgba(47, 125, 107, 0.18); }
.input-wrap input, .input-wrap select, .input-wrap textarea {
  flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font: inherit; color: var(--ink);
  padding: 0.7rem 0.8rem; font-size: 1.05rem; font-weight: 500;
}
.input-wrap input:focus, .input-wrap select:focus, .input-wrap textarea:focus { outline: none; }
.affix { display: flex; align-items: center; padding: 0 0.8rem; color: var(--muted); background: var(--paper); font-size: 0.95rem; white-space: nowrap; }
.affix:first-child { border-right: 1px solid var(--line); border-radius: var(--radius-s) 0 0 var(--radius-s); }
.affix:last-child { border-left: 1px solid var(--line); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 2.5rem; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 1rem; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.help { font-size: var(--step--1); color: var(--muted); margin: 0; line-height: 1.45; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: var(--line); border-radius: 2px; }
input[type="range"]::-moz-range-track { height: 4px; background: var(--line); border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--eucalypt); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--eucalypt); margin-top: -8px; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--eucalypt); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--eucalypt); }

.segment-row { display: flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.segment-row input { position: absolute; opacity: 0; pointer-events: none; }
.segment-row label { flex: 1 1 auto; text-align: center; padding: 0.6rem 0.75rem; cursor: pointer; font-weight: 500; font-size: 0.95rem; border-right: 1px solid var(--line); color: var(--ink-2); }
.segment-row label:last-of-type { border-right: 0; }
.segment-row input:checked + label { background: var(--ink); color: #fff; }
.segment-row input:focus-visible + label { outline: 3px solid var(--wattle); outline-offset: -3px; }
.field.check { display: flex; align-items: flex-start; gap: 0.6rem; }
.field.check input { width: 20px; height: 20px; margin: 0.15rem 0 0; accent-color: var(--eucalypt); flex: none; }
.field.check label { font-weight: 500; font-size: 0.95rem; }

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
}
@media (min-width: 901px) {
  .calc-results > *:first-child { margin-top: 0; }
}

/* Entry content ---------------------------------------------------------- */
.entry { padding-bottom: 2rem; }
.entry > * { max-width: var(--prose); }
.entry > .calc, .entry > .wp-block-shortcode, .entry > .wide, .entry > .calc-table, .entry > figure.wp-block-table { max-width: none; }
.entry h2 { margin-top: 2.2em; }
.entry h3 { margin-top: 1.6em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: 0.4em; }
.entry li::marker { color: var(--eucalypt); }
.entry blockquote { margin: 1.5em 0; padding: 0.25em 0 0.25em 1.25em; border-left: 4px solid var(--eucalypt); color: var(--ink-2); }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.entry img { border-radius: var(--radius-m); }

.answer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--eucalypt);
  border-radius: var(--radius-m);
  padding: 1.1rem 1.25rem;
  font-size: 1.1rem;
}
.answer p:last-child { margin-bottom: 0; }

.entry table, .glance-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; font-size: 0.97rem; }
.entry th, .entry td, .glance-table th, .glance-table td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry thead th { background: var(--paper); font-weight: 600; }
.entry td.num, .entry th.num { text-align: right; white-space: nowrap; }
.entry tr:last-child td, .glance-table tr:last-child td, .glance-table tr:last-child th { border-bottom: 0; }
.entry figure.wp-block-table { margin: 1.5em 0; overflow-x: auto; }
.entry .wp-block-table table, .entry .wp-block-table th, .entry .wp-block-table td, .entry .wp-block-table thead { border-left: 0; border-right: 0; border-top: 0; }
.entry .wp-block-table thead { border-bottom: 1px solid var(--line-strong); }
.entry .wp-block-table table { border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; }
@media (max-width: 600px) { .entry table { font-size: 0.9rem; } .entry th, .entry td { padding: 0.55rem 0.6rem; } }
.entry figcaption, .table-note { font-size: var(--step--1); color: var(--muted); margin-top: 0.5rem; }

.faq { margin: 1em 0 2em; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 2.5rem 1rem 0; font-weight: 600; font-size: 1.05rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0.5rem; top: 1.35rem; width: 10px; height: 10px; border-right: 2px solid var(--eucalypt); border-bottom: 2px solid var(--eucalypt); transform: rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.faq-a { padding: 0 0 1rem; color: var(--ink-2); }

.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 0.9rem; display: grid; place-items: center; font-family: var(--font-display); }

.callout { background: var(--wattle-soft); border-radius: var(--radius-m); padding: 1.1rem 1.25rem; margin: 2rem 0; }
.callout p:last-child { margin-bottom: 0; }
.sources { font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2.5rem; }
.sources h2 { font-size: 1rem; font-family: var(--font-text); letter-spacing: 0; margin-top: 0; }
.sources ul { padding-left: 1.1em; }

/* Related calculators */
.related { border-top: 1px solid var(--line); padding: 2rem 0 3rem; }
.related h2 { font-size: var(--step-2); }
.related-list, .hub-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 2rem; }
.related-list a, .hub-list a { display: grid; gap: 0.2rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.related-list a strong, .hub-list a strong { font-family: var(--font-display); font-size: 1.1rem; }
.related-list a span, .hub-list a span { color: var(--muted); font-size: 0.95rem; }
.related-list a:hover strong, .hub-list a:hover strong { color: var(--eucalypt-deep); text-decoration: underline; text-underline-offset: 0.18em; }
.entry > .hub-list { max-width: none; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-bottom: 2rem; }
.hub-list a { padding: 1.2rem 0; }
.hub-list a strong { font-size: 1.35rem; }

/* Homepage sections ------------------------------------------------------ */
.home-section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.home-section + .home-section { border-top: 1px solid var(--line); }
.section-lead { color: var(--muted); max-width: 60ch; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }

.calc-directory { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0 2.5rem; border-top: 2px solid var(--ink); }
.calc-directory a { display: grid; gap: 0.35rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.calc-directory .q { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.calc-directory .d { color: var(--muted); }
.calc-directory .t { color: var(--eucalypt-deep); font-weight: 600; font-size: 0.95rem; }
.calc-directory a:hover .q { text-decoration: underline; text-decoration-color: var(--wattle); text-decoration-thickness: 3px; text-underline-offset: 0.15em; }

.answers { background: var(--surface); }
.answer-list { margin: 1.5rem 0 0; display: grid; gap: 0; max-width: 62rem; }
.answer-list > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 0.5rem 2.5rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.answer-list dt { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.25; }
.answer-list dd { margin: 0; color: var(--ink-2); }
.answer-list dd a { display: inline-block; margin-top: 0.25rem; font-weight: 600; }
@media (max-width: 700px) { .answer-list > div { grid-template-columns: 1fr; } }

.glance-table th { width: 30%; font-weight: 600; }
.glance-table td:nth-child(2) { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; white-space: nowrap; color: var(--eucalypt-deep); }
.glance-table td:last-child { color: var(--muted); }
.glance-table { margin-top: 1.5rem; }

.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem 2.5rem; }
.trust-grid > h2 { grid-column: 1 / -1; }
.trust-grid p { color: var(--ink-2); }

/* Guides ----------------------------------------------------------------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 2rem; margin: 1.5rem 0 3rem; }
.post-card h3 { font-size: 1.2rem; margin: 0.9rem 0 0.4rem; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.post-card p { color: var(--muted); font-size: 0.97rem; }
.post-card-img img { border-radius: var(--radius-m); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-hero img { border-radius: var(--radius-l); margin-bottom: 1rem; }
.more-guides { border-top: 1px solid var(--line); padding-top: 2rem; }
.nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 3rem; }
.nav-links .page-numbers { padding: 0.45rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; background: var(--surface); }
.nav-links .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Buttons and forms ------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--ink); color: #fff; border: 0; border-radius: var(--radius-s); padding: 0.8rem 1.3rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--eucalypt-deep); color: #fff; }
.search-form { display: flex; gap: 0.5rem; max-width: 34rem; margin-top: 1rem; }
.search-form .input-wrap { flex: 1; }
.contact-form { display: grid; gap: 1.1rem; max-width: 36rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(1.25rem, 3vw, 2rem); }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-status { padding: 0.8rem 1rem; border-radius: var(--radius-s); font-weight: 500; }
.form-status.ok { background: #E3F2EC; color: var(--eucalypt-deep); }
.form-status.err { background: #F7E4E1; color: var(--danger); }

/* Contact page: text and form use the full width (v1.0.2) */
.entry > #contact { max-width: none; }
.entry > #contact .contact-form { max-width: none; }
.entry:has(> #contact) .contact-form .help { display: none; }
.entry:has(> #contact) > p:last-child { padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--wattle); border-radius: var(--radius-s); color: var(--ink-2); font-size: var(--step--1); margin-top: 1.25rem; }
@media (min-width: 640px) {
  .contact-form { grid-template-columns: 1fr 1fr; column-gap: 1.25rem; }
  .contact-form > * { grid-column: 1 / -1; }
  .contact-form > .field:has(#mhlc_name), .contact-form > .field:has(#mhlc_email) { grid-column: auto; }
}
@media (min-width: 901px) {
  .page-article:has(#contact) .page-head .lead { max-width: none; }
  .entry:has(> #contact) {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
  }
  .entry:has(> #contact) > * { max-width: none; grid-column: 1; margin-top: 0; }
  .entry:has(> #contact) > p:first-child { font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); }
  .entry:has(> #contact) > #contact { grid-column: 2; grid-row: 1 / 3; }
  .entry:has(> #contact) > p:last-child { grid-row: 2; margin-top: 0; position: sticky; top: 1.5rem; }
}

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #C9D2E0; margin-top: 3rem; padding: 3rem 0 1.5rem; font-size: 0.95rem; }
.site-footer a { color: #E8EDF5; text-decoration: none; }
.site-footer a:hover { color: var(--wattle); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-title { font-family: var(--font-text); font-size: 0.95rem; font-weight: 600; color: #fff; letter-spacing: 0; margin-bottom: 0.8rem; }
.brand-footer { color: #fff; margin-bottom: 1rem; }
.brand-footer .brand-name span { color: var(--mint); }
.footer-rates { color: var(--mint); font-size: var(--step--1); }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2.5rem; padding-top: 1.25rem; font-size: var(--step--1); color: #94A1B8; }
.footer-legal p { max-width: 90ch; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* WordPress alignment helpers ------------------------------------------- */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, .wp-element-caption { font-size: var(--step--1); color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .related, .calc-inputs input[type="range"] { display: none; }
  .calc { grid-template-columns: 1fr 1fr; box-shadow: none; }
  .calc-results { background: #fff; color: #000; border-left: 1px solid #ccc; }
  .result-figure { color: #000; }
}
