/* =========================================================
   HFRI: Household Financial Resilience Index
   Visual idea: a structural load test. Ink, signal yellow,
   and hazard stripes for the transition zone.
   ========================================================= */

:root {
  --ground: #eef0f2;
  --surface: #ffffff;
  --ink: #11161d;
  --slate: #4f5a68;
  --rule: #c7cdd4;
  --rule-soft: #dde1e6;
  --signal: #f2ba0e;

  --band-very-low: #a23b2a;
  --band-low: #cf6b34;
  --band-high: #5e9c7a;
  --band-very-high: #1f6f54;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  font-feature-settings: "tnum" 1;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

p { margin: 0 0 1em; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--signal);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--signal);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; }

.muted { color: var(--slate); }
.small { font-size: 0.875rem; color: var(--slate); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--gutter);
  background: var(--ink);
  color: #fff;
}

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-mark {
  background: var(--signal);
  color: var(--ink);
  font: 800 1rem/1 var(--font-display);
  letter-spacing: 0.02em;
  padding: 0.4rem 0.55rem;
}
.brand-name { font-weight: 600; }

.nav { display: flex; align-items: center; gap: 1.4rem; font-size: 0.95rem; }
.nav a { text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--signal); }
.nav .nav-cta {
  background: var(--signal);
  color: var(--ink);
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-bottom: 0;
}
.nav .nav-cta:hover { background: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font: 600 1rem/1 var(--font-body);
  padding: 0.95rem 1.4rem;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--signal); color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 2.5rem 4rem;
  align-items: end;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 15ch;
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  max-width: 44rem;
  margin: 1.6rem 0 0;
  color: #27303b;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

.signature {
  border-left: 6px solid var(--signal);
  padding: 0.2rem 0 0.2rem 1.2rem;
}
.signature-name {
  font: 800 clamp(1.8rem, 3vw, 2.6rem)/1.05 var(--font-display);
  letter-spacing: -0.025em;
  margin: 0 0 0.6rem;
}
.signature-line { margin: 0 0 0.2rem; color: var(--slate); }

.hero-figure { margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; }
.hero-figure figcaption { font-weight: 600; margin-bottom: 0.2rem; }

/* ---------- ruler (shared by hero and result) ---------- */
.ruler { position: relative; margin: 3.6rem 0 3.4rem; }
.ruler-bar { display: flex; height: 28px; border: 2px solid var(--ink); background: var(--surface); }

.seg { display: block; height: 100%; }
.seg--high-risk { background: var(--band-very-low); }
.seg--elevated-risk { background: var(--band-low); }
.seg--moderate-risk {
  background: repeating-linear-gradient(-45deg, var(--signal) 0 4px, var(--ink) 4px 8px);
}
.seg--low-risk { background: var(--band-very-high); }

.tick {
  position: absolute;
  top: -14px;
  height: 56px;
  width: 0;
  border-left: 2px solid var(--ink);
}
.tick-label {
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--slate);
}
.tick-label b { display: block; color: var(--ink); font-size: 0.95rem; font-weight: 600; }
.tick--up .tick-label { bottom: 100%; margin-bottom: 4px; }
.tick--down .tick-label { top: 100%; margin-top: 4px; }
.tick--end .tick-label { transform: translateX(-100%); text-align: right; }
.tick--median { border-left-width: 4px; }

.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend .swatch { width: 18px; height: 18px; border: 1.5px solid var(--ink); display: inline-block; }
.noscript { margin-top: 1rem; font-weight: 600; }

