/* ==========================================================================
   Glad2BHome.com - Design System
   Making Homeownership Simpler.
   Single stylesheet. No frameworks.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  --ink:            #111111;
  --ink-2:          #555555;
  --ink-3:          #767676;
  --bg:             #FFFFFF;
  --bg-soft:        #F7F7F7;
  --bg-sink:        #F0F0F0;
  --line:           #E7E7E7;
  --line-strong:    #D2D2D2;
  --green:          #2E8B57;
  --green-deep:     #216B42;
  --green-wash:     #EEF6F1;
  --amber-wash:     #FDF6E8;
  --amber-line:     #E9D8AE;
  --focus:          #0B67C7;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
          "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --t-hero:  clamp(2.75rem, 1.6rem + 5.2vw, 5.5rem);
  --t-d1:    clamp(2.125rem, 1.4rem + 3vw, 3.75rem);
  --t-d2:    clamp(1.75rem, 1.3rem + 2.1vw, 2.75rem);
  --t-h2:    clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --t-h3:    clamp(1.185rem, 1.06rem + 0.5vw, 1.4rem);
  --t-lead:  clamp(1.0625rem, 0.98rem + 0.44vw, 1.3125rem);
  --t-body:  1.0625rem;
  --t-sm:    0.9375rem;
  --t-xs:    0.8125rem;

  --gut: clamp(1.25rem, 0.9rem + 1.6vw, 2.5rem);
  --sec: clamp(3.5rem, 2rem + 6vw, 7.5rem);
  --wrap: 1240px;
  --measure: 43rem;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --lift-1: 0 1px 2px rgba(17,17,17,.04), 0 4px 14px rgba(17,17,17,.05);
  --lift-2: 0 2px 6px rgba(17,17,17,.06), 0 18px 44px rgba(17,17,17,.09);

  --ease: cubic-bezier(.22,.61,.36,1);
  --nav-h: 58px;
}

/* --- 2. Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 640; letter-spacing: -0.022em; line-height: 1.1; }
h1 { font-size: var(--t-d1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.014em; line-height: 1.25; }
p, ul, ol, dl, table, figure, pre { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .4em; }
a { color: var(--green-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
small { font-size: var(--t-xs); }
::selection { background: var(--green-wash); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 50%; transform: translate(-50%, -160%);
  z-index: 200; background: var(--ink); color: #fff; padding: .7rem 1.15rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm); text-decoration: none; font-weight: 600;
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* --- 3. Layout ----------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap-narrow { max-width: 52rem; }
.section { padding-block: var(--sec); }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 3.5vw, 4.5rem); }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: clamp(1rem, .6rem + 1.2vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.section-head { margin-bottom: clamp(1.75rem, 1rem + 2.5vw, 3.25rem); }
.section-head h2 { font-size: var(--t-d2); }
.section-head .lead { margin-top: .75rem; max-width: 46ch; }
.section-head--split {
  display: flex; flex-wrap: wrap; align-items: end;
  justify-content: space-between; gap: 1rem 2rem;
}

.eyebrow {
  display: block; font-size: var(--t-xs); font-weight: 650;
  letter-spacing: .085em; text-transform: uppercase; color: var(--green-deep);
  margin-bottom: .85rem;
}
.lead { font-size: var(--t-lead); color: var(--ink-2); line-height: 1.5; letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }

/* --- 4. Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: var(--r-pill);
  font-size: var(--t-sm); font-weight: 600; letter-spacing: -0.005em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.978); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--lg { padding: .95rem 1.9rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-row--center { justify-content: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 600; font-size: var(--t-sm); text-decoration: none; color: var(--green-deep);
}
.link-arrow::after { content: "\203A"; font-size: 1.25em; line-height: 1; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

/* --- 5. Header / navigation ---------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.masthead.is-stuck { border-bottom-color: var(--line); }
.masthead__inner {
  display: flex; align-items: center; gap: 1rem;
  height: var(--nav-h); max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut);
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--ink); font-weight: 680;
  letter-spacing: -0.028em; font-size: 1.075rem; white-space: nowrap;
}
.brand__mark { width: 26px; height: 26px; flex: none; color: var(--green); }
.brand:hover { color: var(--ink); }

.nav { display: none; margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: clamp(.25rem, -.5rem + 1.6vw, 1.35rem); list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a {
  display: block; padding: .45rem .3rem; font-size: .875rem; font-weight: 500;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: color .18s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 620; }

.nav-actions { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-pill);
  background: transparent; border: 0; color: var(--ink); cursor: pointer;
  transition: background-color .18s var(--ease);
}
.icon-btn:hover { background: var(--bg-sink); }
.icon-btn svg { width: 19px; height: 19px; }
.nav-toggle { display: inline-flex; }

@media (min-width: 1000px) {
  .nav { display: block; }
  .nav-toggle { display: none; }
  .nav-actions { margin-left: .75rem; }
}

.drawer {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 99;
  background: rgba(255,255,255,.98);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  padding: 1.5rem var(--gut) 3rem; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s;
}
.drawer[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer li { margin: 0; border-bottom: 1px solid var(--line); }
.drawer a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem .25rem; font-size: 1.3rem; font-weight: 600;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.drawer a::after { content: "\203A"; color: var(--ink-3); font-weight: 400; font-size: 1.3rem; }
body.is-locked { overflow: hidden; }

.search-overlay {
  position: fixed; inset: 0; z-index: 130; display: grid; place-items: start center;
  padding: clamp(3rem, 10vh, 8rem) var(--gut) 2rem;
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s;
}
.search-overlay[data-open="true"] { opacity: 1; visibility: visible; }
.search-panel { width: 100%; max-width: 680px; }
.search-field {
  display: flex; align-items: center; gap: .75rem;
  border-bottom: 2px solid var(--ink); padding-bottom: .85rem;
}
.search-field svg { width: 22px; height: 22px; flex: none; color: var(--ink-3); }
.search-field input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: clamp(1.35rem, 1rem + 1.6vw, 2rem); font-weight: 600; letter-spacing: -0.025em;
}
.search-field input::placeholder { color: #B4B4B4; }
.search-results { margin-top: 1.5rem; list-style: none; padding: 0; max-height: 55vh; overflow-y: auto; }
.search-results li { margin: 0; border-bottom: 1px solid var(--line); }
.search-results a { display: block; padding: .9rem .25rem; text-decoration: none; color: var(--ink); border-radius: 6px; }
.search-results a:hover, .search-results a:focus-visible { background: var(--bg-soft); }
.search-results .r-cat { font-size: var(--t-xs); font-weight: 650; color: var(--green-deep); text-transform: uppercase; letter-spacing: .07em; }
.search-results .r-title { font-weight: 600; letter-spacing: -0.015em; margin-top: .15rem; }
.search-results .r-desc { font-size: var(--t-sm); color: var(--ink-3); margin-top: .1rem; }
.search-hint { margin-top: 1.25rem; font-size: var(--t-sm); color: var(--ink-3); }
.search-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.chip {
  display: inline-block; padding: .4rem .85rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: #fff; font-size: var(--t-sm);
  color: var(--ink-2); text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }

/* --- 6. Hero ------------------------------------------------------------- */
.hero {
  position: relative; display: grid; align-items: center;
  min-height: min(88vh, 780px); padding-block: clamp(4rem, 2rem + 8vw, 8rem);
  overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.72) 45%, rgba(255,255,255,.94) 100%);
}
@media (min-width: 900px) {
  .hero__media::after {
    background: linear-gradient(100deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.86) 42%, rgba(255,255,255,.35) 100%);
  }
}
.hero__inner { max-width: 40rem; }
.hero h1 { font-size: var(--t-hero); letter-spacing: -0.038em; line-height: .98; }
.hero .lead { margin-top: 1.35rem; font-size: clamp(1.075rem, .95rem + .7vw, 1.4rem); color: #3A3A3A; }
.hero .btn-row { margin-top: 2.25rem; }
.hero__note { margin-top: 2rem; font-size: var(--t-xs); color: var(--ink-3); }

.hero--page { min-height: 0; padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.hero--page .hero__inner { max-width: 46rem; }
.hero--page h1 { font-size: var(--t-d1); line-height: 1.04; }

/* --- 7. Imagery ---------------------------------------------------------- */
.ph { position: relative; overflow: hidden; background: var(--bg-sink); }
img.ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse 60% 45% at 22% 18%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(ellipse 70% 55% at 82% 78%, rgba(0,0,0,.14), transparent 65%),
    var(--ph-grad, linear-gradient(135deg, #E8E0D4 0%, #CFCFC4 100%));
}
.ph::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(115deg, transparent 46%, rgba(255,255,255,.22) 50%, transparent 54%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.028) 0 1px, transparent 1px 3px);
}
.ph--buy     { --ph-grad: linear-gradient(140deg,#DCE9E0 0%,#A8C6B4 55%,#7FA891 100%); }
.ph--sell    { --ph-grad: linear-gradient(140deg,#F0E3D2 0%,#DCC3A4 55%,#BFA07E 100%); }
.ph--own     { --ph-grad: linear-gradient(140deg,#E3E7EC 0%,#BCC6D2 55%,#94A3B4 100%); }
.ph--improve { --ph-grad: linear-gradient(140deg,#F4E5DC 0%,#E0BFAE 55%,#C29A85 100%); }
.ph--money   { --ph-grad: linear-gradient(140deg,#E1EDE5 0%,#B2D3C0 55%,#84B398 100%); }
.ph--moving  { --ph-grad: linear-gradient(140deg,#ECE7F2 0%,#C9C0DC 55%,#A296BE 100%); }
.ph--warm    { --ph-grad: linear-gradient(140deg,#FBF1E4 0%,#EFD9BE 45%,#D8B98F 100%); }
.ph--dusk    { --ph-grad: linear-gradient(140deg,#DCE4EC 0%,#B7A9B8 55%,#8C7F94 100%); }
.ph--16x9  { aspect-ratio: 16 / 9; }
.ph--3x2   { aspect-ratio: 3 / 2; }
.ph--4x3   { aspect-ratio: 4 / 3; }
.ph--1x1   { aspect-ratio: 1 / 1; }
.ph--21x9  { aspect-ratio: 21 / 9; }

/* --- 8. Cards ------------------------------------------------------------ */
.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--lift-2); border-color: transparent; }
.card__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1.185rem; letter-spacing: -0.019em; line-height: 1.25; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__desc { margin: .55rem 0 0; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.55; }
.card__meta {
  margin-top: auto; padding-top: 1.1rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-size: var(--t-xs); color: var(--ink-3);
}
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; }
.kicker {
  font-size: var(--t-xs); font-weight: 650; letter-spacing: .075em;
  text-transform: uppercase; color: var(--green-deep);
}

.cat-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 330px; padding: 1.75rem; border-radius: var(--r-xl);
  overflow: hidden; isolation: isolate; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--lift-2); color: var(--ink); }
.cat-card .ph { position: absolute; inset: 0; z-index: -2; }
.cat-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.80) 38%, rgba(255,255,255,.30) 100%);
}
.cat-card__name { font-size: var(--t-xs); font-weight: 650; letter-spacing: .085em; text-transform: uppercase; color: var(--green-deep); }
.cat-card__head { margin-top: .5rem; font-size: 1.5rem; letter-spacing: -0.026em; line-height: 1.14; max-width: 15ch; }
.cat-card__desc { margin: .7rem 0 0; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5; }
.cat-card .link-arrow { margin-top: 1.1rem; }
@media (min-width: 760px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid .cat-card:nth-child(1), .cat-grid .cat-card:nth-child(2) { min-height: 400px; }
}
@media (min-width: 1080px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }

.guide-card { border-radius: var(--r-xl); }
.guide-card .ph { border-bottom: 1px solid var(--line); }
.guide-card__badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: .3rem .7rem; border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
}
.guide-feature { display: grid; gap: 0; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); }
@media (min-width: 860px) { .guide-feature { grid-template-columns: 1.1fr 1fr; align-items: stretch; } }
.guide-feature .ph { min-height: 280px; height: 100%; }
.guide-feature__body { padding: clamp(1.75rem, 1rem + 2.5vw, 3rem); display: flex; flex-direction: column; justify-content: center; }

.tool-card {
  display: flex; flex-direction: column; gap: .65rem;
  padding: 1.5rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff; text-decoration: none; color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--lift-1); border-color: transparent; color: var(--ink); }
.tool-card__icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--green-wash); color: var(--green-deep);
}
.tool-card__icon svg { width: 21px; height: 21px; }
.tool-card h3 { font-size: 1.06rem; }
.tool-card p { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }

/* --- 9. Breadcrumbs ------------------------------------------------------ */
.crumbs { font-size: var(--t-xs); color: var(--ink-3); padding-block: 1rem .25rem; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.crumbs li { margin: 0; display: flex; align-items: center; gap: .4rem; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink-2); }

/* --- 10. Article --------------------------------------------------------- */
.article-head { padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) 0; }
.article-head h1 { font-size: var(--t-d1); line-height: 1.05; max-width: 20ch; }
.article-head .lead { margin-top: 1.15rem; max-width: var(--measure); }
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem;
  margin-top: 1.75rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  font-size: var(--t-sm); color: var(--ink-3);
}
.byline strong { color: var(--ink); font-weight: 600; }
.byline a { color: var(--ink); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--green-wash);
  color: var(--green-deep); font-weight: 680; font-size: .85rem; letter-spacing: -.02em;
}
.article-hero { margin-block: clamp(1.75rem, 1rem + 2.5vw, 3rem); }
.article-hero .ph { border-radius: var(--r-lg); }
.article-hero figcaption { margin-top: .7rem; font-size: var(--t-xs); color: var(--ink-3); }

.article-layout { display: grid; gap: clamp(2rem, 1rem + 3vw, 3.5rem); align-items: start; }
@media (min-width: 1060px) { .article-layout { grid-template-columns: 220px minmax(0, 1fr); } }

.toc { font-size: var(--t-sm); }
@media (min-width: 1060px) {
  .toc { position: sticky; top: calc(var(--nav-h) + 1.75rem); max-height: calc(100vh - var(--nav-h) - 4rem); overflow-y: auto; }
}
.toc__label { font-size: var(--t-xs); font-weight: 650; letter-spacing: .085em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .85rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a {
  display: block; padding: .38rem 0 .38rem .9rem; margin-left: -1px;
  border-left: 2px solid transparent; color: var(--ink-3);
  text-decoration: none; line-height: 1.35; transition: color .18s var(--ease), border-color .18s var(--ease);
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--green); }
.toc summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }
@media (min-width: 1060px) { .toc summary { display: none; } }

