/* ==========================================================================
   Connecticut Housing Finance Authority — theme
   Design DNA: public/chfa/DESIGN-DNA.md
   Motif: the keyhole aperture, from CHFA's own October 2024 mark.
   Rooms: the open room (light, photographic) and the record room (deep, exact).
   ========================================================================== */

/* ------------------------------------------------------------------ fonts */

@font-face {
  font-family: "Boska";
  src: url("fonts/boska-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Supreme";
  src: url("fonts/supreme-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Supreme";
  src: url("fonts/supreme-italic-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: italic;
  font-display: swap;
}

/* ----------------------------------------------------------------- tokens */

:root {
  /* Signature accent: CHFA green #2BB673, stepped as an OKLCH ramp on one hue
     (L 0.975 -> 0.215, chroma gamut-fitted per step). Every pair the build
     actually uses is verified against WCAG 2.2 rather than eyeballed. */
  --accent-50: #e3ffed;
  --accent-100: #bdffd5;
  --accent-200: #74fcb1;
  --accent-300: #5ae49b;
  --accent-400: #3ecd85;
  --accent-500: #21bb74;
  --accent-600: #009e5f;
  --accent-700: #007d4a;
  --accent-800: #005a33;
  --accent-900: #00351c;
  --accent-950: #00200f;

  --accent: #2bb673;        /* CHFA's own mark value */
  --accent-ink: var(--accent-700);   /* 5.21:1 on white — small text, links */
  --accent-line: var(--accent-600);  /* 3.47:1 on white — rules, UI borders */

  --blue: #0f75bc;          /* CHFA's own mark value */
  --blue-ink: #005e9c;      /* 6.82:1 on white */
  --blue-lift: #84c4ff;     /* on the record room */

  --ink: #0d1f1a;
  --ink-soft: #4a5c56;
  --canvas: #ffffff;
  --canvas-tint: #f1f6f3;
  --rule: #dce6e1;
  --record: #07231b;
  --record-line: #1c4438;
  --record-ink: #e8f3ed;
  --record-soft: #a9c6b8;
  --superseded: #6a7a75;
  --warn-bg: #fff5e6;
  --warn-ink: #7a4b00;
  --warn-line: #d99500;

  /* Fluid type: one continuous curve from a ~360px to a ~1280px anchor.
     Tighter ratio small (~1.2), bolder large (~1.28). Body floor 16px,
     fine print floor 13px. */
  --fs-100: clamp(0.8125rem, 0.7969rem + 0.07vw, 0.8438rem);
  --fs-200: clamp(0.875rem, 0.8438rem + 0.14vw, 0.9375rem);
  --fs-300: clamp(0.9375rem, 0.9063rem + 0.14vw, 1rem);
  --fs-400: clamp(1rem, 0.9375rem + 0.28vw, 1.125rem);
  --fs-500: clamp(1.125rem, 1.0313rem + 0.42vw, 1.3125rem);
  --fs-600: clamp(1.3125rem, 1.125rem + 0.83vw, 1.6875rem);
  --fs-700: clamp(1.5rem, 1.1563rem + 1.53vw, 2.1875rem);
  --fs-800: clamp(1.75rem, 1.1875rem + 2.5vw, 2.875rem);
  --fs-900: clamp(2.125rem, 1.1875rem + 4.17vw, 4rem);
  --fs-max: clamp(2.5rem, 1.0625rem + 6.39vw, 5.375rem);

  --leading-body: 1.62;
  --line: calc(var(--fs-400) * var(--leading-body));

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  --shell: 78rem;
  --measure: 66ch;
  --radius: 4px;

  /* The aperture. A circle over a tapering slot, taken from the keyhole in
     CHFA's mark. One shape, used at four scales and nowhere else. */
  --aperture: polygon(
    63.1% 62.0%, 67.5% 60.2%, 71.5% 58.1%, 75.2% 55.5%, 78.3% 52.5%, 80.9% 49.1%,
    82.9% 45.6%, 84.2% 41.8%, 84.9% 38.0%, 84.9% 34.0%, 84.2% 30.2%, 82.9% 26.4%,
    80.9% 22.9%, 78.3% 19.5%, 75.2% 16.5%, 71.5% 13.9%, 67.5% 11.8%, 63.1% 10.0%,
    58.5% 8.8%, 53.7% 8.2%, 48.8% 8.0%, 43.9% 8.4%, 39.2% 9.4%, 34.7% 10.8%,
    30.4% 12.8%, 26.6% 15.2%, 23.2% 18.0%, 20.3% 21.2%, 18.0% 24.6%, 16.4% 28.3%,
    15.3% 32.1%, 15.0% 36.0%, 15.3% 39.9%, 16.4% 43.7%, 18.0% 47.4%, 20.3% 50.8%,
    23.2% 54.0%, 26.6% 56.8%, 30.4% 59.2%, 34.7% 61.2%, 38.2% 66.0%, 39.6% 70.5%,
    38.8% 84.0%, 36.6% 96.0%, 37.6% 100.0%, 62.4% 100.0%, 63.4% 96.0%, 61.2% 84.0%,
    60.4% 70.5%, 61.8% 66.0%
  );
}

/* ------------------------------------------------------------------- base */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Supreme", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-400);
  line-height: var(--leading-body);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Boska", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 calc(var(--line) * 0.5);
  text-wrap: balance;
}
h1 { font-size: var(--fs-900); font-weight: 700; line-height: 1.1; letter-spacing: -0.021em; }
/* A verbatim CHFA document name can run past 100 characters; at display size
   it would wrap five lines deep and own the whole viewport. Long titles step
   down, still display-weight, never truncated. */
h1.h1--long { font-size: var(--fs-700); line-height: 1.16; letter-spacing: -0.014em; }
.page-head h1.h1--long { max-width: 36ch; }
h2 { font-size: var(--fs-700); line-height: 1.16; }
h3 { font-size: var(--fs-600); line-height: 1.22; }
h4 { font-size: var(--fs-500); line-height: 1.28; }

p { margin: 0 0 var(--line); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-ink); text-underline-offset: 0.18em; text-decoration-thickness: from-font; }
a:hover { color: var(--accent-800); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 var(--line); padding-left: 1.15em; }
li { margin-bottom: calc(var(--line) * 0.28); }

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--sp-7) 0; }

