/* ===== DryEyeMonitor — clinical/aseptic styles =====
   Deeper teal, neutral grays, sharper borders, data-dense layout.
   Mirrors PatientsLikeMe's structure for treatment data hub.
   ==================================================== */

:root {
  /* ===== Warm "patient care" palette =====
     brand = terracotta/coral (primary)
     aqua  = secondary trust anchor
     bg / surface = cream
     text = stone (warm grays)
     Legacy --teal-* names kept so existing rules keep working, but they now
     hold the CORAL primary (2026-06-28 palette unification — teal removed). */
  --teal: #b8542f;          /* deep coral — primary (was teal #006d77) */
  --teal-dark: #8f3f24;     /* darker coral */
  --teal-light: #f9e0d5;    /* light coral tint */
  --teal-vlight: #fdf2ed;   /* very light coral tint */
  --accent: #cc6543;        /* coral — secondary accent */
  --accent-dark: #a85230;   /* deep coral */
  --bg: #fbf6f0;            /* cream-50, body bg */
  --surface: #f6efe6;       /* cream-100, alt section bg */
  --surface-2: #efe7da;     /* slightly deeper cream */
  --text: #1c1917;          /* stone-900 */
  --text-muted: #57534e;    /* stone-600 */
  --text-soft: #a8a29e;     /* stone-400 */
  --border: #ece3d8;        /* stone-200 */
  --border-strong: #e0d6c8; /* stone-300 */
  --good: #4c8c72;          /* sage */
  --warn: #d69a3c;
  --bad: #b8392a;
  --shadow: 0 1px 3px rgba(54, 30, 20, 0.05);
  --shadow-md: 0 2px 8px rgba(54, 30, 20, 0.08);
  --radius: 6px;
  --radius-md: 10px;
  --max-w: 1340px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 .5em;
  letter-spacing: -0.005em;
}
h1 { font-size: 2.1rem; line-height: 1.18; }
h2 { font-size: 1.55rem; line-height: 1.25; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.0rem; }
h5 { font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }

p { margin: 0 0 .9em; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ TOP BAR ============ */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--teal-dark);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--teal); text-decoration: none; }
.brand-mark {
  width: 34px; height: 24px;
  background: url('../img/logo.svg') left center / contain no-repeat;
  display: inline-block;
  font-size: 0; line-height: 0; color: transparent;
}
.brand-sub { color: var(--text-soft); font-weight: 400; font-size: .82rem; margin-left: 2px; }

.nav { display: flex; gap: 20px; flex: 1; }
.nav a {
  color: var(--text);
  font-weight: 600;
  font-size: .92rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--teal); border-bottom-color: var(--teal-light); text-decoration: none; }
.nav a.active { color: var(--teal); border-bottom-color: var(--teal); }

.nav-cta { display: flex; gap: 8px; align-items: center; }
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: .9rem;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: #fff; color: var(--teal); border-color: var(--teal); }
.btn-secondary:hover { background: var(--teal-light); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn-ghost:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-lg { padding: 10px 22px; font-size: .98rem; }
.btn-sm { padding: 4px 9px; font-size: .82rem; }

/* ============ PAGE HERO (small, clinical) ============ */
.page-hero {
  background: var(--teal-vlight);
  border-bottom: 1px solid var(--border);
  padding: 36px 0 28px;
}
.page-hero h1 { margin-bottom: 6px; }
.page-hero p.lead { color: var(--text-muted); font-size: 1.02rem; margin: 0; max-width: 760px; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 8px;
}

/* ============ HOME HERO (still small, clinical) ============ */
.home-hero {
  background: var(--teal-vlight);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 50px;
}
.home-hero .container {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  align-items: center;
}
.home-hero h1 {
  font-size: 2.4rem;
  margin-bottom: 14px;
}
.home-hero p.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 22px;
}
.home-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.home-hero .hero-art {
  display: flex;
  justify-content: center;
}
.home-hero .hero-art svg { max-width: 100%; height: auto; }
@media (max-width: 980px) {
  .home-hero .container { grid-template-columns: 1fr; }
  .home-hero .hero-art { display: none; }
}

/* ============ SECTIONS ============ */
section { padding: 48px 0; }
section.tight { padding: 28px 0; }
section.alt { background: var(--surface); }
.section-title { margin-bottom: 24px; }
.section-title h2 { margin-bottom: 4px; }
.section-title p { color: var(--text-muted); margin: 0; }

