/* CareCheck — Minimalist Clinical Transparency Design System */
:root {
  --canvas: #FFFFFF;
  --surface: #F5F5F7;
  --surface-hover: #ECECF0;
  --obsidian: #0A0A0A;
  --obsidian-card: #141416;
  --obsidian-border: rgba(255, 255, 255, 0.10);

  --ink: #0A0A0A;
  --ink-2: #52525B;
  --ink-3: #71717A;
  --border: rgba(10, 10, 10, 0.08);
  --border-strong: rgba(10, 10, 10, 0.16);

  --accent: #0071E3;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --safe: #15803D;
  --safe-bg: #ECFDF5;
  --safe-ring: #16A34A;
  --moderate: #A16207;
  --moderate-bg: #FEFCE8;
  --moderate-ring: #D97706;
  --high: #C2410C;
  --high-bg: #FFF7ED;
  --high-ring: #EA580C;
  --critical: #B91C1C;
  --critical-bg: #FEF2F2;
  --critical-ring: #DC2626;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-soft: 0 1px 2px rgba(10, 10, 10, 0.04), 0 8px 24px rgba(10, 10, 10, 0.05);
  --shadow-float: 0 16px 40px rgba(10, 10, 10, 0.12), 0 2px 8px rgba(10, 10, 10, 0.05);

  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.011em;
}

h1, h2, h3, h4, .display, .metric-val {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}

h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.22;
  font-weight: 700;
}

h3 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 600;
}

p {
  margin: 0 0 14px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.16s ease, opacity 0.16s ease;
}

a:hover {
  text-decoration: underline;
}

.num, .metric-val, table td.num, .ring-val {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ink-2);
  font-size: 13.5px;
}

.subtle {
  color: var(--ink-3);
  font-size: 12.5px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Layout Containers */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-main {
  padding: 36px 0 80px;
}

/* Translucent Frosted-Glass Sticky Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.025em;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-lockup:hover {
  text-decoration: none;
  opacity: 0.85;
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link {
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}

.nav-link.active {
  color: var(--ink);
  background: var(--surface);
  font-weight: 600;
}

.nav-link-pro {
  background: var(--obsidian);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  margin-left: 4px;
}

.nav-link-pro:hover {
  background: #27272A;
  color: #FFFFFF;
  text-decoration: none;
}

.nav-link-pro.active {
  background: var(--accent);
  color: #FFFFFF;
}

/* Breadcrumbs & Actions Bar */
.page-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.breadcrumbs a {
  color: var(--ink-2);
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn-obsidian {
  background: var(--obsidian);
  color: #FFFFFF;
}

.btn-obsidian:hover:not(:disabled) {
  background: #27272A;
}

.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-accent:hover:not(:disabled) {
  background: #0062C4;
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-hover);
}

.btn-white {
  background: #FFFFFF;
  color: var(--obsidian);
}

.btn-white:hover:not(:disabled) {
  background: #F4F4F5;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
}

/* Surfaces & Cards */
.surface-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.white-card {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.callout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.callout-partner {
  background: var(--canvas);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}

/* Eyebrow Pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--safe-ring);
}

/* Homepage Hero */
.home-hero {
  padding: 44px 0 48px;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 44px;
  align-items: center;
}

.home-hero-title {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin-bottom: 18px;
}

.home-hero-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 540px;
  margin-bottom: 28px;
}

/* Live Autocomplete Search Widget */
.hero-search-wrap {
  position: relative;
  max-width: 580px;
  z-index: 30;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--canvas);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 7px 7px 7px 16px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-soft);
}

.hero-search-icon {
  color: var(--ink-3);
  flex-shrink: 0;
  display: flex;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  padding: 8px 4px;
}

.hero-search input::placeholder {
  color: var(--ink-3);
}

.hero-search-kbd {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.autocomplete-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--canvas);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  z-index: 50;
}

.autocomplete-menu.open {
  display: block;
}

.ac-header {
  padding: 9px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ac-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.12s ease;
}

.ac-item:last-of-type {
  border-bottom: none;
}

.ac-item:hover, .ac-item.selected {
  background: var(--surface);
  text-decoration: none;
}

.ac-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.ac-sub {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 2px;
}

.ac-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.ac-footer:hover {
  background: var(--surface-hover);
}

.hero-hints {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-hint-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-sans);
}

.hero-hint-chip:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

