/* SelfPay Prices — teal/spring ground, emerald-cheap / coral-dear.
   Deliberately distinct from LegitMover (indigo) and HUD Scores (cobalt): the
   three properties should not read as the same site with a new logo.
   Every foreground/background pair below is AA at its rendered size. */

:root {
  color-scheme: light;

  --ink:            #0a2b2b;
  --ink-soft:       #3d5c5c;
  --ink-faint:      #6b8585;
  --paper:          #fbfaf5;
  --surface:        #ffffff;
  --line:           #dde5e3;
  --line-strong:    #c2d1ce;

  --teal-900:       #06403c;
  --teal-700:       #0b7267;
  --teal-600:       #0d9488;
  --spring-500:     #14b8a6;
  --cyan-400:       #22d3ee;

  --cheap:          #047857;
  --cheap-bg:       #d6f5e6;
  --dear:           #b03a2b;
  --dear-bg:        #ffe2dc;
  --mid:            #8a6d1f;
  --mid-bg:         #fdf0cf;

  --cta:            #f59e0b;
  --cta-ink:        #3a2a00;

  --grade-a:        #047857;
  --grade-b:        #0b7267;
  --grade-c:        #8a6d1f;
  --grade-d:        #b45309;
  --grade-f:        #b03a2b;

  --radius:         14px;
  --radius-sm:      9px;
  --shadow:         0 1px 2px rgba(10,43,43,.06), 0 8px 28px rgba(10,43,43,.09);
  --shadow-lift:    0 2px 6px rgba(10,43,43,.08), 0 18px 44px rgba(10,43,43,.14);
  --measure:        68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink:         #eafbf7;
    --ink-soft:    #b6d8d2;
    --ink-faint:   #86aba5;
    /* Lifted off near-black and given real chroma. The first pass sat at
       #061e1e, which reads as flat murk rather than a brand colour — the same
       note that killed the first palettes on the sibling properties. */
    --paper:       #04292c;
    --surface:     #073a3c;
    --line:        #0e5453;
    --line-strong: #17706c;

    --cheap:       #34d399;
    --cheap-bg:    #04372a;
    --dear:        #ff9280;
    --dear-bg:     #431912;
    --mid:         #fbcf5f;
    --mid-bg:      #3a2e08;

    --grade-a:     #34d399;
    --grade-b:     #2dd4bf;
    --grade-c:     #fbcf5f;
    --grade-d:     #fb923c;
    --grade-f:     #ff9280;

    --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.45);
    --shadow-lift: 0 2px 6px rgba(0,0,0,.45), 0 18px 44px rgba(0,0,0,.55);
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--teal-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { a { color: var(--cyan-400); } }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.18; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.85rem, 1.2rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.7rem); }
h3 { font-size: 1.06rem; }
p  { margin: 0 0 1em; max-width: var(--measure); }