::selection { background: var(--accent-100); color: var(--ink); }

/* One ring, always outside the box — except on joined controls, which inset it
   so it never lands inside the control butted against them. */
:focus-visible {
  outline: 3px solid var(--accent-700);
  outline-offset: 2px;
  border-radius: 2px;
}
.room--record :focus-visible { outline-color: var(--accent-300); }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -4rem;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--sp-4); color: #fff; }

.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; border: 0;
}

.shell { width: min(100% - var(--sp-5) * 2, var(--shell)); margin-inline: auto; }
@media (min-width: 48rem) { .shell { width: min(100% - var(--sp-7) * 2, var(--shell)); } }

/* ------------------------------------------------------------------ rooms */

.room { padding-block: calc(var(--line) * 2); }
/* The page head already carries its own bottom band; a full room pad under it
   opens a dead gap before the first thing on the page. */
.page-head + .room,
.page-head + .help { padding-block-start: calc(var(--line) * 1.2); }
.room--tint { background: var(--canvas-tint); }
.room--record {
  background: var(--record);
  color: var(--record-ink);
}
.room--record h1, .room--record h2, .room--record h3, .room--record h4 { color: #fff; }
.room--record p { color: var(--record-soft); }
.room--record a:not(.btn) { color: var(--accent-300); }
.room--record a:not(.btn):hover { color: var(--accent-200); }
.room--record .eyebrow { color: var(--accent-300); }
.room--record .rule { border-color: var(--record-line); }

/* The semi-circle threshold: CHFA's own arc, marking a register change. */
.room--record.threshold { position: relative; margin-top: calc(var(--line) * 2.2); }
.room--record.threshold::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: calc(var(--line) * -2.2);
  height: calc(var(--line) * 2.2);
  background: var(--record);
  clip-path: ellipse(72% 100% at 50% 100%);
}

/* ---------------------------------------------------------------- eyebrow */

.eyebrow {
  font-family: "Supreme", sans-serif;
  font-size: var(--fs-100);
  font-weight: 600;
  letter-spacing: 0.135em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 calc(var(--line) * 0.4);
  max-width: none;
}
.eyebrow--slate { color: var(--ink-soft); }

.lede {
  font-family: "Boska", Georgia, serif;
  font-weight: 300;
  font-size: var(--fs-600);
  line-height: 1.32;
  color: var(--ink);
  max-width: 34ch;
  margin-bottom: calc(var(--line) * 1.2);
}

.rule { border: 0; border-top: 1px solid var(--rule); margin: calc(var(--line) * 1.4) 0; }

/* ------------------------------------------------------------- site alert */

.site-alert {
  background: var(--warn-bg);
  border-bottom: 2px solid var(--warn-line);
  color: var(--warn-ink);
  font-size: var(--fs-300);
  padding: var(--sp-3) 0;
}
.site-alert p { margin: 0; max-width: none; }
.site-alert a { color: var(--warn-ink); font-weight: 600; }

/* ---------------------------------------------------------------- masthead */

.masthead { border-bottom: 1px solid var(--rule); background: var(--canvas); }
.masthead__bar {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding-block: var(--sp-4);
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: var(--sp-3); text-decoration: none; flex: 0 0 auto; }
.brand img { width: clamp(174px, 20vw, 226px); height: auto; }
.brand:focus-visible { outline-offset: 4px; }