/* Editorial Hero Visual */
.hero-visual {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-visual-badge {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.hero-visual-badge-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}

.hero-visual-badge-sub {
  font-size: 12px;
  color: var(--ink-2);
}

/* Hairline KPI Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 40px;
}

.kpi-cell {
  padding: 20px 18px;
  border-right: 1px solid var(--border);
}

.kpi-cell:last-child {
  border-right: none;
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.kpi-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.kpi-val.warn { color: var(--moderate); }
.kpi-val.crit { color: var(--critical); }

/* Obsidian Square-Style Bento Section */
.bento-section {
  padding: 24px 0 56px;
}

.bento-band {
  background: var(--obsidian);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 44px;
}

.bento-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.bento-head h2 {
  color: #FFFFFF;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.03em;
}

.bento-head p {
  color: #A1A1AA;
  max-width: 520px;
  margin: 6px 0 0;
  font-size: 14.5px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.bento-card {
  background: var(--obsidian-card);
  border: 1px solid var(--obsidian-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.bento-span-7 { grid-column: span 7; }
.bento-span-5 { grid-column: span 5; }

.bento-kicker {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A1A1AA;
  font-weight: 600;
  margin-bottom: 10px;
}

.bento-card h3 {
  color: #FFFFFF;
  font-size: 20px;
  margin-bottom: 8px;
}

.bento-card p {
  color: #A1A1AA;
  font-size: 14px;
  margin-bottom: 18px;
}

.bento-link {
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bento-link:hover {
  color: #D4D4D8;
  text-decoration: none;
}

.bento-mini-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 18px;
}

.bento-tier {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
}

.bento-tier-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #FFFFFF;
}

.bento-tier-label {
  font-size: 11.5px;
  color: #A1A1AA;
  margin-top: 2px;
}

.bento-tier-bar {
  height: 4px;
  border-radius: 999px;
  margin-top: 8px;
}

/* State Index Section */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.state-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.state-card:hover {
  background: var(--canvas);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.state-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.state-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.state-card-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.state-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mini-stat-label {
  font-size: 11.5px;
  color: var(--ink-3);
}

.mini-stat-val {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.safety-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.08);
  overflow: hidden;
  display: flex;
}

.seg-safe { background: var(--safe-ring); height: 100%; }
.seg-mod { background: var(--moderate-ring); height: 100%; }
.seg-high { background: var(--high-ring); height: 100%; }
.seg-crit { background: var(--critical-ring); height: 100%; }

.state-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--ink-2);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Editorial Subpage Hero */
.page-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.page-hero-obsidian {
  background: var(--obsidian);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 24px;
}

.page-hero-obsidian h1,
.page-hero-obsidian h2 {
  color: #FFFFFF;
}

.page-hero-obsidian .muted {
  color: #A1A1AA;
}

.subnav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--border);
}

.pill-link:hover {
  background: var(--surface-hover);
  text-decoration: none;
}

.pill-link.active {
  background: var(--obsidian);
  color: #FFFFFF;
  border-color: var(--obsidian);
}

