:root {
      --blue: #006bb7;
      --coral: #ff7f61;
      --ink: #222222;
      --muted: #626b74;
      --line: #e8ebee;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      background: #ffffff;
      color: var(--ink);
      font-family: "Montserrat", Arial, sans-serif;
    }

    .container {
      max-width: 1040px;
      margin: 0 auto;
      padding: 34px 24px 25px;
    }

    .chart-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
    }

    h1 {
      margin: 0;
      font-size: 25px;
      line-height: 1.3;
      font-weight: 750;
    }

    .subtitle {
      margin: 12px 0 26px;
      color: #505862;
      font-size: 14px;
      line-height: 1.65;
      max-width: 760px;
    }

    .tap-hint {
      display: flex;
      align-items: center;
      gap: 7px;
      flex-shrink: 0;
      padding: 7px 11px 7px 9px;
      background: linear-gradient(180deg, #fafafa, #ececec);
      border: 1px solid #d8d8d8;
      border-radius: 8px;
      box-shadow: 0 2px 6px #00000012;
      color: #6d6d6d;
    }

    .tap-icon { font-size: 19px; transform: rotate(-12deg); }
    .tap-text { font-size: 10px; font-weight: 700; font-style: italic; line-height: 1.15; }
    .mobile-text { display: none; }

    .legend {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 16px 30px;
      margin-bottom: 17px;
      font-size: 12px;
      font-weight: 650;
    }

    .legend-item { display: flex; align-items: center; gap: 8px; }
    .legend-dot { width: 12px; height: 12px; border-radius: 50%; }
    .legend-dot.blue { background: var(--blue); }
    .legend-dot.coral { background: var(--coral); }

    .chart-wrap { position: relative; width: 100%; }
    #chart { display: block; width: 100%; height: auto; overflow: visible; }
    #chart text { font-family: "Montserrat", Arial, sans-serif; }
    .plot-row { cursor: pointer; }
    .plot-row:focus { outline: none; }
    .plot-row:focus .focus-ring { stroke: #555; stroke-width: 2; }

    .tooltip {
      position: absolute;
      z-index: 2;
      pointer-events: none;
      opacity: 0;
      background: #fff;
      border: 1px solid #e1e4e8;
      box-shadow: 0 5px 22px #00000019;
      border-radius: 9px;
      padding: 11px 14px;
      font-size: 11px;
      line-height: 1.8;
      min-width: 205px;
      transition: opacity 120ms;
    }

    .tooltip strong { font-size: 12px; }
    .tooltip .blue-text { color: var(--blue); font-weight: 750; }
    .tooltip .coral-text { color: #d96145; font-weight: 750; }

    .note {
      margin: 8px 0 15px;
      font-size: 11px;
      line-height: 1.6;
      font-style: italic;
      font-weight: 700;
    }

    .footer {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 18px;
      border-top: 1px solid #e8ebee;
      padding-top: 14px;
    }

    .footer-text {
      color: #555;
      font-size: 10px;
      line-height: 1.9;
    }

    .nar-logo { width: 112px; height: auto; object-fit: contain; flex-shrink: 0; }

    @media (max-width: 768px) {
      .container { padding: 24px 16px 20px; }
      h1 { font-size: 22px; }
      .subtitle { font-size: 12px; }
      .tap-text { font-size: 9px; }
      .legend { font-size: 11px; gap: 12px 20px; }
    }

    @media (max-width: 480px) {
      .container { padding: 20px 11px 16px; }
      .chart-header { gap: 8px; }
      h1 { font-size: 16px; }
      .subtitle { font-size: 11px; margin-bottom: 18px; }
      .tap-hint { gap: 4px; padding: 5px 7px; }
      .tap-icon { font-size: 13px; }
      .tap-text { font-size: 7px; }
      .desktop-text { display: none; }
      .mobile-text { display: block; }
      .legend { font-size: 9px; gap: 10px 14px; }
      .legend-dot { width: 9px; height: 9px; }
      .footer-text { font-size: 9px; }
      .nar-logo { width: 82px; }
    }

    /* Editorial annotations: exact supplied values only */
    .story-intro { margin: 18px 0 12px; font-size: 13px; line-height: 1.65; color: #4d5963; }
    .story-intro strong { color: #222; }
    .annotation-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 8px 0 16px; }
    .annotation { font-family: inherit; text-align: left; cursor: pointer; background: #fff; border: 1px solid #e1e5e8; border-left: 4px solid #ff7f61; border-radius: 7px; padding: 13px 15px; color: #333; transition: background .2s, border-color .2s, transform .2s; }
    .annotation:hover, .annotation:focus-visible, .annotation.active { background: #fff4f0; border-color: #ff7f61; outline-offset: 3px; }
    .annotation:hover { transform: translateY(-2px); }
    .annotation .stat { display: block; font-size: 27px; font-weight: 800; line-height: 1.2; color: #e66a4d; }
    .annotation .desc { display: block; font-size: 11px; font-weight: 650; line-height: 1.55; margin-top: 4px; }
    .age-section { margin-top: 23px; border-top: 1px solid #e5e8eb; padding-top: 20px; }
    .age-section h2 { margin: 0 0 7px; font-size: 18px; line-height: 1.4; }
    .age-section p { margin: 0 0 15px; color: #626b74; font-size: 12px; line-height: 1.6; }
    .age-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
    .age-card { padding: 17px; border: 1px solid #e6e8eb; border-radius: 8px; display: flex; gap: 15px; align-items: center; }
    .age-circle { width: 80px; height: 80px; flex: 0 0 80px; display: grid; place-items: center; border-radius: 50%; border: 7px solid #ff7f61; color: #d7664b; font-size: 22px; font-weight: 800; }
    .age-label { font-size: 13px; font-weight: 750; line-height: 1.4; }
    .age-range { display: block; margin-top: 4px; font-size: 11px; font-weight: 500; color: #626b74; }
    #chart .plot-row.is-muted { opacity: .2; }
    #chart .plot-row.is-highlighted circle[fill="#ff7f61"] { stroke: #b54830; stroke-width: 3px; }
    @media(max-width: 640px) {
      .annotation-grid { grid-template-columns: 1fr; gap: 8px; }
      .annotation { display: flex; align-items: center; gap: 12px; padding: 9px 12px; }
      .annotation .stat { font-size: 23px; }
      .annotation .desc { margin: 0; }
      .age-grid { grid-template-columns: 1fr; }
      .age-circle { width: 67px; height: 67px; flex-basis: 67px; font-size: 19px; }
    }

    /* Featured generation cards: reference-inspired editorial design */
    .generation-highlights {
      margin: 16px 0 18px;
      gap: 18px;
    }
    .generation-card {
      width: 100%;
      min-height: 142px;
      text-align: left;
      font-family: 'Montserrat', Arial, sans-serif;
      background: #fff;
      border: 1px solid #dfe4e8;
      border-radius: 10px;
      padding: 20px 22px;
      cursor: pointer;
      transition: border-color .2s ease, box-shadow .2s ease;
    }
    .generation-card:hover,
    .generation-card:focus-visible {
      border-color: #ff7f61;
      box-shadow: 0 3px 12px rgba(0,0,0,.06);
      outline-offset: 3px;
    }
    .generation-card.is-active { border-color: #ff7f61; }
    .generation-card .age-circle {
      width: 94px;
      height: 94px;
      flex: 0 0 94px;
      border: 8px solid #ff7f61;
      font-size: 27px;
    }
    .generation-card .age-label { display: block; font-size: 18px; }
    .generation-card .age-range { font-size: 14px; margin-top: 8px; }
    .generation-guide { margin-top: 2px !important; margin-bottom: 8px !important; }
    @media (max-width: 768px) {
      .generation-card { min-height: 120px; padding: 15px; gap: 12px; }
      .generation-card .age-circle { width: 75px; height: 75px; flex-basis: 75px; border-width: 7px; font-size: 22px; }
      .generation-card .age-label { font-size: 15px; }
      .generation-card .age-range { font-size: 12px; }
    }
    @media (max-width: 640px) {
      .generation-highlights { grid-template-columns: 1fr; gap: 10px; }
      .generation-card { min-height: 105px; }
    }

    /* Generational editorial dot plot */
    .generation-feature {
      display: flex;
      align-items: baseline;
      gap: 12px;
      margin: 6px 0 10px;
    }
    .generation-feature-value {
      color: #ff7f61;
      font-size: 32px;
      font-weight: 800;
    }
    .generation-feature-label {
      color: #333;
      font-size: 14px;
      font-weight: 700;
    }
    .generation-chart-wrap { width: 100%; overflow: hidden; }
    #generation-chart { width: 100%; display: block; font-family: 'Montserrat', Arial, sans-serif; }
    #generation-chart .gen-row { cursor: pointer; outline: none; }
    #generation-chart .gen-row:focus-visible .gen-hit { stroke: #006bb7; stroke-width: 2; }
    #generation-chart .gen-row .gen-hit { fill: transparent; }
    #generation-chart .gen-row .gen-dot { transition: r .16s ease, opacity .16s ease; }
    #generation-chart .gen-row.is-selected .gen-dot { stroke: #fff; stroke-width: 2.5; }
    @media (max-width: 480px) {
      .generation-feature-value { font-size: 26px; }
      .generation-feature-label { font-size: 12px; }
    }

    /* All seven generation values as editorial circle cards */
    .generation-circle-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      margin-top: 20px;
    }

    .generation-circle-card {
      display: flex;
      align-items: center;
      gap: 22px;
      min-height: 150px;
      padding: 20px 24px;
      border: 1px solid #dfe4e8;
      border-radius: 12px;
      background: #fff;
      box-sizing: border-box;
    }

    .generation-circle-card .age-circle {
      width: 102px;
      height: 102px;
      flex: 0 0 102px;
      border: 8px solid #ff7f61;
      color: #d7654d;
      font-size: 28px;
      font-weight: 800;
    }

    .generation-circle-card .age-label {
      display: block;
      font-size: 19px;
      line-height: 1.35;
      font-weight: 700;
    }

    .generation-circle-card .age-range {
      display: block;
      margin-top: 7px;
      font-size: 14px;
      color: #68737c;
    }

    @media (max-width: 768px) {
      .generation-circle-card { min-height: 120px; padding: 14px; gap: 12px; }
      .generation-circle-card .age-circle {
        width: 76px; height: 76px; flex-basis: 76px;
        border-width: 7px; font-size: 22px;
      }
      .generation-circle-card .age-label { font-size: 15px; }
      .generation-circle-card .age-range { font-size: 12px; }
    }

    @media (max-width: 540px) {
      .generation-circle-grid { grid-template-columns: 1fr; gap: 10px; }
      .generation-circle-card { min-height: 106px; }
    }
  
/* Consistent hover/tap hint from the supplied design */
.chart-header { align-items: center; justify-content: space-between; box-sizing: border-box; }
.tap-hint.fancy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 7px 11px 7px 9px;
  background: linear-gradient(180deg, #fafafa 0%, #ececec 100%);
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 10px rgba(0,0,0,.08);
}
.tap-hint.fancy .icon-wrap { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tap-hint.fancy .tap-icon { display: inline-block; font-size: 18px; line-height: 1; color: #7a7a7a; transform: rotate(-12deg); }
.tap-hint.fancy .tap-text { font-family: "Montserrat", Arial, sans-serif; font-size: 10px; line-height: 1.08; font-style: italic; font-weight: 700; color: #6d6d6d; letter-spacing: 0; text-align: left; white-space: nowrap; }
.tap-hint.fancy .desktop-text { display: block; }
.tap-hint.fancy .mobile-text { display: none; }
@media (hover: hover) and (pointer: fine) {
  .tap-hint.fancy { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
  .tap-hint.fancy:hover { transform: translateY(-1px); border-color: #cfcfcf; box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 8px 18px rgba(0,0,0,.10); }
}
@media (max-width: 768px) {
  .chart-header { gap: 12px; }
  .tap-hint.fancy { padding: 6px 10px 6px 8px; gap: 6px; }
  .tap-hint.fancy .tap-icon { font-size: 16px; }
  .tap-hint.fancy .tap-text { font-size: 9px; line-height: 1.06; }
}
@media (max-width: 480px) {
  .chart-header { flex-direction: row; align-items: flex-start; gap: 8px; }
  .tap-hint.fancy { align-self: flex-start; margin-left: 0; margin-top: 2px; padding: 5px 7px 5px 6px; gap: 4px; border-radius: 7px; }
  .tap-hint.fancy .tap-icon { font-size: 13px; }
  .tap-hint.fancy .tap-text { font-size: 7px; line-height: 1.02; }
  .tap-hint.fancy .desktop-text { display: none; }
  .tap-hint.fancy .mobile-text { display: block; }
}

/* Shared NAR editorial heading weight: Montserrat Bold (700). */
.chart-header h1 {
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 700;
}
</style>
<style>
/* ============================================================
   NAR Editorial System — matched to Housing Market Snapshot
   Typography / spacing / responsive layout only
   ============================================================ */
:root {
  --blue: #006bb7;
  --coral: #ff7f61;
  --ink: #333333;
  --muted: #555555;
}
html, body, button, input, select, textarea, svg, svg text,
svg tspan, .tooltip, .tap-hint, .age-circle {
  font-family: "Montserrat", Arial, sans-serif !important;
}
body { background: #ffffff; color: var(--ink); }
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 22px 24px 26px;
}
.chart-header { align-items: flex-start; gap: 20px; }
h1 {
  font-size: 34px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -0.5px;
  color: #333;
}
.subtitle {
  max-width: none;
  margin: 25px 0 30px;
  font-size: 23px;
  line-height: 1.55;
  font-weight: 400;
  color: #333;
}
.tap-hint {
  margin-top: 0;
  padding: 7px 11px 7px 9px;
  gap: 7px;
  background: linear-gradient(180deg, #fafafa, #ececec);
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  box-shadow: 0 1px 2px #0000000d, 0 4px 10px #00000014;
}
.tap-text { font-size: 10px; line-height: 1.08; }
.tap-icon { font-size: 18px; }
.legend {
  font-size: 18px;
  font-weight: 700;
  gap: 20px 32px;
  margin: 20px 0 22px;
}
.legend-dot { width: 18px; height: 18px; border-radius: 50%; }
.story-intro {
  margin: 20px 0 14px;
  font-size: 18px;
  line-height: 1.6;
  color: #444;
}
.annotation-grid { gap: 16px; margin: 12px 0 24px; }
.annotation { padding: 18px 18px; border-radius: 12px; }
.annotation .stat { font-size: 34px; }
.annotation .desc { font-size: 15px; }
.age-section { margin-top: 28px; padding-top: 28px; }
.age-section h2 { font-size: 29px; line-height: 1.35; margin-bottom: 13px; }
.age-section p { font-size: 19px; line-height: 1.6; margin-bottom: 23px; }
.generation-circle-grid { gap: 16px; }
.generation-circle-card {
  min-height: 148px;
  padding: 22px;
  border-radius: 12px;
  gap: 18px;
}
.generation-circle-card .age-circle {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  border-width: 8px;
  font-size: 28px;
}
.generation-circle-card .age-label { font-size: 19px; }
.generation-circle-card .age-range { font-size: 15px; }
.note {
  margin: 22px 0 13px;
  font-size: 19px;
  font-style: italic;
  font-weight: 800;
}
.footer {
  align-items: flex-end;
  padding-top: 10px;
  border-top: 0;
  gap: 25px;
}
.footer-text { font-size: 19px; line-height: 1.45; color: #555; }
.nar-logo { width: 265px; max-width: 32%; }
.tooltip { font-size: 13px; }
.tooltip strong { font-size: 14px; }

/* Tablet */
@media (max-width: 900px) {
  .container { padding: 20px 20px 22px; }
  h1 { font-size: 27px; }
  .subtitle { font-size: 18px; margin: 18px 0 24px; }
  .legend { font-size: 16px; }
  .story-intro { font-size: 15px; }
  .annotation .stat { font-size: 29px; }
  .annotation .desc { font-size: 13px; }
  .age-section h2 { font-size: 24px; }
  .age-section p { font-size: 16px; }
  .generation-circle-card { min-height: 125px; padding: 15px; }
  .generation-circle-card .age-circle {
    width: 79px; height: 79px; flex-basis: 79px;
    border-width: 7px; font-size: 22px;
  }
  .generation-circle-card .age-label { font-size: 16px; }
  .generation-circle-card .age-range { font-size: 12px; }
  .note, .footer-text { font-size: 15px; }
  .nar-logo { width: 205px; }
}
/* Mobile */
@media (max-width: 600px) {
  .container { padding: 16px 14px 20px; }
  .chart-header { gap: 8px; }
  h1 { font-size: 18px; line-height: 1.26; letter-spacing: 0; }
  .subtitle { font-size: 13px; line-height: 1.6; margin: 15px 0 20px; }
  .tap-hint { gap: 4px; padding: 5px 7px 5px 6px; }
  .tap-icon { font-size: 13px; }
  .tap-text { font-size: 7px; }
  .desktop-text { display: none; }
  .mobile-text { display: block; }
  .legend { font-size: 12px; gap: 10px 14px; margin: 12px 0 15px; }
  .legend-dot { width: 12px; height: 12px; border-radius: 50%; }
  .story-intro { font-size: 12px; margin: 8px 0 12px; }
  .annotation-grid { grid-template-columns: 1fr; gap: 8px; }
  .annotation { padding: 10px 12px; }
  .annotation .stat { font-size: 25px; }
  .annotation .desc { font-size: 12px; }
  .age-section { padding-top: 18px; margin-top: 20px; }
  .age-section h2 { font-size: 19px; }
  .age-section p { font-size: 12px; margin-bottom: 16px; }
  .generation-circle-grid { grid-template-columns: 1fr; gap: 10px; }
  .generation-circle-card { min-height: 96px; padding: 13px; gap: 13px; }
  .generation-circle-card .age-circle {
    width: 68px; height: 68px; flex-basis: 68px;
    border-width: 6px; font-size: 19px;
  }
  .generation-circle-card .age-label { font-size: 14px; }
  .generation-circle-card .age-range { font-size: 11px; }
  .note { font-size: 12px; margin: 16px 0 10px; }
  .footer { gap: 12px; }
  .footer-text { font-size: 11px; line-height: 1.55; }
  .nar-logo { width: 110px; max-width: 34%; }
}