.prose { max-width: var(--measure); font-size: 1.09rem; line-height: 1.72; color: #232323; }
.prose > h2 {
  font-size: var(--t-h2); margin: 2.75rem 0 .85rem; letter-spacing: -0.025em;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}
.prose > h2:first-child { margin-top: 0; }
.prose > h3 { font-size: var(--t-h3); margin: 2rem 0 .6rem; scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.prose p { margin: 0 0 1.15em; }
.prose ul, .prose ol { margin: 0 0 1.35em; padding-left: 1.35em; }
.prose li { margin-bottom: .5em; }
.prose a { color: var(--green-deep); text-decoration: underline; text-decoration-color: rgba(46,139,87,.35); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 650; color: var(--ink); }
.prose blockquote {
  margin: 2rem 0; padding: .25rem 0 .25rem 1.35rem;
  border-left: 3px solid var(--green); font-size: 1.15rem; line-height: 1.55;
  letter-spacing: -0.012em; color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.callout {
  margin: 2rem 0; padding: 1.35rem 1.5rem; border-radius: var(--r);
  background: var(--bg-soft); border: 1px solid var(--line); font-size: var(--t-body);
}
.callout__title { display: flex; align-items: center; gap: .5rem; font-weight: 650; letter-spacing: -0.012em; margin-bottom: .5rem; }
.callout__title svg { width: 18px; height: 18px; flex: none; }
.callout p:last-child, .callout ul:last-child, .callout ol:last-child { margin-bottom: 0; }
.callout--tip { background: var(--green-wash); border-color: #CFE5D8; }
.callout--tip .callout__title { color: var(--green-deep); }
.callout--warn { background: var(--amber-wash); border-color: var(--amber-line); }
.callout--warn .callout__title { color: #8A6116; }
.callout--note { background: var(--bg-soft); }

.checklist { margin: 1.75rem 0; padding: 0; list-style: none; }
.checklist li {
  position: relative; padding-left: 1.9rem; margin-bottom: .7rem; line-height: 1.6;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .48em;
  width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid var(--green); background: var(--green-wash);
}
.checklist li::after {
  content: ""; position: absolute; left: 4.6px; top: .62em;
  width: 4px; height: 8px; border: solid var(--green-deep);
  border-width: 0 2px 2px 0; transform: rotate(42deg);
}

.table-scroll { margin: 2rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); border: 1px solid var(--line); }
.table-scroll table { margin: 0; width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 32rem; }
.table-scroll caption { caption-side: top; text-align: left; padding: .9rem 1rem; font-weight: 650; font-size: var(--t-sm); border-bottom: 1px solid var(--line); }
.table-scroll th, .table-scroll td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll thead th { background: var(--bg-soft); font-weight: 650; white-space: nowrap; }
.table-scroll tbody tr:last-child td { border-bottom: 0; }

.faq { margin: 2.5rem 0 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem .25rem; cursor: pointer; font-weight: 620; letter-spacing: -0.014em;
  list-style: none; font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 300; color: var(--ink-3); line-height: 1; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq__answer { padding: 0 .25rem 1.3rem; color: var(--ink-2); font-size: var(--t-body); line-height: 1.65; }
.faq__answer p:last-child { margin-bottom: 0; }

.disclaimer {
  margin: 2.5rem 0 0; padding: 1.1rem 1.25rem; border-radius: var(--r-sm);
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: var(--t-xs); color: var(--ink-2); line-height: 1.6;
}
.sources { margin-top: 2.5rem; font-size: var(--t-sm); }
.sources ol { padding-left: 1.2em; color: var(--ink-2); }
.author-box {
  display: flex; gap: 1.15rem; align-items: flex-start; margin-top: 3rem;
  padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-soft);
}
.author-box .avatar { width: 52px; height: 52px; font-size: 1rem; }
.author-box h2 { font-size: 1.06rem; }
.author-box p { margin: .4rem 0 0; font-size: var(--t-sm); color: var(--ink-2); }
.review-note {
  margin-top: 1.25rem; font-size: var(--t-xs); color: var(--ink-3);
  display: flex; gap: .5rem; align-items: flex-start;
}
.review-note svg { width: 15px; height: 15px; flex: none; margin-top: .18em; color: var(--green); }
.next-step {
  margin-top: 2.5rem; padding: 1.5rem 1.6rem; border-radius: var(--r-lg);
  border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
}
.next-step__label { font-size: var(--t-xs); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.next-step h2 { font-size: 1.185rem; margin-top: .3rem; letter-spacing: -0.02em; }

/* --- 11. Calculators ----------------------------------------------------- */
.calc {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; background: #fff; margin: 2rem 0;
}
.calc__grid { display: grid; gap: 0; }
@media (min-width: 820px) { .calc__grid { grid-template-columns: 1.05fr .95fr; } }
.calc__inputs { padding: clamp(1.35rem, 1rem + 1.5vw, 2rem); }
.calc__output {
  padding: clamp(1.35rem, 1rem + 1.5vw, 2rem); background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
@media (min-width: 820px) { .calc__output { border-top: 0; border-left: 1px solid var(--line); } }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: var(--t-sm); font-weight: 600; margin-bottom: .4rem; }
.field .hint { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--t-xs); margin-top: .2rem; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .affix {
  position: absolute; left: .9rem; color: var(--ink-3); font-size: var(--t-sm); pointer-events: none;
}
.input-wrap .affix--right { left: auto; right: .9rem; }
.field input[type="number"], .field input[type="text"], .field input[type="email"], .field select {
  width: 100%; padding: .72rem .9rem; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: #fff; font-size: var(--t-body);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input-wrap.has-prefix input { padding-left: 1.85rem; }
.input-wrap.has-suffix input { padding-right: 2.4rem; }
.field input:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,139,87,.14); outline: none; }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.field input[type="range"] { width: 100%; accent-color: var(--green); height: 26px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.result-primary { padding-bottom: 1.15rem; border-bottom: 1px solid var(--line); }
.result-primary .label { font-size: var(--t-sm); color: var(--ink-2); }
.result-primary .value {
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); font-weight: 660;
  letter-spacing: -0.038em; line-height: 1.05; margin-top: .2rem; font-variant-numeric: tabular-nums;
}
.result-rows { list-style: none; margin: 1.15rem 0 0; padding: 0; font-size: var(--t-sm); }
.result-rows li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.result-rows li:last-child { border-bottom: 0; }
.result-rows .k { color: var(--ink-2); }
.result-rows .v { font-weight: 620; font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 10px; border-radius: var(--r-pill); overflow: hidden; margin: 1.15rem 0 .75rem; background: var(--line); }
.bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: .75rem 1.15rem; font-size: var(--t-xs); color: var(--ink-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: .35rem; }
.calc__note { padding: 1rem 1.25rem; font-size: var(--t-xs); color: var(--ink-3); background: #fff; border-top: 1px solid var(--line); line-height: 1.6; }

/* --- 12. Seasonal -------------------------------------------------------- */
.season {
  border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line);
  display: grid; gap: 0;
}
@media (min-width: 900px) { .season { grid-template-columns: .95fr 1.05fr; } }
.season .ph { min-height: 300px; height: 100%; }
.season__body { padding: clamp(1.75rem, 1rem + 2.5vw, 3rem); }
.season__list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.season__list li { margin: 0; border-top: 1px solid var(--line); }
.season__list a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem 0; text-decoration: none; color: var(--ink); font-weight: 550; font-size: var(--t-body);
}
.season__list a::after { content: "\203A"; color: var(--ink-3); }
.season__list a:hover { color: var(--green-deep); }

/* --- 13b. Ad slots ------------------------------------------------------- */
/* Heights are reserved before any script runs, so an ad can never shift
   layout. Every variant declares an explicit min-height per breakpoint. */
.ad-slot {
  --ad-h: 250px;
  display: block; margin-inline: auto; text-align: center;
  max-width: 100%; contain: layout;
}
.ad-slot__label {
  display: block; font-size: 11px; line-height: 1.4; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .5rem;
}
.ad-slot__frame {
  min-height: var(--ad-h); height: var(--ad-h);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden;
}
.ad-slot__frame > ins { width: 100%; height: 100%; }
.ad-slot__note {
  display: block; font-size: var(--t-xs); color: var(--ink-3);
  margin-top: .45rem; min-height: 1em;
}
.ad-slot[data-state="loaded"] .ad-slot__frame { background: transparent; border-color: transparent; }
.ad-slot--rect   { --ad-h: 250px; max-width: 300px; }
.ad-slot--banner { --ad-h: 100px; max-width: 320px; }
@media (min-width: 760px) {
  .ad-slot--rect   { --ad-h: 280px; max-width: 336px; }
  .ad-slot--banner { --ad-h: 90px;  max-width: 728px; }
}
.ad-slot--incontent { margin-block: 2.75rem; }
.ad-slot--section   { margin-block: 0; padding-block: clamp(2rem, 1rem + 2vw, 3rem); }
@media print { .ad-slot { display: none !important; } }

/* --- 14. Soft CTA -------------------------------------------------------- */
.soft-cta {
  margin: 3rem 0 0; padding: 1.6rem 1.75rem; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: #fff;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.soft-cta h2 { font-size: 1.125rem; letter-spacing: -0.018em; }
.soft-cta p { margin: .3rem 0 0; font-size: var(--t-sm); color: var(--ink-2); max-width: 48ch; }

/* --- 15. Footer ---------------------------------------------------------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2.5rem; margin-top: var(--sec); }
.footer__top { display: grid; gap: 2.5rem; }
@media (min-width: 800px) { .footer__top { grid-template-columns: 1.3fr 2.4fr; } }
.footer__brand .brand { font-size: 1.15rem; }
.footer__tag { margin: .7rem 0 0; font-size: var(--t-sm); color: var(--ink-2); max-width: 32ch; }
.footer__cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.footer h2 { font-size: var(--t-xs); font-weight: 650; letter-spacing: .085em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .9rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .55rem; }
.footer a { font-size: var(--t-sm); color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__bottom {
  margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; justify-content: space-between;
  font-size: var(--t-xs); color: var(--ink-3);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 1.15rem; }

/* --- 16. Misc ------------------------------------------------------------ */
.pagination { display: flex; gap: .5rem; align-items: center; justify-content: center; margin-top: 3rem; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: grid; place-items: center; padding-inline: .6rem;
  border-radius: var(--r-sm); border: 1px solid var(--line); text-decoration: none;
  color: var(--ink-2); font-size: var(--t-sm);
}
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination [aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }

.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.stat-row { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: 2.5rem; }
.stat .n { font-size: clamp(1.85rem, 1.4rem + 1.6vw, 2.5rem); font-weight: 660; letter-spacing: -0.035em; }
.stat .k { font-size: var(--t-sm); color: var(--ink-2); margin-top: .2rem; }

.big-404 { font-size: clamp(4rem, 2rem + 12vw, 9rem); font-weight: 680; letter-spacing: -0.05em; line-height: 1; color: var(--line-strong); }

.sitemap-cols { columns: 260px 3; column-gap: 2.5rem; }
.sitemap-cols section { break-inside: avoid; margin-bottom: 2rem; }
.sitemap-cols h2 { font-size: 1rem; margin-bottom: .6rem; }
.sitemap-cols ul { list-style: none; padding: 0; margin: 0; }
.sitemap-cols li { margin-bottom: .4rem; font-size: var(--t-sm); }

.list-articles { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.list-articles li { margin: 0; border-bottom: 1px solid var(--line); }
.list-articles a { display: block; padding: 1.15rem .25rem; text-decoration: none; color: var(--ink); }
.list-articles a:hover .la-title { color: var(--green-deep); }
.la-title { font-weight: 620; letter-spacing: -0.015em; font-size: 1.075rem; }
.la-meta { font-size: var(--t-xs); color: var(--ink-3); margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.la-desc { font-size: var(--t-sm); color: var(--ink-2); margin-top: .3rem; max-width: 68ch; }

/* --- 17. Reveal on scroll ------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* --- 18. Consent prompt --------------------------------------------------
   The panel is fixed to the bottom of the viewport rather than covering the
   page: the reader can read the article while deciding, and no third party is
   observing them either way. Both answers share one button style and one flex
   basis, so they compute to the same width — a visually louder "Accept" would
   undermine the consent it is collecting.
   -------------------------------------------------------------------------- */
.consent {
  position: fixed; inset: auto 0 0 0; z-index: 300;
  padding: var(--gut); pointer-events: none;
  display: flex; justify-content: center;
}
.consent__panel {
  pointer-events: auto; position: relative;
  width: 100%; max-width: 44rem;
  background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: var(--lift-2);
  padding: clamp(1.25rem, .9rem + 1.2vw, 1.9rem);
}
.consent__panel:focus { outline: none; }
.consent__panel:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.consent__title {
  margin: 0 0 .6rem; padding-right: 2.25rem; font-size: var(--t-h3);
  letter-spacing: -0.02em; font-weight: 660;
}
.consent__body p {
  margin: 0 0 .7rem; font-size: var(--t-sm); line-height: 1.6; color: var(--ink-2);
}
.consent__body p:last-child { margin-bottom: 0; }
.consent__body strong { color: var(--ink); font-weight: 620; }
.consent__dismiss {
  position: absolute; top: .5rem; right: .55rem;
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  font: inherit; font-size: 1.4rem; line-height: 1;
  color: var(--ink-3); background: none; border: 0;
  border-radius: var(--r-sm); cursor: pointer;
}
.consent__dismiss:hover { color: var(--ink); background: var(--bg-soft); }
.consent__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.1rem; }
.consent__btn { flex: 1 1 13rem; min-width: 11rem; }
@media (min-width: 760px) {
  .consent { padding-bottom: calc(var(--gut) + .5rem); }
}

/* --- 19. Print ----------------------------------------------------------- */
@media print {
  .masthead, .drawer, .footer, .toc, .soft-cta, .search-overlay, .next-step,
  .consent { display: none !important; }
  .prose { max-width: none; font-size: 11pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