/* hero entrance: the one orchestrated motion on the page */
.hero-figure .seg { transform-origin: left center; animation: bar-grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-figure .seg:nth-child(2) { animation-delay: 0.1s; }
.hero-figure .seg:nth-child(3) { animation-delay: 0.2s; }
.hero-figure .seg:nth-child(4) { animation-delay: 0.3s; }
.hero-figure .tick { animation: tick-in 0.5s ease-out 1.1s both; }

@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tick-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- sections ---------- */
.section { border-top: 3px solid var(--ink); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 1.5rem 4rem;
}
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.section-head p { margin: 1rem 0 0; color: var(--slate); max-width: 22rem; }

.prose { max-width: 46rem; }
.prose h3 { font-size: 1.35rem; margin: 2.2rem 0 0.9rem; }
.prose p { line-height: 1.7; }

.question {
  margin: 0 0 1.8rem;
  padding: 0 0 0 1.2rem;
  border-left: 6px solid var(--signal);
  font: 600 clamp(1.2rem, 2vw, 1.5rem)/1.35 var(--font-display);
  letter-spacing: -0.01em;
}

.ledger { margin: 0; border-top: 2px solid var(--ink); }
.ledger > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.2rem 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.ledger dt { font-weight: 600; }
.ledger dd { margin: 0; }

.arbor {
  margin-top: 2.2rem;
  padding: 1.1rem 1.3rem;
  background: var(--ink);
  color: #fff;
}
.arbor h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.arbor p { margin: 0; }
.arbor a { color: var(--signal); font-weight: 600; }

/* ---------- method ---------- */
.formula-block { border: 2px solid var(--ink); background: var(--surface); padding: 1.1rem 1.3rem; margin-bottom: 1.6rem; }
.formula { font: 500 1.05rem/1.6 var(--font-body); margin: 0 0 0.5rem; overflow-wrap: anywhere; }
.formula-note { margin: 0.6rem 0 0; font-size: 0.92rem; color: var(--slate); line-height: 1.55; }

.accordion { border-top: 2px solid var(--ink); }
.accordion details { border-bottom: 1px solid var(--rule); }
.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  font: 700 1.2rem/1.2 var(--font-display);
  letter-spacing: -0.01em;
  position: relative;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  font: 500 1.6rem/1 var(--font-body);
}
.accordion details[open] > summary::after { content: "–"; }
.detail-body { padding: 0 0 1.4rem; }

.anchors { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 0.8rem 0; display: block; overflow-x: auto; }
.anchors caption { text-align: left; font-weight: 600; padding-bottom: 0.3rem; font-size: 0.9rem; }
.anchors th, .anchors td { padding: 0.35rem 0.6rem; text-align: right; border: 1px solid var(--rule); white-space: nowrap; }
.anchors th { text-align: left; background: var(--surface); font-weight: 600; }

/* ---------- calculator ---------- */
.section-calc { background: var(--surface); }
.calc-head { max-width: 46rem; margin-bottom: 2.4rem; }
.calc-head h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); margin-bottom: 0.9rem; }
.calc-head p { color: var(--slate); margin: 0; }

.calc-grid {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr);
  gap: 2.5rem 3.5rem;
  align-items: start;
}

.calc-form { min-width: 0; }

.examples { margin-bottom: 1.6rem; }
.examples-label { font-weight: 600; margin-bottom: 0.5rem; }
.examples-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font: 500 0.92rem/1 var(--font-body);
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.chip:hover { background: var(--signal); }

.group { border: 0; border-top: 2px solid var(--ink); margin: 0 0 1.4rem; padding: 0.9rem 0 0; min-width: 0; }
.group legend { font: 700 1.1rem/1 var(--font-display); letter-spacing: -0.01em; padding: 0 0.6rem 0 0; }

.field { margin: 0.9rem 0 0; }
.field label { display: block; font-weight: 600; font-size: 0.97rem; margin-bottom: 0.35rem; }
.hint { font-size: 0.85rem; color: var(--slate); margin: 0.35rem 0 0; line-height: 1.45; }

.input-wrap { display: flex; align-items: stretch; border: 2px solid var(--ink); background: var(--surface); }
.input-wrap:focus-within { box-shadow: 0 0 0 4px var(--signal); }
.prefix { display: flex; align-items: center; padding: 0 0.75rem; background: var(--ground); border-right: 2px solid var(--ink); font-weight: 600; }

input[type="text"], select {
  font: 500 1.05rem/1.2 var(--font-body);
  color: var(--ink);
  border: 0;
  background: transparent;
  padding: 0.75rem 0.8rem;
  width: 100%;
  min-width: 0;
  border-radius: 0;
}
input[type="text"]:focus-visible, select:focus-visible { outline: none; box-shadow: none; }
select { border: 2px solid var(--ink); background: var(--surface); width: 100%; }
select:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--signal); }
input[aria-invalid="true"] { background: #fbe9e5; }

.months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.9rem; }
.readout { margin: 0.8rem 0 0; padding: 0.6rem 0.8rem; background: var(--ground); font-size: 0.92rem; }