/* KPI Grid for State & Facility Pages */
.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.kpi-tile-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.kpi-tile-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Facility Page — Apple Health SVG Ring Gauges */
.facility-hero {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.facility-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.rings-and-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.ring-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.ring-box {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-svg {
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(10, 10, 10, 0.08);
  stroke-width: 6.5;
}

.ring-fill {
  fill: none;
  stroke-width: 6.5;
  stroke-linecap: round;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}

.ring-center small {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 2px;
}

.ring-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.stat-tile-center {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.stat-tile-center .metric-val {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Proportional A–L Severity Bar */
.sev-bar-wrap {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.sev-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.sev-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
}

.sev-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.sev-dot-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-crit { background: var(--critical-ring); }
.dot-high { background: var(--high-ring); }
.dot-mod { background: var(--moderate-ring); }
.dot-low { background: #71717A; }
.dot-safe { background: var(--safe-ring); }

/* Pills & Status Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.pill-safe { background: var(--safe-bg); color: var(--safe); }
.pill-warn { background: var(--moderate-bg); color: var(--moderate); }
.pill-high { background: var(--high-bg); color: var(--high); }
.pill-critical { background: var(--critical-bg); color: var(--critical); }
.pill-neutral { background: var(--surface); color: var(--ink-2); border: 1px solid var(--border); }
.pill-accent { background: var(--accent-soft); color: var(--accent); }

/* Tour Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.checklist-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  margin-top: 3px;
  flex-shrink: 0;
  background: var(--canvas);
}

.print-note-line {
  display: none;
}

/* Hairline Violation Timeline */
.timeline {
  position: relative;
  margin-top: 18px;
  padding-left: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border-strong);
}

.timeline-item {
  position: relative;
  padding: 0 0 20px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -21px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--canvas);
  box-shadow: 0 0 0 1px var(--border-strong);
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.timeline-cat {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
}

.timeline-desc {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* Filter Toolbars & Directory Lists */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 20px;
}

.input, .select {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 9px 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  padding: 0 6px;
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.city-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  color: var(--ink);
  display: block;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.city-card:hover {
  background: var(--canvas);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.facility-row {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.facility-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.facility-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Tour Packet Comparison Drawer */
.compare-panel {
  display: none;
  background: var(--canvas);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 76px;
}

#states {
  scroll-margin-top: 76px;
}

.cmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.cmp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

/* Minimalist Hairline Tables */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 600;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border-strong);
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--surface);
}

/* Glossary & Pricing */
.term-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.term-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.term-code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  margin-right: 8px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

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

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pricing-card.featured {
  background: var(--canvas);
  border: 1.5px solid var(--obsidian);
  box-shadow: var(--shadow-soft);
}

.price-tag {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 12px 0;
}

.pricing-list {
  padding-left: 18px;
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

.pricing-list li {
  margin-bottom: 8px;
}

/* Minimalist Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 34px 0 44px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
}

.footer-links a {
  color: var(--ink-2);
}

.footer-links a:hover {
  color: var(--ink);
}

.print-only {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-cell {
    border-bottom: 1px solid var(--border);
  }
  .bento-span-7, .bento-span-5 {
    grid-column: span 12;
  }
}

@media (max-width: 760px) {
  .kpi-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rings-and-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container, .container-narrow, .site-nav-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
  .site-nav {
    height: auto;
    padding: 10px 0;
  }
  .site-nav-inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-links {
    width: 100%;
    justify-content: space-between;
    overflow-x: visible;
    gap: 2px;
  }
  .nav-link {
    font-size: 12.5px;
    padding: 5px 8px;
  }
  .nav-link-pro {
    font-size: 12px;
    padding: 5px 11px;
    margin-left: 0;
  }
  .home-hero {
    padding: 28px 0 32px;
  }
  .bento-band {
    padding: 26px 20px;
    border-radius: 20px;
  }
  .bento-mini-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .facility-hero, .page-hero, .page-hero-obsidian, .surface-card, .white-card {
    padding: 20px;
  }
  .kpi-strip {
    grid-template-columns: 1fr;
  }
  .kpi-cell {
    border-right: none;
  }
  .hero-search-kbd {
    display: none;
  }
}

/* Printable Tour Checklist PDF Layout */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 12px;
    line-height: 1.45;
  }
  .site-nav, .site-footer, .no-print, .callout-card, .alternatives-card {
    display: none !important;
  }
  .print-only {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #D4D4D8;
  }
  .page-main {
    padding: 0 !important;
  }
  .container, .container-narrow {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .facility-hero, .white-card, .surface-card {
    border: 1px solid #D4D4D8 !important;
    box-shadow: none !important;
    background: #FFFFFF !important;
    padding: 16px !important;
    margin-bottom: 14px !important;
  }
  .rings-and-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
  .checklist-item, .timeline-item {
    break-inside: avoid;
  }
  .print-note-line {
    display: block !important;
    height: 22px;
    border-bottom: 1px dashed #D4D4D8;
    margin-top: 8px;
  }
}

/* v4.0 Clinical Intelligence, Red Flags & Live Enforcement Feed */
.redflag-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.redflag-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13.5px;
}

.redflag-critical {
  background: var(--critical-bg);
  border-color: rgba(185, 28, 28, 0.25);
  color: #7F1D1D;
}

.redflag-warn {
  background: var(--high-bg);
  border-color: rgba(194, 65, 12, 0.25);
  color: #7C2D12;
}

.redflag-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}

.clinical-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.bench-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.bench-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
}

.bench-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.bench-fill {
  height: 100%;
  border-radius: 999px;
}

.qm-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.qm-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.chain-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.chain-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.alert-preview-list {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}

.alert-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.alert-preview-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

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

/* v5.1 Interactive Violation Filters & Phone Links */
.phone-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

.phone-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-pill {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--canvas);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.filter-pill:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.filter-pill.active {
  background: var(--obsidian);
  color: #FFFFFF;
  border-color: var(--obsidian);
}