.wrap { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header-inner {
  width: min(1140px, 100% - 2.5rem); margin-inline: auto;
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 62px; flex-wrap: wrap;
}
.wordmark {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.12rem; letter-spacing: -.025em;
  color: var(--ink); text-decoration: none;
}
.wordmark-badge { width: 27px; height: 27px; border-radius: 8px; flex: none; }
.wordmark span { color: var(--teal-600); }
@media (prefers-color-scheme: dark) { .wordmark span { color: var(--spring-500); } }
.site-header nav { margin-left: auto; display: flex; gap: 1.25rem; font-size: .92rem; }
.site-header nav a { color: var(--ink-soft); text-decoration: none; }
.site-header nav a:hover { color: var(--teal-700); text-decoration: underline; }

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

.hero {
  background:
    radial-gradient(1200px 420px at 12% -10%, rgba(34,211,238,.42), transparent 62%),
    linear-gradient(148deg, var(--teal-900) 0%, var(--teal-700) 48%, var(--teal-600) 100%);
  color: #eafffb;
  padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0 clamp(4rem, 3rem + 6vw, 6.5rem);
  position: relative; overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: center;
}
.hero h1 { color: #ffffff; margin-bottom: .35em; }
.hero-lede { color: #c3f2ea; font-size: clamp(1rem, .95rem + .35vw, 1.16rem); max-width: 46ch; }
.hero-lede strong { color: #ffffff; font-weight: 650; }

/* Exhibit card: a real parsed spread, never a placeholder. */
.exhibit {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
  padding: 1.15rem 1.25rem 1.05rem; transform: rotate(-1.1deg);
}
.exhibit-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); font-weight: 700; margin-bottom: .5rem;
}
.exhibit-service { font-weight: 700; font-size: 1.05rem; margin-bottom: .75rem; }
.exhibit-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: .45rem 0; border-top: 1px solid var(--line);
}
.exhibit-row:first-of-type { border-top: 0; }
.exhibit-hospital { font-size: .87rem; color: var(--ink-soft); min-width: 0; }
.exhibit-price { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.exhibit-price.is-cheap { color: var(--cheap); }
.exhibit-price.is-dear  { color: var(--dear); }
.exhibit-verdict {
  margin-top: .7rem; padding-top: .65rem; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--ink-soft);
}
.exhibit-verdict b { color: var(--dear); }

/* ---------- floating search card ---------- */

.search-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
  padding: 1.15rem 1.25rem; margin-top: -3.25rem; position: relative; z-index: 5;
}
.search-card h2 { font-size: 1.02rem; margin-bottom: .7rem; }
.search-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.search-form input[type=search] {
  flex: 1 1 16rem; min-width: 0;
  padding: .72rem .9rem; font-size: 1rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
}
.search-form input[type=search]:focus-visible {
  outline: 3px solid var(--spring-500); outline-offset: 1px; border-color: transparent;
}
.btn {
  padding: .72rem 1.25rem; font-size: .96rem; font-weight: 680;
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--cta); color: var(--cta-ink);
}
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.search-hint { margin: .6rem 0 0; font-size: .84rem; color: var(--ink-faint); }

/* ---------- section furniture ---------- */