/* ============ GRIDS ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* ============ CARDS / PANELS ============ */
.card, .panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; font-size: 1.05rem; }
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.panel-head h3 { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.panel-head .meta { font-size: .82rem; color: var(--text-soft); }

/* ============ TABLES (data hub style) ============ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
  vertical-align: middle;
}
.data-table th {
  background: var(--surface);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-strong);
}
.data-table tr:hover td { background: var(--teal-vlight); }
.data-table td .tname { font-weight: 600; color: var(--teal-dark); }
.data-table td .tname:hover { color: var(--accent); }
.data-table td .tsub { font-size: .8rem; color: var(--text-soft); display: block; margin-top: 1px; }

/* Inline horizontal bar for data tables */
.bar {
  position: relative;
  background: var(--surface);
  border-radius: 2px;
  height: 14px;
  width: 100%;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
}
.bar.bar-accent > span { background: var(--accent); }
.bar.bar-good > span { background: var(--good); }
.bar.bar-warn > span { background: var(--warn); }
.bar.bar-bad > span { background: var(--bad); }
.bar-with-label { display: grid; grid-template-columns: 1fr 40px; gap: 8px; align-items: center; }
.bar-with-label .num { font-size: .82rem; color: var(--text-muted); text-align: right; }

/* ============ TREATMENT INDEX FILTERS ============ */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
}
.filter-row input[type="search"] {
  flex: 1;
  min-width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: .95rem;
}
.cat-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  display: inline-block;
  padding: 5px 11px;
  font-size: .82rem;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.pill.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.pill:hover { border-color: var(--teal); }
.pill.active:hover { background: var(--teal-dark); }

/* ============ CATEGORY DROPDOWNS ============ */
.cat-dropdowns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cat-dd { position: relative; }
.cat-dd > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: .82rem;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  user-select: none;
}
.cat-dd > summary::-webkit-details-marker { display: none; }
.cat-dd > summary::after {
  content: "\25BE";
  font-size: .7rem;
  color: var(--text-muted);
  margin-left: 2px;
}
.cat-dd > summary:hover { border-color: var(--teal); }
.cat-dd[open] > summary { background: var(--teal); color: #fff; border-color: var(--teal); }
.cat-dd[open] > summary::after { color: #fff; }
.cat-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(20, 35, 50, 0.12);
  min-width: 280px;
  max-width: 380px;
  padding: 12px 14px;
  z-index: 50;
}
.cat-dd-section { margin-bottom: 10px; }
.cat-dd-section:last-child { margin-bottom: 0; }
.cat-dd-section h6 {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin: 0 0 4px 0;
}
.cat-dd-section ul { list-style: none; margin: 0; padding: 0; }
.cat-dd-section li { padding: 2px 0; font-size: .85rem; }
.cat-dd-section li a { color: var(--text); text-decoration: none; }
.cat-dd-section li a:hover { color: var(--teal); text-decoration: underline; }
.cat-dd-unknown {
  padding: 4px 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  font-size: .85rem;
}
.cat-dd-unknown a {
  color: var(--text-muted);
  text-decoration: none;
  font-style: italic;
}
.cat-dd-unknown a:hover { color: var(--teal); text-decoration: underline; }

/* ============ ROW VARIANTS TOGGLE ============ */
.variants { margin-top: 6px; }
.variants > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 9px 1px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #fff;
  user-select: none;
}
.variants > summary::-webkit-details-marker { display: none; }
.variants > summary::before {
  content: "+";
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  color: var(--teal);
  margin-right: 2px;
}
.variants[open] > summary::before { content: "\2212"; }
.variants[open] > summary {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal-dark);
}
.variants:not([open]) > summary:hover { border-color: var(--teal); }
.variants-list {
  margin-top: 6px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 0 6px 6px 0;
  font-size: .82rem;
  color: var(--text);
  line-height: 1.5;
}

