/* ===========================================================================
   Cesar & Brandi Real Estate Team — the whole visual system, one file.

   Direction: "The Move Map".

   The reasoning, so the next person does not undo it by accident:

   A real estate site normally leans on photography. We have none yet — no
   headshots, no listing galleries, nothing shot for this brand. A design that
   needs photographs to look good would look unfinished today and we would ship
   stock images to cover it, which is the single most generic thing a real
   estate site can do.

   So this is built on the things we control completely: paper, ink, type,
   spacing, and one drawn line. It looks like a well-made printed guide — a map
   somebody who knows the area drew for you — and it will look *better* when
   real photographs arrive, not different.

   Three colours and no more. Paper, ink, and a deep green that does the work
   of a brand. Amber is the route line: it marks the path, it never fills a
   button that is not the one thing we want pressed.
   =========================================================================== */

/* --- Fonts, self-hosted --------------------------------------------------- */
/* These were loaded from Google Fonts, which meant a render-blocking stylesheet
   from a third-party origin before any text could paint, plus a second
   connection to fetch the files themselves. Both faces are open licence, so
   they live here instead: one origin, no extra DNS, no blocking request, and
   the site stops depending on a host it does not control.

   Both are variable fonts covering weights 400-700, which is why the whole
   range the stylesheet uses comes from one file each.

   font-display: swap — text paints immediately in the fallback and swaps when
   the face arrives. A blank heading is worse than a heading in Georgia. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/fraunces-var.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+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-var.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+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* Ground and ink */
  --paper:     #fbf8f2;
  --paper-2:   #f4efe4;
  --paper-3:   #ece5d6;
  --ink:       #161a19;
  --ink-2:     #4b5551;
  /* ink-3 is used for .tiny and .hint — small text, so it must clear 4.5:1
     against the lightest ground it ever sits on (--paper-3). The obvious
     lighter grey failed at 3.81 and looked fine, which is exactly how this
     gets shipped. Measured, not eyeballed: 5.40 on paper, 5.00 on paper-2,
     4.57 on paper-3. */
  --ink-3:     #606865;
  --line:      #e1d9c9;
  --line-2:    #cfc5b1;

  /* The brand green. Deep enough to sit under white text at any size. */
  --green:     #0e5c4f;
  --green-d:   #0a423a;
  --green-l:   #e6f0ec;

  /* The route line. Used sparingly and always to mean "this way". */
  --amber:     #d98c1f;
  --amber-l:   #fbf0da;

  /* One warm accent for seller-side moments, so buy and sell feel different
     without needing two brands. */
  /* clay carries form error text at .86rem, so it is held to 4.5:1 too:
     5.14 on paper, 4.67 on the clay-tinted note background. */
  --clay:      #aa4e36;
  --clay-l:    #fbeae5;

  --ok:        #1f6b4d;
  --warn:      #8a5a12;

  /* Type */
  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --text:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Spacing — a 4px base, named so the markup reads as intent */
  --s1: .25rem;  --s2: .5rem;   --s3: .75rem;  --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 3rem;    --s8: 4rem;  --s9: 6rem;

  --radius:   14px;
  --radius-s: 9px;
  --shadow:   0 1px 2px rgba(22,26,25,.05), 0 8px 24px -12px rgba(22,26,25,.18);
  --shadow-l: 0 2px 4px rgba(22,26,25,.06), 0 24px 48px -24px rgba(22,26,25,.26);

  --wrap: 72rem;
  --read: 38rem;   /* a comfortable measure for body copy */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:   #14171a;
    --paper-2: #1b1f23;
    --paper-3: #232A2E;
    --ink:     #eef2ef;
    --ink-2:   #b3bdb8;
    --ink-3:   #8b958f;
    --line:    #2a3135;
    --line-2:  #3a4349;
    --green:   #4fbfa3;
    --green-d: #7ad4bb;
    --green-l: #16302a;
    --amber:   #f0ae46;
    --amber-l: #2e2415;
    --clay:    #e08469;
    --clay-l:  #33201b;
    --ok:      #58c494;
    --warn:    #e0b05a;
    --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
    --shadow-l: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -24px rgba(0,0,0,.8);
  }
}

