:root {
  --bg: #09101f;
  --bg2: #10172a;
  --bg3: #172241;
  --panel: rgba(16, 24, 45, 0.92);
  --panel2: rgba(24, 35, 66, 0.96);
  --text: #eef4ff;
  --muted: #aab7d5;
  --accent: #78d7ff;
  --accent2: #8ef0c1;
  --warn: #f6c44f;
  --danger: #f7a8a8;
  --border: rgba(95, 122, 196, 0.28);
  --border-strong: rgba(120, 215, 255, 0.42);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(120, 215, 255, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(142, 240, 193, 0.08), transparent 22%),
    linear-gradient(180deg, var(--bg), var(--bg2) 36%, #0d1426 100%);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 40px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 48px); line-height: 1.02; letter-spacing: -0.03em; }
h2 { margin: 0 0 12px; font-size: 18px; letter-spacing: -0.01em; }
h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.sub { color: var(--muted); margin: 0 0 14px; line-height: 1.55; font-size: 15px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px; }

.topbar {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(95, 122, 196, 0.18);
  background: rgba(9, 16, 31, 0.72);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #03202a; font-weight: 900;
  box-shadow: 0 10px 22px rgba(120, 215, 255, 0.22);
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 800; font-size: 22px; line-height: 1.05; }
.brand-sub { color: var(--muted); font-size: 12px; line-height: 1.35; }

.nav-shell {
  position: sticky;
  top: 59px;
  z-index: 15;
  background: rgba(9, 16, 31, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(95, 122, 196, 0.16);
}
.nav {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px 12px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.nav-primary {
  padding-bottom: 10px;
}
.nav-secondary {
  padding-top: 10px;
  padding-bottom: 0;
}
.nav-more {
  padding: 0 14px 12px;
}
.nav-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(95, 122, 196, 0.24);
  background: rgba(18, 27, 53, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.nav-more-toggle::-webkit-details-marker { display: none; }
.nav-more.open .nav-more-toggle,
.nav-more[open] .nav-more-toggle {
  color: var(--text);
  border-color: rgba(120, 215, 255, 0.36);
}
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 9px 13px; border-radius: 999px; border: 1px solid rgba(95, 122, 196, 0.24);
  background: rgba(18, 27, 53, 0.92); color: var(--muted); font-size: 13px;
}
.nav-item:hover { text-decoration: none; color: var(--text); border-color: rgba(120, 215, 255, 0.36); }
.nav-item.active {
  background: linear-gradient(180deg, rgba(34, 58, 108, 0.96), rgba(25, 41, 79, 0.96));
  color: var(--text); border-color: var(--border-strong); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.nav-icon { font-size: 14px; }
.nav-label { display: inline-block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 22px 16px; }
.page-head { margin-bottom: 18px; }
.page-head-hero {
  display: flex; flex-direction: column; gap: 16px;
  padding: 18px; border-radius: 22px; border: 1px solid rgba(120, 215, 255, 0.16);
  background: linear-gradient(180deg, rgba(20, 29, 56, 0.9), rgba(14, 21, 41, 0.9));
  box-shadow: var(--shadow);
}
.hero-sub { max-width: 680px; margin-bottom: 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
section { margin-bottom: 18px; }
.card {
  background: linear-gradient(180deg, rgba(20, 29, 56, 0.94), rgba(17, 25, 49, 0.96));
  border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
}
.grid-2, .grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.table-wrap { overflow-x: auto; }
.progress-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 980px; }
.progress-table th, .progress-table td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--border); }
.progress-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.big-progress { font-size: 34px; font-weight: 800; color: var(--text); margin-bottom: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 11px 16px; border-radius: 12px; border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #05221f;
  font-weight: 800; font-size: 14px; box-shadow: 0 10px 26px rgba(120, 215, 255, 0.12);
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.ghost { background: rgba(18, 27, 53, 0.85); color: var(--accent); border-color: rgba(120, 215, 255, 0.24); box-shadow: none; }
.btn.danger-btn { background: transparent; color: var(--danger); border-color: var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .wide { grid-column: 1 / -1; } .form-grid button { grid-column: 1 / -1; justify-self: start; } }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
input, select {
  padding: 11px 12px; border-radius: 11px; border: 1px solid rgba(95, 122, 196, 0.28);
  background: rgba(10, 18, 37, 0.9); color: var(--text); font-size: 15px; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-bar input { flex: 1 1 200px; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--border); }
.badge-muted { background: rgba(24, 35, 66, 0.95); color: var(--muted); }
.badge-ok { background: rgba(142, 240, 193, 0.14); color: var(--accent2); border-color: rgba(142, 240, 193, 0.28); }
.badge-warn { background: rgba(246, 196, 79, 0.14); color: var(--warn); border-color: rgba(246, 196, 79, 0.28); }
.badge-danger { background: rgba(247, 168, 168, 0.14); color: var(--danger); border-color: rgba(247, 168, 168, 0.28); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: rgba(26, 36, 68, 0.95); border: 1px solid rgba(95, 122, 196, 0.22);
  border-radius: 14px; padding: 14px;
}
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 28px; font-weight: 800; margin-top: 6px; }
.stat-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }

.priorities { display: flex; flex-direction: column; gap: 10px; }
.priority {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(95, 122, 196, 0.22);
  border-radius: 14px; background: rgba(20, 31, 59, 0.88); color: var(--text);
}
.priority:hover { text-decoration: none; border-color: rgba(120, 215, 255, 0.36); }
.priority-rank {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: rgba(36, 55, 102, 0.96); font-weight: 800; color: var(--accent);
}
.priority-body { flex: 1; }
.priority-title { font-weight: 800; font-size: 17px; }
.priority-detail { color: var(--muted); font-size: 14px; margin-top: 2px; }

.brief-list, .mini-list, .index-list, .fu-list, .mood-list, .reorder-list, .checklist { list-style: none; margin: 0; padding: 0; }
.brief-list li { padding: 10px 0; border-bottom: 1px dashed rgba(95, 122, 196, 0.22); }
.brief-list li:last-child { border-bottom: 0; }
.brief-list a { color: var(--text); }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(95, 122, 196, 0.22); }
.empty { color: var(--muted); padding: 14px; text-align: center; border: 1px dashed rgba(95, 122, 196, 0.3); border-radius: 12px; }

.checklist li, .check-row, .fu { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.fu { flex-wrap: nowrap; }
.fu-body { display: flex; align-items: center; min-width: 0; flex: 1; }
.fu-title { line-height: 1.25; }
.check-label.done, .fu.done .fu-title { text-decoration: line-through; color: var(--muted); }
.check-meta { margin-left: auto; color: var(--muted); font-size: 12px; }
.tick {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(95, 122, 196, 0.3);
  background: rgba(10, 18, 37, 0.92); color: var(--accent2); font-weight: 900; cursor: pointer;
}
.tick.on { background: rgba(142, 240, 193, 0.16); border-color: rgba(142, 240, 193, 0.28); }

.doc { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.doc-title { font-weight: 700; }
.fu-link { color: var(--text); text-decoration: none; }
.fu-link:hover, .fu-link:focus { text-decoration: underline; }
textarea {
  width: 100%; min-height: 160px; border-radius: 14px; border: 1px solid rgba(95,122,196,0.28);
  background: rgba(10, 18, 37, 0.9); color: var(--text); font-size: 15px; padding: 12px 14px;
}
.brief-item { padding: 10px 0; border-bottom: 1px dashed rgba(95, 122, 196, 0.22); }
.brief-item:last-child { border-bottom: 0; }
.doc-meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.doc-path { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--accent); margin-top: 4px; word-break: break-all; }
.doc-note { font-size: 13px; margin-top: 4px; }
.doc-file { display: flex; gap: 6px; align-items: center; }
.queue-summary, .queue-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.doc-queue { align-items: flex-start; }
.index-group { margin-bottom: 18px; }
.index-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); }