.utility {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-200);
}
.utility a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.utility a:hover { color: var(--accent-ink); text-decoration: underline; }
.utility .tel { font-weight: 600; color: var(--ink); }

/* --------------------------------------------------------------- omnibox */

.omnibox { position: relative; flex: 1 1 22rem; min-width: 16rem; }
.omnibox__form { display: flex; }
.omnibox__input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: var(--fs-300);
  color: var(--ink);
  background: var(--canvas-tint);
  border: 1px solid var(--rule);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 0.7rem var(--sp-4);
  min-height: 44px;
}
.omnibox__input::placeholder { color: var(--ink-soft); }
/* Joined control: the ring goes INSIDE, so it never lands in the button. */
.omnibox__input:focus-visible { outline-offset: -3px; background: #fff; }
.omnibox__btn {
  flex: 0 0 auto;
  font: inherit;
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-800);
  border: 1px solid var(--accent-800);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 var(--sp-5);
  min-height: 44px;
  cursor: pointer;
}
.omnibox__btn:hover { background: var(--accent-900); border-color: var(--accent-900); color: #fff; }
/* Pulled further in than the field's ring so it still reads as a ring rather
   than as the button shrinking, and recoloured to hold against the fill. */
.omnibox__btn:focus-visible { outline-color: #fff; outline-offset: -6px; }

.omnibox__panel {
  position: absolute;
  z-index: 60;
  inset-inline: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -22px rgba(13, 31, 26, 0.5);
  max-height: 68vh;
  overflow-y: auto;
  padding: var(--sp-2) 0;
}
.omnibox__panel[hidden] { display: none; }
.omnibox__panel, .omnibox__panel li { list-style: none; margin: 0; }
.omnibox__group {
  font-size: var(--fs-100);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: var(--sp-3) var(--sp-4) var(--sp-1);
}
.omnibox__opt {
  display: block;
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  border-left: 3px solid transparent;
}
.omnibox__opt[aria-selected="true"] { background: var(--accent-50); border-left-color: var(--accent-600); }
.omnibox__opt strong { display: block; font-weight: 600; font-size: var(--fs-300); }
.omnibox__opt span { display: block; font-size: var(--fs-200); color: var(--ink-soft); }

/* --------------------------------------------------------------- primary nav */

.mainnav { border-top: 1px solid var(--rule); background: var(--canvas); }
.mainnav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.mainnav__list a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-300);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  min-height: 44px;
}
.mainnav__list a:hover { color: var(--accent-800); background: var(--accent-50); border-bottom-color: var(--accent-600); }
.mainnav__list a[aria-current="page"] { color: var(--accent-800); border-bottom-color: var(--accent-700); font-weight: 600; }
.mainnav__list a:focus-visible { outline-offset: -3px; }
.mainnav details > summary { display: none; }