/* ============ COST-VS-EFFICIENCY VALUE TAG ============ */
.value-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.value-best     { background: #dff1cf; color: #2d6717; border: 1px solid #a7d685; }
.value-good     { background: #f0f4dc; color: #6d7e2a; border: 1px solid #d0d896; }
.value-premium  { background: #ffe7c2; color: #8a4f10; border: 1px solid #f0c089; }
.value-low      { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); }
.value-costly   { background: #f7d4d0; color: #8a2a1f; border: 1px solid #e4a098; }

/* ============ SYMPTOM CHECK-IN HISTORY (7-DAY STRIP) ============ */
.checkin-history { display: flex; flex-direction: column; gap: 6px; }
.checkin-history-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.checkin-history-header .name-spacer { flex: 1; }
.checkin-history-header .icon-spacer { flex: 0 0 22px; }
.days-strip-labels { display: flex; gap: 4px; flex: 0 0 auto; }
.days-strip-labels > span { width: 28px; text-align: center; }
.checkin-history-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.checkin-history-row .symptom-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--teal);
}
.checkin-history-row .name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.days-strip { display: flex; gap: 4px; flex: 0 0 auto; }
.day-cell {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}
.day-cell.yes { background: #c44545; color: #fff; }
.day-cell.no { background: #ece3d8; color: var(--text-soft); }
.day-cell.today { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ============ TODAY'S SYMPTOM CHECK-IN GRID (legacy) ============ */
.symptom-checkin-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.symptom-checkin-summary .ck-count {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.symptom-checkin-summary .ck-count .yes { color: #c44545; }
.symptom-checkin-summary .ck-meta { font-size: 0.82rem; color: var(--text-muted); }

.symptom-checkin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.symptom-checkin-item {
  padding: 14px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.symptom-checkin-item .symptom-icon {
  width: 28px;
  height: 28px;
  display: block;
}
.symptom-checkin-item .name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-top: 2px;
}
.symptom-checkin-item .status {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 2px;
}
.symptom-checkin-item.yes {
  background: #fef2f0;
  border-color: #e4a098;
}
.symptom-checkin-item.yes .symptom-icon { color: #c44545; }
.symptom-checkin-item.yes .status {
  background: #c44545;
  color: #fff;
}
.symptom-checkin-item.no {
  background: #f6efe6;
}
.symptom-checkin-item.no .symptom-icon { color: var(--text-soft); opacity: 0.5; }
.symptom-checkin-item.no .name { color: var(--text-muted); }
.symptom-checkin-item.no .status {
  background: #ece3d8;
  color: var(--text-soft);
}

/* ============ EFFECTIVENESS RATING (1–5) ============ */
.eff-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.eff-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.eff-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  flex: 1 1 110px;
  min-width: 110px;
  text-align: center;
  transition: background-color 0.1s, border-color 0.1s;
}
.eff-btn:hover { border-color: var(--teal); }
.eff-btn .eff-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-muted);
}
.eff-btn .eff-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.eff-input:checked + .eff-btn {
  background: var(--teal);
  border-color: var(--teal);
}
.eff-input:checked + .eff-btn .eff-num,
.eff-input:checked + .eff-btn .eff-label {
  color: #fff;
}

/* ============ FACE SCALE (e.g. side effects) ============ */
.face-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.face-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.face-btn {
  flex: 1 1 110px;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  text-align: center;
  transition: background-color 0.1s, border-color 0.1s, transform 0.1s;
}
.face-btn:hover { border-color: var(--teal); transform: translateY(-1px); }
.face-btn .face {
  width: 44px;
  height: 44px;
  display: block;
}
.face-btn .face-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.face-input:checked + .face-btn {
  border-color: var(--text);
  border-width: 2px;
  padding: 11px 7px;
  background: var(--teal-vlight);
}
.face-input:checked + .face-btn .face-label {
  color: var(--text);
}

/* Inline effectiveness pill (for lists) */
.eff-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.eff-pill-1 { background: #fadcd8; color: #8a2a1f; border: 1px solid #e4a098; }
.eff-pill-2 { background: #fce8d4; color: #94531a; border: 1px solid #f0c089; }
.eff-pill-3 { background: #f0f4dc; color: #6d7e2a; border: 1px solid #d0d896; }
.eff-pill-4 { background: #dff1cf; color: #2d6717; border: 1px solid #a7d685; }
.eff-pill-5 { background: var(--teal-light); color: var(--teal-dark); border: 1px solid var(--teal); }

/* ============ YES / NO BUTTON GROUP ============ */
.yn-group { display: inline-flex; gap: 6px; flex: 0 0 auto; align-items: center; }
.yn-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.yn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #fff;
  user-select: none;
  min-width: 64px;
  text-align: center;
  transition: background-color 0.1s, color 0.1s, border-color 0.1s;
}
.yn-btn:hover { border-color: var(--teal); color: var(--text); }
.yn-input:checked + .yn-yes {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.yn-input:checked + .yn-no {
  background: #c44545;
  color: #fff;
  border-color: #c44545;
}

/* ============ SYMPTOMS-TODAY ROW ============ */
.symptom-today-list { display: flex; flex-direction: column; }
.symptom-today-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}
.symptom-today-row:last-child { border-bottom: none; }
.symptom-today-row .symptom-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: var(--teal);
}
.symptom-today-row .symptom-text { flex: 1; min-width: 0; }
.symptom-today-row .symptom-text h4 {
  margin: 0 0 2px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.symptom-today-row .symptom-text p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.symptom-today-row .yn-group { flex: 0 0 auto; }

/* ============ NAV DROPDOWN ============ */
.nav-item-dropdown { position: relative; display: inline-block; }
.nav-item-dropdown > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(20, 35, 50, 0.12);
  padding: 6px 0;
  min-width: 200px;
  z-index: 100;
  margin-top: 4px;
}
.nav-item-dropdown:hover .nav-submenu,
.nav-item-dropdown:focus-within .nav-submenu { display: block; }
.nav-submenu a {
  display: block;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: none;
  white-space: nowrap;
}
.nav-submenu a:hover {
  background: var(--teal-vlight);
  color: var(--teal);
  text-decoration: none;
}
.nav-caret { font-size: 0.65rem; vertical-align: middle; color: var(--text-soft); }

/* ============ INTAKE FORM ============ */
.intake-form { display: flex; flex-direction: column; gap: 18px; }
.intake-form > .card h3 { margin: 0 0 6px 0; font-size: 1.15rem; font-weight: 800; color: var(--text); text-transform: none; letter-spacing: 0; }
.intake-form > .card > p.muted { margin: 0 0 14px 0; font-size: 0.9rem; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-label.label-past {
  color: #3f4a5b;
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: inline-block;
  align-self: flex-start;
}
.form-label.label-active {
  color: var(--teal-dark);
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: inline-block;
  align-self: flex-start;
}
.intake-form input[type="date"],
.intake-form input[type="text"],
.intake-form select,
.intake-form textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  font-family: inherit;
  color: var(--text);
}
.intake-form textarea { min-height: 56px; resize: vertical; }
.intake-form select[multiple] {
  padding: 6px;
  min-height: 200px;
  font-size: 0.9rem;
}
.intake-form select[multiple] optgroup {
  font-weight: 800;
  color: var(--teal-dark);
  background: var(--teal-vlight);
  padding: 4px 6px;
}
.intake-form select[multiple] option {
  padding: 4px 8px;
  font-weight: 400;
  color: var(--text);
}
.intake-form .help-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 6px 0;
}

/* Multi-select treatments picker (grouped checkboxes) */
.tx-multipicker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.tx-mp-group {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px 12px;
}
.tx-mp-header {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--teal-dark);
  background: var(--teal-vlight);
  border-radius: 6px;
  padding: 5px 10px;
  margin: -2px -6px 10px;
  display: inline-block;
}
.tx-mp-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text);
  line-height: 1.35;
}
.tx-mp-group label:hover { color: var(--teal-dark); }
.tx-mp-group label input[type="checkbox"] {
  margin: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--teal);
  flex: 0 0 15px;
}

/* Past-treatments variant: same teal selection styling as active — section title is the differentiator */
.tx-multipicker.tx-mp-past {
  background: var(--teal-vlight);
  border: 2px solid var(--teal);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0, 109, 119, 0.12);
}
.tx-multipicker.tx-mp-past .tx-mp-group {
  background: #fff;
  border: 1.5px solid var(--teal-light);
}
.tx-multipicker.tx-mp-past .tx-mp-header {
  background: transparent;
  color: var(--teal-dark);
  font-weight: 800;
  padding-left: 0;
  padding-right: 0;
}
.tx-multipicker.tx-mp-past .tx-mp-group label {
  color: var(--text);
}
.tx-multipicker.tx-mp-past .tx-mp-group label:hover {
  color: var(--teal-dark);
}
.tx-multipicker.tx-mp-past .tx-mp-group label input[type="checkbox"] {
  accent-color: var(--teal);
}