/* --- Reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

/* Focus you can actually see. Amber on every ground we have. */
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* --- Type ----------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.021em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.6rem); margin-bottom: var(--s4); }
h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); margin-bottom: var(--s2); }
h4 { font-size: 1.05rem; margin-bottom: var(--s2); }

p, li { text-wrap: pretty; }
p + p { margin-top: var(--s4); }

a { color: var(--green); text-underline-offset: .18em; text-decoration-thickness: .06em; }
a:hover { color: var(--green-d); }

strong, b { font-weight: 650; }
small { font-size: .875rem; }

.lede {
  font-size: clamp(1.125rem, 1.05rem + .4vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: var(--read);
}

.eyebrow {
  font-size: .78rem;
  font-weight: 620;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: var(--s3);
}

.measure { max-width: var(--read); }
.center  { margin-inline: auto; text-align: center; }
.muted   { color: var(--ink-2); }
.tiny    { font-size: .82rem; line-height: 1.55; color: var(--ink-3); }

/* --- Layout --------------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }
main  { flex: 1 1 auto; }

section { padding-block: clamp(var(--s7), 6vw, var(--s9)); }
section.tight { padding-block: var(--s7); }
.band { background: var(--paper-2); border-block: 1px solid var(--line); }
.band-green { background: var(--green); color: #fff; }
.band-green h2, .band-green h3 { color: #fff; }
.band-green p { color: rgba(255,255,255,.86); }
.band-green a { color: #fff; }

.grid { display: grid; gap: var(--s5); }
@media (min-width: 46rem) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .split  { grid-template-columns: 1.05fr .95fr; gap: var(--s7); align-items: start; }
}
.stack   { display: flex; flex-direction: column; gap: var(--s4); }
.row     { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* --- Skip link ------------------------------------------------------------ */

.skip {
  position: absolute; left: var(--s4); top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: var(--s3) var(--s4); border-radius: var(--radius-s);
  transition: top .15s ease;
}
.skip:focus { top: var(--s4); color: var(--paper); }

/* --- Header --------------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; gap: var(--s5);
  min-height: 4.25rem;
}

.brandmark {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-weight: 600; font-size: 1.08rem;
  letter-spacing: -.02em; color: var(--ink); text-decoration: none;
  line-height: 1.15;
}
.brandmark:hover { color: var(--ink); }
.brandmark .mk { flex: none; }
.brandmark .nm { display: flex; flex-direction: column; }
.brandmark .nm b { font-weight: 600; }
.brandmark .nm span {
  font-family: var(--text); font-size: .68rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}

.nav { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 530; font-size: .95rem;
  padding: var(--s2) var(--s3); border-radius: var(--radius-s);
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--green); background: var(--green-l); }

.nav-toggle { display: none; }

@media (max-width: 60rem) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    margin-left: auto; background: none; border: 1px solid var(--line-2);
    border-radius: var(--radius-s); padding: .5rem .75rem; cursor: pointer;
    font-size: .9rem; font-weight: 560;
  }
  .nav {
    display: none; position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: var(--s3) var(--s5) var(--s5);
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: var(--s3) var(--s3); font-size: 1.05rem; }
  .nav .btn { margin-top: var(--s3); justify-content: center; }
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .78rem 1.25rem;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 580; font-size: .98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  background: var(--green); color: #fff;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 1px 2px rgba(14,92,79,.2);
}
.btn:hover { background: var(--green-d); color: #fff; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

.btn-amber { background: var(--amber); color: #2a1d05; box-shadow: 0 1px 2px rgba(217,140,31,.25); }
.btn-amber:hover { background: #c67d16; color: #2a1d05; }

.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-2); box-shadow: none;
}
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink-3); }

.band-green .btn { background: #fff; color: var(--green-d); }
.band-green .btn:hover { background: var(--paper-2); color: var(--green-d); }
.band-green .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.band-green .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.btn-sm { padding: .5rem .9rem; font-size: .88rem; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.05rem; }

/* --- Cards ---------------------------------------------------------------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s5);
  box-shadow: var(--shadow);
}
.band .card { background: var(--paper); }

a.card { text-decoration: none; color: inherit; display: block;
         transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-l); border-color: var(--line-2); color: inherit; }
a.card h3 { color: var(--ink); }
a.card .more { color: var(--green); font-weight: 580; font-size: .93rem; display: inline-flex; gap: .35rem; align-items: center; margin-top: var(--s3); }
a.card:hover .more .arw { transform: translateX(3px); }
.more .arw { transition: transform .16s ease; }

.card-amber { border-color: var(--amber); background: var(--amber-l); box-shadow: none; }
.card-clay  { border-color: color-mix(in srgb, var(--clay) 40%, var(--line)); background: var(--clay-l); box-shadow: none; }
.card-green { border-color: color-mix(in srgb, var(--green) 35%, var(--line)); background: var(--green-l); box-shadow: none; }

/* --- The route: the signature device -------------------------------------- */
/* A sequence of stops on a line. Used wherever the point is "this happens,
   then this". It is the brand's one drawn element and the reason the site
   feels like a map rather than a brochure. */

.route { list-style: none; padding: 0; margin: 0; position: relative; }
.route > li {
  position: relative;
  padding-left: 3.25rem;
  padding-bottom: var(--s6);
}
.route > li:last-child { padding-bottom: 0; }
/* the line */
.route > li::before {
  content: "";
  position: absolute; left: 1.03rem; top: 2.1rem; bottom: -.15rem;
  width: 2px;
  background: repeating-linear-gradient(to bottom,
              var(--amber) 0 7px, transparent 7px 13px);
}
.route > li:last-child::before { display: none; }
/* the stop */
.route > li > .stop {
  position: absolute; left: 0; top: .1rem;
  width: 2.15rem; height: 2.15rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--amber);
  font-family: var(--display); font-weight: 650; font-size: .95rem;
  color: var(--green);
}
.route h3 { margin-bottom: var(--s2); }
.route .when {
  display: inline-block; font-size: .76rem; font-weight: 620;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: var(--s1);
}