@media (max-width: 59.99rem) {
  .mainnav details { border-block: 0; }
  .mainnav details > summary {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    list-style: none;
    cursor: pointer;
    padding: var(--sp-3) 0;
    font-weight: 600;
    font-size: var(--fs-300);
    min-height: 44px;
  }
  .mainnav details > summary::-webkit-details-marker { display: none; }
  .mainnav details > summary::after { content: "▾"; color: var(--accent-ink); }
  .mainnav details[open] > summary::after { content: "▴"; }
  .mainnav__list { flex-direction: column; padding-bottom: var(--sp-3); }
  .mainnav__list a { border-bottom: 0; border-left: 3px solid transparent; padding-inline: var(--sp-3); }
  .mainnav__list a[aria-current="page"] { border-left-color: var(--accent-700); background: var(--accent-50); }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0.6rem var(--sp-5);
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-size: var(--fs-300);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary { background: var(--accent-800); color: #fff; border-color: var(--accent-800); }
.btn--primary:hover { background: var(--accent-900); border-color: var(--accent-900); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent-ink); border-color: var(--accent-line); }
.btn--ghost:hover { background: var(--accent-50); color: var(--accent-800); }
.room--record .btn--primary { background: var(--accent-300); color: var(--record); border-color: var(--accent-300); }
.room--record .btn--primary:hover { background: var(--accent-200); border-color: var(--accent-200); color: var(--record); }
.room--record .btn--ghost { color: var(--accent-300); border-color: var(--accent-600); }
.room--record .btn--ghost:hover { background: rgba(90, 228, 155, 0.12); color: var(--accent-200); }

/* -------------------------------------------------- the aperture (motif 1) */

.aperture {
  position: relative;
  overflow: hidden;
  background: var(--record);
}
.aperture__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------------- the hero */

.hero { background: var(--record); color: var(--record-ink); position: relative; overflow: hidden; }
/* The hero shares the record room's ground, so it takes the same lifted
   foreground values: the light-room accent is 3.18:1 down here and fails. */
.hero a:not(.btn) { color: var(--accent-300); }
.hero a:not(.btn):hover { color: var(--accent-200); }
.hero .btn--primary { background: var(--accent-300); color: var(--record); border-color: var(--accent-300); }
.hero .btn--primary:hover { background: var(--accent-200); border-color: var(--accent-200); color: var(--record); }
.hero .btn--ghost { color: var(--accent-300); border-color: var(--accent-600); }
.hero .btn--ghost:hover { background: rgba(90, 228, 155, 0.12); color: var(--accent-200); }
.hero :focus-visible { outline-color: var(--accent-300); }
.hero__grid {
  display: grid;
  gap: var(--sp-6);
  align-items: center;
  padding-block: calc(var(--line) * 2.4);
}
@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: var(--sp-8); }
}
.hero h1 { color: #fff; font-size: var(--fs-900); line-height: 1.13; letter-spacing: -0.024em; margin-bottom: calc(var(--line) * 0.6); max-width: 15ch; }
.hero__deck {
  font-family: "Boska", Georgia, serif;
  font-weight: 300;
  font-size: var(--fs-600);
  line-height: 1.34;
  color: var(--record-ink);
  max-width: 30ch;
}
.hero__stamp {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-200);
  color: var(--accent-300);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.hero__figure { position: relative; }
/* The photograph is first in the source so it is the first thing under the
   chrome on a narrow or short screen; the two-column layout puts the words
   back on the left. */
@media (max-width: 61.99rem) {
  .hero__grid { padding-block: calc(var(--line) * 0.9) calc(var(--line) * 1.4); gap: var(--sp-5); }
}
@media (min-width: 62rem) {
  .hero__grid > div { order: 1; }
  .hero__figure { order: 2; }
}
.hero__figure .aperture { aspect-ratio: 16 / 9; border-radius: 3px; }
.hero__caption {
  margin-top: var(--sp-3);
  font-size: var(--fs-100);
  color: var(--record-soft);
  max-width: 42ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: calc(var(--line) * 1.1); }

/* --------------------------------------------- the state chip (motif 3) */

.state {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: var(--fs-100);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.25em 0.7em 0.25em 0.55em;
  border-radius: 999px;
  white-space: nowrap;
}
/* The keyhole, drawn in CSS: a circle over a tapering slot. Open when the
   record is in force, filled when it has been replaced. */
.state::before {
  content: "";
  width: 0.7em;
  height: 0.88em;
  flex: 0 0 auto;
  background: currentColor;
  clip-path: var(--aperture);
}
.state--in-force { background: var(--accent-50); color: var(--accent-800); }
.state--takes-effect { background: var(--warn-bg); color: var(--warn-ink); }
.state--superseded { background: #edf0ef; color: #4d5a55; }
.state--superseded::before { clip-path: none; border-radius: 2px; opacity: 0.55; }
.room--record .state--in-force { background: rgba(90, 228, 155, 0.16); color: var(--accent-200); }
.room--record .state--superseded { background: rgba(232, 243, 237, 0.1); color: var(--record-soft); }
.room--record .state--takes-effect { background: rgba(217, 149, 0, 0.18); color: #ffd88a; }

/* -------------------------------------------------- in force today (strip) */

.inforce { border-bottom: 1px solid var(--rule); }
.inforce__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin-bottom: calc(var(--line) * 0.9);
}
.inforce__head h2 { margin-bottom: 0; }
.inforce__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.figure-cell {
  background: #fff;
  padding: var(--sp-5);
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  row-gap: var(--sp-2);
  text-decoration: none;
  color: inherit;
}
a.figure-cell:hover { background: var(--accent-50); }
a.figure-cell:focus-visible { outline-offset: -3px; }
.figure-cell__label {
  font-size: var(--fs-100);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.figure-cell__value {
  font-family: "Boska", Georgia, serif;
  font-weight: 700;
  font-size: var(--fs-800);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.figure-cell__value sup { font-size: 0.44em; font-weight: 600; top: -0.85em; }
.figure-cell__note { font-size: var(--fs-200); color: var(--ink-soft); line-height: 1.42; }

/* ------------------------------------------------ audience doors (motif 2) */

.doors {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6) var(--sp-5);
}
@media (min-width: 34rem) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .doors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.door {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  row-gap: var(--sp-3);
  text-decoration: none;
  color: inherit;
}
.door__figure {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 3px;
}
.door__figure img {
  width: 100%;
  height: auto;
  transition: transform 280ms ease, filter 280ms ease;
}
.door:hover .door__figure img { transform: scale(1.025); }
.door h3 { margin: 0; font-size: var(--fs-500); }

/* The aperture in its two smallest roles: the 404's mark and the search
   empty state, same shape as the chips and doors. */
.aperture-404 {
  display: inline-block;
  width: 0.7em; height: 0.88em;
  margin-right: 0.4em;
  vertical-align: -0.08em;
  background: var(--accent-600);
  clip-path: var(--aperture);
}
.aperture-empty h2::before {
  content: "";
  display: inline-block;
  width: 0.6em; height: 0.75em;
  margin-right: 0.35em;
  background: var(--superseded);
  clip-path: var(--aperture);
}
.door:hover h3,
.door:focus-visible h3 { color: var(--accent-800); text-decoration: underline; text-underline-offset: 0.18em; }
.room--record .door:hover h3,
.hero .door:hover h3 { color: var(--accent-200); }
.door p { font-size: var(--fs-300); color: var(--ink-soft); margin: 0; max-width: 30ch; }
.door:focus-visible { outline-offset: 4px; }

/* --------------------------------------------------------- changed ledger */

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ledger li { margin: 0; border-bottom: 1px solid var(--rule); }
.ledger__row {
  display: grid;
  gap: var(--sp-2) var(--sp-5);
  padding: var(--sp-4) 0;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
}
@media (min-width: 46rem) {
  .ledger__row { grid-template-columns: 9.5rem minmax(0, 1fr) auto; }
}
a.ledger__row:hover .ledger__title,
a.ledger__row:focus-visible .ledger__title { color: var(--accent-800); text-decoration: underline; text-underline-offset: 0.18em; }
.room--record a.ledger__row:hover .ledger__title,
.room--record a.ledger__row:focus-visible .ledger__title { color: var(--accent-200); }
a.ledger__row:focus-visible { outline-offset: -3px; }
.ledger__date {
  font-size: var(--fs-200);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.ledger__title { font-weight: 500; font-size: var(--fs-400); }
.ledger__meta { font-size: var(--fs-200); color: var(--ink-soft); display: block; margin-top: 2px; }
.room--record .ledger { border-color: var(--record-line); }
.room--record .ledger li { border-color: var(--record-line); }
.room--record .ledger__date { color: var(--record-soft); }
.room--record .ledger__title { color: #fff; }
.room--record .ledger__meta { color: var(--record-soft); }

/* ------------------------------------------------------------ data tables */

.table-wrap { overflow-x: auto; margin-bottom: var(--line); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-300);
  min-width: 34rem;
}
table.data caption {
  text-align: left;
  font-size: var(--fs-200);
  color: var(--ink-soft);
  padding-bottom: var(--sp-3);
}
table.data th {
  text-align: left;
  font-size: var(--fs-100);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
  padding: var(--sp-2) var(--sp-4) var(--sp-2) 0;
  white-space: nowrap;
}
table.data td {
  padding: var(--sp-4) var(--sp-4) var(--sp-4) 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.data td.num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data .row-note { display: block; font-size: var(--fs-200); color: var(--ink-soft); margin-top: 4px; max-width: 46ch; font-weight: 400; }
.room--record table.data th { color: var(--record-soft); border-bottom-color: var(--accent-300); }
.room--record table.data td { border-bottom-color: var(--record-line); color: var(--record-ink); }

@media (max-width: 42rem) {
  .table-wrap:has(.data--rates) { overflow: visible; }
  table.data--rates { min-width: 0; border-collapse: separate; }
  .data--rates caption { padding-bottom: var(--sp-4); }
  .data--rates thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .data--rates tbody,
  .data--rates tr,
  .data--rates th,
  .data--rates td { display: block; width: 100%; }
  .data--rates tr { padding-block: var(--sp-4); border-top: 1px solid var(--rule); }
  .data--rates th[scope="row"] { padding: 0 0 var(--sp-3) !important; border: 0 !important; font-size: var(--fs-400) !important; }
  .data--rates td { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-4); padding: var(--sp-2) 0; border: 0; }
  .data--rates td::before { content: attr(data-label); color: var(--ink-soft); font-size: var(--fs-200); font-weight: 500; white-space: normal; }
}

.stamp {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-200);
  color: var(--ink-soft);
  border-left: 3px solid var(--accent-line);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
  margin-bottom: var(--line);
}
.stamp strong { color: var(--ink); font-weight: 600; }
.stamp--caution { border-left-color: var(--warn-line); background: var(--warn-bg); padding-block: var(--sp-3); }
.stamp--caution strong { color: var(--warn-ink); }

/* ------------------------------------------------------------ record cards */

.record-card {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent-600);
  border-radius: var(--radius);
  padding: var(--sp-5);
  background: #fff;
}
.record-card--superseded { border-left-color: var(--superseded); background: var(--canvas-tint); }
.record-card--takes-effect { border-left-color: var(--warn-line); }
.record-card h3 { margin-bottom: var(--sp-2); font-size: var(--fs-500); }
.record-card dl { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-4); margin: var(--sp-4) 0 0; font-size: var(--fs-300); }
.record-card dt { font-weight: 600; color: var(--ink-soft); }
.record-card dd { margin: 0; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- prose */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: calc(var(--line) * 1.8); }
.prose h3 { margin-top: calc(var(--line) * 1.3); }
.prose > *:first-child { margin-top: 0; }

.page-head { padding-block: calc(var(--line) * 1.2) calc(var(--line) * 0.7); border-bottom: 1px solid var(--rule); }
.page-head h1 { max-width: 20ch; }
.page-head .lede { margin-bottom: 0; }

.breadcrumb { font-size: var(--fs-200); color: var(--ink-soft); margin-bottom: var(--sp-3); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--accent-ink); }