/* Active-treatments variant: solid teal wrapper, filled header chips, drop shadow — reads as "currently in use" */
.tx-multipicker.tx-mp-active {
  background: var(--teal-vlight);
  border: 2px solid var(--teal);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0, 109, 119, 0.12);
}
.tx-multipicker.tx-mp-active .tx-mp-group {
  background: #fff;
  border: 1.5px solid var(--teal-light);
}
.tx-multipicker.tx-mp-active .tx-mp-header {
  background: transparent;
  color: var(--teal-dark);
  font-weight: 800;
  padding-left: 0;
  padding-right: 0;
}
.tx-multipicker.tx-mp-active .tx-mp-group label {
  color: var(--text);
}

/* OSDI frequency table */
.osdi-q-table { display: flex; flex-direction: column; }
.osdi-q-header,
.osdi-q-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, 1fr);
  gap: 6px;
  align-items: center;
}
.osdi-q-header { padding: 0 0 8px 0; border-bottom: 2px solid var(--border-strong); }
.osdi-q-header > div {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
}
.osdi-q-header > div:first-child { text-align: left; }
.osdi-q-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.osdi-q-row:last-child { border-bottom: none; }
.osdi-q-row > label {
  display: flex;
  justify-content: center;
  cursor: pointer;
}

/* Symptom OPQRST collapsibles */
.symptom-fold {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fff;
}
.symptom-fold > summary {
  list-style: none;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}