/* --- Answer blocks -------------------------------------------------------- */
/* A question as a heading and a direct answer as the first paragraph. People
   skim this. Retrieval systems quote it. Same shape serves both, which is the
   cheapest honest win in the whole brief. */

.qa { border-top: 1px solid var(--line); padding-top: var(--s5); margin-top: var(--s5); }
.qa:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.qa h3 { font-family: var(--display); }
.qa .answer { font-size: 1.08rem; color: var(--ink); }
.qa .answer + p { color: var(--ink-2); }

/* --- Forms ---------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: var(--s4); }
.field > label { font-weight: 580; font-size: .94rem; }
.field .hint { font-size: .85rem; color: var(--ink-3); }

.input, select.input, textarea.input {
  width: 100%;
  padding: .72rem .85rem;
  background: var(--paper);
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-s);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover { border-color: var(--ink-3); }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-l); outline: none; }
.input:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
textarea.input { min-height: 7rem; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--clay); }

.field .err { font-size: .86rem; color: var(--clay); font-weight: 560; }

/* A money input that reads as money */
.money { position: relative; }
.money .input { padding-left: 1.85rem; }
.money::before {
  content: "$"; position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-weight: 560; pointer-events: none;
}
.pct { position: relative; }
.pct .input { padding-right: 2.1rem; }
.pct::after {
  content: "%"; position: absolute; right: .9rem; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-weight: 560; pointer-events: none;
}

/* Choice chips — used instead of radio buttons where the choice is the point */
.choices { display: flex; flex-wrap: wrap; gap: var(--s2); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.choice span {
  display: block; padding: .6rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--paper);
  font-size: .94rem; font-weight: 540; cursor: pointer;
  transition: all .14s ease;
}
.choice input:hover + span { border-color: var(--ink-3); }
.choice input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.consent input { margin-top: .32rem; width: 1.05rem; height: 1.05rem; accent-color: var(--green); flex: none; }

/* The honeypot. Hidden from people, reachable by scripts that fill everything. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Status --------------------------------------------------------------- */

.note {
  border-left: 3px solid var(--green);
  background: var(--green-l);
  padding: var(--s4);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-size: .95rem;
}
.note.warn  { border-color: var(--amber); background: var(--amber-l); }
.note.clay  { border-color: var(--clay);  background: var(--clay-l); }
.note h3, .note h4 { margin-bottom: var(--s1); font-size: 1.05rem; }

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .65rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; letter-spacing: .01em;
  background: var(--paper-3); color: var(--ink-2);
}
.chip-green { background: var(--green-l); color: var(--green); }
.chip-amber { background: var(--amber-l); color: var(--warn); }