/* ------------------------------------------------------------ index tools */

.indexbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--canvas-tint);
  border-block: 1px solid var(--rule);
  padding-block: var(--sp-4);
  margin-bottom: calc(var(--line) * 1.2);
}
.indexbar form,
form.indexbar { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-end; }
.indexbar form + #index-results-summary { margin-top: var(--sp-3); }
.indexbar #index-results-summary { max-width: 68ch; line-height: 1.45; }
.field { display: grid; gap: var(--sp-1); }
.field > label { font-size: var(--fs-100); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select {
  font: inherit;
  font-size: var(--fs-300);
  min-height: 44px;
  padding: 0.4rem var(--sp-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.field--grow { flex: 1 1 16rem; }
.field select { max-width: 15rem; }
.indexbar .btn { min-height: 44px; }
.result-count { font-size: var(--fs-200); color: var(--ink-soft); margin: 0 0 var(--sp-4); max-width: none; }

.pagination { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: calc(var(--line) * 1.2); }
.pagination a, .pagination span {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--sp-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: var(--fs-300);
  text-decoration: none;
  color: var(--ink);
}
.pagination a:hover { border-color: var(--accent-line); background: var(--accent-50); color: var(--accent-800); }
.pagination [aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------- link lists */

.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { border-bottom: 1px solid var(--rule); margin: 0; }
.linklist a {
  display: grid;
  gap: 2px;
  padding: var(--sp-4) 0;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}
.linklist a:hover strong,
.linklist a:focus-visible strong { color: var(--accent-800); text-decoration: underline; text-underline-offset: 0.18em; }
.room--record .linklist a:hover strong,
.room--record .linklist a:focus-visible strong { color: var(--accent-200); }
.linklist a:focus-visible { outline-offset: -3px; }
.linklist strong { font-weight: 500; font-size: var(--fs-400); }
.linklist span { font-size: var(--fs-200); color: var(--ink-soft); }
.room--record .linklist li { border-color: var(--record-line); }
.room--record .linklist strong { color: #fff; }
.room--record .linklist span { color: var(--record-soft); }

/* ------------------------------------------------------------- two column */

.split { display: grid; gap: var(--sp-6); }
@media (min-width: 58rem) { .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-8); } }
.split--even { grid-template-columns: 1fr; }
@media (min-width: 58rem) { .split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.aside-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--sp-5);
  background: var(--canvas-tint);
  font-size: var(--fs-300);
}
.aside-card h2, .aside-card h3 { font-size: var(--fs-500); }
.aside-card p { max-width: none; }

/* ------------------------------------------------------------- portraits */

.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--sp-5); }
.person { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: var(--sp-2); }
.person img { aspect-ratio: 1; object-fit: cover; border-radius: 3px; width: 100%; }
.person strong { font-size: var(--fs-400); font-weight: 600; border-top: 2px solid var(--accent); padding-top: var(--sp-2); display: block; }
.person span { font-size: var(--fs-200); color: var(--ink-soft); }

