/* ---------- base ---------- */
:root {
  --bg: #0a0a0b;
  --bg-elev: #15151a;
  --bg-elev-2: #1d1d24;
  --fg: #e7e7ea;
  --fg-muted: #9094a0;
  --fg-dim: #5b5e6a;
  --accent: #6da6ff;
  --accent-dim: #3b6fc4;
  --good: #4ad295;
  --warn: #f6b352;
  --bad: #ff6b6b;
  --critical: #ff4655;
  --border: #25252e;
  --radius: 10px;
  --gap: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--fg-muted); font-size: 0.9em; }
code { font-family: var(--font-mono); background: var(--bg-elev-2); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em; }
button, .link-btn {
  background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit;
}
button:hover, .link-btn:hover { text-decoration: underline; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10,10,11,0.85);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.brand-mark { color: var(--accent); }
.topnav { display: flex; gap: 18px; align-items: center; }
.topnav a { color: var(--fg-muted); font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.topnav a.active { color: var(--fg); border-color: var(--accent); }
.topnav a.muted { color: var(--fg-dim); cursor: not-allowed; }
.topnav .logout { margin-left: 12px; color: var(--fg-dim); }

/* ---------- container ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: grid;
  gap: var(--gap);
}

/* ---------- hero ---------- */
.hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  padding: 8px 4px 4px;
}
.hero-greeting h1 { margin: 0 0 4px; font-size: 26px; }
.hero-meta { display: flex; gap: 12px; }
.meta-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  text-align: right;
  min-width: 100px;
}
.meta-label { font-size: 0.75em; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.meta-value { font-size: 22px; font-weight: 600; }
.meta-card--alert { border-color: var(--critical); text-decoration: none; }
.meta-card--alert .meta-value { color: var(--critical); }
.meta-pulse { color: var(--critical); animation: pulse 1.6s ease-in-out infinite; font-size: 0.7em; vertical-align: middle; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ---------- card ---------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px;
  flex-wrap: wrap; gap: 8px;
}
.card-head h2 { font-size: 16px; margin: 0; font-weight: 600; }
.card-head h2 .icon { margin-right: 6px; }
.card-sub { font-size: 0.85em; color: var(--fg-muted); }

/* ---------- alerts ---------- */
.alert-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.alert {
  border-left: 3px solid var(--border);
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border-radius: 6px;
}
.alert-headline { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-muted); flex-shrink: 0; }
.alert--critical { border-left-color: var(--critical); }
.alert--critical .alert-dot { background: var(--critical); box-shadow: 0 0 0 4px rgba(255,70,85,0.18); }
.alert--watch { border-left-color: var(--warn); }
.alert--watch .alert-dot { background: var(--warn); }
.alert--adherence { border-left-color: var(--accent); }
.alert--adherence .alert-dot { background: var(--accent); }
.alert-rule { font-size: 0.9em; color: var(--fg-muted); margin-top: 2px; }
.alert-action { font-size: 0.95em; margin-top: 6px; }
.alert-source { font-size: 0.8em; margin-top: 4px; }
.alerts-empty { background: var(--bg-elev); border-color: var(--good); }
.alerts-empty .icon { color: var(--good); }

/* ---------- insights ---------- */
.insights-md { line-height: 1.65; white-space: pre-wrap; }
.insights-status { margin-top: 10px; }
.insights-disclaimer { margin-top: 12px; font-size: 0.8em; padding-top: 10px; border-top: 1px solid var(--border); }