/* Unverified facts, shown loudly in preview and never in live. */
mark.needs-check {
  background: #ffe8a8; color: #5c4203;
  font-size: .82em; font-weight: 620; font-family: var(--text);
  padding: .1em .45em; border-radius: 4px;
  border: 1px dashed #c89a1a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) mark.needs-check { background: #4a3a0e; color: #f5d98a; border-color: #9a7a1e; }
}

/* The preview bar. Impossible to miss, impossible to mistake for the site. */
.preview-bar {
  background: repeating-linear-gradient(135deg, #2a2520 0 12px, #332c25 12px 24px);
  color: #ffe3a8; font-size: .84rem; text-align: center;
  padding: .55rem var(--s4); line-height: 1.5;
}
.preview-bar a { color: #ffd98a; }
.preview-bar b { color: #fff; }

/* --- Numbers / results ---------------------------------------------------- */

.figure {
  font-family: var(--display); font-weight: 650;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem);
  line-height: 1.05; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.figure.pos { color: var(--green); }
.figure.neg { color: var(--clay); }
.figure-label { font-size: .85rem; font-weight: 600; letter-spacing: .06em;
                text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s2); }

table.lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.lines th, table.lines td { text-align: left; padding: .6rem 0; border-bottom: 1px solid var(--line); }
table.lines td:last-child, table.lines th:last-child { text-align: right; }
table.lines tr.total td { font-weight: 650; border-bottom: 0; border-top: 2px solid var(--ink); padding-top: .8rem; }
table.lines td.minus { color: var(--clay); }
.scroll-x { overflow-x: auto; }

/* --- Footer --------------------------------------------------------------- */

.site-foot {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding-block: var(--s7) var(--s6);
  font-size: .92rem;
  margin-top: var(--s8);
}
.site-foot h3, .site-foot h4 { font-family: var(--text); font-size: .78rem; letter-spacing: .1em;
                text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s3); font-weight: 600; }
.site-foot a { color: var(--ink-2); text-decoration: none; display: block; padding: .22rem 0; }
.site-foot a:hover { color: var(--green); }
.foot-legal {
  margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: .84rem; line-height: 1.6;
}
.foot-legal p + p { margin-top: var(--s3); }

/* The equal housing mark. Required in spirit and in most brokerage policies;
   it is also simply the right thing to put on a housing website. */
.eho { display: inline-flex; align-items: center; gap: .5rem; margin-top: var(--s3); color: var(--ink-3); }
.eho svg { flex: none; }

/* --- Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .6s cubic-bezier(.16,1,.3,1) both; }
  .rise-2 { animation-delay: .07s; }
  .rise-3 { animation-delay: .14s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* --- Print ---------------------------------------------------------------- */
/* People print the plan and put it on the fridge. Make that look deliberate. */

@media print {
  .site-head, .site-foot, .preview-bar, .no-print, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  section { padding-block: 1rem; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .route > li::before { background: #bbb; }
}

/* --- Article prose -------------------------------------------------------- */
/* The rendered Markdown. Everything here is about reading comfort: a measure
   that does not force the eye to travel, headings that separate without
   shouting, and tables that survive a phone. */

.article-body > * + * { margin-top: var(--s4); }
.article-body h2 {
  font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem);
  margin-top: var(--s7); margin-bottom: var(--s3);
  scroll-margin-top: 5.5rem;              /* clears the sticky header on anchor jumps */
}
.article-body h3 {
  font-size: clamp(1.1rem, 1.02rem + .4vw, 1.3rem);
  margin-top: var(--s6); margin-bottom: var(--s2);
  scroll-margin-top: 5.5rem;
}
.article-body h4 { margin-top: var(--s5); }
.article-body p  { line-height: 1.7; }
.article-body ul, .article-body ol { padding-left: 1.4rem; }
.article-body li + li { margin-top: .4rem; }
.article-body li { line-height: 1.65; }
.article-body blockquote {
  border-left: 3px solid var(--amber);
  padding: var(--s2) 0 var(--s2) var(--s4);
  margin-block: var(--s5);
  font-size: 1.08rem;
}
.article-body blockquote p { margin: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin-block: var(--s6); }
.article-body figure { margin-block: var(--s5); }
.article-body figure img { border-radius: var(--radius-s); border: 1px solid var(--line); }
.article-body figcaption { font-size: .85rem; color: var(--ink-3); margin-top: var(--s2); }
.article-body table.lines { margin-block: var(--s5); font-size: .95rem; }
.article-body table.lines th { font-weight: 620; }
.article-body code {
  font-size: .9em; background: var(--paper-3); padding: .12em .35em; border-radius: 4px;
}
.article-body a { font-weight: 520; }

/* First paragraph after the headline reads slightly larger. */
.article-body > p:first-child { font-size: 1.1rem; color: var(--ink-2); }

/* ===========================================================================
   THE STICKY ACTION BAR — phones only
   ===========================================================================
   Hidden by default and shown only below the layout breakpoint. On a laptop
   the page's own calls to action are already on screen; a fixed bar there is
   furniture that covers the footer.

   THE TWO FAILURES THIS AVOIDS, both of which this codebase has already
   shipped once on the MREA worksheet:

   1. A semi-transparent background. #fbf8f2f2 looks like a design choice and
      behaves like a bug — the page scrolls past visibly behind the buttons.
      The background here is fully opaque, and the blur is a progressive
      extra on the border only, never a substitute for it.

   2. Content hidden underneath. A fixed bar is out of flow, so the end of the
      page sits behind it unless something reserves the space. body gets
      padding-bottom for exactly that, including the iOS safe-area inset, so
      the last line of the footer always clears it.
   =========================================================================== */
.stickybar { display: none; }

@media (max-width: 46rem) {
  .stickybar {
    display: block;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    background: var(--paper);            /* opaque. not negotiable. */
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -18px rgba(22, 26, 25, .55);
    padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
    /* Slides up once, after the reader has scrolled past the hero. */
    transform: translateY(110%);
    transition: transform .22s cubic-bezier(.2, .8, .3, 1);
  }
  .stickybar.on { transform: none; }

  .stickybar-in {
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: 34rem;
    margin: 0 auto;
  }
  .stickybar-txt {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .82rem;
    line-height: 1.25;
    color: var(--ink);
    opacity: .78;
  }
  .stickybar .btn { flex: 0 0 auto; white-space: nowrap; }

  /* Reserve the room. Without this the footer's last line sits under the bar
     and nobody notices until somebody tries to tap the privacy link. */
  body { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .stickybar { transition: none; }
}

/* It has no place on paper. */
@media print { .stickybar { display: none !important; } }

/* ===========================================================================
   THE COOKIE NOTICE
   ===========================================================================
   A notice, not a wall. It never covers the content, never dims the page, and
   "no" is exactly as easy to press as "yes" — a cookie dialogue where refusing
   is harder than accepting is a dark pattern, and a recognised one.

   It stacks ABOVE the sticky action bar rather than fighting it for the same
   corner, and while it is up the page reserves room for both.
   =========================================================================== */
.cookienote {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 70;                       /* above the action bar, below modals */
  background: var(--ink);
  color: var(--paper);
  padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px -20px rgba(0, 0, 0, .8);
  animation: cookienote-in .25s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes cookienote-in { from { transform: translateY(100%) } to { transform: none } }

.cookienote-in {
  max-width: 62rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cookienote p {
  flex: 1 1 22rem;
  margin: 0;
  font-size: .85rem;
  line-height: 1.5;
  opacity: .92;
}
.cookienote a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
.cookienote-acts { display: flex; gap: .5rem; flex: 0 0 auto; }

/* The refuse button is a real button, same size, same weight, no colour trick
   to make it look like the lesser option. */
.cookienote .btn {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(251, 248, 242, .45);
}
.cookienote .btn:hover { border-color: var(--paper); background: rgba(251, 248, 242, .1); }
.cookienote .btn-solid {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.cookienote .btn-solid:hover { background: #fff; }

/* While the notice is up, the action bar sits on top of it and the page
   reserves room for the pair. */
@media (max-width: 46rem) {
  body.has-cookienote .stickybar { bottom: 100%; }
  body.has-cookienote { padding-bottom: calc(10rem + env(safe-area-inset-bottom)); }
  .cookienote-acts { width: 100%; }
  .cookienote-acts .btn { flex: 1 1 0; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { .cookienote { animation: none; } }
@media print { .cookienote { display: none !important; } }
