/* aHealingVisit v3 — warm "asoberbed" design language.
   Palette, type and card anatomy mirror asoberbed_ref/public/a.html. */

:root {
  --navy: #2e4a5f;
  --navy2: #243c4e;
  --teal: #6da79d;
  --teal-d: #527f77;
  --teal-l: #eaf1ef;
  --mint: #dfeae7;
  --cream: #faf8f4;
  --ink: #33404a;
  --muted: #68757f;
  --dim: #6f7a83; /* darkened from #96a1aa so small meta text clears WCAG AA on cream */
  --line: #e8e6df;
  --line2: #d8d4ca;
  --card: #ffffff;
  --star: #d19a3c;
  --bad: #a8524a;
  --bad-l: #f7edeb;
  --shadow: 0 1px 3px rgba(60, 70, 80, 0.05), 0 6px 20px rgba(60, 70, 80, 0.05);
  --shadow-h: 0 3px 8px rgba(60, 70, 80, 0.07), 0 14px 34px rgba(60, 70, 80, 0.1);
}

/* Dark theme — RULES.md §7 requires a working toggle even though Civic Modern
   light is the consumer default. Same variable names, no per-component overrides. */
[data-theme='dark'] {
  --navy: #9fc2d6;
  --navy2: #bcdcee;
  --teal: #6da79d;
  --teal-d: #8bc4b9;
  --teal-l: #1c2b2a;
  --mint: #1c2b28;
  --cream: #161a1d;
  --ink: #e8e9ea;
  --muted: #a7b0b7;
  --dim: #8b959c;
  --line: #2a2f33;
  --line2: #383e43;
  --card: #1f2428;
  --star: #e0b563;
  --bad: #d98a82;
  --bad-l: #2c1e1c;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-h: 0 3px 8px rgba(0, 0, 0, 0.35), 0 14px 34px rgba(0, 0, 0, 0.3);
}
[data-theme='dark'] img.gphoto,
[data-theme='dark'] .hero img { filter: brightness(0.92) contrast(1.02); }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.disp,
h1,
h2,
h3,
h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}
button,
input,
select {
  font-family: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
img { display: block; max-width: 100%; }
.tnum { font-variant-numeric: tabular-nums; }
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 99;
  background: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
:focus-visible {
  outline: 2px solid var(--teal-d);
  outline-offset: 2px;
  border-radius: 4px;
}
.card:focus-visible,
.ticker button:focus-visible,
.loadmore:focus-visible,
.empty .retry:focus-visible,
.pageclose:focus-visible,
.navcta:focus-visible,
.infolink:focus-visible,
.aipbtn:focus-visible,
.fapply:focus-visible {
  outline: 2px solid var(--teal-d);
  outline-offset: 3px;
}
.pinb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.aipbox:focus-within { box-shadow: 0 0 0 3px var(--mint), var(--shadow); }
.fcell:focus-within label { color: var(--teal-d); }
.gcell:focus-within { border-color: var(--teal); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d6d2c8; border-radius: 6px; }

/* ----------------------------------------------------------------- header */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.navin {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 26px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Figtree', system-ui, sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--navy);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand .logomark { flex: 0 0 auto; }
.brand .b2 { color: var(--teal-d); }
.navlinks {
  margin-left: auto;
  display: flex;
  gap: 26px;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}
.navlinks a:hover { color: var(--navy); }
.navcta {
  background: none;
  border: 1px solid var(--line2);
  color: var(--navy);
  padding: 9px 19px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15.5px;
}
.navcta:hover { background: #fff; border-color: var(--teal); }
.themetoggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 100px;
  border: 1px solid var(--line2);
  background: none;
  color: var(--navy);
  cursor: pointer;
  flex: 0 0 auto;
}
.themetoggle:hover { background: #fff; border-color: var(--teal); }
.themetoggle.isdark svg path { fill: currentColor; }

/* ------------------------------------------------------------------- hero */
.hero {
  background: linear-gradient(180deg, #f0ece4, var(--cream));
  border-bottom: 1px solid var(--line);
  padding: 18px 24px 20px;
}
.heroin {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 52px;
  align-items: center;
}
.herocol { min-width: 0; }
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--teal-d);
  font-weight: 600;
  font-size: 15.5px;
  padding: 7px 16px;
  border-radius: 100px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(42px, 4.3vw, 58px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.hero h1 em { font-style: normal; color: var(--teal-d); }
.hero p.sub {
  font-size: 19.5px;
  color: var(--muted);
  margin: 10px 0 0;
  max-width: 720px;
}
.herotrust {
  list-style: none;
  margin: 15px 0 0;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 9px 26px;
  max-width: 760px;
}
.herotrust li:first-child { grid-column: 1 / -1; }
.herotrust li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
.herotrust svg { color: var(--teal-d); flex: 0 0 auto; }
.herophoto { position: relative; }
.herophoto .pimg {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(46, 74, 95, 0.09), 0 24px 60px rgba(46, 74, 95, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.6);
  aspect-ratio: 16 / 10;
  max-height: 330px;
  background: var(--mint);
}
.herophoto .pimg img { width: 100%; height: 100%; object-fit: cover; }
.floatcard {
  position: absolute;
  left: -22px;
  bottom: -22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(46, 74, 95, 0.15);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
}
.floatcard .fcicon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--teal-l);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-d);
}
.floatcard .fct { font-weight: 700; font-size: 15px; color: var(--navy); line-height: 1.2; }
.floatcard .fcs { font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }

/* -------------------------------------------------------------- stat band */
.statband { background: var(--navy); color: #fff; }
.statin {
  max-width: 1240px;
  margin: 0 auto;
  padding: 7px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: center;
}
.sitem { text-align: center; border-right: 1px solid rgba(255, 255, 255, 0.13); }
.sitem:last-child { border-right: none; }
.sitem .n {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 2.7vw, 38px);
  line-height: 1.02;
  color: #fff;
  letter-spacing: -0.01em;
}
.sitem .l {
  font-size: 13px;
  color: #e2eaee;
  margin-top: 5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------- search block */
.searchsec {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 10px 24px 9px;
}
.searchin {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ask in plain English */
.aip { margin: 0; width: 100%; }
.aiplabel {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-d);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.aipbox {
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  padding: 7px;
  box-shadow: var(--shadow);
}
.aipbox:focus-within { border-color: var(--teal); }
.aipbox input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  padding: 14px 14px 14px 26px;
  font-size: 18.5px;
  color: var(--ink);
}
.aipbox input::placeholder { color: var(--dim); }
.aipbtn {
  background: var(--teal-d);
  color: #fff;
  border-radius: 100px;
  padding: 0 30px;
  min-height: 54px;
  font-weight: 600;
  font-size: 17.5px;
  white-space: nowrap;
}
.aipbtn:hover { background: var(--navy); }

/* example ticker (marquee) */
.ticker {
  position: relative;
  width: 100%;
  margin-top: 9px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticktrack {
  display: flex;
  gap: 9px;
  width: max-content;
  animation: tickerscroll 80s linear infinite;
}
.ticker:hover .ticktrack,
.ticker:focus-within .ticktrack { animation-play-state: paused; }
@keyframes tickerscroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  padding: 9px 17px;
  border-radius: 100px;
  transition: 0.15s;
  white-space: nowrap;
  flex: 0 0 auto;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(46, 74, 95, 0.04);
}
.ticker button:hover {
  border-color: var(--teal);
  color: var(--teal-d);
  background: var(--teal-l);
}
/* ------------------------------------------- print: facility one-pager */


@media (prefers-reduced-motion: reduce) {
  .ticktrack { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
}

/* connected filter bar */
.orline {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 7px 0 0;
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.orline:before,
.orline:after { content: ""; height: 1px; background: var(--line); flex: 1; }
.filterbar {
  width: 100%;
  margin: 10px 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.fcell {
  flex: 1;
  min-width: 130px;
  padding: 8px 16px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fcell:last-of-type { border-right: none; }
.fcell label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.fcell label em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #b3bcc3;
}
.fcell select,
.fcell input {
  border: none;
  outline: none;
  background: none;
  font-size: 17.5px;
  font-weight: 500;
  color: var(--ink);
  width: 100%;
  cursor: pointer;
}
.fcell input { cursor: text; font-variant-numeric: tabular-nums; }
.fcell input::placeholder { color: var(--dim); font-weight: 400; }
.fcell.off { opacity: 0.5; }
.fcell.off select { cursor: not-allowed; }
.fapply {
  background: var(--teal-l);
  color: var(--teal-d);
  font-weight: 600;
  border-radius: 12px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16.5px;
}
.fapply:hover { background: var(--mint); }
.ziperr {
  color: var(--bad);
  font-size: 14.5px;
  font-weight: 600;
  margin-top: 12px;
  text-align: center;
}
.vnote {
  font-size: 13px;
  color: var(--dim);
  margin: 6px 0 0;
  text-align: center;
  max-width: 92ch;
}

/* --------------------------------------------------------------- results */
.wrap { max-width: 1320px; margin: 0 auto; padding: 8px 24px 44px; }
.rbar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.rbar h2 { font-size: clamp(28px, 2.6vw, 36px); color: var(--navy); }
.rbar .count { color: var(--dim); font-size: 16px; }
.gcontrols {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.gcell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 14px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  box-shadow: 0 1px 2px rgba(46, 74, 95, 0.04);
}
.gcell label,
.gcell > span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim);
}
.gcell select {
  border: none;
  outline: none;
  background: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  max-width: 210px;
}
.clearsearch {
  color: var(--teal-d);
  font-weight: 600;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.area-note {
  background: var(--teal-l);
  color: var(--teal-d);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14.5px;
  margin-bottom: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
}
.card:hover { box-shadow: var(--shadow-h); transform: translateY(-1px); }
.cardtop { height: 118px; position: relative; overflow: hidden; background: var(--mint); }
.cardtop img { width: 100%; height: 100%; object-fit: cover; }
.tscore {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.93);
  color: var(--teal-d);
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.tscore.fair { color: #8a6a2f; }
.tscore.low { color: var(--bad); }
.tscore.na { color: var(--muted); }
.distb {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(46, 74, 95, 0.86);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  font-variant-numeric: tabular-nums;
}
.cardbody { padding: 11px 14px 12px; flex: 1; display: flex; flex-direction: column; }
.cname {
  font-weight: 700;
  font-size: 17.5px;
  color: var(--navy);
  line-height: 1.26;
  letter-spacing: -0.01em;
  font-family: 'Figtree', system-ui, sans-serif;
}
.cloc {
  font-size: 15px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.crow { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; align-items: center; }
.pill {
  font-size: 13.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--teal-l);
  color: var(--teal-d);
}
.pill.neutral { background: #f0ede5; color: #7d7259; }
.pill.warn { background: #f7f0e2; color: #8a6a2f; }
.pill.bad { background: var(--bad-l); color: var(--bad); }
.pill.good { background: var(--teal-l); color: var(--teal-d); }
.cfoot {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cphone { font-size: 13.5px; color: var(--dim); font-weight: 500; font-variant-numeric: tabular-nums; }
.viewb {
  margin-left: auto;
  color: var(--teal-d);
  font-weight: 600;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

/* stars */
.stars { display: inline-flex; align-items: center; gap: 6px; }
.stars .glyphs { display: inline-flex; gap: 1px; }
.stars svg { width: 15px; height: 15px; }
.stars .lbl { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.starrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.starrow .cap {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  min-width: 11ch;
}
.starrow .su { font-size: 12.5px; color: var(--dim); }

.loadwrap { display: flex; justify-content: center; margin-top: 26px; }
.loadmore {
  background: #fff;
  border: 1px solid var(--line2);
  color: var(--navy);
  font-weight: 600;
  font-size: 16px;
  padding: 12px 30px;
  border-radius: 100px;
  box-shadow: var(--shadow);
}
.loadmore:hover { border-color: var(--teal); color: var(--teal-d); }
.loadmore[disabled] { opacity: 0.6; cursor: default; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 54px 20px;
  color: var(--muted);
}
.empty h3 { font-size: 21px; color: var(--navy); margin-bottom: 8px; }
.empty p { max-width: 60ch; margin: 0 auto; font-size: 15.5px; }
/* skeletons — mirror the card anatomy exactly so nothing shifts when data lands */
.skel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.skel-card .sk-img { height: 118px; border-radius: 0; }
.skel-body { padding: 11px 14px 12px; flex: 1; display: flex; flex-direction: column; }
.skel-foot {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sk {
  background: linear-gradient(90deg, #f0ede7 25%, #e7e3da 50%, #f0ede7 75%);
  background-size: 200% 100%;
  animation: sk 1.3s infinite;
  border-radius: 5px;
}
@keyframes sk {
  to { background-position: -200% 0; }
}

/* empty + error states */
.empty .retry {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-d);
  color: #fff;
  font-weight: 600;
  font-size: 15.5px;
  padding: 11px 24px;
  border-radius: 100px;
}
.empty .retry:hover { background: var(--navy); }
.empty .hint { margin-top: 10px; font-size: 14px; color: var(--dim); }

/* --------------------------------------------------- footer legal columns */
.legalgrid {
  max-width: 1000px;
  margin: 18px auto 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  text-align: left;
}
.legalcell {
  background: #fbf9f5;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.legalcell h4 {
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 5px;
}
.legalcell p { font-size: 13.5px; line-height: 1.6; color: #6f7a82; }
.legalcell a { color: var(--teal-d); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------- content pages */
.pageov {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(46, 74, 95, 0.42);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 34px 20px;
  overflow: hidden;
}
.pagesheet {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 70px rgba(46, 74, 95, 0.28);
  width: min(780px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pagebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}
.pagekicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--teal-d);
}
.pageclose {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pageclose:hover { border-color: var(--teal); color: var(--teal-d); }
.pagescroll { overflow-y: auto; padding: 26px 30px 34px; }
.pagedoc h2 { font-size: clamp(28px, 3vw, 36px); color: var(--navy); letter-spacing: -0.02em; }
.pagedoc h3 { font-size: 21px; color: var(--navy); margin: 24px 0 8px; }
.pagedoc p { font-size: 16px; color: var(--muted); margin-top: 10px; }
.pagedoc p.lede { font-size: 18px; color: var(--ink); margin-top: 12px; }
.pagedoc .doclist {
  list-style: none;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pagedoc .doclist li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 15.5px;
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(46, 74, 95, 0.04);
}
.pagedoc .doclist strong { color: var(--navy); }
.pagedoc .docstats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.pagedoc .docstats > div {
  background: var(--teal-l);
  border-radius: 14px;
  padding: 13px 15px;
}
.pagedoc .dn {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.05;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.pagedoc .dk { display: block; font-size: 13px; color: var(--teal-d); margin-top: 4px; font-weight: 600; }
.pagedoc .docnote {
  margin-top: 20px;
  font-size: 14px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.pagedoc .docnote a,
.pagedoc p a { color: var(--teal-d); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* --------------------------------------------------------- info sections */
.info { background: #f4f1ea; border-top: 1px solid var(--line); padding: 40px 24px; }
.infoin {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.infocard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.infocard h3 { font-size: 24px; color: var(--navy); margin-bottom: 10px; }
.infocard p { font-size: 16px; color: var(--muted); margin-bottom: 10px; }
.infolink {
  display: inline-block;
  margin-top: 14px;
  color: var(--teal-d);
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.infolink:hover { color: var(--navy); }
.infocard ul { margin: 8px 0 0 18px; font-size: 15px; color: var(--muted); }
.infocard li { margin-bottom: 6px; }
.infocard strong { color: var(--navy); }
.bars { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.barrow { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); }
.barrow .bl { min-width: 15ch; color: var(--ink); font-weight: 500; }
.bar { height: 9px; border-radius: 100px; background: var(--teal); }
.bar.alt { background: var(--navy); opacity: 0.6; }

/* ----------------------------------------------------------------- footer */
.footer {
  background: #f1eee7;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 26px 24px 34px;
  text-align: center;
  font-size: 14px;
}
.footer b { color: var(--navy); }
.footer .flinks {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0 6px;
}
.footer .flinks a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer .fine {
  max-width: 860px;
  margin: 8px auto 0;
  font-size: 13px;
  line-height: 1.6;
  color: #7a858d;
}
.footer .fine a { color: var(--teal-d); font-weight: 600; }

/* -------------------------------------------------------- facility lightbox */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(46, 74, 95, 0.52);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: 0.24s;
  z-index: 40;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.lbwrap {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  pointer-events: none;
}
.lb {
  pointer-events: auto;
  width: 100%;
  max-width: 1020px;
  max-height: 92vh;
  background: var(--cream);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(28, 44, 58, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.lbwrap.open .lb { opacity: 1; transform: none; }
.printhead { display: none; }
.lbbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.lbheadtxt { flex: 1; min-width: 0; }
.lbtitle {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lbloc { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.lbtools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.lbtool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line2);
  border-radius: 100px;
  padding: 7px 13px;
}
.lbtool:hover { border-color: var(--teal); color: var(--teal-d); }
.lbtool.on { background: var(--teal-l); border-color: var(--teal); color: var(--teal-d); }
.lbtool.done { background: var(--teal-l); border-color: var(--teal); color: var(--teal-d); }
.lbnav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal-d);
  background: var(--teal-l);
  border-radius: 100px;
  padding: 7px 13px 7px 10px;
  flex: 0 0 auto;
  max-width: 190px;
}
.lbnav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbnav:hover { background: var(--mint); }
.lbx {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lbx:hover { background: #fff; border-color: var(--line2); }
.lbtool:focus-visible,
.lbnav:focus-visible,
.lbx:focus-visible { outline: 2px solid var(--teal-d); outline-offset: 2px; }
.lbscroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lbbody {
  display: grid;
  grid-template-columns: minmax(0, 61fr) minmax(0, 39fr);
  gap: 16px;
  padding: 16px 20px 34px;
  align-items: start;
}
.lbmain { min-width: 0; }
.lbrail { min-width: 0; position: sticky; top: 0; }

/* gallery */
.gal { margin-bottom: 14px; }
.galmain {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--mint);
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}
.galmain img { width: 100%; height: 100%; object-fit: cover; }
.galchip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--teal-d);
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 100px;
}
.gthumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.gthumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 11px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--mint);
  display: block;
}
.gthumb img { width: 100%; height: 100%; object-fit: cover; }
.gthumb.on { border-color: var(--teal); }
.gthumb:hover { border-color: var(--line2); }
.gthumb:focus-visible { outline: 2px solid var(--teal-d); outline-offset: 2px; }
.galcap { font-size: 12.5px; color: var(--dim); margin-top: 8px; line-height: 1.5; }

/* percentile highlight + rail bits */
.printonly { display: none; }

.pctline {
  display: block;
  line-height: 1.5;
  margin-top: 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--teal-d);
  background: var(--teal-l);
  border-radius: 12px;
  padding: 9px 13px;
}
.pctline em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 500;
}

/* ownership + chain */
.ownlist { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.ownrow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 13px;
}
.ownrow .on-n { font-size: 15px; font-weight: 600; color: var(--navy); }
.ownrow .on-t { font-size: 12.5px; color: var(--dim); }
.ownrow .on-r { font-size: 13px; color: var(--muted); margin-top: 3px; }
.ownrow .on-p { text-align: right; white-space: nowrap; }
.ownrow .on-pct { font-size: 15px; font-weight: 700; color: var(--teal-d); }
.ownrow .on-since { display: block; font-size: 12.5px; color: var(--dim); }
.chaincard {
  margin-top: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
}
.chaincard .ch-n { font-family: 'Fraunces', Georgia, serif; font-size: 18px; color: var(--navy); }
.chaincard .ch-m { font-size: 14px; color: var(--muted); margin-top: 4px; }
.goodline {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--teal-d);
  background: var(--teal-l);
  border-radius: 12px;
  padding: 10px 13px;
}
.finegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }

/* similar facilities */
.simgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.simcard {
  text-align: left;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.simcard:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.simcard:focus-visible { outline: 2px solid var(--teal-d); outline-offset: 2px; }
.simcard .s-img { height: 78px; background: var(--mint); position: relative; }
.simcard .s-img img { width: 100%; height: 100%; object-fit: cover; }
.simcard .s-dist {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}
.simcard .s-b { padding: 9px 11px 11px; }
.simcard .s-n {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  display: block;
}
.simcard .s-c { font-size: 12.5px; color: var(--muted); display: block; margin-top: 2px; }
.simcard .s-row { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.simcard .s-t {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--teal-l);
  color: var(--teal-d);
}
.simcard .s-t.fair { background: #f7f0e2; color: #8a6a2f; }
.simcard .s-t.low { background: var(--bad-l); color: var(--bad); }
.simcard .s-t.na { background: #f1eee7; color: var(--dim); }
.simcard .stars .glyphs svg { width: 11px; height: 11px; }
.simcard .stars .lbl { font-size: 11.5px; }

/* pin button on cards */
.pinb {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 100px;
  padding: 4px 9px;
}
.pinb:hover { background: #fff; color: var(--teal-d); }
.pinb.on { background: var(--teal-d); color: #fff; }
.pinb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* compare tray */
.cmptray {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 100px;
  box-shadow: 0 10px 34px rgba(46, 74, 95, 0.2);
  padding: 9px 12px 9px 16px;
  max-width: calc(100vw - 28px);
  flex-wrap: wrap;
}
.cmplbl { font-size: 13px; font-weight: 700; color: var(--navy); }
.cmpchips { display: flex; gap: 6px; flex-wrap: wrap; }
.cmpchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 6px 4px 11px;
  font-size: 13px;
  color: var(--ink);
  max-width: 190px;
}
.cmpchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmpchip button {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--line);
  color: var(--navy);
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cmpchip button:hover { background: var(--line2); }
.cmpgo {
  background: var(--teal-d);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 100px;
}
.cmpgo:hover { background: var(--navy); }
.cmpgo[disabled] { opacity: 0.55; cursor: default; }
.cmpclear { font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 8px; }
.cmpclear:hover { color: var(--bad); }

/* compare view inside the lightbox */
.cmpview { padding: 4px 0 0; }
.cmpgrid { display: grid; gap: 12px; }
.cmphead {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
  position: relative;
}
.cmphead .c-n { font-size: 15.5px; font-weight: 700; color: var(--navy); line-height: 1.3; padding-right: 22px; }
.cmphead .c-c { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cmphead .c-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.cmphead .c-x:hover { background: var(--bad-l); color: var(--bad); }
.cmprow {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.cmprow:last-child { border-bottom: none; }
.cmprow .r-k { font-size: 14px; color: var(--muted); }
.cmprow .r-k em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); }
.cmprow .r-v { font-size: 15px; font-weight: 600; color: var(--navy); }
.cmprow .r-v.best { color: var(--teal-d); }
.cmprow .r-v .rv-sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--dim); }
.cmpnatl { font-size: 12.5px; color: var(--dim); }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 100px;
  box-shadow: 0 8px 26px rgba(46, 74, 95, 0.28);
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* detail panels (shared by all three verticals) */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.panel-title { font-size: 19px; color: var(--navy); }
.panel-note { font-size: 14px; color: var(--muted); margin-top: 6px; }
.panel-note.bad { color: var(--bad); }
.basis-note {
  font-size: 14px;
  color: var(--teal-d);
  background: var(--teal-l);
  border-radius: 12px;
  padding: 10px 13px;
  margin-top: 12px;
}
.banner {
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14.5px;
  margin: 12px 0 0;
  background: var(--teal-l);
  color: var(--teal-d);
}
.banner.error { background: var(--bad-l); color: var(--bad); }
.banner strong { font-weight: 700; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.chip {
  font-size: 13.5px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 100px;
  background: var(--teal-l);
  color: var(--teal-d);
}
.chip.off {
  background: #f4f2ec;
  color: var(--dim);
  text-decoration: line-through;
  text-decoration-color: var(--line2);
}
.chip-warn {
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: #f7f0e2;
  color: #8a6a2f;
}
.measures { margin-top: 14px; display: flex; flex-direction: column; gap: 15px; }
.measure .top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.measure .name { font-size: 15.5px; font-weight: 600; color: var(--navy); }
.measure .val { font-size: 15.5px; font-weight: 700; color: var(--teal-d); white-space: nowrap; }
.measure .help { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.measure .track {
  position: relative;
  height: 8px;
  border-radius: 100px;
  background: #eee9df;
  margin-top: 8px;
}
.measure .fill { position: absolute; inset: 0 auto 0 0; border-radius: 100px; background: var(--teal); }
.measure .natl {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--navy);
  border-radius: 2px;
}
.measure .cmp {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
  color: var(--dim);
}
.measure .cmp .pill { font-size: 12.5px; padding: 2px 9px; }
.kv { margin-top: 12px; display: flex; flex-direction: column; }
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.kv > div:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; color: var(--navy); text-align: right; }
.cta { display: flex; gap: 10px; margin-top: 4px; }
.cta a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
}
.cta .primary { background: var(--teal-d); color: #fff; }
.cta .primary:hover { background: var(--navy); }
.cta .ghost { background: #fff; border: 1px solid var(--line); color: var(--navy); }
.cta .ghost:hover { border-color: var(--teal); }
.softnote { font-size: 13.5px; color: var(--muted); margin-top: 9px; text-align: center; }
.asklist { margin: 12px 0 0 18px; font-size: 15px; color: var(--muted); }
.asklist li { margin-bottom: 6px; }
.scorebar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--teal-l);
  border-radius: 14px;
  padding: 12px 16px;
}
.scorebar .sv {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  color: var(--teal-d);
}
.scorebar.fair .sv { color: #8a6a2f; }
.scorebar.low .sv { color: var(--bad); }
.scorebar.na .sv { color: var(--muted); font-size: 22px; }
.scorebar .sl { font-size: 15px; font-weight: 700; color: var(--navy); }
.scorebar .su { font-size: 13px; color: var(--muted); }
.ratings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.rating-card { background: var(--cream); border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; }
.rc-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.rc-label { font-size: 14px; font-weight: 700; color: var(--navy); }
.rc-help { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.stats { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.stat-row { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.s-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.s-label { font-size: 15px; font-weight: 600; color: var(--navy); }
.s-val { font-size: 15px; font-weight: 700; color: var(--teal-d); white-space: nowrap; }
.s-cmp { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--dim); margin-top: 4px; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.statgrid > div {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px 13px;
}
.statgrid > div.bad { background: var(--bad-l); border-color: #ecd8d4; }
.statgrid .sg-n {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.1;
  color: var(--navy);
}
.statgrid > div.bad .sg-n { color: var(--bad); }
.statgrid .sg-k { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.statgrid .sg-k em { font-style: normal; color: var(--dim); }
.deflist { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.def { background: var(--cream); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; }
.def-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.def-date { font-size: 13px; color: var(--muted); }
.sev { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 100px; }
.sev-low { background: var(--teal-l); color: var(--teal-d); }
.sev-mid { background: #f7f0e2; color: #8a6a2f; }
.sev-high { background: var(--bad-l); color: var(--bad); }
.def-desc { font-size: 14px; color: var(--ink); margin-top: 6px; }
.def-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--dim); margin-top: 6px; align-items: center; }
.tablewrap { overflow-x: auto; margin-top: 12px; }
.owntable { width: 100%; border-collapse: collapse; font-size: 14px; }
.owntable th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.owntable td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.fineprint { font-size: 13px; color: var(--dim); margin-top: 14px; }
.own-type { display: block; font-size: 12px; color: var(--dim); }
.btn-ghost {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line2);
  color: var(--navy);
  font-weight: 600;
  font-size: 14.5px;
  padding: 9px 18px;
  border-radius: 100px;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-d); }
.spin {
  width: 26px;
  height: 26px;
  border: 3px solid var(--teal-l);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

[hidden] { display: none !important; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .infoin { grid-template-columns: 1fr; }
  .legalgrid { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 860px) {
  .heroin { grid-template-columns: 1fr; gap: 30px; }
  .herotrust { grid-template-columns: 1fr; max-width: none; }
  .herotrust li:first-child { grid-column: auto; }
  .herophoto { order: 2; }
  .herocol { order: 1; }
  .hero p.sub { max-width: none; }
  .statin { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
  .sitem:nth-child(2) { border-right: none; }
  .gcontrols { margin-left: 0; width: 100%; }
  .ratings { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .navlinks a:not(.navcta) { display: none; }
  .navcta { white-space: nowrap; padding: 7px 12px; font-size: 13px; }
  .brand { font-size: 17px; }
  .navin { padding: 8px 16px; gap: 10px; }
  .brand .logomark { width: 22px; height: 22px; }
  .hero { padding: 28px 20px 26px; }
  .hero h1 { font-size: clamp(33px, 8.6vw, 42px); }
  .hero p.sub { font-size: 17.5px; }
  .herotrust li { font-size: 15.5px; }
  .floatcard { left: 0; right: 0; bottom: -18px; max-width: none; }
  .wrap { padding: 20px 18px 40px; }
  .grid { grid-template-columns: 1fr; }
  .searchsec { padding: 26px 18px 26px; }
  .filterbar { flex-direction: column; }
  .fcell { border-right: none; border-bottom: 1px solid var(--line); }
  .fcell:last-of-type { border-bottom: none; }
  .fapply { padding: 12px 20px; justify-content: center; margin-top: 4px; }
  .aipbox { border-radius: 22px; flex-wrap: wrap; padding: 6px; }
  .aipbox input { font-size: 16.5px; padding: 10px 10px 10px 14px; flex-basis: 100%; }
  .aipbtn { width: 100%; min-height: 44px; justify-content: center; }
  .aiplabel { font-size: 12px; }
  .ticker button { font-size: 13.5px; padding: 7px 13px; }
  .rbar h2 { font-size: 23px; }
  .statin { padding: 18px 12px; }
  .sitem .n { font-size: 24px; }
  .statgrid { grid-template-columns: 1fr 1fr; }
  .pageov { padding: 0; }
  .pagesheet { border-radius: 0; width: 100%; height: 100%; max-height: 100%; }
  .pagescroll { padding: 20px 18px 34px; }
  .pagedoc .docstats { grid-template-columns: 1fr; }
  .sitem .l { font-size: 12px; letter-spacing: 0.04em; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  /* the example marquee stops completely and becomes a scrollable row */
  .ticktrack { animation: none !important; transform: none !important; }
  .ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .sk { animation: none !important; background: #efece5 !important; }
}

/* ---------------------------------------------------- lightbox responsive */
@media (max-width: 900px) {
  .lbbody { grid-template-columns: 1fr; padding: 14px 16px 32px; }
  .lbrail { position: static; }
  .simgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .lbwrap { padding: 0; }
  .lb {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: translateY(24px);
  }
  .lbbar {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 10px 12px 10px 14px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .lbtitle { font-size: 18.5px; white-space: normal; }
  .lbloc { font-size: 13px; }
  .lbtools { gap: 5px; }
  .lbtool { padding: 7px 10px; font-size: 12.5px; }
  .lbtool span { display: none; }
  .lbnav { max-width: 132px; }
  .gthumbs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .cmptray { border-radius: 20px; bottom: 10px; padding: 10px 12px; }
  .toast { bottom: 96px; }
}
@media (max-width: 520px) {
  .simgrid { grid-template-columns: 1fr; }
  .cmpchip { max-width: 132px; }
}


/* -------------------------------------------------------------- print view */
/* kept last so it overrides the lightbox layout defined further down the file */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 10.5pt; }
  /* only the open profile prints; everything else on the page steps aside */
  body > *:not(.lbwrap) { display: none !important; }
  .cmptray, .toast, .overlay, .pageov { display: none !important; }
  .lbwrap {
    display: block !important;
    position: static;
    inset: auto;
    padding: 0;
    opacity: 1 !important;
  }
  .lb {
    max-width: 100%;
    max-height: none;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    opacity: 1 !important;
    transform: none !important;
    display: block;
    overflow: visible;
  }
  .printhead {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 10pt;
    color: #33404a;
    border-bottom: 1px solid #d8d4ca;
    padding-bottom: 6pt;
    margin-bottom: 8pt;
  }
  .lbbar { border: none; padding: 0 0 6pt; background: none; }
  .lbtools, .lbnav, .lbx { display: none !important; }
  .lbtitle { font-size: 18pt; }
  .lbscroll { overflow: visible; }
  .lbbody { display: block; padding: 0; }
  .lbrail { position: static; margin-top: 10pt; }
  .gthumbs, .galchip, #simwrap, #own-more, .btn-ghost { display: none !important; }
  .galcap { font-size: 8pt; }
  .cta a { border: 1px solid #d8d4ca; background: #fff; color: #33404a; padding: 5pt 8pt; }
  .galmain {
    aspect-ratio: 16 / 6;
    max-height: 52mm;
    border-radius: 8pt;
    box-shadow: none;
    page-break-inside: avoid;
  }
  /* a one-pager keeps the most recent citations and drops the tail */
  .deflist .def:nth-child(n + 4) { display: none; }
  .noprint { display: none !important; }
  .printonly { display: block; }
  .panel {
    box-shadow: none;
    border: 1px solid #e8e6df;
    border-radius: 8pt;
    padding: 8pt 10pt;
    margin-bottom: 8pt;
  }
  .panel-title, .panel h3, .panel h4 { break-after: avoid; }
  .measure, .stat-row, .ownrow, .def, .pctline, .scorehead, .chainbox { page-break-inside: avoid; }
  .ownlist .ownrow:nth-child(n + 7) { display: none; }
  a[href^="tel"] { color: #33404a; text-decoration: none; }
  .lb::after {
    content: 'Printed from aHealingVisit. Star ratings and measures come from CMS Care Compare; confirm details with the provider and your state survey agency.';
    display: block;
    font-size: 8.5pt;
    color: #68757f;
    border-top: 1px solid #d8d4ca;
    padding-top: 6pt;
    margin-top: 6pt;
  }
}

/* ------------------------------------------------ what people say (Google) */
/* Deliberately quieter than every CMS panel: no accent fill, no bold number
   treatment that could read as a score. The trust score stays the hero metric. */
.gsay-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--cream);
}
.gsay-num { font-size: 26px; font-weight: 600; color: var(--navy); line-height: 1; }
.gsay-b { display: flex; flex-direction: column; gap: 3px; }
.gsay-n { font-size: 13px; color: var(--dim); }
.grevs { list-style: none; display: grid; gap: 10px; margin-top: 14px; }
.grev {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  background: #fff;
}
.grev-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.grev-who { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.grev-who a { color: var(--teal-d); text-decoration: underline; text-underline-offset: 2px; }
.grev-when { font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.grev-stars { margin-top: 5px; }
.grev-stars .stars svg { width: 14px; height: 14px; }
.grev-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 7px;
  white-space: pre-line;
}
.grev-text.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grev-none { font-style: italic; }
.grev-more {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal-d);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gsay-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.gsay-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-d);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gsay-attr { font-size: 12.5px; color: var(--dim); }
@media (max-width: 560px) {
  .grev-top { flex-direction: column; gap: 2px; }
  .gsay-num { font-size: 23px; }
}