.symptom-fold > summary::-webkit-details-marker { display: none; }
.symptom-fold[open] > summary { border-bottom: 1px solid var(--border); background: var(--teal-vlight); border-radius: 10px 10px 0 0; }
.symptom-fold > summary input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: var(--teal);
}
.symptom-fold > summary .sym-name { font-weight: 700; color: var(--text); flex: 1; }
.symptom-fold > summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--teal);
  font-weight: 700;
  line-height: 1;
}
.symptom-fold[open] > summary::after { content: "\2212"; }
.opqrst-fields { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.opqrst-field {
  display: grid;
  grid-template-columns: 30px 110px 1fr;
  gap: 12px;
  align-items: center;
}
.opqrst-field .op-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.opqrst-field .op-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.opqrst-field input[type="text"],
.opqrst-field select { padding: 6px 10px; font-size: 0.88rem; }
.opqrst-field input[type="range"] { width: 100%; accent-color: var(--teal); }
.opqrst-field .sev-line {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
  align-items: center;
}
.opqrst-field .sev-val {
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 0.92rem;
  text-align: right;
}

/* ============ OPQRST LIST ============ */
.opqrst-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.opqrst-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.opqrst-letter {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  margin-top: 2px;
}
.opqrst-row strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 2px;
}
.opqrst-row p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============ OSDI-6 CATEGORIES LIST ============ */
.osdi-cats { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.osdi-cat-row {
  border-left: 3px solid var(--teal);
  padding: 4px 0 4px 14px;
}
.osdi-cat-row .lab {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.osdi-cat-row strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
}
.osdi-cat-row p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============ OSDI SEVERITY SCALE ============ */
.osdi-scale {
  margin: 16px 0 18px;
}
.osdi-bar {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #6cc04a 0%,
    #a8d54a 22%,
    #e8c344 50%,
    #ec894a 75%,
    #c44545 100%
  );
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.osdi-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}
.osdi-labels span:nth-child(1) { color: #4f9c2b; }
.osdi-labels span:nth-child(2) { color: #a09023; }
.osdi-labels span:nth-child(3) { color: #b96627; }
.osdi-labels span:nth-child(4) { color: #9c2f2f; }

/* ============ SYMPTOM LIST ============ */
.symptom-list {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.symptom-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.symptom-item:last-child { border-bottom: none; }
.symptom-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: var(--teal);
}
.symptom-text { flex: 1; min-width: 0; }
.symptom-text h4 {
  margin: 0 0 2px 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.symptom-text p {
  margin: 0;
  font-size: .88rem;
  color: var(--text-muted);
}

/* ============ INFO INFOGRAPHIC CARDS ============ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding: 40px 0 24px;
}
.info-card-stack { display: flex; flex-direction: column; }
.info-title {
  font-size: 1.7rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 12px 0;
  color: var(--text);
}
.info-desc {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 18px 0;
  font-size: .95rem;
  line-height: 1.45;
}
.info-card-viz {
  flex: 1;
  padding: 22px 22px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}
.info-viz-label {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text);
  text-align: center;
  margin: 0 0 16px 0;
}
.info-bars { display: flex; flex-direction: column; gap: 12px; }
.info-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 50px;
  gap: 12px;
  align-items: center;
}
.info-bar-label { font-weight: 700; font-size: .9rem; color: var(--text); }
.info-bar {
  background: #eef2f5;
  border-radius: 4px;
  height: 14px;
  overflow: hidden;
}
.info-bar-fill { display: block; height: 100%; }
.info-bar-major    { background: #6cc04a; }
.info-bar-moderate { background: #93cf6f; }
.info-bar-slight   { background: #cae3b9; }
.info-bar-none     { background: var(--border); }
.info-bar-val { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.info-se-chart, .info-ce-chart {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}
.info-se-chart svg, .info-ce-chart svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  font-family: 'Open Sans', sans-serif;
}
.info-axis-label  { font-size: 9px; fill: var(--text-muted); }
.info-grid-line   { stroke: var(--border); stroke-dasharray: 3 3; stroke-width: 1; }
.info-x-label     { font-size: 9px; fill: var(--text-muted); }
@media (max-width: 900px) {
  .info-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ============ LEAF ICON IN TABLE ROWS ============ */
.tname-cell { display: flex; gap: 12px; align-items: flex-start; }
.leaf-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin-top: 2px;
  color: var(--teal);
  display: block;
}
.tname-body { flex: 1 1 auto; min-width: 0; }

/* ============ TREATMENT DETAIL ============ */
.tx-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 28px 0 24px;
}
.tx-header .crumbs { font-size: .82rem; color: var(--text-soft); margin-bottom: 8px; }
.tx-header h1 { margin: 0 0 6px; font-size: 2rem; }
.tx-header .tx-sub { color: var(--text-muted); margin: 0 0 14px; }
.tx-meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.tx-meta { font-size: .85rem; }
.tx-meta .lab { color: var(--text-soft); text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }
.tx-meta .val { color: var(--text); font-weight: 600; font-size: 1rem; }

.tx-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  margin-top: 28px;
}

/* effectiveness donut bands */
.eff-bands {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.eff-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
}
.eff-band .lab { font-size: .75rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; }
.eff-band .num { font-weight: 700; font-size: 1.4rem; color: var(--teal-dark); display: block; margin-top: 2px; }
.eff-band.major .num { color: var(--good); }
.eff-band.moderate .num { color: var(--teal-dark); }
.eff-band.slight .num { color: var(--warn); }
.eff-band.none .num { color: var(--bad); }

/* side-effect severity dots */
.sev {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: .78rem;
  font-weight: 600;
}
.sev.mild { background: #e8f4ec; color: var(--good); }
.sev.moderate { background: #fcf3df; color: var(--warn); }
.sev.severe { background: #f7e0dd; color: var(--bad); }

/* small chart wrappers */
.chart-card { padding: 18px; }
.chart-container { position: relative; height: 250px; }
.chart-container.lg { height: 320px; }

/* ============ TRACKER PAGE (kept) ============ */
.tracker-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  margin-top: 20px;
}
.form-row { margin-bottom: 12px; }
.form-row label {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.form-row label .val { color: var(--teal); font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--teal); }
input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
}
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .78rem;
  cursor: pointer;
  user-select: none;
}
.chip.active { background: var(--teal); color: #fff; border-color: var(--teal); }

.tracker-charts { display: grid; gap: 20px; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
}
.kpi .lab { color: var(--text-soft); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.kpi .num { font-size: 1.55rem; font-weight: 800; color: var(--teal-dark); display: block; margin-top: 2px; }
.kpi .delta { font-size: .8rem; }
.kpi .delta.up { color: var(--bad); }
.kpi .delta.down { color: var(--good); }

/* ============ MY HEALTH OVERVIEW ============ */
.mh-shell {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.mh-shell .container { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.mh-id .pid { font-size: .8rem; color: var(--text-soft); }
.mh-id h1 { margin: 2px 0 6px; font-size: 1.7rem; }
.mh-id .pmeta { color: var(--text-muted); font-size: .9rem; }
.mh-id .pmeta strong { color: var(--text); }

.mh-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
  font-size: 1.08rem;
}
.mh-shell { font-size: 1.08rem; }
.mh-grid .panel-head h3 { font-size: 1.15rem; }
.mh-grid .card p,
.mh-grid .card td,
.mh-grid .card .meta { font-size: 1rem; }
.mh-stack { display: grid; gap: 18px; }

.mh-tabs {
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 2px;
  margin-top: 14px;
}
.mh-tabs a {
  padding: 10px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: .9rem;
  border-bottom: 3px solid transparent;
}
.mh-tabs a.active { color: var(--teal); border-bottom-color: var(--teal); }
.mh-tabs a:hover { color: var(--teal-dark); text-decoration: none; }

.tx-list {
  list-style: none;
  padding: 0; margin: 0;
}
.tx-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.tx-list li:last-child { border-bottom: 0; }
.tx-list .name { font-weight: 600; color: var(--text); }
.tx-list .meta { font-size: .8rem; color: var(--text-soft); }
.tx-list .dose { font-size: .82rem; color: var(--text-muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.status-dot.active { background: var(--good); }
.status-dot.titrate { background: var(--warn); }
.status-dot.stopped { background: var(--text-soft); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative;
  padding: 0 0 16px 22px;
  border-left: 2px solid var(--border);
  margin-left: 6px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px; top: 4px;
  width: 10px; height: 10px;
  background: var(--teal);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--teal);
}
.timeline .date { font-size: .78rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; }
.timeline .title { font-weight: 600; margin: 1px 0 2px; }
.timeline .desc { font-size: .87rem; color: var(--text-muted); margin: 0; }

.next-visit {
  background: var(--teal-vlight);
  border: 1px solid var(--teal-light);
  border-radius: var(--radius-md);
  padding: 14px;
}
.next-visit .when { font-weight: 700; color: var(--teal-dark); }

.reminder-list { list-style: none; padding: 0; margin: 0; }
.reminder-list li {
  display: flex; gap: 10px; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.reminder-list li:last-child { border-bottom: 0; }
.reminder-list .when { color: var(--text-soft); width: 64px; flex-shrink: 0; }

/* ============ FOOTER ============ */
footer.site-footer {
  background: #1c1917;
  color: #d6cfc6;
  padding: 36px 0 22px;
  margin-top: 48px;
  font-size: .9rem;
}
footer.site-footer h6 {
  color: #fff;
  text-transform: uppercase;
  font-size: .76rem;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
}
footer.site-footer ul { list-style: none; padding: 0; margin: 0; }
footer.site-footer li { margin-bottom: 6px; }
footer.site-footer a { color: #d6cfc6; }
footer.site-footer a:hover { color: #fff; text-decoration: underline; }
footer .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 24px; }
footer .footer-brand p { color: #a8a29e; margin-top: 8px; font-size: .85rem; }
footer .footer-bottom {
  border-top: 1px solid #3a3531;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .78rem;
  color: #a8a29e;
}
footer .badge-soc {
  display: inline-block;
  padding: 3px 8px;
  background: #3a3531;
  border-radius: 3px;
  font-size: .72rem;
  color: #d6cfc6;
}

/* ============ MODAL (SPEED questionnaire) ============ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 30, 45, 0.55);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 720px;
  box-shadow: 0 20px 60px rgba(0, 30, 50, 0.25);
  overflow: hidden;
  animation: modalIn .15s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--teal-vlight);
}
.modal-head h2 { margin: 0 0 4px; font-size: 1.25rem; color: var(--teal-dark); }
.modal-head p { margin: 0; color: var(--text-muted); font-size: .88rem; }
.modal-close {
  background: none;
  border: 0;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px; max-height: 70vh; overflow-y: auto; }
.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
  gap: 10px;
}
.modal-foot .score-now {
  font-size: .92rem;
  color: var(--text-muted);
}
.modal-foot .score-now strong { color: var(--teal-dark); font-size: 1.1rem; }

/* SPEED form layout */
.speed-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}
.speed-table th, .speed-table td {
  padding: 8px 10px;
  text-align: center;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
}
.speed-table th {
  background: var(--surface);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .72rem;
}
.speed-table td:first-child, .speed-table th:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text);
}
.speed-table td:first-child { font-weight: 600; }
.speed-table input[type="radio"] {
  accent-color: var(--teal);
  cursor: pointer;
  width: 16px; height: 16px;
}
.speed-section-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--teal-dark);
  margin: 4px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--teal-light);
}
.speed-when { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.speed-when label {
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.speed-result {
  background: var(--teal-vlight);
  border: 1px solid var(--teal-light);
  border-radius: 6px;
  padding: 18px;
  text-align: center;
  margin-top: 16px;
  display: none;
}
.speed-result.show { display: block; }
.speed-result .score {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1;
}
.speed-result .out-of { font-size: 1rem; color: var(--text-muted); }
.speed-result .band {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.speed-result .band.normal   { background: #e1f1e7; color: var(--good); }
.speed-result .band.mild     { background: #fdf2e1; color: var(--warn); }
.speed-result .band.moderate { background: #fce8d4; color: #b97419; }
.speed-result .band.severe   { background: #f7dfdb; color: var(--bad); }
.speed-result p.lab { color: var(--text-muted); margin-top: 12px; font-size: .9rem; }

/* ============ MISC ============ */
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.mono { font-family: "SF Mono", ui-monospace, Menlo, monospace; }
.spacer-sm { height: 12px; }
.spacer-md { height: 24px; }
.callout {
  background: var(--teal-vlight);
  border-left: 3px solid var(--teal);
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: .92rem;
}
.disclaimer {
  background: #fdf5e3;
  border-left: 3px solid var(--warn);
  padding: 11px 16px;
  border-radius: var(--radius);
  color: #6b5300;
  font-size: .85rem;
  margin: 18px 0;
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tag.rx { background: #fdf2ed; color: #a85230; }
.tag.otc { background: #e8f4ec; color: var(--good); }
.tag.procedure { background: #f3eaf9; color: #6f3eb8; }
.tag.device { background: #fcf3df; color: #8a5e10; }
.tag.lifestyle { background: var(--surface-2); color: var(--text-muted); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .grid-3, .grid-4, .grid-2,
  .tx-layout, .mh-grid, .tracker-layout {
    grid-template-columns: 1fr;
  }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .tx-meta-row { grid-template-columns: repeat(2, 1fr); }
  footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .home-hero h1 { font-size: 1.8rem; }
  h1 { font-size: 1.6rem; }
}

/* ===== Get started (gate) page ===== */
.bullet-list { list-style: none; padding: 0; margin: 0; }
.bullet-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  line-height: 1.5;
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}
.mini-checklist {
  background: var(--teal-vlight);
  border: 1px solid var(--teal-light);
  border-radius: 10px;
  padding: 14px 16px;
}
.mini-checklist .mc-label {
  display: block;
  font-weight: 700;
  color: var(--teal);
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.mini-checklist p { margin: 0; font-size: .95rem; line-height: 1.45; }

/* Display serif for headlines (premium health aesthetic) */
h1, h2, .font-display, blockquote { font-family: 'Newsreader', Georgia, 'Times New Roman', serif; font-weight: 600; letter-spacing: -0.005em; }
h1 { line-height: 1.08; }

/* Page-hero with a content image (treatments / whatworks) — styles.css pages */
.page-hero .hero-with-media{display:grid;grid-template-columns:1.7fr 1fr;gap:2.75rem;align-items:center;}
.page-hero .hero-with-media > div:first-child{min-width:0;}
.page-hero .hero-media{overflow:hidden;border-radius:16px;box-shadow:0 6px 20px rgba(15,23,42,.10);border:1px solid rgba(15,23,42,.06);}
.page-hero .hero-media img{display:block;width:100%;aspect-ratio:6/5;object-fit:cover;}
@media (max-width:860px){.page-hero .hero-with-media{grid-template-columns:1fr;}.page-hero .hero-media{display:none;}}

/* ---- feature hero (treatments landing) — FULL-BLEED, matching the
   symptoms/diagnosis tailwind heroes: clean white field, larger headline, chip
   row, and an edge-to-edge image filling the right ~46% with a white left-fade
   (not a small boxed card). Scoped to .page-hero--feature so other .page-hero /
   .hero-with-media users are untouched. 2026-06-28 ---- */
.page-hero--feature{position:relative;overflow:hidden;background:#fff;padding:0;border-bottom:1px solid var(--border);}
.page-hero--feature .container{position:relative;z-index:1;}
.page-hero--feature .hero-feature-text{max-width:560px;padding:64px 0 60px;}
/* font-weight:400 to match the Tailwind heroes (their injected serif weight:600
   is reset to 400 by Tailwind preflight; styles.css keeps 600, so force 400 here
   for a consistent headline weight across all hero pages). 2026-06-28 */
.page-hero--feature h1{font-size:clamp(2.2rem,4.4vw,3.05rem);font-weight:400;line-height:1.08;margin-bottom:12px;letter-spacing:-0.02em;}
.page-hero--feature p.lead{font-size:1.12rem;line-height:1.6;max-width:540px;color:var(--text);}
.page-hero--feature .hero-bleed-media{position:absolute;inset:0 0 0 auto;width:46%;pointer-events:none;}
.page-hero--feature .hero-bleed-media img{width:100%;height:100%;object-fit:cover;object-position:50% 50%;}
.page-hero--feature .hero-bleed-fade{position:absolute;inset:0 auto 0 0;width:14rem;background:linear-gradient(to right,#fff,rgba(255,255,255,.7),transparent);}
.page-hero--feature .hero-feature-mobile{display:none;}
@media(max-width:860px){
  .page-hero--feature .hero-bleed-media{display:none;}
  .page-hero--feature .hero-feature-text{padding:40px 0 32px;}
  .page-hero--feature .hero-feature-mobile{display:block;}
  .page-hero--feature .hero-feature-mobile img{width:100%;height:220px;object-fit:cover;}
}
.hero-chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px;}
.hero-chip{display:inline-flex;align-items:center;border:1px solid var(--border);background:var(--surface);color:var(--text-muted);border-radius:999px;padding:7px 15px;font-size:.85rem;font-weight:500;}