/* ------------------------------------------------------------ post cards */

.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: var(--sp-6); }
.post { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: var(--sp-3); min-width: 0; text-decoration: none; color: inherit; }
.post img { aspect-ratio: 12 / 5; object-fit: contain; object-position: center; border-radius: 3px; width: 100%; background: var(--canvas-tint); }
.post h2, .post h3 { margin: 0; font-size: var(--fs-500); }
.post:hover h3,
.post:focus-visible h3 { color: var(--accent-800); text-decoration: underline; text-underline-offset: 0.18em; }
.room--record .post:hover h3 { color: var(--accent-200); }
.post p { font-size: var(--fs-300); color: var(--ink-soft); margin: 0; }
.post time { font-size: var(--fs-200); color: var(--ink-soft); font-weight: 600; letter-spacing: 0.04em; }
.post:focus-visible { outline-offset: 4px; }

/* -------------------------------------------------------- homebuyer path */

.buyer-path {
  counter-reset: buyer-step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--canvas);
  overflow: hidden;
}
.buyer-path > li {
  counter-increment: buyer-step;
  position: relative;
  min-width: 0;
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
}
.buyer-path > li + li { border-left: 1px solid var(--rule); }
.buyer-path > li::before {
  content: counter(buyer-step);
  display: block;
  width: max-content;
  margin-bottom: var(--sp-4);
  color: var(--accent-800);
  font-family: var(--font-sans);
  font-size: var(--fs-200);
  font-weight: 700;
  letter-spacing: 0.12em;
  border-bottom: 2px solid var(--accent);
}
.buyer-path > li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(var(--sp-6) + 0.2rem);
  right: -0.42rem;
  width: 0.72rem;
  height: 0.72rem;
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  background: var(--canvas);
  transform: rotate(45deg);
}
.buyer-path h3 { margin-top: 0; }
.buyer-class {
  display: grid;
  grid-template-columns: minmax(11rem, 0.7fr) minmax(0, 1.3fr);
  gap: var(--sp-5);
  align-items: start;
  margin-top: var(--sp-5);
  padding: var(--sp-5);
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
}
.buyer-class h3,
.buyer-class p { margin-top: 0; }