/* ---------- tasks ---------- */
.task-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.task-item {
  display: grid; grid-template-columns: 220px 1fr; gap: 12px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.task-item:last-child { border-bottom: 0; }
.task-section { font-size: 0.75em; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.task-text { font-size: 0.95em; }

/* ---------- weekstrip ---------- */
.weekstrip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.metric-tile {
  background: var(--bg-elev-2);
  border-radius: 8px;
  padding: 12px 14px;
  position: relative;
}
.metric-label { font-size: 0.8em; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.metric-value { font-size: 26px; font-weight: 600; line-height: 1.1; margin-top: 2px; }
.metric-unit { font-size: 14px; color: var(--fg-muted); font-weight: 400; }
.metric-delta { font-size: 0.85em; margin-top: 4px; min-height: 1em; }
.metric-delta.up { color: var(--good); }
.metric-delta.down { color: var(--bad); }
.metric-delta.neutral { color: var(--fg-muted); }
.spark-wrap { position: relative; height: 44px; margin-top: 6px; }
.spark-wrap > canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }

/* Chart cards need a bounded height so Chart.js can size against it */
.chart-card > canvas, .lab-grid > div > canvas {
  display: block;
  max-width: 100%;
}
.chart-card { position: relative; }
.chart-card > canvas { max-height: 280px; }
.lab-grid > div { position: relative; }
.lab-grid > div > canvas { max-height: 220px; }

/* ---------- charts ---------- */
.chart-card canvas { display: block; width: 100% !important; }
.lab-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.lab-grid h3 { font-size: 13px; margin: 0 0 6px; color: var(--fg-muted); font-weight: 500; }

/* ---------- meds ---------- */
.med-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.med-item { display: flex; justify-content: space-between; align-items: baseline; }
.med-name { font-weight: 500; }
.med-tags { font-size: 0.8em; }

/* ---------- lab table ---------- */
.lab-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.lab-table th, .lab-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.lab-table th { color: var(--fg-muted); font-weight: 500; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.04em; }
.lab-row--flag { background: rgba(255,107,107,0.06); }
.lab-row--flag .lab-value { color: var(--bad); font-weight: 600; }
.lab-panel { white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-size: 0.8em; }
.lab-test { font-weight: 500; }
.lab-value { font-family: var(--font-mono); }
.lab-ref { font-family: var(--font-mono); font-size: 0.85em; }
.flag-chip { background: var(--bad); color: #0a0a0b; padding: 1px 7px; border-radius: 10px; font-size: 0.7em; font-weight: 700; letter-spacing: 0.04em; }

/* ---------- conditions ---------- */
.condition-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.condition-card { background: var(--bg-elev-2); padding: 12px 14px; border-radius: 8px; border-left: 3px solid var(--accent); }
.condition-title { font-weight: 600; }
.condition-tags { font-size: 0.8em; margin-top: 4px; }

/* ---------- visit timeline ---------- */
.visit-timeline { display: grid; gap: 10px; }
.visit-card { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 14px 16px; background: var(--bg-elev-2); border-radius: 8px; }
.visit-card--link { text-decoration: none; color: inherit; transition: background 0.15s, transform 0.15s; }
.visit-card--link:hover { background: #23232c; text-decoration: none; transform: translateX(2px); }
.visit-date { font-family: var(--font-mono); color: var(--accent); font-weight: 600; line-height: 1.15; }
.visit-time { font-size: 0.78em; font-family: var(--font-mono); margin-top: 2px; }
.visit-title { font-weight: 600; font-size: 0.95em; }
.visit-provider, .visit-tags, .visit-file { font-size: 0.85em; margin-top: 3px; }
.visit-summary { font-size: 0.92em; color: var(--fg); margin: 8px 0; line-height: 1.55; }
.visit-sections { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.section-chip { display: inline-block; background: rgba(109,166,255,0.10); color: var(--accent); padding: 1px 8px; border-radius: 10px; font-size: 0.72em; font-weight: 500; }

/* ---------- card link headings (e.g., "Latest panel →") ---------- */
.card-link { color: var(--fg); text-decoration: none; }
.card-link:hover { color: var(--accent); text-decoration: none; }

/* ---------- lab prev/next navigation ---------- */
.lab-nav { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 12px; font-size: 0.85em; }
.lab-nav-link { color: var(--fg-muted); padding: 6px 10px; background: var(--bg-elev-2); border-radius: 6px; }
.lab-nav-link:hover { color: var(--accent); background: var(--bg-elev); text-decoration: none; }
.lab-nav-next { margin-left: auto; }

/* ---------- visit detail page ---------- */
.visit-detail-hero { padding: 8px 4px 0; }
.visit-detail-hero h1 { margin: 6px 0 6px; font-size: 24px; }
.visit-detail-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.9em; }
.visit-detail-meta span:first-child { color: var(--accent); font-family: var(--font-mono); font-weight: 500; }
.back-link { font-size: 0.85em; color: var(--fg-muted); }
.back-link:hover { color: var(--accent); }
.visit-content { padding: 20px 26px; }
.visit-toc { display: flex; flex-wrap: wrap; gap: 8px 12px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border); align-items: baseline; }
.toc-link { font-size: 0.82em; color: var(--accent); padding: 2px 8px; background: rgba(109,166,255,0.08); border-radius: 4px; }
.toc-link:hover { background: rgba(109,166,255,0.18); text-decoration: none; }

/* Markdown content rendering */
.md-content { line-height: 1.65; }
.md-content h2 { font-size: 17px; margin: 26px 0 10px; padding-top: 4px; border-top: 1px solid var(--border); padding-top: 18px; }
.md-content h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.md-content h3 { font-size: 14px; margin: 16px 0 8px; color: var(--accent); font-weight: 600; }
.md-content h4 { font-size: 13px; margin: 12px 0 6px; color: var(--fg-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.md-content p { margin: 8px 0; }
.md-content ul, .md-content ol { margin: 8px 0; padding-left: 1.5em; }
.md-content li { margin: 3px 0; }
.md-content strong { color: var(--fg); font-weight: 600; }
.md-content em { color: var(--fg-muted); }
.md-content code { background: var(--bg-elev-2); }
.md-content blockquote { border-left: 3px solid var(--accent); padding: 4px 14px; margin: 10px 0; background: var(--bg-elev-2); color: var(--fg-muted); border-radius: 0 6px 6px 0; }
.md-content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.9em; }
.md-content th, .md-content td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.md-content th { color: var(--fg-muted); font-weight: 500; font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.04em; }
.md-content hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

/* ---------- footer ---------- */
.footer {
  max-width: 1200px; margin: 0 auto; padding: 16px 20px 30px;
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 0.85em; color: var(--fg-muted);
  border-top: 1px solid var(--border);
}

/* ---------- login ---------- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card label { display: block; margin: 16px 0 6px; font-size: 0.85em; color: var(--fg-muted); }
.login-card input[type="password"] {
  width: 100%; padding: 10px 12px; background: var(--bg-elev-2); border: 1px solid var(--border);
  color: var(--fg); border-radius: 6px; font: inherit;
}
.login-card button[type="submit"] {
  width: 100%; padding: 11px; margin-top: 18px;
  background: var(--accent); color: #0a0a0b; border-radius: 6px; font-weight: 600;
  cursor: pointer; border: none;
}
.login-card button[type="submit"]:hover { text-decoration: none; background: #88b9ff; }
.login-error {
  background: rgba(255,70,85,0.12); color: var(--critical); padding: 8px 12px; border-radius: 6px;
  font-size: 0.9em; margin-bottom: 4px;
}
.login-foot { margin-top: 18px; font-size: 0.8em; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .hero { flex-direction: column; align-items: stretch; }
  .hero-meta { justify-content: stretch; }
  .meta-card { flex: 1; text-align: left; }
  .weekstrip { grid-template-columns: repeat(2, 1fr); }
  .lab-grid { grid-template-columns: 1fr; }
  .task-item { grid-template-columns: 1fr; }
  .task-section { margin-bottom: 2px; }
}

/* ---------- adherence calendar ---------- */
.adherence-cal {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7em;
  color: rgba(255,255,255,0.7);
}
.cal-cell.cal-good  { background: rgba(74,210,149,0.55); }
.cal-cell.cal-bad   { background: rgba(255,107,107,0.55); }
.cal-cell.cal-empty { background: rgba(144,148,160,0.18); color: rgba(255,255,255,0.35); }
@media (max-width: 720px) {
  .adherence-cal { grid-template-columns: repeat(10, 1fr); }
}

/* ---------- adherence 2x2 quadrant grid ---------- */
.adherence-cal-quad {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.cal-quad {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-elev);
}
.cal-quad-day {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 0.65em;
  color: #ffffff;
  text-shadow: 0 0 2px rgba(0,0,0,0.7);
  pointer-events: none;
}
.cal-quad > div:not(.cal-quad-day) {
  position: absolute;
  width: 50%;
  height: 50%;
}
.cal-quad-tl { top: 0; left: 0; }
.cal-quad-tr { top: 0; right: 0; }
.cal-quad-bl { bottom: 0; left: 0; }
.cal-quad-br { bottom: 0; right: 0; }
.cal-sig-flonase     { background: #4ad295; } /* green — matches lab "good" stroke */
.cal-sig-supplements { background: #b388ff; } /* lavender */
.cal-sig-energy      { background: #f6b352; } /* orange — 0 energy drinks (clean day) */
.cal-sig-energy-dim  { background: rgba(246,179,82,0.35); } /* dim orange — 1/day treat */
.cal-sig-walks       { background: #f5d24a; } /* yellow */
.cal-quad-bad        { background: var(--bg-elev); }   /* matches card — missed blends in */
.cal-quad-empty      { background: rgba(180,90,90,0.5); } /* gray w/ red tint — no data */
.adherence-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; font-size: 0.8em; color: var(--muted, #9094a0);
}
.adherence-legend i {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 3px; margin-right: 4px; vertical-align: middle;
}
@media (max-width: 720px) {
  .adherence-cal-quad { grid-template-columns: repeat(10, 1fr); }
}

/* ---------- adherence streak (single signal, 1 row per day) ---------- */
.adherence-streak-row { margin-bottom: 12px; }
.adherence-streak-row:last-child { margin-bottom: 0; }
.adherence-streak-label {
  font-size: 0.78em; color: var(--muted, #9094a0);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px;
}
.adherence-streak {
  display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px;
}
.adherence-streak-cell {
  height: 18px; border-radius: 3px;
  background: var(--bg-elev, #1c1c24);
  position: relative;
}
.adherence-streak-cell.taken { background: #4ad295; }
.adherence-streak-cell.treat { background: #f6b352; }
.adherence-streak-cell.missed { background: #ff6b6b; }
.adherence-streak-cell.unknown { background: rgba(180,90,90,0.4); }
.streak-swatch {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 3px; margin-right: 4px; vertical-align: middle;
}
.streak-swatch.taken { background: #4ad295; }
.streak-swatch.treat { background: #f6b352; }
.streak-swatch.missed { background: #ff6b6b; }
.streak-swatch.unknown { background: rgba(180,90,90,0.4); }
@media (max-width: 720px) {
  .adherence-streak { grid-template-columns: repeat(10, 1fr); }
}

/* ---------- supplement stack table ---------- */
.stack-meta {
  font-size: 0.85em; color: var(--muted, #9094a0); margin: -8px 0 10px;
}
.stack-table { width: 100%; border-collapse: collapse; font-size: 0.9em; margin-bottom: 12px; }
.stack-table th, .stack-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.stack-table th { color: var(--fg-muted); font-weight: 500; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.04em; }
.stack-table td:first-child { font-weight: 600; white-space: nowrap; }
.stack-pending { margin-top: 10px; font-size: 0.88em; }
.stack-pending summary { cursor: pointer; color: var(--accent, #6aaaff); }
.stack-pending ul { margin: 6px 0 0 18px; padding: 0; }
.stack-pending li { margin: 4px 0; }

/* ---------- log form (mobile-first) ---------- */
.log-form {
  display: flex; flex-direction: column; gap: 18px;
  padding: 18px;
}
.log-field { border: none; padding: 0; margin: 0; }
.log-field legend {
  font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg-muted); margin-bottom: 8px; font-weight: 600;
}
.chip-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-elev); color: var(--fg);
  cursor: pointer; user-select: none;
  font-size: 1em; transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--accent-dim); }
.chip:has(input:checked) {
  background: var(--accent); color: #0a0a0b; border-color: var(--accent);
  font-weight: 600;
}
.chip--yn { min-width: 64px; }
.text-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .text-row { grid-template-columns: repeat(3, 1fr); }
}
.text-field { display: flex; flex-direction: column; gap: 4px; }
.text-field span {
  font-size: 0.78em; color: var(--fg-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.text-field input, .text-field textarea {
  background: var(--bg-elev); color: var(--fg); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; font-size: 1em; font-family: inherit;
  min-height: 44px;
}
.text-field textarea { min-height: 84px; resize: vertical; }
.text-field input:focus, .text-field textarea:focus {
  outline: none; border-color: var(--accent);
}
.text-field--wide { margin-top: 10px; }
.log-actions {
  display: flex; gap: 10px; padding-top: 8px;
  border-top: 1px solid var(--border);
}
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font-size: 1em; font-weight: 600; cursor: pointer; text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent); color: #0a0a0b; flex: 1;
}
.btn-primary:hover { background: #8db8ff; text-decoration: none; }
.btn-secondary {
  background: transparent; color: var(--fg-muted); border-color: var(--border);
}
.btn-secondary:hover { color: var(--fg); border-color: var(--accent-dim); text-decoration: none; }
.toast-card {
  background: rgba(74,210,149,0.12); border-color: rgba(74,210,149,0.4);
  color: var(--good); padding: 12px 16px; margin-bottom: 14px;
}

/* Quick-log nav CTA on overview */
.quicklog-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px; gap: 14px;
}
.quicklog-card .ql-text { display: flex; flex-direction: column; gap: 2px; }
.quicklog-card .ql-text strong { font-size: 1.05em; }
.quicklog-card .ql-text span { color: var(--fg-muted); font-size: 0.9em; }
.quicklog-card .btn-primary { flex: 0 0 auto; min-width: 160px; }

/* ---------- tracker form additions ---------- */
.form-section {
  font-size: 0.92em; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-muted); font-weight: 600; margin: 8px 0 0 0;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.form-section:first-of-type { padding-top: 0; border-top: none; }
.note-input, .num-input {
  width: 100%; background: var(--bg-elev); color: var(--fg);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 0.95em; margin-top: 8px;
  font-family: inherit; min-height: 38px;
}
.num-input { max-width: 140px; }
.note-input:focus, .num-input:focus { outline: none; border-color: var(--accent); }
.entry-recap { list-style: none; padding: 0; margin: 0; }
.entry-recap li {
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  font-size: 0.92em; color: var(--fg-muted);
}
.entry-recap li:last-child { border-bottom: none; }
.entry-recap strong { color: var(--fg); margin-right: 6px; }

/* ---------- cheyenne overview ---------- */
.score-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px;
}
@media (max-width: 600px) {
  .score-grid { grid-template-columns: repeat(2, 1fr); }
}
.score-tile {
  background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; text-align: center;
}
.score-label { font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-muted); margin-bottom: 6px; }
.score-value { font-size: 2em; font-weight: 600; color: var(--fg); line-height: 1; }
.score-scale { font-size: 0.85em; color: var(--fg-dim); margin-top: 2px; }
.today-extras { padding: 0 14px 12px; font-size: 0.92em; }

.streak-grid { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.streak-row-card { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.streak-row-label { margin-bottom: 8px; font-size: 0.95em; }
.streak-row-cells { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; }
.streak-cell { aspect-ratio: 1; border-radius: 3px; }
.streak-cell.taken { background: #4ad295; }
.streak-cell.missed { background: rgba(180, 90, 90, 0.45); }

.ah-grid { padding: 0; }
.ah-row {
  display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 14px;
  border-bottom: 1px solid var(--border); font-size: 0.92em;
}
.ah-row:last-child { border-bottom: none; }
.ah-row strong { color: var(--fg); }
.ah-date { color: var(--fg-muted); min-width: 90px; }