/* segmented radio control */
.segmented { display: flex; border: 2px solid var(--ink); margin: 0.2rem 0 0.4rem; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  flex: 1;
  text-align: center;
  padding: 0.65rem 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  background: var(--surface);
}
.segmented label + input + label { border-left: 2px solid var(--ink); }
.segmented input:checked + label { background: var(--ink); color: #fff; }
.segmented input:focus-visible + label { outline: 3px solid var(--signal); outline-offset: -5px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }

/* results */
.results { min-width: 0; border: 2px solid var(--ink); background: var(--ground); padding: clamp(1.1rem, 3vw, 2rem); }
.results-empty h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.results-empty p { color: var(--slate); margin: 0; }

.results-body h3 { font-size: 1.25rem; margin: 2rem 0 0.7rem; }
.results-body > h3:first-of-type { margin-top: 1.8rem; }

.score-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 2rem; }
.score-figure { margin: 0; display: flex; align-items: baseline; gap: 0.5rem; font-family: var(--font-display); }
#score-value { font-size: clamp(4rem, 9vw, 6.5rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; }
.score-out { font-size: 1.3rem; color: var(--slate); font-weight: 500; }
.score-meta { flex: 1 1 14rem; }
.score-meta p { margin: 0 0 0.3rem; }
.band-label { font: 700 1.35rem/1.2 var(--font-display); letter-spacing: -0.01em; }