.band { padding: clamp(2.25rem, 1.75rem + 2vw, 3.5rem) 0; }
.band-head {
  display: flex; align-items: baseline; gap: .85rem; flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.band-head h2 { margin: 0; }
.band-hint { font-size: .85rem; color: var(--ink-faint); }

/* ---------- proof strip ---------- */

.spread-grid {
  display: grid; gap: .85rem;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
}
.spread-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .95rem 1rem; text-decoration: none;
  color: inherit; display: block; transition: box-shadow .12s, border-color .12s;
}
.spread-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.spread-service { font-weight: 680; margin-bottom: .55rem; font-size: .98rem; }
.spread-numbers {
  display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.spread-low  { color: var(--cheap); font-weight: 760; font-size: 1.18rem; }
.spread-high { color: var(--dear);  font-weight: 760; font-size: 1.18rem; }
.spread-arrow { color: var(--ink-faint); }
.spread-mult {
  margin-left: auto; font-size: .78rem; font-weight: 720;
  background: var(--dear-bg); color: var(--dear);
  padding: .12rem .5rem; border-radius: 999px; white-space: nowrap;
}
.spread-where { margin: .5rem 0 0; font-size: .8rem; color: var(--ink-faint); }

/* ---------- stat tiles ---------- */

.stat-row {
  display: grid; gap: .8rem; margin-top: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .9rem 1rem;
}
.stat-num {
  font-size: 1.75rem; font-weight: 760; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.stat-label { font-size: .82rem; color: var(--ink-soft); margin-top: .15rem; }
.stat.is-zero .stat-num { color: var(--ink-faint); font-weight: 600; }

/* ---------- data tables and rows ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.price-table {
  width: 100%; border-collapse: collapse; font-size: .94rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.price-table th, .price-table td {
  padding: .68rem .8rem; text-align: left; border-top: 1px solid var(--line);
  white-space: nowrap;
}
.price-table thead th {
  border-top: 0; background: var(--paper); font-size: .76rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint);
  font-weight: 700;
}
.price-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 640; }
.price-table td.name { white-space: normal; min-width: 15rem; }
.price-table tr.is-cheapest td { background: var(--cheap-bg); }
.price-table tr.is-cheapest td.num.cash { color: var(--cheap); font-weight: 760; }
.price-table tr.is-dearest  td.num.cash { color: var(--dear);  font-weight: 760; }
.price-table .muted { color: var(--ink-faint); font-weight: 500; }
.price-table .hospital-sub { display: block; font-size: .78rem; color: var(--ink-faint); font-weight: 500; }

/* ---------- chips and badges ---------- */

.chip {
  display: inline-block; font-size: .74rem; font-weight: 700;
  padding: .1rem .48rem; border-radius: 999px; white-space: nowrap;
}
.chip-cheap { background: var(--cheap-bg); color: var(--cheap); }
.chip-dear  { background: var(--dear-bg);  color: var(--dear); }
.chip-mid   { background: var(--mid-bg);   color: var(--mid); }
.chip-quiet { background: transparent; color: var(--ink-faint); border: 1px solid var(--line); }

.grade {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: 8px;
  font-weight: 780; font-size: 1rem; color: #fff; flex: none;
}
.grade-A { background: var(--grade-a); }
.grade-B { background: var(--grade-b); }
.grade-C { background: var(--grade-c); color: #241c00; }
.grade-D { background: var(--grade-d); }
.grade-F { background: var(--grade-f); }
@media (prefers-color-scheme: dark) {
  .grade-A, .grade-B, .grade-C, .grade-F { color: #04231f; }
}

/* ---------- hospital list rows ---------- */

.hospital-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.hospital-row {
  display: flex; align-items: center; gap: .95rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .85rem 1rem;
  text-decoration: none; color: inherit;
}
.hospital-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.hospital-row-main { min-width: 0; flex: 1; }
.hospital-row-name { font-weight: 680; }
.hospital-row-sub { font-size: .82rem; color: var(--ink-faint); }
.hospital-row-stats { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- callouts and provenance ---------- */

.callout {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--spring-500);
  border-radius: var(--radius); padding: 1rem 1.15rem; margin: 1.25rem 0;
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.is-warning { border-left-color: var(--cta); }

.provenance {
  font-size: .84rem; color: var(--ink-faint);
  border-top: 1px solid var(--line); padding-top: .9rem; margin-top: 1.5rem;
}
.provenance a { color: var(--ink-soft); }
.provenance code {
  font-size: .82em; background: var(--paper); padding: .05rem .3rem;
  border-radius: 4px; border: 1px solid var(--line);
}

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

.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  margin-top: 3rem; padding: 2rem 0;
  font-size: .87rem; color: var(--ink-soft);
}
.site-footer-inner { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.site-footer nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.site-footer p { max-width: var(--measure); margin-bottom: .5rem; }

/* ---------- illustration ---------- */

.hero-art { width: 100%; height: auto; max-width: 380px; display: block; }
.art-window-lit { fill: #ffd98a; }
@media (prefers-color-scheme: dark) { .art-window-lit { fill: #ffe9b8; } }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .exhibit { transform: none; max-width: 26rem; }
  .search-card { margin-top: -2.25rem; }
}
@media (max-width: 560px) {
  .site-header-inner { min-height: 56px; gap: .75rem; }
  .site-header nav { gap: .85rem; font-size: .86rem; width: 100%; margin-left: 0; padding-bottom: .5rem; }
  .hospital-row { flex-wrap: wrap; }
  .hospital-row-stats { width: 100%; justify-content: flex-start; }
  .stat-num { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Explainer pages (/about)
   A page about reading enormous files should show the enormous numbers, and
   should not be one flat column of prose on one flat colour.
   ========================================================================== */

/* Never let the dark ground read as flat black. */
@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(1100px 620px at 88% -8%, rgba(20,184,166,.16), transparent 60%),
      radial-gradient(900px 520px at -8% 22%, rgba(34,211,238,.10), transparent 62%),
      var(--paper);
    background-attachment: fixed;
  }
}

.hero.is-explainer {
  padding-bottom: clamp(3rem, 2rem + 5vw, 5rem);
  background:
    radial-gradient(760px 460px at 76% 34%, rgba(34,211,238,.38), transparent 66%),
    radial-gradient(900px 420px at 6% -14%, rgba(20,184,166,.34), transparent 62%),
    linear-gradient(146deg, var(--teal-900) 0%, var(--teal-700) 52%, var(--teal-600) 100%);
}
.hero.is-explainer .hero-grid { align-items: center; }
.hero-eyebrow {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .13em;
  font-weight: 750; color: #7ff0dd; margin-bottom: .7rem;
}

/* Figures strip that overlaps the hero, same trick as the search card. */
.figure-strip {
  display: grid; gap: .8rem; position: relative; z-index: 5; margin-top: -2.75rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.figure {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow);
}
.figure-num {
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); font-weight: 780;
  letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums;
  background: linear-gradient(96deg, var(--spring-500), var(--cyan-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.figure-label { font-size: .82rem; color: var(--ink-soft); margin-top: .3rem; }

/* Numbered rule cards — two accents, not two identical grey boxes. */
.rule-grid {
  display: grid; gap: 1rem; margin: 1.5rem 0;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}
.rule {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.25rem 1.2rem; overflow: hidden;
}
.rule::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--spring-500), var(--cyan-400));
}
.rule.is-amber::before { background: linear-gradient(90deg, var(--cta), #fbbf24); }
.rule-num {
  font-size: 2.5rem; font-weight: 800; line-height: 1; letter-spacing: -.05em;
  color: var(--spring-500); opacity: .28; margin-bottom: -.35rem;
}
.rule.is-amber .rule-num { color: var(--cta); }
.rule h3 { margin: .35rem 0 .5rem; font-size: 1.06rem; }
.rule p { margin-bottom: 0; font-size: .95rem; color: var(--ink-soft); }
.rule p strong, .rule p em { color: var(--ink); }

/* Full-bleed band for the single most striking fact on the page. */
.exhibit-band {
  background:
    radial-gradient(680px 380px at 16% 50%, rgba(34,211,238,.42), transparent 68%),
    radial-gradient(900px 340px at 88% 8%, rgba(20,184,166,.34), transparent 64%),
    linear-gradient(140deg, #032f2d, var(--teal-700) 72%, var(--teal-600));
  border-block: 1px solid rgba(127,240,221,.22);
  color: #eafffb; padding: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem) 0;
  margin: clamp(2rem, 1.5rem + 2vw, 3rem) 0;
}
.exhibit-band-inner {
  display: grid; gap: clamp(1rem, .5rem + 2vw, 2.5rem); align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
}
.exhibit-figure {
  font-size: clamp(5.5rem, 3rem + 11vw, 11rem); font-weight: 850;
  letter-spacing: -.06em; line-height: .82; color: #fff;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  text-shadow: 0 0 60px rgba(34,211,238,.5);
}
.exhibit-figure small {
  display: block; font-size: .13em; font-weight: 750; letter-spacing: .16em;
  text-transform: uppercase; color: #8fe8db; margin-top: .75rem;
}
.exhibit-band h2 { color: #fff; margin-bottom: .4rem; }
.exhibit-band p { color: #c3f2ea; margin-bottom: 0; max-width: 56ch; }

/* Two-up prose blocks so the page has rhythm instead of one long column. */
.prose-grid {
  display: grid; gap: clamp(1rem, .5rem + 2vw, 2.25rem);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.prose-grid h2 { margin-top: 0; }

@media (max-width: 780px) {
  .exhibit-band-inner { grid-template-columns: 1fr; }
  .figure-strip { margin-top: -1.75rem; }
}
