/* Nashville ice storm 2026 (Winter Storm Fern) data study – page styles.
   Uses the site tokens from /components/shared-styles.css; winter palette on top. */
.tfm {
  --ink: #142230;
  --ink-2: #4a5d6d;
  --line: #d8e3ec;
  --ice: #bfe8ff;
  --ice-2: #6fb9e6;
  --fern: #3a8fd0;
  --pre: #9db0c0;
  --post: #d6e1ea;
  --ice-bg: #eef5fa;
  --night: #0b1620;
  --night-2: #13232f;
  color: var(--ink);
  overflow-wrap: break-word;
}
.tfm .visually-hidden, .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tfm h2 { font-family: 'Montserrat', sans-serif; font-size: clamp(26px, 4.2vw, 38px); line-height: 1.15; margin: 0 0 14px; color: var(--ink); letter-spacing: -0.01em; }
.tfm h3 { font-family: 'Montserrat', sans-serif; font-size: clamp(18px, 2.4vw, 21px); line-height: 1.3; margin: 28px 0 10px; color: var(--ink); }
.tfm p, .tfm li { font-size: 17px; line-height: 1.65; }
.tfm a { color: #1f5f99; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.tfm .small, .tfm .small a { font-size: 14px; color: var(--ink-2); }
.tfm .src { font-size: 12.5px !important; line-height: 1.5 !important; color: var(--ink-2); margin: 8px 0 0; }
.tfm-sec { padding: 64px 0; scroll-margin-top: 120px; }
.tfm-ice { background: var(--ice-bg); }
.tfm-narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.tfm-kicker { font-family: 'Montserrat', sans-serif; font-size: 13px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9fd8ff; margin: 0 0 8px; }

/* ---------- dark sections ---------- */
.tfm-dark { background: var(--night); color: #e9f1f5; }
.tfm-dark h2, .tfm-dark h3 { color: #fff; }
.tfm-dark p, .tfm-dark li { color: #cfdbe2; }
.tfm-dark a { color: #9fd8ff; }
.tfm-dark .src, .tfm-dark .small, .tfm-dark .small a { color: #9fb3c0; }

/* ---------- hero ---------- */
.tfm-hero { position: relative; color: #fff; background: var(--night); padding: 108px 0 40px; overflow: hidden; }
.tfm-hero__bg { position: absolute; inset: 0; }
.tfm-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.tfm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,20,32,.62) 0%, rgba(8,20,32,.8) 40%, rgba(8,18,26,.96) 100%); }
.tfm-hero__inner { position: relative; z-index: 1; }
.hero-vis { margin-top: 4px; }
@media (min-width: 1100px) {
  .hero-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); grid-template-areas: "t v" "f v"; gap: 0 40px; align-items: start; }
  .hero-text { grid-area: t; } .hero-vis { grid-area: v; margin-top: 46px; } .hero-foot { grid-area: f; }
  .hero-foot .tfm-stats { grid-template-columns: 1fr !important; }
  .hero-foot .tfm-stats li { display: flex !important; align-items: baseline; }
  .hero-foot .tfm-stats strong { display: inline !important; margin: 0 !important; min-width: 92px; }
  .tfm-hero h1 { font-size: 52px; }
}
.tfm-crumbs { font-size: 13px; margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 8px; color: rgba(255,255,255,.7); }
.tfm-crumbs a { color: rgba(255,255,255,.85); }
.tfm-hero h1 { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: clamp(34px, 6.4vw, 64px); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 14px; color: #fff; max-width: 16ch; }
.tfm-lede { font-size: clamp(18px, 2.4vw, 21px) !important; line-height: 1.5 !important; max-width: 640px; color: rgba(255,255,255,.92); margin: 0 0 22px; }
.hero-chart { margin: 0; padding: 16px 16px 10px; border-radius: 14px; background: rgba(8,18,26,.62); border: 1px solid rgba(191,232,255,.18); backdrop-filter: blur(6px); }
.hero-chart__title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; color: #dbe7ee; margin: 0 0 6px; }
.hero-chart .src { color: #9fb3c0; }
.chart--hero .grid { stroke: rgba(255,255,255,.08); }
.chart--hero .ax { fill: #9fb3c0; font: 15px 'Open Sans', sans-serif; }
.chart--hero .spk { stroke: rgba(159,216,255,.55); stroke-width: 1.1; fill: none; }
.chart--hero .spk--fern { stroke: #bfe8ff; stroke-width: 1.6; filter: drop-shadow(0 0 3px rgba(191,232,255,.7)); }
.chart--hero .ann circle { fill: #fff; }
.chart--hero .ann text { font: 600 15px 'Open Sans', sans-serif; fill: #cfdbe2; }
.chart--hero .ann .big { font: 800 40px 'Montserrat', sans-serif; fill: #fff; }
.chart--hero .ann .mid { font: 800 20px 'Montserrat', sans-serif; fill: #fff; }
.tfm-stats { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.tfm-stats li { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 12px 14px; display: flex; align-items: baseline; gap: 12px; }
.tfm-stats strong { flex: 0 0 auto; font-family: 'Montserrat', sans-serif; font-size: clamp(24px, 3.6vw, 34px); font-weight: 800; line-height: 1; color: #fff; }
.tfm-stats span { font-size: 14px; line-height: 1.35; color: rgba(255,255,255,.82); }
.tfm-byline { font-size: 13px !important; color: rgba(255,255,255,.65); margin: 18px 0 0; }
.tfm-byline a { color: #fff; }
@media (min-width: 900px) { .tfm-stats { grid-template-columns: repeat(3, 1fr); } .tfm-stats li { display: block; } .tfm-stats strong { display: block; margin-bottom: 6px; } .tfm-hero { padding: 124px 0 52px; } }

/* ---------- toc ---------- */
.tfm-toc { position: sticky; top: 64px; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.tfm-toc .container { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.tfm-toc .container::-webkit-scrollbar { display: none; }
.tfm-toc a { flex: 0 0 auto; font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.tfm-toc a:hover, .tfm-toc a.is-active { color: #fff; background: var(--ink); border-color: var(--ink); }

/* ---------- share / embed ---------- */
.share { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink) !important; font: 600 13px 'Montserrat', sans-serif; text-decoration: none; cursor: pointer; }
.share-btn svg { width: 16px; height: 16px; fill: currentColor; }
.share-btn--main { background: var(--ink); color: #fff !important; border-color: var(--ink); }
.share--dark .share-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff !important; }
.share--dark .share-btn--main { background: #bfe8ff; color: var(--night) !important; border-color: #bfe8ff; }
.share--lead { justify-content: center; }
.share--lead .share-btn--main { min-height: 44px; padding: 0 20px; font-size: 14px; }
.embed-panel { flex: 1 1 100%; margin-top: 6px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-align: left; }
.embed-note { font-size: 14px !important; margin: 0 0 8px; color: var(--ink-2) !important; }
.embed-code { position: relative; margin-top: 10px; padding: 10px 12px 50px; border-radius: 8px; background: #f4f8fb; border: 1px solid var(--line); }
.embed-l { font: 700 12px 'Montserrat', sans-serif !important; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2) !important; margin: 0 0 4px; }
.embed-code code { display: block; font-size: 12px; line-height: 1.5; word-break: break-all; color: var(--ink); max-height: 96px; overflow: auto; white-space: pre-wrap; }
.copy-btn { position: absolute; right: 10px; bottom: 10px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 8px; border: 0; background: var(--ink); color: #fff; cursor: pointer; min-height: 36px; }
.copy-btn.is-done { background: var(--fern); }

/* ---------- Fern player ---------- */
.fern-player { margin: 26px auto 0; max-width: 860px; }
.fern-stage { position: relative; background: var(--night-2); border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.fern-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 1006; }
.fern-stage noscript img { width: 100%; height: auto; display: block; }
.fern-hud { position: absolute; left: 14px; top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(8,18,26,.72); border: 1px solid rgba(255,255,255,.1); pointer-events: none; }
.fern-hud p { margin: 0; font-size: 14px !important; line-height: 1.5 !important; color: #dbe7ee; }
.fern-clock { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(15px, 2.4vw, 20px) !important; color: #fff !important; margin-bottom: 4px !important; font-variant-numeric: tabular-nums; }
.fern-count strong { font-family: 'Montserrat', sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot--f { background: var(--ice); box-shadow: 0 0 6px var(--ice); }
.dot--d { background: #f6ad3c; box-shadow: 0 0 6px #f6ad3c; }
.fern-controls { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
.fern-btn { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; }
.fern-btn svg { width: 22px; height: 22px; fill: currentColor; }
.fern-btn .i-pause { display: none; }
.fern-btn.is-playing .i-play { display: none; }
.fern-btn.is-playing .i-pause { display: inline; }
.fern-btn--text { width: auto; border-radius: 999px; padding: 0 16px; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 13px; }
.fern-btn:focus-visible { outline: 3px solid #9fd8ff; outline-offset: 2px; }
#fern-scrub { flex: 1 1 auto; accent-color: #9fd8ff; height: 28px; }
.fern-days { margin-top: 4px; }
.fern-player figcaption { font-size: 13px; color: #9fb3c0; margin-top: 10px; line-height: 1.5; }
.chart--days { min-height: 90px; }
.chart--days .grid { stroke: rgba(255,255,255,.08); }
.chart--days .ax { fill: #9fb3c0; font: 12px 'Open Sans', sans-serif; }
.chart--days .s-f { fill: var(--ice-2); }
.chart--days .s-d { fill: #f6ad3c; }
.chart--days .fday { opacity: .45; transition: opacity .2s; }
.chart--days .fday.is-past { opacity: 1; }
.chart--days .fday.is-now .s-f { fill: #fff; }

/* ---------- quotes ---------- */
.quote { margin: 28px 0; padding: 20px 22px; border-left: 4px solid var(--fern); background: #fff; border-radius: 0 12px 12px 0; }
.quote p { font-family: 'Montserrat', sans-serif; font-size: clamp(17px, 2.2vw, 20px) !important; line-height: 1.45 !important; font-weight: 600; margin: 0 0 10px; color: var(--ink); }
.quote footer { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.quote footer img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.quote--dark { max-width: 760px; margin: 36px auto 0; background: rgba(255,255,255,.05); border-left-color: var(--ice); }
.quote--dark p { color: #fff !important; }
.quote--dark footer, .quote--dark footer strong { color: #cfdbe2; }

/* ---------- key number cards ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 26px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 16px; scroll-margin-top: 130px; display: flex; flex-direction: column; }
.card:target { box-shadow: 0 0 0 3px var(--ice-2); }
.card h3 { margin: 0 0 14px; font-size: 17px; line-height: 1.3; }
.card h3 strong { display: block; font-size: clamp(32px, 4.2vw, 44px); line-height: 1.05; font-weight: 800; color: var(--fern); }
.card p { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 12px 0 8px; }
.card .cite-link { margin-top: auto; font-size: 13px; color: var(--ink-2) !important; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(6, 1fr); } .card--a { grid-column: span 2; } .card--b { grid-column: span 3; } }
.hb { display: grid; gap: 8px; }
.hb-r { display: grid; grid-template-columns: minmax(0, 1fr) 46px; grid-template-areas: "l l" "t n"; gap: 3px 8px; align-items: center; }
.hb-l { grid-area: l; font-size: 13px; color: var(--ink-2); }
.hb-t { grid-area: t; height: 14px; background: #f0f5f9; border-radius: 4px; overflow: hidden; }
.hb-b { display: block; height: 100%; width: var(--w); background: var(--pre); border-radius: 4px; }
.hb-r--hl .hb-b { background: var(--fern); }
.hb-n { grid-area: n; font: 700 14px 'Montserrat', sans-serif; text-align: right; }
.split { display: flex; height: 64px; border-radius: 8px; overflow: hidden; font-size: 13px; }
.split b { display: block; font: 800 18px 'Montserrat', sans-serif; }
.split-a { width: var(--w); background: var(--fern); color: #fff; padding: 8px 10px; line-height: 1.25; }
.split-b { flex: 1; background: #e3ecf3; color: var(--ink-2); padding: 8px 10px; line-height: 1.25; }
.chart { width: 100%; height: auto; display: block; }
.chart--mini .ax { font: 12px 'Open Sans', sans-serif; fill: var(--ink-2); }
.chart--mini .val { font: 700 11px 'Montserrat', sans-serif; fill: var(--ink); }
.chart--mini .s-o { fill: var(--pre); }
.chart--mini .s-fern { fill: var(--fern); }

/* ---------- photos + context ---------- */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.ph { margin: 0; position: relative; border-radius: 10px; overflow: hidden; background: var(--night-2); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 3 / 4; }
.ph--wide, .ph--land { grid-column: 1 / -1; }
.ph--wide img { aspect-ratio: 4 / 3; }
.ph--land img { aspect-ratio: 3 / 2; }
.ph figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 9px; font-size: 12.5px; line-height: 1.4; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.78)); }
.ph figcaption a { color: #cfeaff; }
@media (min-width: 760px) {
  .photo-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; }
  .ph img, .ph--wide img, .ph--land img { aspect-ratio: auto; }
  .ph { grid-row: span 2; }
  .ph--wide { grid-column: span 2; grid-row: span 2; }
  .ph--land { grid-column: span 2; grid-row: span 1; }
}
.ctx-title { margin-top: 44px !important; }
.ctx-intro { margin: 0 0 4px; }
.ctx-stats { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ctx-stats li { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 14px; }
.ctx-stats strong { display: block; font-family: 'Montserrat', sans-serif; font-size: clamp(22px, 3vw, 28px); font-weight: 800; color: #fff; }
.ctx-stats span { font-size: 13.5px; line-height: 1.45; display: block; }
@media (min-width: 900px) { .ctx-stats { grid-template-columns: repeat(4, 1fr); } }

/* ---------- before / during / after hex maps ---------- */
.hex3 { position: relative; margin: 24px 0 0; }
.hex3-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.hex3-tabs button { flex: 1; font: 600 13px 'Montserrat', sans-serif; padding: 9px 8px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; min-height: 40px; }
.hex3-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.hex3-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.hex3-grid[data-active="0"] .hex3-panel:not([data-p="0"]), .hex3-grid[data-active="1"] .hex3-panel:not([data-p="1"]), .hex3-grid[data-active="2"] .hex3-panel:not([data-p="2"]) { display: none; }
@media (min-width: 900px) {
  .hex3-tabs { display: none; }
  .hex3-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hex3-grid .hex3-panel { display: block !important; }
}
.hex3-h { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; margin: 0 0 8px; align-items: end; }
.hex3-h b { font: 800 16px 'Montserrat', sans-serif; }
.hex3-h span { grid-column: 1; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.hex3-h strong { grid-column: 2; grid-row: 1 / 3; font: 800 28px 'Montserrat', sans-serif; color: var(--fern); }
.hex3-panel[data-p="1"] .hex-stage { border-color: var(--ice-2); box-shadow: 0 0 0 2px rgba(111,185,230,.25); }
.hex-stage { position: relative; background: #f7fafc; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.hex-stage svg { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 1006; touch-action: manipulation; }
.hex-scroll.is-zoomed { aspect-ratio: 1000 / 1006; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.hex-scroll.is-zoomed svg { width: 260%; max-width: none; }
.hex-zoom { position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 700 22px/1 'Montserrat', sans-serif; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(20,34,48,.15); }
.hex-zoom .z-out, .hex-zoom[aria-pressed="true"] .z-in { display: none; }
.hex-zoom[aria-pressed="true"] .z-out { display: inline; }
.hex-stage .county { fill: #fff; stroke: #c3d2de; stroke-width: 1.5; }
.hex-stage .river { fill: none; stroke: #a9cde2; stroke-width: 2.4; stroke-linecap: round; }
.hex-stage .dline { fill: none; stroke: #6b7f90; stroke-width: .8; opacity: .45; pointer-events: none; }
.hex-stage .hx { stroke: #fff; stroke-width: .6; cursor: pointer; }
.hex-stage .hx--0 { fill: transparent; }
.hex-stage .hx.is-hover { stroke: var(--ink); stroke-width: 2.4; fill: #ffd27a !important; }
.hex-stage .clab { font: 600 15px 'Open Sans', sans-serif; fill: var(--ink); paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 3px; pointer-events: none; }
.hex-tip { position: absolute; z-index: 3; pointer-events: none; background: var(--ink); color: #fff; padding: 9px 11px; border-radius: 8px; font-size: 13px; line-height: 1.35; width: 210px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.25); transform: translate(-50%, calc(-100% - 10px)); }
.hex-tip strong { display: block; font-family: 'Montserrat', sans-serif; font-size: 14px; margin-bottom: 6px; }
.hex-tip .tr { display: grid; grid-template-columns: 84px 1fr 26px; gap: 6px; align-items: center; }
.hex-tip .tb { height: 8px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
.hex-tip .tb span { display: block; height: 100%; }
.hex-tip .b0 { background: var(--pre); } .hex-tip .b1 { background: #7fc4f0; } .hex-tip .b2 { background: #e3ecf3; }
.hex-tip b { text-align: right; font-family: 'Montserrat', sans-serif; }
.hex-legend { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.hex-legend .ramp { display: flex; }
.hex-legend .ramp span { width: 42px; height: 26px; position: relative; }
.hex-legend .ramp i { position: absolute; left: 0; right: 0; bottom: -18px; font-style: normal; font-size: 11px; text-align: center; }
.hex-legend { padding-bottom: 16px; }

/* ---------- districts ---------- */
.dist-wrap { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 24px; align-items: start; }
@media (min-width: 900px) { .dist-wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; } }
.dist-wrap > *, .nb-grid > *, .yt-grid > *, .yt-cols > * { min-width: 0; }
.dmap { margin: 0; }
.dmap-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; border: 1px solid var(--line); margin-bottom: 10px; }
.dmap-toggle button { font: 600 13px 'Montserrat', sans-serif; padding: 8px 12px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; min-height: 36px; }
.dmap-toggle button[aria-checked="true"] { background: var(--ink); color: #fff; }
.dmap svg { width: 100%; height: auto; display: block; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.dmap .county { fill: #eef3f7; }
.dmap .dist { stroke: #fff; stroke-width: 1.4; cursor: pointer; }
.dmap .dist:hover, .dmap .dist:focus, .dmap .dist.is-on { stroke: var(--ink); stroke-width: 3; outline: none; }
.dmap[data-metric="s"] .s0, .legend .s0 { fill: #dcecf6; background: #dcecf6; }
.dmap[data-metric="s"] .s1, .legend .s1 { fill: #a9d1ec; background: #a9d1ec; }
.dmap[data-metric="s"] .s2, .legend .s2 { fill: #6fb0de; background: #6fb0de; }
.dmap[data-metric="s"] .s3, .legend .s3 { fill: #3a86c4; background: #3a86c4; }
.dmap[data-metric="s"] .s4, .legend .s4 { fill: #1b5a98; background: #1b5a98; }
.dmap[data-metric="r"] .r0, .legend .r0 { fill: #e6edf2; background: #e6edf2; }
.dmap[data-metric="r"] .r1, .legend .r1 { fill: #c3d3df; background: #c3d3df; }
.dmap[data-metric="r"] .r2, .legend .r2 { fill: #93abbe; background: #93abbe; }
.dmap[data-metric="r"] .r3, .legend .r3 { fill: #5f7e97; background: #5f7e97; }
.dmap[data-metric="r"] .r4, .legend .r4 { fill: #34536d; background: #34536d; }
.dmap .dlab { font: 700 19px 'Montserrat', sans-serif; text-anchor: middle; fill: var(--ink); paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 3px; pointer-events: none; }
.dmap[data-metric="s"] .legend--r, .dmap[data-metric="r"] .legend--s { display: none; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.legend li { font-size: 13px !important; display: flex; align-items: center; gap: 6px; }
.legend .sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.dpanel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.dp-k { font: 700 13px 'Montserrat', sans-serif !important; letter-spacing: .1em; text-transform: uppercase; color: var(--fern); margin: 0; }
.dp-h { margin: 2px 0 2px !important; font-size: 24px !important; }
.dp-a { font-size: 14px !important; color: var(--ink-2); margin: 0 0 14px; }
.dp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.dp-stats p, .zo-s p { margin: 0; font-size: 13px !important; line-height: 1.35 !important; color: var(--ink-2); }
.dp-stats strong, .zo-s strong { display: block; font: 800 26px 'Montserrat', sans-serif; color: var(--ink); }
.dp-stats p:nth-child(2) strong, .dp-stats p:nth-child(3) strong { color: var(--fern); }
.dp-bar, .pa-t { display: flex; height: 18px; border-radius: 5px; overflow: hidden; background: #f0f5f9; }
.seg { display: block; height: 100%; }
.seg--pre { background: var(--pre); } .seg--fern { background: var(--fern); } .seg--post { background: var(--post); }
.dp-key, .pa-key { font-size: 13px !important; color: var(--ink-2); margin: 8px 0 12px; }
.k { display: inline-block; width: 11px; height: 11px; border-radius: 2px; vertical-align: -1px; margin: 0 4px 0 8px; }
.k:first-child { margin-left: 0; }
.k--pre { background: var(--pre); } .k--fern { background: var(--fern); } .k--post { background: var(--post); border: 1px solid #c4d3df; }
.dp-pace { font-size: 16px !important; margin: 0 0 6px; }
.dp-pace b { color: var(--fern); }
.dp-rank { font-size: 14px !important; color: var(--ink-2); margin: 0; }
details.more { margin-top: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
details.more summary { cursor: pointer; padding: 14px 18px; font: 700 15px 'Montserrat', sans-serif; }
details.more .table-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0; max-height: 520px; overflow: auto; }
details.more .small { padding: 0 18px 14px; margin: 10px 0 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; }
.dtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.dtable th, .dtable td { padding: 9px 12px; text-align: right; border-bottom: 1px solid #edf2f6; white-space: nowrap; }
.dtable th:nth-child(-n+2), .dtable td:nth-child(-n+2) { text-align: left; }
.dtable thead th { position: sticky; top: 0; background: #fff; font: 700 12px 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); cursor: pointer; user-select: none; white-space: normal; vertical-align: bottom; }
.dtable thead th[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
.dtable thead th[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
.dtable tbody tr.is-on { background: #e6f2fb; }
.dtable tbody tr:hover { background: #f5f9fc; }

/* ---------- neighborhoods ---------- */
.nb-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 24px; align-items: start; }
@media (min-width: 900px) { .nb-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; } }
.fig-h { display: block; font: 700 15px 'Montserrat', sans-serif !important; margin: 0 0 8px; color: var(--ink); }
.pa-fig { margin: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.pa-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.pa-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "t t"; gap: 3px 10px; font-size: 14px; line-height: 1.3; }
.pa-n { grid-area: n; } .pa-v { grid-area: v; color: var(--ink-2); font-size: 13px; } .pa-v b { color: var(--ink); }
.pa-t { grid-area: t; height: 14px; background: transparent; }
.zip-look { padding: 18px; background: var(--ice-bg); border-radius: 14px; border: 1px solid var(--line); }
.zip-look select { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.zip-out { margin-top: 12px; }
.zip-out p { font-size: 15px; margin: 0; }
.zo-h { margin-bottom: 10px !important; } .zo-h b { font: 800 20px 'Montserrat', sans-serif; margin-right: 6px; }
.zo-s { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zo-s strong { font-size: 22px; }
.st-two { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 22px; }
@media (min-width: 560px) { .st-two { grid-template-columns: 1fr 1fr; } }
.streets { list-style: none; padding: 0; margin: 0; }
.streets li { display: grid; grid-template-columns: minmax(0, 1fr) 30px; grid-template-areas: "s n" "b b"; gap: 2px 8px; font-size: 14px; padding: 3px 0; }
.st-name { grid-area: s; } .st-n { grid-area: n; text-align: right; font: 700 14px 'Montserrat', sans-serif; }
.st-bar { grid-area: b; height: 7px; border-radius: 3px; background: linear-gradient(90deg, var(--pre) var(--w), #edf2f6 var(--w)); }
.streets--fern .st-bar { background: linear-gradient(90deg, var(--fern) var(--w), #edf2f6 var(--w)); }

/* ---------- your trees ---------- */
.yt-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 900px) { .yt-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 44px; } }
.yt-photo { margin: 0; }
.yt-photo img { width: 100%; height: auto; border-radius: 14px; display: block; }
.yt-photo figcaption { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.yt-cols { display: grid; grid-template-columns: 1fr; gap: 10px 40px; margin-top: 12px; }
@media (min-width: 860px) { .yt-cols { grid-template-columns: 1fr 1fr; } }
.yt-cols p { font-size: 16px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 6px; font-size: 16px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--fern); }
.cta-card { margin: 32px 0 0; padding: 24px; border-radius: 14px; background: var(--night); color: #fff; display: grid; gap: 18px; }
.cta-card h3 { color: #fff; margin: 0 0 6px; }
.cta-card p { color: rgba(255,255,255,.85); margin: 0; font-size: 16px; }
.cta-card a:not(.btn) { color: #9fd8ff; }
.cta-card__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-card .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
@media (min-width: 860px) { .cta-card { grid-template-columns: 1fr auto; align-items: center; } .cta-card__btns { flex-direction: column; } }

/* ---------- use this data, faq, method ---------- */
.copy-box { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 56px; margin: 18px 0; }
.copy-box p { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.downloads { padding-left: 20px; }
.downloads li { font-size: 16px; }
#faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 0 18px; }
#faq summary { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 17px; padding: 16px 0; cursor: pointer; }
#faq details p { margin: 0 0 16px; }
.tfm-method h2 { font-size: 22px; }
.tfm-method h3 { font-size: 17px; }
.tfm-method p, .tfm-method li { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.sources { padding-left: 20px; }
.sources li { margin-bottom: 4px; }

@media (max-width: 520px) {
  .tfm-sec { padding: 48px 0; }
  .fern-hud { left: 8px; top: 8px; padding: 8px 10px; }
  .fern-hud p { font-size: 12px !important; }
  .dp-stats strong { font-size: 22px; }
  .zo-s strong { font-size: 19px; }
  .dtable { font-size: 14px; }
  .dtable th, .dtable td { padding: 8px 7px; }
  .hero-chart { padding: 12px 10px 8px; }
  .chart--hero .ann .big { font-size: 50px; }
  .chart--hero .ann text, .chart--hero .ax { font-size: 23px; }
  .chart--hero .ann .mid { font-size: 26px; }
  .tfm-stats strong { min-width: 70px; }
}
@media (prefers-reduced-motion: reduce) { .tfm * { transition: none !important; } }

.tfm-method p { margin: 0 0 12px; }
.tfm .cta-section { padding: 60px 0; background: linear-gradient(135deg, #12324c 0%, var(--night) 100%); text-align: center; color: #fff; }
.tfm .cta-section h2 { color: #fff; }
.tfm .cta-section p { color: rgba(255,255,255,.85); max-width: 620px; margin: 0 auto 24px; }
.tfm .cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tfm .btn-white { background: #fff; color: var(--ink) !important; border: 2px solid #fff; }
.tfm .btn-outline-white { background: transparent; color: #fff !important; border: 2px solid rgba(255,255,255,.7); }

/* screenshot mode for share images (make_assets.py) */
.shot-frame { width: 1200px; padding: 40px 44px 30px; background: #fff; font-family: 'Open Sans', sans-serif; }
.shot-frame--dark { background: var(--night); }
.shot-frame .shot-k { font: 700 14px 'Montserrat', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--fern); margin: 0 0 6px; }
.shot-frame .shot-t { font: 800 34px/1.15 'Montserrat', sans-serif; color: var(--ink); margin: 0 0 18px; }
.shot-frame--dark .shot-t { color: #fff; }
.shot-frame .shot-f { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; font-size: 15px; color: var(--ink-2); }
.shot-frame--dark .shot-f { color: #9fb3c0; border-color: rgba(255,255,255,.12); }
.shot-frame .shot-f b { font-family: 'Montserrat', sans-serif; color: var(--ink); }
.shot-frame--dark .shot-f b { color: #fff; }