.marker-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .marker-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .marker-grid { grid-template-columns: 1fr 1fr 1fr; } }
.wearables-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .wearables-grid { grid-template-columns: 1fr 1fr; } }
.competition-grid, .lb-overview, .lb-two-up, .calculator-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .competition-grid, .lb-overview, .lb-two-up { grid-template-columns: 1fr 1fr; } .calculator-grid { grid-template-columns: 1fr 1fr; } }
.calculator-card, .lb-panel, .lb-score {
  background: rgba(18, 27, 53, 0.76); border: 1px solid rgba(95, 122, 196, 0.22); border-radius: 14px; padding: 14px;
}
.lb-score-label { color: var(--muted); font-size: 12px; }
.lb-score-value { font-size: 24px; font-weight: 800; margin-top: 4px; }
.lb-score-sub, .lb-score-delta { font-size: 12px; margin-top: 4px; }
.lb-score-delta.better { color: var(--accent2); }
.lb-score-delta.worse { color: var(--warn); }
.lb-score-delta.flat { color: var(--muted); }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.trend-list { display: flex; flex-direction: column; gap: 10px; }
.trend-row {
  display: grid; grid-template-columns: 1fr; gap: 10px; padding: 12px; border: 1px solid rgba(95, 122, 196, 0.22); border-radius: 12px; background: rgba(18, 27, 53, 0.78);
}
@media (min-width: 820px) { .trend-row { grid-template-columns: minmax(220px, 1.5fr) 190px auto; align-items: center; } }
.trend-title { font-weight: 700; }
.trend-meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.spark { width: 100%; height: auto; }
.spark path { stroke: var(--accent); }
.spark circle { fill: var(--accent); }
.spark-down path, .spark-down circle { stroke: var(--warn); fill: var(--warn); }
.spark-empty { fill: var(--muted); font-size: 18px; }
.connector-card, .wearable-card, .cgm-card { overflow: hidden; }
.connector-head, .wearable-head, .cgm-period-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.connector-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.sync-rows, .wearable-meta, .source-health-grid { display: grid; gap: 10px; }
.sync-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed rgba(95, 122, 196, 0.22); }
.sync-row:last-child { border-bottom: 0; }
.sync-key { color: var(--muted); min-width: 120px; }
.connector-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.decision-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 14px; }
.decision-why { margin-top: 6px; line-height: 1.45; }
.bulk-decision-grid { display: grid; gap: 12px; }
.bulk-decision-card { border: 1px solid rgba(95, 122, 196, 0.22); border-radius: 14px; padding: 14px; background: rgba(18, 27, 53, 0.72); }
.bulk-decision-title { font-weight: 800; margin-bottom: 10px; word-break: break-word; }
.bulk-decision-actions { display: grid; gap: 8px; }
.compact-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.compact-input { min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(95, 122, 196, 0.3); background: rgba(10, 16, 34, 0.9); color: var(--text); min-width: 160px; }
.source-health-grid { grid-template-columns: 1fr; }
@media (min-width: 760px) { .source-health-grid { grid-template-columns: 1fr 1fr; } }
.source-health { border: 1px solid rgba(95, 122, 196, 0.22); border-radius: 12px; padding: 12px; background: rgba(18, 27, 53, 0.72); }
.sh-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.sh-line { color: var(--text); font-size: 13px; }
.cgm-period-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
@media (min-width: 860px) { .cgm-period-grid { grid-template-columns: 1fr 1fr; } }
.cgm-period { background: rgba(18, 27, 53, 0.74); }
.cgm-period-title { margin: 0; font-size: 16px; color: var(--text); }
.cgm-period-when { margin-top: 4px; font-size: 13px; }
.cgm-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.cgm-metric { background: rgba(10, 18, 37, 0.55); border: 1px solid rgba(95, 122, 196, 0.22); border-radius: 12px; padding: 10px; }
.cgm-metric-label { color: var(--muted); font-size: 12px; }
.cgm-metric-value { font-size: 20px; font-weight: 800; margin-top: 4px; }
.unit { font-size: 12px; color: var(--muted); font-weight: 600; }
.cgm-spark { margin-top: 6px; }
.cgm-period-foot { margin-top: 10px; font-size: 13px; }
.roadmap-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 820px) { .roadmap-grid { grid-template-columns: 1fr 1fr; } }
.roadmap-card { display: flex; flex-direction: column; gap: 12px; }
.roadmap-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.roadmap-list li { align-items: flex-start; gap: 10px; }
.roadmap-list li span { min-width: 130px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.ordered-list { margin: 0; padding-left: 18px; line-height: 1.6; }
.ordered-list li + li { margin-top: 8px; }
.wearable-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 10px; }
.wearable-highlight { border: 1px solid rgba(95, 122, 196, 0.22); border-radius: 12px; padding: 10px 12px; background: rgba(18, 27, 53, 0.78); }
.wh-label { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.wh-value { font-size: 20px; font-weight: 800; color: var(--text); }
.wh-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.apple-session-list { margin-top: 12px; }
.coach-link-list { display: grid; gap: 12px; }
.coach-link-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(95, 122, 196, 0.24);
  border-radius: 14px;
  background: rgba(18, 27, 53, 0.82);
  color: var(--text);
}
.coach-link-row:hover {
  text-decoration: none;
  border-color: rgba(120, 215, 255, 0.4);
}
.coach-link-step {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(36, 55, 102, 0.96);
  color: var(--accent);
  font-weight: 800;
}
.coach-link-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.coach-link-label {
  font-weight: 800;
  color: #fff;
}
.coach-link-note {
  color: #d7e0f6;
  font-size: 13px;
  line-height: 1.45;
}
.coach-link-action {
  color: var(--accent);
  white-space: nowrap;
}
.folder-stack {
  display: grid;
  gap: 14px;
}
.folder-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(31, 44, 82, 0.98), rgba(19, 29, 56, 0.98));
  border: 1px solid rgba(129, 170, 255, 0.24);
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}
.folder-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(120, 215, 255, 0.12);
  font-size: 28px;
}
.folder-card-title {
  color: var(--text);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
}
.folder-card-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}
.folder-card-meta {
  margin-top: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.folder-card-summary {
  margin-top: 8px;
  color: #d7e0f6;
  font-size: 13px;
  line-height: 1.45;
}
.folder-card-action {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.blood-tests-overview {
  background: linear-gradient(180deg, rgba(24, 35, 66, 0.98), rgba(15, 23, 45, 0.98));
}
.blood-folder-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.blood-folder-meta {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(120, 215, 255, 0.12);
  border: 1px solid rgba(120, 215, 255, 0.22);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.doc-list {
  display: grid;
  gap: 12px;
}
.doc-list li {
  border-bottom: 0;
  padding: 0;
}
.blood-doc-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(95, 122, 196, 0.22);
  background: rgba(18, 27, 53, 0.72);
}
.doc-copy {
  min-width: 0;
}
.doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.doc-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(142, 240, 193, 0.14);
  border: 1px solid rgba(142, 240, 193, 0.26);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 800;
}
.mood-top-grid {
  align-items: start;
}
.mood-summary-block + .mood-summary-block {
  margin-top: 16px;
}
.home-focus-grid {
  align-items: start;
}
.compact-wearable-card .wearable-meta {
  display: grid;
  gap: 8px;
}
.simple-roadmap-card .roadmap-list li span {
  min-width: 56px;
}
.home-brief-card .section-head {
  margin-bottom: 10px;
}
.mood-row {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(95, 122, 196, 0.22);
  background: rgba(18, 27, 53, 0.72);
}
.mood-row + .mood-row {
  margin-top: 10px;
}
.mood-row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.mood-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mood-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.blood-columns {
  align-items: start;
}
.page-head-hero-compact {
  padding-top: 14px;
  padding-bottom: 14px;
}
.foot { max-width: 1120px; margin: 22px auto 0; padding: 0 16px; }
.disclaimer { color: var(--muted); font-size: 12px; line-height: 1.6; }

@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 640px) {
  body {
    color: #f6f8ff;
  }
  .topbar {
    padding: 10px 12px 8px;
    background: rgba(8, 13, 25, 0.96);
  }
  .brand {
    gap: 10px;
    align-items: flex-start;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
  .brand-name {
    font-size: 18px;
    color: #f8fbff;
  }
  .brand-sub {
    font-size: 11px;
    color: #dbe4fb;
  }
  .nav-shell {
    top: 50px;
    background: rgba(8, 13, 25, 0.98);
  }
  .nav {
    padding: 8px 12px 10px;
    gap: 8px;
  }
  .nav-primary {
    padding-bottom: 6px;
  }
  .nav-more {
    padding: 0 12px 10px;
  }
  .nav-more-toggle {
    min-height: 36px;
    font-size: 13px;
    color: #e8eefc;
    background: rgba(16, 25, 48, 0.96);
  }
  .nav-item {
    padding: 10px 12px;
    font-size: 14px;
    color: #e8eefc;
    background: rgba(16, 25, 48, 0.96);
  }
  .nav-item.active {
    background: linear-gradient(180deg, rgba(64, 104, 196, 0.98), rgba(45, 73, 141, 0.98));
    color: #ffffff;
    border-color: rgba(172, 210, 255, 0.65);
  }
  .wrap {
    padding: 12px 12px 18px;
  }
  .page-head-hero {
    padding: 14px;
    border-radius: 18px;
    gap: 12px;
  }
  .eyebrow {
    margin-bottom: 8px;
    color: #a9e8ff;
  }
  h1 {
    font-size: 26px;
    line-height: 1.05;
    color: #ffffff;
  }
  .sub, .hero-sub {
    font-size: 16px;
    line-height: 1.45;
    color: #dce6ff;
  }
  .hero-actions {
    gap: 8px;
  }
  .btn {
    min-height: 44px;
    justify-content: center;
  }
  .btn.ghost {
    color: #dff3ff;
    background: rgba(27, 42, 79, 0.95);
    border-color: rgba(150, 210, 255, 0.45);
  }
  .btn.small {
    padding: 10px 12px;
    font-size: 14px;
  }
  .card {
    padding: 14px;
    border-radius: 16px;
  }
  .stat {
    padding: 12px;
  }
  .stat-label {
    color: #c7d4f2;
  }
  .stat-value {
    font-size: 22px;
    color: #ffffff;
  }
  .stat-sub, .muted, .doc-meta, .trend-meta, .wh-meta, .sh-line, .cgm-period-when, .cgm-period-foot {
    color: #d7e0f6;
  }
  .stats, .cgm-metrics, .wearable-highlights, .grid-3 {
    grid-template-columns: 1fr;
  }
  .sync-row, .mini-list li {
    flex-direction: column;
    align-items: flex-start;
  }
  .coach-link-row {
    grid-template-columns: 28px 1fr;
    align-items: flex-start;
  }
  .coach-link-action {
    grid-column: 2;
    white-space: normal;
  }
  .folder-card {
    grid-template-columns: 44px 1fr;
    align-items: flex-start;
  }
  .folder-card-icon {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
  .folder-card-action {
    grid-column: 2;
    margin-top: 8px;
  }
  .folder-card-title {
    font-size: 23px;
  }
  .blood-doc-row {
    flex-direction: column;
  }
  .doc-actions {
    justify-content: flex-start;
  }
  .mood-row {
    padding: 12px;
  }
  .mood-row-head {
    flex-direction: column;
  }
  .sync-key { min-width: 0; }
  .priority { align-items: flex-start; }
  .priority-title { font-size: 18px; }
}


.proto-section { margin-top: 16px; }
.proto-row, .med-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(95, 122, 196, 0.22);
}
.proto-row:last-child, .med-row:last-child { border-bottom: 0; }
.proto-row-main { min-width: 0; flex: 1; }
.proto-row-title { font-size: 22px; font-weight: 700; line-height: 1.15; }
.proto-row-meta { color: var(--muted); font-size: 15px; line-height: 1.45; margin-top: 4px; }
.proto-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.proto-row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.med-row { align-items: center; }
@media (max-width: 700px) {
  .proto-row, .med-row { flex-direction: column; }
  .proto-row-side { width: 100%; align-items: flex-start; }
  .proto-row-actions { justify-content: flex-start; }
  .proto-row-title { font-size: 18px; }
}


.today-section .proto-row {
  background: rgba(18, 27, 53, 0.22);
  border: 1px solid rgba(95, 122, 196, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 6px;
  gap: 8px;
}
.today-section .proto-row:last-child { margin-bottom: 0; }
.today-section .proto-row-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.today-section .proto-row-title {
  font-size: 16px;
  line-height: 1.15;
}
.today-section .proto-row-title::before {
  content: "☐ ";
  color: var(--accent2);
  font-size: 13px;
}
.today-section .proto-row-mini-meta .badge,
.today-section .badge {
  padding: 2px 6px;
  font-size: 10px;
}
.today-section .proto-row-meta {
  font-size: 12px;
  line-height: 1.3;
  margin-top: 2px;
}
.today-section .proto-row-side {
  display: none;
}
.today-section .compact-actions,
.today-section .proto-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.today-section .compact-actions .btn.small,
.today-section .proto-row-actions .btn.small {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
  border-radius: 9px;
  line-height: 1.1;
}
.med-row {
  background: rgba(18, 27, 53, 0.42);
  border: 1px solid rgba(95, 122, 196, 0.18);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.med-row:last-child { margin-bottom: 0; }


.daily-entry-toggle + .daily-entry-toggle { margin-top: 10px; }
.daily-entry-button {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(95, 122, 196, 0.22);
  border-radius: 16px;
  background: rgba(18, 27, 53, 0.78);
  cursor: pointer;
}
.daily-entry-button::-webkit-details-marker { display: none; }
.daily-entry-copy { min-width: 0; }
.daily-entry-copy strong { display: block; font-size: 22px; }
.daily-entry-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.daily-entry-open {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.compact-daily-card {
  margin-top: 8px;
  padding-top: 14px;
}


.compact-open-row {
  justify-content: flex-end;
  padding: 10px 14px;
  min-height: 0;
}
.compact-open-row .daily-entry-open {
  font-size: 15px;
}


.suggestion-list {
  padding-left: 1.4rem;
}
.suggestion-list li + li {
  margin-top: 12px;
}


.people-plan-list {
  padding-left: 1.35rem;
}
.people-plan-list li {
  display: list-item;
  border-bottom: 1px dashed rgba(95, 122, 196, 0.22);
  padding: 10px 0;
}
.people-plan-list li:last-child {
  border-bottom: 0;
}
.people-plan-list.numbered {
  list-style: decimal;
}
.people-plan-list.bulleted {
  list-style: disc;
}


.btn.is-loading { opacity: 0.75; pointer-events: none; }
.ask-submit-row { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ask-loading-copy { font-size: 13px; }
.ask-latest-wrap { border-color: rgba(120, 215, 255, 0.42); box-shadow: 0 0 0 1px rgba(120, 215, 255, 0.12), var(--shadow); }
.ask-featured { border: 1px solid rgba(120, 215, 255, 0.24); border-radius: 16px; padding: 10px; background: rgba(18, 27, 53, 0.42); }
.ask-answer-card { border-color: rgba(120, 215, 255, 0.28); }


.proto-row {
  border: 1px solid rgba(95, 122, 196, 0.18);
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: rgba(18, 27, 53, 0.32);
  margin-bottom: 12px;
}
.proto-row:last-child { margin-bottom: 0; }
.proto-row-main { display: flex; flex-direction: column; gap: 8px; }
.proto-row-headline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.proto-row-title { font-size: 17px; font-weight: 800; line-height: 1.15; }
.proto-row-mini-meta .badge { padding: 4px 8px; font-size: 12px; }
.proto-row-meta { color: var(--muted); font-size: 14px; line-height: 1.35; }
.proto-row-actions.compact-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.today-section .sub { margin-bottom: 10px; }
.proto-row-compact { padding: 10px 12px 10px; border-radius: 14px; margin-bottom: 10px; }
.proto-row-compact .proto-row-main { gap: 6px; }
.proto-row-compact .proto-row-title { font-size: 15px; }
.proto-row-compact .proto-row-meta { font-size: 12.5px; line-height: 1.25; }
.proto-row-compact .proto-row-actions.compact-actions { gap: 6px; }
.proto-row-compact .btn.small { padding: 6px 10px; font-size: 12px; }
.proto-row-compact .proto-row-mini-meta .badge { padding: 3px 7px; font-size: 11px; }


.ask-chat-list-wrap { display: grid; gap: 14px; }
.ask-thread { display: block; padding: 0; }
.ask-thread-body { display: grid; gap: 12px; align-items: stretch; }
.ask-bubble {
  border-radius: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(95, 122, 196, 0.22);
  max-width: 100%;
}
.ask-user-bubble {
  background: rgba(53, 92, 190, 0.22);
  margin-left: auto;
  width: calc(100% - 36px);
}
.ask-hermes-bubble {
  background: rgba(18, 27, 53, 0.72);
  border-color: rgba(120, 215, 255, 0.24);
  width: 100%;
}
.ask-bubble-role {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.ask-bubble-text {
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 15px;
}
.ask-bubble-text.rich { white-space: normal; }
.ask-chat-block {
  margin: 0 0 10px;
  white-space: pre-wrap;
  line-height: 1.55;
}
.ask-chat-block:last-child { margin-bottom: 0; }
.ask-chat-list {
  padding-left: 14px;
  border-left: 2px solid rgba(120, 215, 255, 0.18);
}
.ask-featured {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}
.ask-answer-card { border-color: rgba(120, 215, 255, 0.28); }