@media (max-width: 52rem) {
  .buyer-path { grid-template-columns: 1fr; }
  .buyer-path > li + li {
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
  .buyer-path > li::after { display: none; }
  .buyer-class { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------- help strip */

.help {
  background: var(--accent-50);
  border-top: 3px solid var(--accent-600);
  padding-block: calc(var(--line) * 2);
}
.help__grid { display: grid; gap: var(--sp-5); }
@media (min-width: 54rem) { .help__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--sp-8); align-items: center; } }
.help h2 { margin-bottom: var(--sp-2); }
.help .tel-big {
  font-family: "Boska", Georgia, serif;
  font-size: var(--fs-700);
  font-weight: 700;
  color: var(--accent-900);
  text-decoration: none;
  display: inline-block;
  min-height: 44px;
  letter-spacing: -0.01em;
}
.help .tel-big:hover { text-decoration: underline; text-underline-offset: 0.14em; }

/* ---------------------------------------------------------------- footer */

.site-footer { background: var(--record); color: var(--record-ink); padding-block: calc(var(--line) * 2.4) calc(var(--line) * 1.4); }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer a { color: var(--accent-300); }
.site-footer a:hover { color: var(--accent-200); }
.footer__grid { display: grid; gap: var(--sp-6); }
@media (min-width: 52rem) { .footer__grid { grid-template-columns: 1.2fr repeat(3, 1fr); gap: var(--sp-7); } }
.footer__grid h3 { font-size: var(--fs-400); font-family: "Supreme", sans-serif; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; font-size: var(--fs-300); }
.footer__grid li { margin-bottom: var(--sp-2); }
.footer__grid a { text-decoration: none; }
.footer__grid a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.footer__brand img { width: 200px; margin-bottom: var(--sp-4); }
.footer__brand p { color: var(--record-soft); font-size: var(--fs-300); }
.footer__signup { display: flex; gap: 0; margin-top: var(--sp-3); max-width: 22rem; }
.footer__signup input {
  flex: 1 1 auto; min-width: 0; font: inherit; font-size: var(--fs-300);
  padding: 0.55rem var(--sp-3); min-height: 44px;
  border: 1px solid var(--record-line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
  background: #0b2c22; color: #fff;
}
.footer__signup input::placeholder { color: #7d9c8d; }
.footer__signup input:focus-visible { outline-offset: -3px; }
.footer__signup button {
  font: inherit; font-size: var(--fs-200); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--accent-300); background: var(--accent-300); color: var(--record);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 0 var(--sp-4); min-height: 44px; cursor: pointer;
}
.footer__signup button:focus-visible { outline-color: #fff; outline-offset: -5px; }
.footer__note {
  margin-top: calc(var(--line) * 1.6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--record-line);
  font-size: var(--fs-200);
  color: var(--record-soft);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  justify-content: space-between;
}
.footer__note p { max-width: none; margin: 0; color: var(--record-soft); }

/* -------------------------------------------------------------- messages */

.demo-note {
  background: var(--canvas-tint);
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  font-size: var(--fs-300);
  color: var(--ink-soft);
}
.no-js-fallback {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--sp-5);
  background: var(--canvas-tint);
}

/* ------------------------------------------------------------- utilities */

.stack > * + * { margin-top: var(--line); }
.stack-tight > * + * { margin-top: calc(var(--line) * 0.5); }
.section-head { margin-bottom: calc(var(--line) * 1.1); }
.section-head p { max-width: 52ch; margin-bottom: 0; }
.text-soft { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
.mt-line { margin-top: var(--line); }

/* ------------------------------------------------------- view transitions */

@view-transition { navigation: auto; }
.brand { view-transition-name: chfa-brand; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------------ print */

@media print {
  .site-header, .site-footer, .site-alert, .mainnav, .omnibox, .utility, .help, .indexbar { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  .room--record, .site-footer, .hero { background: #fff !important; color: #000 !important; }
  .room--record h1, .room--record h2, .room--record h3, .hero h1 { color: #000 !important; }
  .room--record p, .site-footer p { color: #333 !important; }
  a { color: #000; text-decoration: underline; }
  .aperture__media, .door__figure img { clip-path: none !important; }
}

/* ------------------------------------------------------- data graphics */

/* Bars and rails are elements, not SVG: the build ships no vector files, and
   keeping the numbers as text means the graphic reads correctly aloud. */
.figure-block {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--sp-5);
  background: #fff;
}
.figure-block > h3 { font-size: var(--fs-500); margin-bottom: var(--sp-2); }
.figure-block > p { font-size: var(--fs-300); color: var(--ink-soft); }
.room--record .figure-block { background: rgba(232, 243, 237, 0.05); border-color: var(--record-line); }
.room--record .figure-block > p { color: var(--record-soft); }

.barchart { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: grid; gap: var(--sp-2); }
.barchart__row {
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) minmax(0, 1fr) auto;
  gap: var(--sp-3);
  align-items: center;
  margin: 0;
  font-size: var(--fs-200);
}
.barchart__label { color: var(--ink-soft); }
.barchart__track { background: var(--canvas-tint); border-radius: 2px; height: 0.85rem; overflow: hidden; }
.barchart__bar { display: block; height: 100%; width: var(--w); background: var(--accent-600); border-radius: 2px; }
.barchart__value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.room--record .barchart__label { color: var(--record-soft); }
.room--record .barchart__track { background: rgba(232, 243, 237, 0.12); }
.room--record .barchart__bar { background: var(--accent-300); }
.room--record .barchart__value { color: #fff; }

.timeline { list-style: none; margin: var(--sp-5) 0 0; padding: 0 0 0 var(--sp-5); position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 0.45em; bottom: 0.45em;
  width: 2px;
  background: var(--rule);
}
.timeline__item { position: relative; margin: 0 0 var(--sp-4); display: grid; gap: 2px; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(var(--sp-5) * -1 + 1px);
  top: 0.42em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-600);
  box-shadow: 0 0 0 3px var(--canvas);
}
.timeline__item--takes-effect::before { background: var(--warn-line); }
.timeline__item--superseded::before { background: var(--superseded); }
.timeline__date {
  font-size: var(--fs-100);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.timeline__label { font-size: var(--fs-300); }
.room--record .timeline::before { background: var(--record-line); }
.room--record .timeline__item::before { box-shadow: 0 0 0 3px var(--record); background: var(--accent-300); }
.room--record .timeline__date { color: var(--record-soft); }
.room--record .timeline__label { color: #fff; }

.rate-path {
  margin: var(--line) 0;
  border: 1px solid #cfe1ec;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: var(--sp-5);
  background: linear-gradient(110deg, #f6fbff 0%, #fff 72%);
}
.rate-path__head { display: flex; align-items: baseline; gap: var(--sp-4); }
.rate-path__head .eyebrow { color: var(--blue-ink); margin: 0; }
.rate-path__head h2 { font-size: var(--fs-600); margin: 0; }
.rate-path__steps {
  list-style: none;
  padding: 0;
  margin: var(--sp-5) 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}
.rate-path__steps li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
}
.rate-path__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1rem;
  right: calc(var(--sp-5) * -0.8);
  width: calc(var(--sp-5) * 0.6);
  height: 1px;
  background: #a8c9dd;
}
.rate-path__number {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--blue-ink);
  color: #fff;
  font-size: var(--fs-200);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rate-path__steps strong,
.rate-path__steps small { display: block; }
.rate-path__steps strong { line-height: 1.25; }
.rate-path__steps small { margin-top: var(--sp-1); color: var(--ink-soft); font-size: var(--fs-200); line-height: 1.45; }

@media (max-width: 44rem) {
  .rate-path__head { display: block; }
  .rate-path__head .eyebrow { margin-bottom: var(--sp-1); }
  .rate-path__steps { grid-template-columns: 1fr; gap: var(--sp-4); }
  .rate-path__steps li:not(:last-child)::after {
    top: 2rem;
    left: 0.99rem;
    right: auto;
    width: 1px;
    height: var(--sp-4);
  }
}

figure.plate { margin: 0; }
figure.plate img { border-radius: 3px; width: 100%; }
figure.plate figcaption {
  font-size: var(--fs-200);
  color: var(--ink-soft);
  margin-top: var(--sp-3);
  max-width: 52ch;
}
.room--record figure.plate figcaption { color: var(--record-soft); }