.results .ruler { margin: 3rem 0 2.6rem; }
.ruler-marker {
  position: absolute;
  top: -14px;
  height: 56px;
  width: 0;
  border-left: 4px solid var(--ink);
  transition: left 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ruler-marker-label {
  position: absolute;
  bottom: 100%;
  left: 0;
  transform: translateX(-50%);
  margin-bottom: 4px;
  background: var(--signal);
  border: 2px solid var(--ink);
  padding: 0.2rem 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.ruler-marker.is-left .ruler-marker-label { transform: translateX(-10px); }
.ruler-marker.is-right .ruler-marker-label { transform: translateX(calc(-100% + 10px)); }

.axis-num {
  position: absolute;
  top: 100%;
  margin-top: 18px;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: var(--slate);
}
.axis-num.is-first { transform: none; }
.axis-num.is-last { transform: translateX(-100%); }

.notices { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.notices li { background: var(--surface); border-left: 5px solid var(--signal); padding: 0.55rem 0.8rem; margin-bottom: 0.45rem; font-size: 0.92rem; }

/* dimensions */
.dims { list-style: none; padding: 0; margin: 0; }
.dims li { padding: 0.8rem 0; border-top: 1px solid var(--rule); }
.dims li:first-child { border-top: 2px solid var(--ink); }
.dim-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.dim-name { font-weight: 600; }
.dim-score { font: 700 1.3rem/1 var(--font-display); }
.track { height: 12px; background: var(--surface); border: 1.5px solid var(--ink); margin: 0.45rem 0; }
.fill { height: 100%; background: var(--ink); width: 0; transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.dims li.is-weakest .fill { background: var(--signal); box-shadow: inset 0 0 0 1.5px var(--ink); }
.dims li.is-weakest .dim-name::after {
  content: "Costs the most points";
  margin-left: 0.7rem;
  background: var(--signal);
  border: 1.5px solid var(--ink);
  padding: 0.1rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  vertical-align: middle;
}
.dim-weight { font-weight: 400; font-size: 0.82rem; color: var(--slate); margin-left: 0.4rem; }
.dim-note { margin: 0; font-size: 0.9rem; color: var(--slate); }

/* levers */
.levers { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.levers li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
}
.levers li:first-child { border-top: 2px solid var(--ink); }
.lever-gain { font: 700 1.2rem/1.2 var(--font-display); text-align: right; white-space: nowrap; }
.lever-sub { grid-column: 1 / -1; font-size: 0.88rem; color: var(--slate); margin: 0; }

/* shock */
.shock-controls { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: center; margin-bottom: 1rem; }
.shock-controls .segmented { margin: 0; flex: 1 1 15rem; }
.shock-selects { display: flex; align-items: center; gap: 0.6rem; }
.shock-selects label { font-weight: 600; }
.shock-selects select { width: auto; padding: 0.55rem 0.6rem; }

.shock-row { background: var(--surface); border: 1.5px solid var(--ink); padding: 0.9rem 1rem; margin-bottom: 0.7rem; }
.shock-row h4 { margin: 0 0 0.25rem; font: 700 1.02rem/1.25 var(--font-display); }
.shock-row p { margin: 0 0 0.4rem; font-size: 0.93rem; line-height: 1.5; }
.shock-row p:last-child { margin-bottom: 0; }
.shock-status { font-weight: 700; }
.cover-track { height: 14px; background: var(--ground); border: 1.5px solid var(--ink); margin: 0.5rem 0 0.3rem; }
.cover-fill { height: 100%; background: var(--band-very-high); }
.cover-fill.is-short { background: var(--band-low); }

/* curves */
.curves-wrap { margin-top: 1.6rem; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.curves-wrap summary { cursor: pointer; padding: 0.9rem 0; font-weight: 600; }
.curves { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin: 0.4rem 0 0.8rem; }
.curve-card { background: var(--surface); border: 1.5px solid var(--ink); padding: 0.6rem 0.6rem 0.2rem; }
.curve-card h4 { margin: 0 0 0.2rem; font: 700 0.95rem/1.2 var(--font-display); }
.curve-card svg { display: block; width: 100%; height: auto; }
.c-grid { stroke: var(--rule-soft); stroke-width: 1; }
.c-axis { stroke: var(--ink); stroke-width: 1.2; }
.c-text { fill: var(--slate); font: 400 9px var(--font-body); }
.c-line { fill: none; stroke: var(--ink); stroke-width: 2.2; }
.c-anchor { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.c-user-line { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 3; }
.c-user-dot { fill: var(--signal); stroke: var(--ink); stroke-width: 2; }

.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-top: 1.6rem; }
.copy-status { font-size: 0.9rem; font-weight: 600; }

/* ---------- limits and contact ---------- */
.plain-list { list-style: none; padding: 0; margin: 0 0 1.4rem; border-top: 2px solid var(--ink); }
.plain-list li { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); line-height: 1.6; }

.contact-list { list-style: none; padding: 0; margin: 1.6rem 0 0; border-top: 2px solid var(--ink); }
.contact-list li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.2rem 1.5rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
}
.contact-list .c-label { font-weight: 600; }
.contact-list a { font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.contact-list .pending { color: var(--slate); }

.site-footer { background: var(--ink); color: #d3d8de; padding: 1.6rem 0; font-size: 0.9rem; }
.site-footer p { margin: 0; max-width: 52rem; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .section-grid, .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .signature { max-width: 24rem; }
  .section-head p { max-width: 36rem; }
}

@media (max-width: 720px) {
  .nav a:not(.nav-cta) { display: none; }
  .ledger > div, .contact-list li { grid-template-columns: minmax(0, 1fr); }
  .brand-name { font-size: 0.95rem; }
}

@media (max-width: 560px) {
  .tick-label { font-size: 0.7rem; }
  .tick-label b { font-size: 0.82rem; }
  .tick--minor .tick-label { display: none; }
  /* on narrow screens the median label moves above the bar so it cannot touch the maximum label */
  .tick--median .tick-label { top: auto; bottom: 100%; margin: 0 0 4px; }
  .months { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-figure .seg, .hero-figure .tick { animation: none; }
  .ruler-marker, .fill { transition: none; }
}
/* ---------- research materials ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.info-card {
  display: block;
  padding: 1.2rem 1.3rem;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.info-card:hover {
  background: var(--signal);
  transform: translateY(-2px);
}

.info-card h3 {
  font-size: 1.2rem;
  margin: 0.35rem 0 0.6rem;
}

.info-card p {
  margin: 0;
  color: var(--slate);
  font-size: 0.92rem;
  line-height: 1.5;
}

.card-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
}

.section-intro {
  max-width: 30rem !important;
}

@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- print: results only ---------- */
@media print {
  .site-header, .hero, #project, #method, #limits, #contact, .site-footer,
  .calc-form, .calc-head, .result-actions, .shock-controls, .curves-wrap, .skip-link { display: none !important; }
  body { background: #fff; }
  .section, .section-calc { border: 0; padding: 0; background: #fff; }
  .calc-grid { display: block; }
  .results { border: 0; padding: 0; background: #fff; }
  .seg--moderate-risk { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .seg, .fill, .cover-fill, .ruler-marker-label { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.model-link {
  display: inline-block;
  margin: 0.2rem 0 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-underline-offset: 3px;
}

.model-link:hover {
  background: var(--signal);
}
/* ---------- Version 2 band table ---------- */
.bands-table { width: 100%; border-collapse: collapse; margin: 1.4rem 0 0.6rem; font-size: 0.92rem; background: var(--surface); }
.bands-table caption { text-align: left; font-weight: 600; margin-bottom: 0.4rem; }
.bands-table th, .bands-table td { border: 1px solid var(--rule); padding: 0.45rem 0.6rem; text-align: left; }
.bands-table thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }
@media (max-width: 560px) { .bands-table { font-size: 0.8rem; } .bands-table th, .bands-table td { padding: 0.35rem 0.4rem; } }
