:root {
  color-scheme: light;
  --bg: #efedf1;
  --surface: #fbfafc;
  --surface-soft: #e5e1e8;
  --surface-raised: #ffffff;
  --text: #171419;
  --muted: #625d66;
  --faint: #8d8692;
  --border: #c8c2cc;
  --border-strong: #78717e;
  --blue: #7550a6;
  --blue-dark: #4d2779;
  --blue-soft: #e7def0;
  --yellow: #b07d1e;
  --yellow-text: #6a4610;
  --yellow-soft: #f5ead2;
  --green: #1f6b48;
  --green-soft: #dcefe4;
  --red: #a32c46;
  --red-soft: #f7e1e6;
  --orange: #7550a6;
  --wine: #2c1837;
  --acid: #b8a2cc;
  --cream: #efedf1;
  --ink: #171419;
  --shadow: 0 5px 0 rgba(23, 20, 25, .10);
  --radius: 18px;
  --radius-sm: 10px;
  --page-max: 1380px;
  --control-height: 42px;
  --focus-ring: #7b5d8a;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0c0f;
  --surface: #18161b;
  --surface-soft: #252129;
  --surface-raised: #1f1c22;
  --text: #f3f1f5;
  --muted: #b8b1bc;
  --faint: #89828e;
  --border: #47404c;
  --border-strong: #756c7c;
  --blue: #9b78c3;
  --blue-dark: #c5a7e1;
  --blue-soft: #30233d;
  --yellow: #d6a95a;
  --yellow-text: #eccf94;
  --yellow-soft: #322914;
  --green: #5ec48d;
  --green-soft: #16271d;
  --red: #ec8398;
  --red-soft: #321f26;
  --orange: #7e57a9;
  --wine: #24132e;
  --acid: #b9a1cf;
  --cream: #f3f1f5;
  --ink: #0d0c0f;
  --shadow: 0 5px 0 rgba(0, 0, 0, .38);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0d0c0f;
    --surface: #18161b;
    --surface-soft: #252129;
    --surface-raised: #1f1c22;
    --text: #f3f1f5;
    --muted: #b8b1bc;
    --faint: #89828e;
    --border: #47404c;
    --border-strong: #756c7c;
    --blue: #9b78c3;
    --blue-dark: #c5a7e1;
    --blue-soft: #30233d;
    --yellow: #9b82b4;
    --yellow-text: #d6c3e7;
    --yellow-soft: #30283a;
    --green: #967aaa;
    --green-soft: #2e2735;
    --red: #b6789e;
    --red-soft: #392633;
    --orange: #7e57a9;
    --wine: #24132e;
    --acid: #b9a1cf;
    --cream: #f3f1f5;
    --ink: #0d0c0f;
    --shadow: 0 5px 0 rgba(0, 0, 0, .38);
  }
}

/* Self-hosted typefaces (latin subset) — display serif + body grotesque */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-400i.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/geist-400.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/geist-500.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/geist-600.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/geist-700.woff2") format("woff2");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, summary, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.15rem, 4.2vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -.01em;
}
h2 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  margin: 2px 0 0;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.14;
  letter-spacing: -.005em;
}
h3 { margin-bottom: 6px; font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.18rem; line-height: 1.2; letter-spacing: -.005em; }
ul { padding-left: 20px; }
li + li { margin-top: 7px; }
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
::selection { background: var(--acid); color: var(--ink); }
[hidden] { display: none !important; }

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

.section-kicker,
.panel-label {
  margin: 0 0 5px;
  color: var(--blue-dark);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .015em;
}
.section-description,
.supporting-copy,
.compact-summary,
.caption,
.empty,
.missing-data,
.body-help {
  color: var(--muted);
  font-size: .84rem;
}
.section-description,
.compact-summary { margin: 7px 0 0; }
.text-action {
  color: var(--blue-dark);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.text-action:hover { text-decoration: underline; }
.tag,
.status-pill,
.safety-label,
.source-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.tag { padding: 5px 9px; color: var(--blue-dark); background: var(--blue-soft); }

/* Shared brand and theme control */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}
.brand-orb {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}
.brand small,
.brand strong { display: block; }
.brand small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.brand strong { font-size: .88rem; line-height: 1.15; }
.theme-icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-icon-button:hover { border-color: var(--blue); color: var(--blue-dark); }
.theme-icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Dashboard shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 232px;
  flex-direction: column;
  align-self: flex-start;
  width: 232px;
  min-height: 100vh;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  z-index: 10;
}
.sidebar-nav { display: grid; gap: 3px; margin-top: 34px; }
.sidebar-nav a,
.sidebar-more summary {
  border-radius: 8px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
}
.sidebar-nav > a { padding: 9px 10px; }
.sidebar-nav a:hover,
.sidebar-nav a:focus-visible,
.sidebar-more summary:hover,
.sidebar-more[open] summary { color: var(--text); background: var(--surface-soft); }
.sidebar-more { margin-top: 4px; padding-top: 7px; border-top: 1px solid var(--border); }
.sidebar-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
}
.sidebar-more summary::-webkit-details-marker { display: none; }
.sidebar-more summary span { color: var(--blue-dark); font-size: 1rem; transition: transform .16s ease; }
.sidebar-more[open] summary span { transform: rotate(45deg); }
.sidebar-more div { display: grid; gap: 2px; padding: 4px 0 0 8px; }
.sidebar-more div a { padding: 7px 9px; font-size: .78rem; }
.connections { display: grid; gap: 5px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.conn-line { margin: 0; color: var(--muted); font-size: .72rem; }
.conn-line::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--green); }
.conn-line.conn-off::before { background: var(--faint); }
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; }
.sidebar-footer a { color: var(--muted); font-size: .78rem; text-decoration: none; }
.sidebar-footer a:hover { color: var(--blue-dark); }
.icon-button { border: 0; background: transparent; cursor: pointer; }
.main {
  width: min(1260px, calc(100% - 232px));
  margin: 0 auto;
  padding: 34px clamp(24px, 4vw, 56px) 70px;
}
.dashboard-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.toolbar-title strong,
.toolbar-title span { display: block; }
.toolbar-title strong { font-size: .88rem; }
.toolbar-title span { color: var(--muted); font-size: .72rem; }
.quick-nav,
.view-controls { display: flex; align-items: center; gap: 5px; }
.quick-nav a,
.view-controls button,
.panel-toggle,
.section-collapse-button {
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.quick-nav a:hover { color: var(--text); background: var(--surface-soft); }
.view-controls { padding-left: 12px; border-left: 1px solid var(--border); }
.view-controls button,
.panel-toggle,
.section-collapse-button { border-color: var(--border); color: var(--blue-dark); }
.view-controls button:hover,
.panel-toggle:hover,
.section-collapse-button:hover { border-color: var(--blue); background: var(--blue-soft); }

/* Cards and primary training view */
.daily-stack { scroll-margin-top: 16px; }
.card,
.today-card,
.readiness-card,
.metric-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card { margin-bottom: 18px; padding: clamp(20px, 2.6vw, 30px); scroll-margin-top: 18px; }
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.sample-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--yellow-soft);
  color: var(--yellow-text);
  font-size: .8rem;
}
.sample-banner span { color: var(--muted); }
.daily-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 18px; margin-bottom: 18px; }
.today-card,
.readiness-card { padding: clamp(21px, 3vw, 31px); }
.today-card { border-top: 4px solid var(--blue); }
.today-card h1 { font-size: clamp(2rem, 4vw, 3.3rem); }
.status-pill { padding: 6px 10px; color: var(--blue-dark); background: var(--blue-soft); }
.status-pill.reduce,
.status-pill.recovery { color: var(--red); background: var(--red-soft); }
.status-pill.ready { color: var(--green); background: var(--green-soft); }
.today-prescription { display: grid; grid-template-columns: .8fr .8fr 1.4fr; gap: 10px; margin: 21px 0 17px; }
.today-prescription div,
.load-comparison div,
.goal-stats div { padding: 12px; border-radius: 9px; background: var(--surface-soft); }
.today-prescription small,
.load-comparison small,
.goal-stats small,
.summary-strip span,
.metric-card span {
  display: block;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
}
.today-prescription strong,
.load-comparison strong,
.goal-stats strong {
  display: block;
  margin-top: 5px;
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: .88rem;
}
.today-purpose { max-width: 720px; margin-bottom: 16px; font-size: 1rem; }
.why-details,
.shoe-assignments,
.recovery-history { border-top: 1px solid var(--border); padding-top: 12px; }
.why-details summary,
.shoe-assignments summary,
.recovery-history summary { color: var(--blue-dark); font-size: .78rem; font-weight: 700; cursor: pointer; }
.why-details ul { margin-bottom: 4px; color: var(--muted); font-size: .84rem; }
.session-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 17px; }
.session-notes p { margin: 0; color: var(--muted); font-size: .8rem; }
.session-notes b { display: block; margin-bottom: 4px; color: var(--text); font-size: .75rem; }
.saved-status { margin: 17px 0 0; color: var(--green); font-size: .78rem; font-weight: 700; }
.today-status-form,
.mini-form,
.shoe-form,
.race-form,
.feedback-form,
.detail-grid { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.today-status-form label,
.mini-form label:not(.check),
.shoe-form label,
.race-form label,
.feedback-form label,
.detail-grid label { display: grid; gap: 5px; color: var(--muted); font-size: .7rem; font-weight: 700; }
.today-status-form label { min-width: 130px; }
.today-status-form .status-note { flex: 1; }
input,
select,
textarea {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
}
textarea { resize: vertical; }
.today-status-form button,
.mini-form button,
.shoe-form button,
.shoe-assignments button,
.adherence-form button {
  min-height: 39px;
  padding: 8px 12px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.readiness-card h2 { color: var(--text); }
.supporting-copy { margin: 9px 0 0; }
.load-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 12px; }
.load-bar,
.shoe-meter { height: 7px; overflow: hidden; border-radius: 999px; background: var(--border); }
.load-bar i,
.shoe-meter i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.load-change { margin: 8px 0 14px; color: var(--muted); font-size: .75rem; }
.missing-data { margin: 13px 0 0; }
.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.summary-strip article { padding: 17px 20px; }
.summary-strip article + article { border-left: 1px solid var(--border); }
.summary-strip strong { display: block; margin: 4px 0 2px; font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 1rem; font-variant-numeric: tabular-nums; }
.summary-strip small { color: var(--muted); font-size: .7rem; }

/* Weekly plan, activities, goals, calendar */
.week-comparison { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.plan-day { min-height: 112px; padding: 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); }
.plan-day small,
.plan-day span { display: block; color: var(--muted); font-size: .7rem; }
.plan-day strong { display: block; margin: 12px 0 8px; font-size: .8rem; }
.plan-day.completed { border-color: var(--green); }
.plan-day.missed,
.plan-day.skipped { border-color: var(--red); }
.plan-day.today { border: 2px solid var(--blue); }
.adjustment-note { margin-top: 15px; padding: 13px 15px; border-left: 3px solid var(--yellow); background: var(--yellow-soft); }
.adjustment-note b { color: var(--yellow-text); font-size: .76rem; }
.adjustment-note p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.compact-run-panel { padding: clamp(18px, 2.5vw, 24px); }
.compact-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.run-search input { width: min(300px, 34vw); background: var(--surface-soft); font-size: .78rem; }
.compact-run-list { margin-top: 15px; }
.compact-run-list > [hidden] { display: none !important; }
.analysis-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.analysis-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  text-decoration: none;
}
.analysis-links a:hover { border-color: var(--blue); background: var(--blue-soft); }
.analysis-links a span,
.analysis-links a small { display: block; }
.analysis-links a span > b { font-size: .8rem; }
.analysis-links a small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.analysis-links a > strong { text-align: right; font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.analysis-links a > strong i { display: block; color: var(--blue-dark); font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: .68rem; font-style: normal; }
.panel-empty { margin: 15px 0 0; color: var(--muted); font-size: .8rem; }
.companion-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 18px; }
.goal-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 17px; }
.goal-card ul { color: var(--muted); font-size: .84rem; }
.mini-form label:not(.check) { flex: 1 1 110px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .76rem; }
.check input { width: auto; accent-color: var(--blue); }
.record-list > div,
.trend-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--border); }
.record-list span,
.record-list small,
.trend-list span,
.trend-list small { display: block; }
.record-list span,
.trend-list span { font-size: .82rem; }
.record-list small,
.trend-list small { color: var(--muted); font-size: .68rem; }
.record-list strong,
.trend-list strong { font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: .75rem; font-variant-numeric: tabular-nums; text-align: right; }
.trend-improving { color: var(--green); }
.trend-worsening { color: var(--red); }
.calendar-nav { display: flex; gap: 5px; }
.calendar-nav a { padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); font-size: .72rem; font-weight: 700; text-decoration: none; }
.calendar-nav a:hover { color: var(--blue-dark); border-color: var(--blue); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .7rem; font-weight: 700; text-align: left; white-space: nowrap; }
td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr:hover { background: var(--surface-soft); }
.calendar { min-width: 700px; table-layout: fixed; }
.calendar th { padding: 7px; }
.calendar td { height: 88px; padding: 7px; border: 1px solid var(--border); vertical-align: top; white-space: normal; }
.calendar tbody tr:hover { background: transparent; }
.cal-date { color: var(--muted); font-size: .72rem; }
.cal-run,
.cal-suggested,
.cal-race { margin-top: 5px; padding: 4px 5px; border-radius: 5px; font-size: .65rem; line-height: 1.25; }
.cal-run { color: var(--blue-dark); background: var(--blue-soft); }
.cal-suggested { color: var(--muted); background: var(--surface-soft); }
.cal-race { color: var(--yellow-text); background: var(--yellow-soft); font-weight: 700; }
.out-of-month { opacity: .48; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--blue); }

/* Shoes and records */
.shoe-form label { flex: 1 1 130px; }
.shoe-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.shoe-list article { display: flex; justify-content: space-between; gap: 14px; padding: 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.shoe-list small { color: var(--blue-dark); font-size: .68rem; font-weight: 700; }
.shoe-list h3 { margin: 4px 0; font-size: 1rem; }
.shoe-list p,
.shoe-list span { margin: 0; color: var(--muted); font-size: .72rem; }
.shoe-meter { margin: 9px 0 5px; }
.shoe-assignments { margin-top: 17px; }
.shoe-assignments form,
.adherence-form { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid var(--border); font-size: .76rem; }
.shoe-assignments form span,
.adherence-form span { flex: 1; }
.link-button { padding: 5px 6px; border: 0; background: transparent; color: var(--muted); font-size: .72rem; cursor: pointer; }
.link-button:hover { color: var(--blue-dark); text-decoration: underline; }
.danger-link,
.danger-link:hover { color: var(--red); }

/* Charts, detail metrics, and compact sections */
.chart-wrap { min-height: 260px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.metric-card { display: flex; min-height: 125px; flex-direction: column; padding: 18px; }
.metric-card strong { margin: auto 0 5px; font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: clamp(1rem, 2vw, 1.45rem); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.metric-card small { color: var(--muted); font-size: .7rem; }
.source-pill { padding: 3px 7px; color: var(--blue-dark); background: var(--blue-soft); text-transform: capitalize; }
.dashboard-collapsible { transition: padding .16s ease, border-color .16s ease; }
.dashboard-collapsible.is-section-collapsed { padding-top: 15px; padding-bottom: 15px; box-shadow: none; }
.dashboard-collapsible.is-section-collapsed > .section-heading { align-items: center; margin-bottom: 0; }
.dashboard-collapsible.is-section-collapsed > :not(.section-heading) { display: none !important; }
.section-collapse-button { flex: 0 0 auto; }

/* Body and recovery */
.recovery-card { border-top: 4px solid var(--yellow); }
.safety-label { padding: 6px 10px; color: var(--yellow-text); background: var(--yellow-soft); }
.recovery-intro { max-width: 880px; margin-bottom: 24px; color: var(--muted); }
.recovery-layout { display: grid; grid-template-columns: minmax(330px, .95fr) minmax(330px, 1.05fr); gap: 28px; }
.anatomy-panel { padding-right: 28px; border-right: 1px solid var(--border); }
.panel-label { font-size: .8rem; }
.body-help { margin: 0 0 10px; }
.mannequin-wrap { display: grid; min-height: 420px; place-items: center; border-radius: 12px; background: var(--surface-soft); }
.mannequin { width: 100%; max-width: 390px; height: 550px; }
.mannequin text { fill: var(--muted); font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 10px; }
.body-shell { fill: color-mix(in srgb, var(--blue) 8%, var(--surface)); stroke: var(--border-strong); stroke-width: 1; }
.body-region { fill: color-mix(in srgb, var(--blue) 20%, transparent); stroke: color-mix(in srgb, var(--blue) 58%, var(--border)); stroke-width: 1; cursor: pointer; transition: fill .14s ease; }
.body-region:hover,
.body-region.is-selected { fill: var(--blue); stroke: var(--blue-dark); }
.region-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 13px; }
.region-group { flex-basis: 100%; margin: 10px 0 1px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.region-list button { padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: .72rem; cursor: pointer; }
.region-list button:hover,
.region-list button.is-selected { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.recovery-form { display: grid; align-content: start; gap: 15px; }
.recovery-form > label:not(.check) { display: grid; gap: 6px; font-size: .82rem; font-weight: 700; }
.recovery-form output { justify-self: end; margin-top: -28px; color: var(--blue-dark); font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: .76rem; font-variant-numeric: tabular-nums; }
.recovery-form input[type="range"] { width: 100%; padding: 0; border: 0; accent-color: var(--blue); }
.recovery-form textarea { min-height: 84px; }
.recovery-form fieldset { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.recovery-form legend { margin-bottom: 7px; font-size: .82rem; font-weight: 700; }
.selected-areas { padding: 11px 12px; border-left: 3px solid var(--border-strong); background: var(--surface-soft); color: var(--muted); font-size: .78rem; }
.selected-areas.has-selection { border-color: var(--blue); color: var(--text); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.form-note { margin: 0; padding: 11px; border-radius: 8px; background: var(--yellow-soft); color: var(--yellow-text); font-size: .76rem; }
.primary-button {
  padding: 10px 14px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.primary-button:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.guidance-result { margin-top: 22px; padding: 17px; border: 1px solid var(--blue); border-radius: 10px; background: var(--blue-soft); }
.guidance-result.urgent { border-color: var(--red); background: var(--red-soft); }
.guidance-result p:last-child { margin-bottom: 0; }
.training-context { display: flex; align-items: baseline; gap: 12px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--border); }
.training-context span { color: var(--blue-dark); font-size: .75rem; font-weight: 700; }
.training-context p { margin: 0; color: var(--muted); font-size: .78rem; }
.recovery-history { margin-top: 17px; }
.history-item { margin-top: 11px; padding: 13px; border-left: 3px solid var(--blue); background: var(--surface-soft); font-size: .8rem; }
.history-item.urgent { border-color: var(--red); }
.history-item p { margin: 0 0 5px; }
.history-item p:last-child { margin: 0; color: var(--muted); }

/* Coaching, feedback, races, about */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.columns > div + div { padding-left: 30px; border-left: 1px solid var(--border); }
.columns ul { color: var(--muted); font-size: .84rem; }
.feedback-list { margin-top: 14px; border-bottom: 1px solid var(--border); }
.feedback-entry { padding: 12px 0; border-top: 1px solid var(--border); }
.feedback-entry summary { display: flex; justify-content: space-between; gap: 15px; font-size: .82rem; font-weight: 700; cursor: pointer; }
.feedback-entry summary small { color: var(--blue-dark); font-size: .7rem; }
.feedback-form label { flex: 0 1 110px; }
.feedback-form .feedback-comment { flex: 1 1 220px; }
.feedback-form textarea { min-height: 40px; }
.feedback-remove-form { display: flex; justify-content: flex-end; padding-bottom: 6px; }
.race-form label { flex: 1 1 150px; }
.race-list { margin: 20px 0 0; padding: 0; list-style: none; }
.race-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); font-size: .82rem; }
.about-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; margin-top: 34px; padding: 34px 0 0; border-top: 1px solid var(--border); }
.about-panel p { color: var(--muted); }
.about-links { display: flex; gap: 18px; }
.about-links a { color: var(--blue-dark); font-size: .82rem; font-weight: 700; text-decoration: none; }
.about-links a:hover { text-decoration: underline; }

/* Run detail */
.detail-page { width: min(1050px, calc(100% - 36px)); margin: 0 auto; padding: 30px 0 70px; }
.detail-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 46px; }
.detail-nav a { color: var(--blue-dark); font-size: .82rem; font-weight: 700; text-decoration: none; }
.detail-header { margin-bottom: 28px; }
.detail-header h1 { max-width: 850px; }
.detail-header > p:last-child { max-width: 700px; margin: 13px 0 0; color: var(--muted); }
.unavailable-card { background: var(--surface-soft); }

/* Responsive layouts */
@media (max-width: 1060px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr) minmax(350px, .78fr); gap: 45px; }
  .main { padding-right: 26px; padding-left: 26px; }
  .week-comparison { grid-template-columns: repeat(4, 1fr); }
  .dashboard-toolbar { grid-template-columns: 1fr auto; }
  .quick-nav { grid-row: 2; grid-column: 1 / -1; }
  .view-controls { grid-row: 1; grid-column: 2; }
}

@media (max-width: 960px) {
  .app-shell { display: block; }
  .sidebar {
    position: sticky;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
    min-height: 0;
    padding: 11px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-nav { margin: 0; }
  .sidebar-nav { display: flex; align-items: center; justify-content: flex-end; gap: 2px; margin: 0; }
  .sidebar-nav > a { padding: 7px 8px; white-space: nowrap; }
  .sidebar-more { position: relative; margin: 0; padding: 0; border: 0; }
  .sidebar-more summary { padding: 7px 8px; white-space: nowrap; }
  .sidebar-more div {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 12;
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .connections { display: flex; grid-column: 1 / -1; gap: 15px; margin-top: 8px; padding-top: 8px; }
  .sidebar-footer { margin: 0; }
  .main { width: 100%; padding-top: 24px; }
  .daily-grid,
  .companion-grid { grid-template-columns: 1fr; }
  .recovery-layout { grid-template-columns: 1fr; }
  .anatomy-panel { padding: 0 0 24px; border-right: 0; border-bottom: 1px solid var(--border); }
}

@media (max-width: 820px) {
  .landing-hero { grid-template-columns: 1fr; gap: 46px; padding: 48px 0; }
  .landing-content { max-width: 700px; }
  .landing-content h1 { max-width: 700px; }
  .week-preview { width: min(560px, 100%); }
  .summary-strip { grid-template-columns: 1fr; }
  .summary-strip article + article { border-top: 1px solid var(--border); border-left: 0; }
  .analysis-links,
  .shoe-list { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 105px; }
  .about-panel { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 700px) {
  .sidebar { grid-template-columns: 1fr auto; }
  .sidebar-nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; margin-top: 9px; overflow-x: auto; }
  .connections { grid-row: 3; flex-wrap: wrap; }
  .main { padding: 18px 14px 52px; }
  .dashboard-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .toolbar-title,
  .quick-nav,
  .view-controls { grid-row: auto; grid-column: 1; }
  .quick-nav { display: grid; grid-template-columns: repeat(3, 1fr); }
  .quick-nav a { text-align: center; background: var(--surface-soft); }
  .view-controls { padding: 9px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .view-controls button { flex: 1; }
  .section-heading,
  .compact-panel-heading { flex-wrap: wrap; }
  .panel-tools { display: grid; grid-template-columns: 1fr auto; width: 100%; }
  .run-search input { width: 100%; }
  .today-prescription,
  .session-notes { grid-template-columns: 1fr; }
  .today-status-form,
  .mini-form,
  .shoe-form,
  .race-form { display: grid; grid-template-columns: 1fr 1fr; }
  .today-status-form label,
  .mini-form label:not(.check),
  .shoe-form label,
  .race-form label { min-width: 0; }
  .status-note,
  .today-status-form button,
  .mini-form button,
  .shoe-form button,
  .race-form button { grid-column: 1 / -1; }
  .week-comparison { grid-template-columns: repeat(2, 1fr); }
  .columns { grid-template-columns: 1fr; gap: 24px; }
  .columns > div + div { padding: 24px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .feedback-form { display: grid; grid-template-columns: repeat(3, 1fr); }
  .feedback-form .feedback-comment,
  .feedback-form .primary-button { grid-column: 1 / -1; }
  .training-context { display: block; }
  .training-context p { margin-top: 5px; }
  .mannequin { height: 500px; }
  .landing-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 18px 0; }
}

@media (max-width: 500px) {
  .landing-shell { padding: 0 18px; }
  .landing-header { min-height: 70px; }
  .landing-content h1 { font-size: clamp(2.8rem, 15vw, 4.2rem); }
  .compact-login { grid-template-columns: 1fr auto; width: 100%; }
  .compact-login-label { grid-column: 1 / -1; }
  .compact-login > label { grid-column: 1; }
  .compact-login button { grid-column: 2; }
  .week-preview { padding: 18px; }
  .week-bars { height: 120px; }
  .landing-footer nav { flex-direction: column; gap: 5px; }
  .brand strong { font-size: .8rem; }
  .today-status-form,
  .mini-form,
  .shoe-form,
  .race-form { grid-template-columns: 1fr; }
  .today-status-form > *,
  .mini-form > *,
  .shoe-form > *,
  .race-form > * { grid-column: 1; }
  .goal-stats,
  .load-comparison,
  .detail-grid { grid-template-columns: 1fr; }
  .feedback-form { grid-template-columns: 1fr; }
  .feedback-form > * { grid-column: 1 !important; }
  .mannequin { height: 430px; }
  .anatomy-panel { min-width: 0; }
  .race-list li,
  .adherence-form,
  .shoe-assignments form { align-items: flex-start; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Contrast guarantee: explicit foregrounds for every interactive and dark-surface state. */
.landing-body, .landing-body p, .landing-body li { color: var(--g-ink); }
.landing-content, .landing-content h1, .landing-content p { color: #fff; }
.landing-how-preview, .landing-how-preview h2, .landing-how-preview li, .landing-how-preview a { color: #fff; }
.landing-how-preview .section-kicker, .method-safety .section-kicker { color: #d9c7e4; }
.landing-footer, .landing-footer a, .method-header, .method-header a { color: var(--g-ink); }
.landing-open-dashboard { background: #fff; color: #17151a; }
.landing-open-dashboard:hover, .landing-open-dashboard:focus-visible { border-color: #fff; background: #17151a; color: #fff; }
.login-dialog, .login-dialog .compact-login { background: #fff; color: #1b191d; }
.login-dialog-copy h2, .login-dialog .compact-login > label, .login-dialog-close { color: #1b191d; }
.login-dialog-copy p, .login-dialog-copy small { color: #5d5761; }
.login-dialog .compact-login > input { border-color: #8b858e; background: #fff; color: #1b191d; caret-color: #1b191d; }
.login-dialog .compact-login > input::placeholder { color: #6f6972; opacity: 1; }
.login-dialog-submit, .login-dialog-submit:visited { border-color: var(--g-purple-dark); background: var(--g-purple-dark); color: #fff; }
.login-dialog-submit:hover, .login-dialog-submit:focus-visible { border-color: var(--g-purple); background: var(--g-purple); color: #fff; }

.dashboard-body .main, .dashboard-body .main p, .dashboard-body .main li, .dashboard-body .main label, .dashboard-body .main legend { color: var(--g-ink); }
.dashboard-body .section-description, .dashboard-body .compact-summary, .dashboard-body .caption, .dashboard-body .empty, .dashboard-body .supporting-copy { color: #5f5963; }
.dashboard-body input, .dashboard-body select, .dashboard-body textarea,
.dashboard-body .today-card input, .dashboard-body .today-card select {
  border-color: #aaa4ad;
  background: #fff;
  color: #17151a;
  caret-color: #17151a;
}
.dashboard-body input::placeholder, .dashboard-body textarea::placeholder { color: #6b6570; opacity: 1; }
.dashboard-body select option { background: #fff; color: #17151a; }
.dashboard-body input:disabled, .dashboard-body select:disabled, .dashboard-body textarea:disabled { background: #e6e3e7; color: #4f4953; opacity: 1; }

.dashboard-body .main button:not(.primary-button):not(.link-button):not(.login-dialog-close),
.dashboard-body .panel-toggle, .dashboard-body .section-collapse-button {
  border: 1px solid #817a85;
  background: #fff;
  color: #241f27;
}
.dashboard-body .main button:not(.primary-button):not(.link-button):hover,
.dashboard-body .panel-toggle:hover, .dashboard-body .section-collapse-button:hover {
  border-color: var(--g-purple);
  background: var(--g-purple-soft);
  color: var(--g-purple-dark);
}
.dashboard-body .primary-button,
.dashboard-body .today-status-form button,
.dashboard-body .mini-form button,
.dashboard-body .race-form button,
.dashboard-body .shoe-form button,
.dashboard-body .shoe-assignments button,
.dashboard-body .adherence-form button {
  border: 1px solid var(--g-purple-dark);
  background: var(--g-purple-dark);
  color: #fff;
}
.dashboard-body .primary-button:hover, .dashboard-body .primary-button:focus-visible,
.dashboard-body .today-status-form button:hover, .dashboard-body .mini-form button:hover,
.dashboard-body .race-form button:hover, .dashboard-body .shoe-form button:hover,
.dashboard-body .shoe-assignments button:hover, .dashboard-body .adherence-form button:hover {
  border-color: var(--g-purple);
  background: var(--g-purple);
  color: #fff;
}
.dashboard-body button:disabled { border-color: #77717a; background: #77717a; color: #fff; cursor: not-allowed; opacity: 1; }
.dashboard-body .link-button, .dashboard-body .text-action, .dashboard-body .calendar-nav a { color: var(--g-purple-dark); }
.dashboard-body .danger-link, .dashboard-body .link-button.danger-link { color: #91232b; }
.dashboard-body summary { color: #2b2530; }
.dashboard-body .feedback-entry summary, .dashboard-body .feedback-entry summary span { color: #211d24; }
.dashboard-body .feedback-entry summary small { color: var(--g-purple-dark); }

.dashboard-body .readiness-card,
.dashboard-body .readiness-card h2,
.dashboard-body .readiness-card strong,
.dashboard-body .readiness-card b,
.dashboard-body .readiness-card .load-comparison strong,
.dashboard-body .readiness-card .why-details summary { color: #fff; }
.dashboard-body .readiness-card .section-kicker { color: #d8c4e2; }
.dashboard-body .readiness-card p,
.dashboard-body .readiness-card li,
.dashboard-body .readiness-card small,
.dashboard-body .readiness-card .supporting-copy,
.dashboard-body .readiness-card .load-change,
.dashboard-body .readiness-card .missing-data,
.dashboard-body .readiness-card .why-details ul { color: #d9d5dc; }
.dashboard-body .readiness-card .why-details, .dashboard-body .readiness-card .load-comparison { border-color: #5e5862; }
.dashboard-body .readiness-recovery-link { border: 1px solid #bfa8cd; background: transparent; color: #fff; }
.dashboard-body .readiness-recovery-link:hover, .dashboard-body .readiness-recovery-link:focus-visible { border-color: #fff; background: #fff; color: #211b25; }

.dashboard-body .summary-strip, .dashboard-body .summary-strip strong { color: #fff; }
.dashboard-body .summary-strip span, .dashboard-body .summary-strip small { color: #eee7f2; }
.dashboard-body .status-pill { border: 1px solid #705781; background: #eee8f2; color: #33203f; }
.dashboard-body .status-pill.ready { border-color: #55765c; background: #e2eee4; color: #234b2d; }
.dashboard-body .status-pill.reduce, .dashboard-body .status-pill.recovery { border-color: #a2484e; background: #f6e4e5; color: #7d2027; }
.dashboard-body .tag { border: 1px solid #9c8ba7; background: #eee8f2; color: #33203f; }
.dashboard-body .adjustment-note { background: #f4f0e5; color: #2c281e; }
.dashboard-body .adjustment-note b, .dashboard-body .adjustment-note p { color: #2c281e; }
.dashboard-body .form-note { background: #f4f0e5; color: #3f381f; }
.dashboard-body .selected-areas { background: #eeebef; color: #4f4953; }
.dashboard-body .selected-areas.has-selection { color: #211d24; }
.dashboard-body .guidance-result { background: #eee8f2; color: #211d24; }
.dashboard-body .guidance-result p { color: #211d24; }
.dashboard-body .guidance-result.urgent { background: #f7e4e5; color: #701c23; }
.dashboard-body .history-item { background: #efedef; color: #211d24; }
.dashboard-body .history-item p, .dashboard-body .history-item p:last-child { color: #39333d; }
.dashboard-body .region-list button { border: 1px solid #98919b; background: #fff; color: #2c2730; }
.dashboard-body .region-list button:hover { border-color: var(--g-purple); background: var(--g-purple-soft); color: var(--g-purple-dark); }
.dashboard-body .region-list button.is-selected, .dashboard-body .region-list button[aria-pressed="true"] { border-color: var(--g-purple-dark); background: var(--g-purple-dark); color: #fff; }
.dashboard-body .about-panel, .dashboard-body .about-panel h2 { color: #fff; }
.dashboard-body .about-panel p { color: #d4cfd6; }
.dashboard-body .about-panel a { color: #dfcaeb; }
.mobile-product-nav a { color: #d1ccd3; }
.mobile-product-nav a.active { background: #fff; color: #211d24; }

.method-body, .method-page, .method-page p, .method-page li, .method-page a { color: var(--g-ink); }
.method-safety, .method-safety h2 { color: #fff; }
.method-safety p { color: #ded9e1; }

.detail-body { background: var(--g-bg); color: var(--g-ink); }
.detail-body .detail-nav, .detail-body .detail-nav a, .detail-body .detail-nav span { color: #332d37; }
.detail-body .detail-header { background: var(--g-purple-soft); color: var(--g-ink); }
.detail-body .detail-header h1, .detail-body .detail-header p, .detail-body .detail-header span { color: var(--g-ink); }
.detail-body .metric-card { border-color: var(--g-line); background: #fff; color: var(--g-ink); }
.detail-body .metric-card span, .detail-body .metric-card small, .detail-body .metric-card strong { color: var(--g-ink); }
.detail-body .metric-card:nth-child(2) { background: var(--g-ink); color: #fff; }
.detail-body .metric-card:nth-child(2) span, .detail-body .metric-card:nth-child(2) small, .detail-body .metric-card:nth-child(2) strong { color: #fff; }
.detail-body .card, .detail-body .card h2, .detail-body .card h3, .detail-body .card p, .detail-body .card li { background: #fff; color: var(--g-ink); }
.detail-body .caption { color: #5f5963; }

/* --------------------------------------------------------------------------
   Gaman Field Notes — editorial trail-running system
   -------------------------------------------------------------------------- */

body { background: var(--bg); }
h1, h2, h3 { text-wrap: balance; }
.section-kicker,
.panel-label {
  color: var(--blue-dark);
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.section-description,
.supporting-copy,
.compact-summary,
.caption,
.empty,
.missing-data,
.body-help { line-height: 1.55; }
.brand-orb {
  border: 1px solid currentColor;
  border-radius: 50% 50% 10% 50%;
  background: var(--acid);
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  transform: rotate(-7deg);
}
.brand > span:last-child { transform: none; }
.brand small {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: .95rem;
  letter-spacing: -.025em;
  text-transform: none;
}
.brand strong {
  margin-top: 1px;
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: .61rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.theme-icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

/* Dashboard — practical data framed like an athletic field journal. */
.sidebar {
  flex-basis: 250px;
  width: 250px;
  padding: 28px 18px 20px;
  border-right: 2px solid var(--ink);
  background: var(--wine);
  color: #f4f2f6;
}
.sidebar .brand { color: #f4f2f6; }
.sidebar .brand-orb { color: var(--ink); }
.sidebar-nav { gap: 4px; margin-top: 42px; }
.sidebar-nav a,
.sidebar-more summary { border-radius: 999px; color: rgba(244,242,246,.78); }
.sidebar-nav > a { padding: 10px 13px; }
.sidebar-nav a:hover,
.sidebar-nav a:focus-visible,
.sidebar-more summary:hover,
.sidebar-more[open] summary { background: var(--acid); color: var(--ink); }
.sidebar-more { border-color: rgba(255,255,255,.24); }
.sidebar-more summary span { color: var(--acid); }
.connections { border-color: rgba(255,255,255,.24); }
.conn-line { color: rgba(244,242,246,.76); }
.conn-line::before { background: var(--acid); }
.sidebar-footer a { color: rgba(244,242,246,.76); }
.sidebar-footer a:hover { color: var(--acid); }
.sidebar .theme-icon-button { color: #f4f2f6; }
.main { width: min(1390px, calc(100% - 250px)); padding: 32px clamp(22px, 3.6vw, 56px) 80px; }
.dashboard-toolbar {
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  margin-bottom: 20px;
  padding: 15px 16px;
  border: 1.5px solid var(--text);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--text) 14%, transparent);
}
.toolbar-title small { display: block; margin-bottom: 3px; color: var(--blue-dark); font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: .57rem; letter-spacing: .08em; }
.toolbar-title strong { font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.28rem; letter-spacing: -.005em; }
.quick-nav a,
.view-controls button,
.panel-toggle,
.section-collapse-button { border-radius: 999px; }
.quick-nav a:hover { background: var(--acid); color: var(--ink); }
.view-controls button,
.panel-toggle,
.section-collapse-button { border-color: var(--border-strong); color: var(--text); }
.view-controls button:hover,
.panel-toggle:hover,
.section-collapse-button:hover { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.card,
.today-card,
.readiness-card,
.metric-card {
  border: 1.5px solid var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card { margin-bottom: 22px; }
.sample-banner { border: 1.5px solid var(--ink); background: var(--acid); color: var(--ink); }
.sample-banner span { color: rgba(23,20,25,.72); }
.daily-grid { grid-template-columns: minmax(0, 1.8fr) minmax(270px, .68fr); gap: 22px; margin-bottom: 22px; }
.today-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  padding: 0;
  overflow: hidden;
  border-top: 10px solid var(--blue);
  background: var(--surface);
  color: var(--text);
}
.today-card-main { min-width: 0; padding: clamp(24px, 3vw, 36px); }
.today-card .section-kicker,
.today-card .section-description { color: var(--blue-dark); }
.today-card h1 { max-width: 680px; font-size: clamp(2.4rem, 4.8vw, 4.6rem); line-height: .9; }
.today-card .status-pill { border: 1px solid var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.today-card .today-prescription div { border: 1px solid var(--border); background: var(--surface-soft); }
.today-card .today-prescription small,
.today-card .session-notes p { color: var(--muted); }
.today-card .session-notes b,
.today-card .why-details summary { color: var(--text); }
.today-card .why-details { border-color: var(--border); }
.today-card input,
.today-card select { border-color: var(--border-strong); background: var(--surface-soft); color: var(--text); }
.today-card .today-status-form label { color: var(--muted); }
.today-card .today-status-form button { border-color: var(--ink); background: var(--ink); color: #f4f2f6; }
.readiness-card { border-color: var(--wine); background: var(--wine); color: #f4f2f6; }
.readiness-card h2,
.readiness-card .section-kicker,
.readiness-card .why-details summary { color: #f4f2f6; }
.readiness-card .supporting-copy,
.readiness-card .load-change,
.readiness-card .missing-data,
.readiness-card .why-details ul { color: rgba(244,242,246,.72); }
.readiness-card .load-comparison div { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.09); }
.readiness-card .load-comparison small { color: rgba(244,242,246,.64); }
.readiness-card .why-details { border-color: rgba(255,255,255,.24); }
.readiness-card .load-bar { background: rgba(255,255,255,.2); }
.readiness-card .load-bar i { background: var(--acid); }
.summary-strip { border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--acid); color: var(--ink); box-shadow: var(--shadow); }
.summary-strip article + article { border-color: var(--ink); }
.summary-strip span,
.summary-strip small { color: rgba(23,20,25,.68); }
.summary-strip strong { font-size: 1.18rem; }
.plan-day { border-color: var(--border-strong); border-radius: 5px; background: transparent; }
.plan-day.today { border-color: var(--orange); background: var(--blue-soft); }
.adjustment-note { border: 1px solid var(--ink); border-left: 10px solid var(--acid); background: var(--surface-soft); }
.adjustment-note b { color: var(--text); }
.analysis-links a { border-color: var(--border-strong); border-radius: 12px; }
.analysis-links a:hover { border-color: var(--ink); background: var(--acid); color: var(--ink); }
.analysis-links a:hover small,
.analysis-links a:hover i { color: rgba(23,20,25,.72); }
.goal-card { background: var(--blue-soft); color: var(--text); }
.goal-card .section-kicker,
.goal-card .caption,
.goal-card .empty,
.goal-card ul { color: var(--muted); }
.goal-card .goal-stats div { border: 1px solid var(--border); background: var(--surface); }
.goal-card input { background: var(--surface); color: var(--text); }
.records-card { background: var(--acid); color: var(--ink); }
.records-card .section-kicker,
.records-card .missing-data,
.records-card .record-list small { color: rgba(23,20,25,.68); }
.records-card .record-list > div { border-color: rgba(23,20,25,.35); }
.calendar td { background: color-mix(in srgb, var(--surface) 75%, transparent); }
.cal-run { background: var(--blue-soft); color: var(--blue-dark); }
.cal-race { background: var(--acid); color: var(--ink); }
.metric-card:nth-child(1) { background: var(--acid); color: var(--ink); }
.metric-card:nth-child(2) { background: var(--wine); color: #f4f2f6; }
.metric-card:nth-child(2) span,
.metric-card:nth-child(2) small { color: rgba(244,242,246,.7); }
.metric-card:nth-child(3) { background: var(--surface-soft); color: var(--text); }
.metric-card:nth-child(1) span,
.metric-card:nth-child(1) small,
.metric-card:nth-child(3) span,
.metric-card:nth-child(3) small { color: var(--muted); }
.shoe-list article { border-color: var(--border-strong); border-radius: 12px; }
.source-pill { border: 1px solid var(--border-strong); background: transparent; }
.recovery-card { padding: 0; overflow: hidden; border: 1.5px solid var(--wine); }
.recovery-card > .section-heading { align-items: center; margin: 0; padding: clamp(22px, 3vw, 34px); background: var(--wine); color: #f4f2f6; }
.recovery-card > .section-heading .section-kicker { color: var(--acid); }
.recovery-card > .section-heading .safety-label { border: 1px solid var(--acid); background: transparent; color: var(--acid); }
.recovery-card > .recovery-intro { max-width: 980px; margin: 0; padding: 22px clamp(22px, 3vw, 34px) 0; }
.recovery-layout { padding: 24px clamp(22px, 3vw, 34px) 32px; }
.recovery-card > .guidance-result,
.recovery-card > .training-context,
.recovery-card > .recovery-history { margin-right: clamp(22px, 3vw, 34px); margin-left: clamp(22px, 3vw, 34px); }
.recovery-card > .recovery-history { margin-bottom: 28px; }
.mannequin-wrap { border: 1px solid var(--border); background: var(--surface-soft); }
.region-list button { border-radius: 999px; }
.region-list button:hover,
.region-list button.is-selected { border-color: var(--ink); background: var(--acid); color: var(--ink); }
.selected-areas { border-left-width: 8px; }
.primary-button,
.today-status-form button,
.mini-form button,
.shoe-form button,
.shoe-assignments button,
.adherence-form button {
  border-color: var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #f4f2f6;
}
.primary-button:hover,
.today-status-form button:hover,
.mini-form button:hover,
.shoe-form button:hover,
.shoe-assignments button:hover,
.adherence-form button:hover { border-color: var(--wine); background: var(--wine); color: #f4f2f6; }
.about-panel {
  grid-template-columns: .72fr 1fr .9fr;
  gap: 45px;
  margin-top: 42px;
  padding: clamp(30px, 4vw, 50px);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #f4f2f6;
  box-shadow: 7px 7px 0 var(--acid);
}
.about-panel .section-kicker,
.about-links a { color: var(--acid); }
.about-panel p { color: #b9b3be; }
.about-nature { position: relative; min-height: 230px; margin: 0; overflow: hidden; border: 1px solid #5f5865; border-radius: 12px; }
.about-nature img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.5) contrast(1.08) saturate(.55); }
.about-nature::after { position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(13,12,15,.82)); content: ""; }
.about-nature figcaption { position: absolute; right: 15px; bottom: 14px; left: 15px; z-index: 1; color: #f4f2f6; font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-size: 1.15rem; }

/* Individual run file */
.detail-body { background: var(--bg); }
.detail-page { width: min(1180px, calc(100% - 40px)); padding-top: 24px; }
.detail-nav { margin-bottom: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--text); }
.detail-nav span { font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: .62rem; letter-spacing: .1em; }
.detail-hero { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 510px; margin-bottom: 22px; border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 8px 8px 0 var(--acid); }
.detail-header { display: flex; flex-direction: column; justify-content: center; margin: 0; padding: clamp(30px, 5vw, 70px); background: var(--blue-soft); color: var(--text); }
.detail-header .section-kicker { color: var(--blue-dark); }
.detail-header h1 { font-size: clamp(5rem, 10vw, 9.5rem); line-height: .77; letter-spacing: -.08em; }
.detail-header h1 span { margin-left: .08em; font-size: .24em; letter-spacing: -.03em; text-transform: uppercase; }
.detail-header > p:last-child { max-width: 600px; margin-top: 28px; color: var(--muted); }
.detail-photo { position: relative; min-height: 460px; margin: 0; overflow: hidden; border-left: 1.5px solid var(--ink); }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.detail-photo figcaption { position: absolute; right: 14px; bottom: 14px; padding: 6px 9px; border: 1px solid var(--ink); background: var(--acid); color: var(--ink); font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: .58rem; }
.detail-page .metric-grid { gap: 16px; margin-bottom: 22px; }
.detail-page .metric-card { min-height: 155px; }
.detail-page .metric-card strong { font-size: clamp(1.2rem, 2.5vw, 2rem); }
.comparison-card { border-left: 12px solid var(--acid); }
.run-signals { border-color: var(--wine); }
.recovery-next { background: var(--wine); color: #f4f2f6; }
.recovery-next .section-kicker { color: var(--acid); }
.unavailable-card { box-shadow: none; }

@keyframes fieldRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fieldReveal {
  from { opacity: 0; clip-path: inset(0 0 100% 0 round 26px 26px 120px 26px); }
  to { opacity: 1; clip-path: inset(0 0 0 0 round 26px 26px 120px 26px); }
}
@keyframes imageSettle {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@media (max-width: 1180px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); gap: 36px; }
  .landing-content h1 { font-size: clamp(3.7rem, 7.8vw, 7rem); }
  .landing-story { grid-template-columns: 1fr 1fr; }
  .story-lead { grid-column: auto; min-height: 300px !important; }
  .story-week { border-left: 0 !important; }
  .today-card { grid-template-columns: minmax(0, 1fr) 205px; }
  .main { padding-right: 24px; padding-left: 24px; }
  .about-panel { grid-template-columns: 1fr 1fr; }
  .about-nature { grid-column: 1 / -1; min-height: 260px; }
}

@media (max-width: 960px) {
  .landing-hero { grid-template-columns: 1fr; min-height: 0; }
  .landing-content { max-width: 850px; }
  .landing-content h1 { font-size: clamp(4rem, 12vw, 7.4rem); }
  .landing-photo { min-height: 560px; border-radius: 26px 26px 100px 26px; }
  .sidebar {
    width: 100%;
    min-height: 0;
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }
  .sidebar-more div { border: 1px solid var(--ink); background: var(--wine); }
  .main { width: 100%; }
  .daily-grid { grid-template-columns: 1fr; }
  .today-card { grid-template-columns: minmax(0, 1fr) minmax(220px, .42fr); }
  .readiness-card { min-height: 0; }
  .detail-hero { grid-template-columns: 1fr .75fr; }
}

@media (max-width: 820px) {
  .landing-header { min-height: 76px; }
  .landing-nav > a { display: none; }
  .landing-hero { gap: 38px; padding: 48px 0 58px; }
  .landing-content h1 { font-size: clamp(3.5rem, 13.5vw, 6.5rem); }
  .landing-photo { min-height: 560px; }
  .landing-story { grid-template-columns: 1fr; }
  .landing-story > article { min-height: 320px; }
  .landing-story > article + article { border-top: 2px solid var(--ink); border-left: 0; }
  .story-nature { min-height: 390px; border-top: 2px solid var(--ink); border-left: 0; }
  .story-lead { grid-column: auto; }
  .today-card { grid-template-columns: 1fr; }
  .summary-strip article + article { border-color: var(--ink); }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-photo { min-height: 430px; border-top: 1.5px solid var(--ink); border-left: 0; }
  .about-panel { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 700px) {
  .landing-shell { padding: 0 18px; }
  .landing-content .section-kicker { margin-bottom: 16px; }
  .landing-content h1 { font-size: clamp(3.25rem, 15.5vw, 5.6rem); line-height: .84; }
  .landing-copy { margin-top: 22px; }
  .landing-points { grid-template-columns: 1fr; }
  .landing-points span { grid-template-columns: 30px 1fr; gap: 4px; }
  .landing-points span + span { padding-left: 0; border-top: 1px solid currentColor; border-left: 0; }
  .compact-login { grid-template-columns: 1fr; }
  .compact-login-label,
  .compact-login > label,
  .compact-login button { grid-column: 1; }
  .compact-login button { width: 100%; }
  .landing-photo { min-height: 490px; box-shadow: 6px 6px 0 var(--orange); }
  .photo-stamp { width: 96px; height: 96px; }
  .photo-stamp strong { font-size: .78rem; }
  .landing-story,
  .landing-footer { margin-right: -18px; margin-left: -18px; }
  .landing-story > article { padding: 32px 22px; }
  .landing-footer { gap: 25px; min-height: 230px; padding: 35px 22px; }
  .landing-footer nav { gap: 7px; }
  .sidebar { background: var(--wine); }
  .sidebar-nav { margin-top: 9px; scrollbar-width: thin; }
  .main { padding: 18px 14px 52px; }
  .dashboard-toolbar { grid-template-columns: 1fr; gap: 10px; border-radius: 14px; }
  .toolbar-title,
  .quick-nav,
  .view-controls { grid-row: auto; grid-column: 1; }
  .quick-nav { display: grid; grid-template-columns: repeat(3, 1fr); }
  .quick-nav a { text-align: center; background: var(--surface-soft); }
  .view-controls { padding: 9px 0 0; border-top: 1px solid var(--border); border-left: 0; }
  .view-controls button { flex: 1; }
  .toolbar-title small { margin-bottom: 5px; }
  .card { border-radius: 14px; }
  .today-card h1 { font-size: clamp(2.7rem, 14vw, 4.2rem); }
  .recovery-card > .section-heading { align-items: flex-start; }
  .recovery-layout { padding-right: 18px; padding-left: 18px; }
  .detail-page { width: min(100% - 24px, 1180px); }
  .detail-nav span { display: none; }
  .detail-header { padding: 34px 24px; }
  .detail-header h1 { font-size: clamp(4.4rem, 22vw, 7rem); }
  .about-panel { padding: 28px 22px; }
}

@media (max-width: 500px) {
  .landing-content h1 { font-size: clamp(3rem, 16.7vw, 4.7rem); }
  .landing-photo { min-height: 430px; }
  .landing-photo figcaption { right: 18px; bottom: 18px; left: 18px; }
  .story-lead h2 { font-size: 2.4rem; }
  .today-card-main { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-content,
  .landing-photo,
  .landing-photo > img { animation: none !important; }
}

/* Cinematic landing page: one image, one statement, one way in. */
.landing-body {
  min-height: 100vh;
  background: #f2f2f0;
  color: #171719;
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
}
.landing-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  margin: 0;
  padding: 0 max(18px, calc((100vw - var(--page-max)) / 2 + 28px));
  border: 0;
  border-bottom: 1px solid #d9d7da;
  background: rgba(250, 250, 249, .97);
  color: #171719;
}
[data-theme="dark"] .landing-header {
  border-color: #3c393f;
  background: rgba(20, 19, 22, .98);
  color: #f5f3f6;
}
.landing-wordmark {
  color: inherit;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 2.6vw, 2.3rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1;
  text-decoration: none;
}
.landing-header-actions,
.landing-nav {
  display: flex;
  align-items: center;
}
.landing-header-actions { gap: 13px; }
.landing-nav { gap: clamp(4px, 1.2vw, 18px); }
.landing-nav a {
  padding: 7px 6px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  color: inherit;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
}
.landing-nav a:hover,
.landing-nav a:focus-visible {
  border-color: currentColor;
  border-radius: 0;
}
.landing-header .landing-mode,
.landing-header .theme-icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  border: 1px solid #a9a5ab;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.landing-header .theme-icon-button:hover { border-color: currentColor; color: inherit; }
.landing-shell {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
}
.landing-hero {
  position: relative;
  display: block;
  min-height: calc(100svh - 74px);
  padding: 0;
  overflow: hidden;
  background: #302c32;
  isolation: isolate;
}
.landing-hero-media {
  position: absolute;
  z-index: -3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 49%;
  pointer-events: none;
  filter: saturate(.8) contrast(1.02) brightness(.96);
  animation: none;
}
.landing-hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 9, 12, .73) 0%, rgba(10, 9, 12, .35) 43%, rgba(10, 9, 12, .04) 72%),
    linear-gradient(0deg, rgba(10, 9, 12, .78) 0%, transparent 48%);
  content: "";
}
.landing-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .08);
  content: "";
  pointer-events: none;
}
.landing-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: clamp(22px, 7vw, 118px);
  display: block;
  width: min(690px, calc(100% - 44px));
  max-width: 690px;
  padding: 0;
  color: #fff;
  text-align: left;
  transform: translateY(-50%);
  animation: none;
}
.landing-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #eeeae5;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.landing-eyebrow::before {
  width: 34px;
  height: 1px;
  background: currentColor;
  content: "";
}
.landing-content h1 {
  max-width: 660px;
  margin: 0;
  color: #fff;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 4.9vw, 4.7rem);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -.008em;
  line-height: .98;
  text-transform: none;
  text-wrap: balance;
}
.landing-copy {
  max-width: 620px;
  margin: 21px 0 0;
  color: rgba(255, 255, 255, .9);
  font-size: clamp(1.14rem, 1.55vw, 1.38rem);
  line-height: 1.46;
}
[data-theme="dark"] .landing-copy { color: rgba(255, 255, 255, .9); }
.landing-error {
  width: max-content;
  max-width: 100%;
  margin: 16px 0 0;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(56, 18, 42, .86);
  color: #fff;
  font-size: .78rem;
}
.landing-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 28px;
}
.landing-actions .compact-login {
  display: grid;
  grid-template-columns: minmax(165px, 230px) auto;
  gap: 0;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(16, 15, 18, .6);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
[data-theme="dark"] .landing-actions .compact-login {
  border-color: transparent;
  box-shadow: none;
}
.landing-actions .compact-login input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: .82rem;
}
.landing-actions .compact-login input::placeholder { color: rgba(255, 255, 255, .7); }
.landing-actions .compact-login input:focus { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .82); }
.landing-actions .compact-login button,
.ghost-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 0;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.landing-actions .compact-login button {
  border: 0;
  background: #fff;
  color: #171719;
  cursor: pointer;
}
.landing-actions .compact-login button:hover { border-color: #e4e0dc; background: #e4e0dc; color: #171719; }
.ghost-action {
  border: 1px solid rgba(255, 255, 255, .75);
  background: rgba(12, 11, 14, .18);
  color: #fff;
  backdrop-filter: blur(8px);
}
.ghost-action:hover { border-color: #fff; background: rgba(255, 255, 255, .12); }
.landing-open-dashboard {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #171719;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.landing-open-dashboard:hover { background: #e4e0dc; }
.login-dialog {
  width: min(420px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #1b191d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
}
.login-dialog::backdrop {
  background: rgba(12, 11, 14, .66);
  backdrop-filter: blur(5px);
}
.login-dialog .compact-login {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 30px;
  border: 0;
  border-radius: 4px;
  background: #f6f5f3;
  box-shadow: none;
}
.login-dialog-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #cbc8cc;
  border-radius: 50%;
  background: transparent;
  color: #272429;
  line-height: 0;
  cursor: pointer;
}
.login-dialog-close::before,
.login-dialog-close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1px;
  background: currentColor;
  content: "";
  transform-origin: center;
}
.login-dialog-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.login-dialog-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.login-dialog-close:hover { border-color: #827b85; background: #ebe8e9; }
.login-dialog-copy { padding-right: 34px; }
.login-dialog-copy small {
  display: block;
  color: #6d6870;
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.login-dialog-copy h2 {
  margin-top: 7px;
  color: #1b191d;
  font-size: 2rem;
  font-weight: 600;
}
.login-dialog-copy p {
  margin: 7px 0 8px;
  color: #6d6870;
  font-size: .78rem;
}
.login-dialog .compact-login > label {
  color: #4f4a52;
  font-size: .7rem;
  font-weight: 700;
}
.login-dialog .compact-login > input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #bcb8be;
  border-radius: 2px;
  background: #fff;
  color: #1b191d;
}
.login-dialog-submit {
  min-height: 44px;
  margin-top: 2px;
  border: 1px solid #1b191d;
  border-radius: 2px;
  background: #1b191d;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.login-dialog-submit:hover { background: #5f426f; border-color: #5f426f; }
.login-dialog .landing-error {
  width: 100%;
  margin: 0;
  border: 0;
  background: #eee0e9;
  color: #6f355f;
}
.landing-about {
  padding: clamp(56px, 7vw, 104px) clamp(22px, 5vw, 82px);
  border-top: 1px solid #cfccd1;
  border-bottom: 1px solid #cfccd1;
  background: #efefed;
  color: #1c191e;
}
.landing-about > * { width: min(1320px, 100%); margin-right: auto; margin-left: auto; }
.landing-about-intro {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(340px, .55fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: end;
  padding-bottom: clamp(48px, 6vw, 76px);
}
.landing-about-intro > p:first-child,
.landing-about-visual-copy > p:first-child,
.landing-about-grid article > span,
.landing-about-note > p {
  display: block;
  margin: 0 0 14px;
  color: #6b4e7b;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.landing-about-intro h2 {
  grid-row: 2;
  max-width: 760px;
  margin: 0;
  color: #1c191e;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 3.8vw, 3.9rem);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .94;
}
.landing-about-intro > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 520px;
  margin: 0;
  color: #625d66;
  font-size: 1rem;
  line-height: 1.75;
}
.landing-about-visual {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  min-height: 520px;
  margin-top: clamp(48px, 6vw, 78px);
  margin-bottom: clamp(48px, 6vw, 78px);
  overflow: hidden;
  background: #1d1a1f;
  color: #f3f1f4;
}
.landing-about-visual-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 5vw, 74px);
  background:
    radial-gradient(circle at 20% 14%, rgba(141, 114, 155, .24), transparent 38%),
    #1d1a1f;
}
.landing-about-visual-copy > p:first-child { color: #c9b4d3; }
.landing-about-visual-copy h3 {
  max-width: 520px;
  margin: 0;
  color: #f4f2f5;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 3.5vw, 3.55rem);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: .96;
}
.landing-about-visual-copy > p:not(:first-child) {
  max-width: 510px;
  margin: 26px 0 0;
  color: #bfb9c2;
  font-size: .9rem;
  line-height: 1.72;
}
.about-signal-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.about-signal-row span {
  padding: 8px 11px;
  border: 1px solid #4d4750;
  color: #d9d4dc;
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.about-route-stage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto minmax(240px, 1fr) auto;
  min-width: 0;
  padding: clamp(26px, 4vw, 52px);
  border-left: 1px solid #464048;
  background:
    linear-gradient(135deg, rgba(255,255,255,.025), transparent 60%),
    #262228;
}
.about-route-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #bdb7c0;
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.about-route-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b497c2;
  box-shadow: 0 0 0 0 rgba(180, 151, 194, .5);
  animation: about-status-pulse 2.2s ease-out infinite;
}
.about-route-map {
  grid-column: 1 / -1;
  align-self: center;
  width: 100%;
  overflow: visible;
}
.about-route-grid-line {
  fill: none;
  stroke: rgba(218, 210, 222, .075);
  stroke-width: 1;
}
.about-route-shadow,
.about-route-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.about-route-shadow { stroke: rgba(0, 0, 0, .48); stroke-width: 13; }
.about-route-line {
  stroke: url(#about-route-gradient);
  stroke-width: 4;
  stroke-dasharray: 13 12;
  animation: about-route-flow 1.15s linear infinite;
}
.about-route-point > circle:first-child { fill: #f0ebf2; stroke: #6f587a; stroke-width: 4; }
.about-route-ring {
  fill: none;
  stroke: #b497c2;
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: about-route-ring 2.8s ease-out infinite;
}
.about-route-point-two .about-route-ring { animation-delay: .7s; }
.about-route-point-three .about-route-ring { animation-delay: 1.4s; }
.about-route-point-four .about-route-ring { animation-delay: 2.1s; }
.about-route-label {
  min-width: 0;
  padding: 18px 12px 0;
  border-top: 1px solid #464048;
}
.about-route-label-one { padding-left: 0; }
.about-route-label-four { padding-right: 0; text-align: right; }
.about-route-label small,
.about-route-label strong,
.about-route-label span { display: block; }
.about-route-label small { color: #a98bb7; font-size: .55rem; letter-spacing: .1em; }
.about-route-label strong { margin-top: 7px; color: #f0edf1; font-size: .72rem; }
.about-route-label span { margin-top: 4px; color: #918a95; font-size: .61rem; }
.landing-about-grid article {
  transition: background-color .2s ease;
}
.landing-about-grid article:hover { background: #f7f6f4; }
@keyframes about-route-flow { to { stroke-dashoffset: -25; } }
@keyframes about-route-ring {
  0% { opacity: 0; transform: scale(.45); }
  22% { opacity: .75; }
  75%, 100% { opacity: 0; transform: scale(1.7); }
}
@keyframes about-status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(180, 151, 194, .48); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(180, 151, 194, 0); }
}
.landing-about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #c8c4cb;
  border-left: 1px solid #c8c4cb;
}
.landing-about-grid article {
  min-height: 250px;
  padding: clamp(28px, 3vw, 46px);
  border-right: 1px solid #c8c4cb;
  border-bottom: 1px solid #c8c4cb;
}
.landing-about-grid article h3,
.landing-about-note h3 {
  margin: 0;
  color: #1c191e;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.03;
}
.landing-about-grid article p {
  max-width: 390px;
  margin: 20px 0 0;
  color: #625d66;
  font-size: .85rem;
  line-height: 1.7;
}
.landing-model-explainer { padding: clamp(20px, 4vw, 48px) 0 0; }
.landing-model-header {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(330px, .55fr);
  gap: clamp(36px, 8vw, 120px);
  align-items: end;
  padding-bottom: clamp(38px, 5vw, 64px);
}
.landing-model-header div > p,
.landing-model-card-heading > span,
.landing-model-limits > p {
  display: block;
  margin: 0 0 15px;
  color: #6b4e7b;
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.landing-model-header h3 {
  max-width: 760px;
  margin: 0;
  color: #1c191e;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 3.7vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -.052em;
  line-height: .94;
}
.landing-model-header > p {
  max-width: 550px;
  margin: 0;
  color: #625d66;
  font-size: .92rem;
  line-height: 1.75;
}
.landing-model-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #c8c4cb;
}
.landing-model-card { min-width: 0; padding: clamp(30px, 4vw, 58px); }
.landing-model-card + .landing-model-card { border-left: 1px solid #c8c4cb; }
.landing-model-card-workout { background: #f7f6f4; }
.landing-model-card-recovery { background: #e5e2e6; }
.landing-model-card-heading > span { color: #6b4e7b; }
.landing-model-card-heading h4 {
  max-width: 620px;
  margin: 0;
  color: #211e23;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.7vw, 3rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}
.landing-model-card-heading > p {
  max-width: 650px;
  margin: 23px 0 0;
  color: #625d66;
  font-size: .86rem;
  line-height: 1.72;
}
.landing-model-details {
  margin-top: 30px;
  border-top: 1px solid #c2bdc4;
  border-bottom: 1px solid #c2bdc4;
}
.landing-model-details > summary,
.landing-model-limits > summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 20px;
  align-items: center;
  padding: 18px 42px 18px 0;
  list-style: none;
  cursor: pointer;
}
.landing-model-details > summary::-webkit-details-marker,
.landing-model-limits > summary::-webkit-details-marker { display: none; }
.landing-model-details > summary::after,
.landing-model-limits > summary::after {
  position: absolute;
  top: 50%;
  right: 4px;
  color: #5f4a69;
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  transform: translateY(-50%);
}
.landing-model-details[open] > summary::after,
.landing-model-limits[open] > summary::after { content: "−"; }
.landing-model-details > summary span,
.landing-model-limits > summary span { color: #302b32; font-size: .76rem; font-weight: 700; }
.landing-model-details > summary small,
.landing-model-limits > summary small { color: #746e77; font-size: .64rem; }
.landing-model-details-body { padding: 8px 0 30px; border-top: 1px solid #d0ccd1; }
.landing-model-details-body > p { margin: 22px 0 0; color: #625d66; font-size: .8rem; line-height: 1.7; }
.landing-model-formula {
  margin-top: 34px;
  padding: 24px;
  background: #211e23;
  color: #f4f1f5;
}
.landing-model-formula span {
  display: block;
  margin-bottom: 11px;
  color: #bea8c8;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.landing-model-formula code {
  color: #e7e2e9;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .73rem;
  line-height: 1.75;
  white-space: normal;
}
.landing-model-steps { margin: 30px 0 0; padding: 0; list-style: none; }
.landing-model-steps li {
  display: grid;
  grid-template-columns: minmax(105px, .32fr) minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid #d0ccd1;
}
.landing-model-steps li:last-child { border-bottom: 1px solid #d0ccd1; }
.landing-model-steps strong,
.landing-model-steps small { display: block; }
.landing-model-steps strong { color: #28242a; font-size: .72rem; }
.landing-model-steps small { margin-top: 6px; color: #826d8c; font-size: .58rem; line-height: 1.45; }
.landing-model-steps p { margin: 0; color: #625d66; font-size: .79rem; line-height: 1.7; }
.landing-model-baseline {
  margin-top: 30px;
  padding: 25px;
  border-left: 3px solid #755c81;
  background: #ece7ee;
}
.landing-model-baseline strong { display: block; color: #302b32; font-size: .76rem; line-height: 1.5; }
.landing-model-baseline p { margin: 10px 0 0; color: #625d66; font-size: .78rem; line-height: 1.7; }
.landing-recovery-inputs { margin-top: 34px; }
.landing-recovery-inputs > p {
  margin: 0 0 12px;
  color: #6b4e7b;
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.landing-recovery-inputs ul { margin: 0; padding: 0; list-style: none; }
.landing-recovery-inputs li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid #c2bdc4;
}
.landing-recovery-inputs li:last-child { border-bottom: 1px solid #c2bdc4; }
.landing-recovery-inputs li span { color: #6b4e7b; font-size: .62rem; font-weight: 700; }
.landing-recovery-inputs li strong { color: #514b54; font-size: .74rem; font-weight: 500; line-height: 1.65; }
.landing-safety-gate {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 18px;
  margin-top: 32px;
  padding: 26px;
  background: #211e23;
  color: #f4f1f5;
}
.landing-safety-icon {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid #856d90;
  border-radius: 50%;
  place-items: center;
}
.landing-safety-icon span { position: relative; width: 14px; height: 14px; }
.landing-safety-icon span::before,
.landing-safety-icon span::after { position: absolute; background: #ceb9d7; content: ""; }
.landing-safety-icon span::before { top: 0; left: 6px; width: 2px; height: 14px; }
.landing-safety-icon span::after { top: 6px; left: 0; width: 14px; height: 2px; }
.landing-safety-gate small,
.landing-safety-gate strong { display: block; }
.landing-safety-gate small { color: #bca5c6; font-size: .56rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.landing-safety-gate strong { margin-top: 7px; color: #f4f1f5; font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.5rem; line-height: 1.08; }
.landing-safety-gate p { margin: 12px 0 0; color: #c1bbc4; font-size: .75rem; line-height: 1.68; }
.landing-recovery-guardrails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 30px;
  border-top: 1px solid #c2bdc4;
  border-left: 1px solid #c2bdc4;
}
.landing-recovery-guardrails > div { min-height: 135px; padding: 22px; border-right: 1px solid #c2bdc4; border-bottom: 1px solid #c2bdc4; }
.landing-recovery-guardrails strong,
.landing-recovery-guardrails span { display: block; }
.landing-recovery-guardrails strong { color: #302b32; font-size: .7rem; }
.landing-recovery-guardrails span { margin-top: 8px; color: #6a646d; font-size: .7rem; line-height: 1.55; }
.landing-model-limits {
  display: block;
  padding: 0 clamp(28px, 4vw, 54px);
  border-right: 1px solid #c8c4cb;
  border-bottom: 1px solid #c8c4cb;
  border-left: 1px solid #c8c4cb;
  background: #efefed;
}
.landing-model-limits > summary { padding-top: 24px; padding-bottom: 24px; }
.landing-model-limits ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 38px;
  margin: 0;
  padding: 28px 0 34px;
  border-top: 1px solid #c8c4cb;
  list-style: none;
}
.landing-model-limits li {
  position: relative;
  padding-left: 16px;
  color: #625d66;
  font-size: .76rem;
  line-height: 1.65;
}
.landing-model-limits li::before { position: absolute; top: .65em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #80688b; content: ""; }
.landing-about-note {
  display: grid;
  grid-template-columns: minmax(170px, .45fr) minmax(0, 1.55fr);
  gap: clamp(28px, 6vw, 90px);
  padding: clamp(34px, 4vw, 56px);
  background: #1d1a1f;
  color: #f3f1f4;
}
.landing-about-note > p { color: #c9b4d3; }
.landing-about-note h3 { max-width: 760px; color: #f3f1f4; font-size: clamp(1.7rem, 2.6vw, 2.8rem); }
.landing-about-note div > p {
  max-width: 900px;
  margin: 22px 0 0;
  color: #c4bec7;
  font-size: .88rem;
  line-height: 1.75;
}

@media (max-width: 1180px) {
  .landing-model-columns { grid-template-columns: 1fr; }
  .landing-model-card + .landing-model-card { border-top: 1px solid #c8c4cb; border-left: 0; }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .landing-about-intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .landing-about-intro > p:last-child { grid-column: 1; grid-row: auto; }
  .landing-about-visual { grid-template-columns: 1fr; min-height: 0; }
  .about-route-stage { min-height: 470px; border-top: 1px solid #464048; border-left: 0; }
  .landing-about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-model-header { grid-template-columns: 1fr; gap: 24px; }
  .landing-model-header > p { max-width: 720px; }
  .landing-model-limits { grid-template-columns: 1fr; gap: 18px; }
}
.landing-source {
  position: absolute;
  right: clamp(20px, 4vw, 64px);
  bottom: clamp(22px, 4vh, 40px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.landing-source span {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
}
.landing-footer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0;
  padding: 18px max(18px, calc((100vw - var(--page-max)) / 2 + 28px));
  border: 0;
  background: #f2f2f0;
  color: #242126;
}
[data-theme="dark"] .landing-footer { background: #141316; color: #f4f2f5; }
.landing-footer > div {
  display: flex;
  align-items: baseline;
  gap: 11px;
}
.landing-footer > div strong {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}
.landing-footer > div span {
  color: #6d6870;
  font-size: .75rem;
}
[data-theme="dark"] .landing-footer > div span { color: #aaa4af; }
.landing-footer nav {
  display: flex;
  flex-direction: row;
  gap: 18px;
}
.landing-footer a {
  color: inherit;
  font-size: .74rem;
  font-weight: 700;
  text-decoration: none;
}
.landing-footer a:hover { color: inherit; text-decoration: underline; }

@media (max-width: 760px) {
  .landing-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 14px;
    min-height: 96px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .landing-wordmark { grid-column: 1 / -1; }
  .landing-header-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .landing-nav {
    justify-content: flex-start;
    gap: 11px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .landing-nav::-webkit-scrollbar { display: none; }
  .landing-nav > a { display: block; padding: 5px 0; font-size: .7rem; }
  .landing-hero { min-height: calc(100svh - 96px); }
  .landing-hero-media { object-position: 61% center; }
  .landing-hero::before {
    background:
      linear-gradient(90deg, rgba(10, 9, 12, .62), rgba(10, 9, 12, .12)),
      linear-gradient(0deg, rgba(10, 9, 12, .88) 0%, rgba(10, 9, 12, .3) 62%, rgba(10, 9, 12, .08));
  }
  .landing-content {
    top: 50%;
    bottom: auto;
    left: 20px;
    width: calc(100% - 40px);
  }
  .landing-content h1 { max-width: 540px; font-size: clamp(2.2rem, 8.2vw, 3.45rem); line-height: .98; }
  .landing-copy { max-width: 500px; margin-top: 16px; }
  .landing-actions { flex-wrap: wrap; margin-top: 22px; }
  .landing-source { right: 20px; bottom: 24px; }
  .landing-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .landing-footer > div { display: grid; gap: 2px; }
  .landing-footer nav { flex-direction: row; gap: 14px; }
  .landing-about { padding: 52px 22px; }
  .landing-about-intro {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-bottom: 42px;
  }
  .landing-about-intro > p:last-child { grid-column: 1; grid-row: auto; }
  .landing-about-visual { grid-template-columns: 1fr; min-height: 0; }
  .landing-about-visual-copy { padding: 42px 28px; }
  .about-route-stage {
    grid-template-rows: auto minmax(190px, 1fr) auto;
    min-height: 390px;
    padding: 26px 20px;
    border-top: 1px solid #464048;
    border-left: 0;
  }
  .about-route-label { padding: 15px 6px 0; }
  .about-route-label span { font-size: .55rem; }
  .landing-about-grid { grid-template-columns: 1fr; }
  .landing-about-grid article { min-height: 0; padding: 32px 26px; }
  .landing-about-grid article h3,
  .landing-about-grid article p { max-width: 620px; }
  .landing-model-header { grid-template-columns: 1fr; gap: 22px; }
  .landing-model-card { padding: 34px 24px; }
  .landing-model-steps li { grid-template-columns: 1fr; gap: 10px; }
  .landing-recovery-inputs li { grid-template-columns: 1fr; gap: 7px; }
  .landing-safety-gate { grid-template-columns: 1fr; }
  .landing-recovery-guardrails { grid-template-columns: 1fr; }
  .landing-recovery-guardrails > div { min-height: 0; }
  .landing-model-limits { grid-template-columns: 1fr; gap: 18px; padding: 30px 24px; }
  .landing-model-limits ul { grid-template-columns: 1fr; }
  .landing-about-note { grid-template-columns: 1fr; gap: 18px; padding: 34px 28px; }
}

@media (max-width: 520px) {
  .landing-hero { min-height: max(560px, calc(100svh - 96px)); }
  .landing-content h1 { font-size: clamp(2.1rem, 10.5vw, 3.1rem); }
  .landing-actions { display: grid; grid-template-columns: 1fr; }
  .landing-actions .compact-login { grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .landing-actions .compact-login button { padding-right: 12px; padding-left: 12px; }
  .ghost-action { width: max-content; }
  .landing-source { font-size: .58rem; }
  .landing-footer nav { flex-wrap: wrap; }
  .about-signal-row { display: grid; grid-template-columns: 1fr 1fr; }
  .about-route-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto minmax(180px, 1fr) auto auto; min-height: 390px; }
  .about-route-label span { display: none; }
  .about-route-label strong { font-size: .64rem; }
}

@media (max-width: 390px) {
  .landing-nav { gap: 9px; }
  .landing-nav > a { font-size: .66rem; }
  .landing-content { top: 50%; bottom: auto; }
  .landing-actions .compact-login { grid-template-columns: 1fr; }
  .landing-actions .compact-login button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero-media,
  .landing-content,
  .about-route-status > span,
  .about-route-line,
  .about-route-ring { animation: none !important; }
  .landing-about-grid article { transform: none !important; }
}

/* Editorial dashboard: the landing page's calm, image-led system carried inside. */
.dashboard-body {
  min-height: 100vh;
  background: #efefed;
  color: var(--text);
}
[data-theme="dark"] .dashboard-body { background: #111013; }
.dashboard-body .app-shell {
  display: block;
  min-height: 100vh;
}
.dashboard-body .sidebar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
  width: 100%;
  min-height: 74px;
  padding: 0 max(20px, calc((100vw - var(--page-max)) / 2 + 28px));
  border: 0;
  border-bottom: 1px solid #d3d1d4;
  background: rgba(250, 250, 249, .97);
  color: #19171b;
  box-shadow: none;
  backdrop-filter: blur(14px);
}
[data-theme="dark"] .dashboard-body .sidebar {
  border-color: #3d3941;
  background: rgba(20, 19, 22, .97);
  color: #f4f2f5;
}
.dashboard-body .dashboard-wordmark {
  display: inline-block;
  color: inherit;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.35vw, 2.2rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1;
  white-space: nowrap;
}
.dashboard-body .sidebar-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: clamp(6px, 1.2vw, 18px);
  min-width: 0;
  margin: 0;
}
.dashboard-body .sidebar-nav > a,
.dashboard-body .sidebar-more > summary {
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: .73rem;
  font-weight: 600;
  white-space: nowrap;
}
.dashboard-body .sidebar-nav > a:hover,
.dashboard-body .sidebar-nav > a:focus-visible,
.dashboard-body .sidebar-more > summary:hover,
.dashboard-body .sidebar-more[open] > summary {
  border-color: currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
}
.dashboard-body .sidebar-more {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
}
.dashboard-body .sidebar-more > summary { gap: 6px; }
.dashboard-body .sidebar-more > summary span {
  color: inherit;
  font-size: .9rem;
}
.dashboard-body .sidebar-more > div {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  display: grid;
  width: 220px;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  box-shadow: 0 18px 50px rgba(17, 15, 19, .16);
}
.dashboard-body .sidebar-more:not([open]) > div { display: none; }
.dashboard-body .sidebar-more[open] > div { display: grid; }
.dashboard-body .sidebar-more > div a {
  padding: 9px 10px;
  border-radius: 2px;
  color: var(--text);
  font-size: .76rem;
}
.dashboard-body .sidebar-more > div a:hover { background: var(--surface-soft); }
.dashboard-body .connections {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}
.dashboard-body .conn-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #4f4a52;
  font-size: .62rem;
  white-space: nowrap;
}
[data-theme="dark"] .dashboard-body .conn-line { color: #bbb5bf; }
.dashboard-body .conn-line::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #6e527e;
  content: "";
}
.dashboard-body .conn-line.conn-off::before { background: #9d979f; }
.dashboard-body .sidebar-footer {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0;
}
.dashboard-body .sidebar-footer a {
  color: inherit;
  font-size: .7rem;
  font-weight: 600;
}
.dashboard-body .sidebar-footer a:hover { color: inherit; text-decoration: underline; }
.dashboard-body .sidebar .theme-icon-button {
  width: 35px;
  height: 35px;
  border: 1px solid #aaa6ac;
  background: transparent;
  color: inherit;
}
.dashboard-body .main {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: 0 28px 84px;
}
.dashboard-body .dashboard-toolbar {
  position: static;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  margin: 0 0 26px;
  padding: 28px 0 24px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.dashboard-body .toolbar-title small {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.dashboard-body .toolbar-title strong {
  color: var(--text);
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1;
}
.dashboard-body .toolbar-title span {
  margin-top: 7px;
  color: var(--muted);
  font-size: .78rem;
}
.dashboard-body .quick-nav,
.dashboard-body .view-controls {
  display: flex;
  gap: 5px;
  padding: 0;
  border: 0;
}
.dashboard-body .dashboard-view-menu { position: relative; margin: 0; }
.dashboard-body .dashboard-view-menu > summary {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  font-size: .69rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.dashboard-body .dashboard-view-menu > summary::-webkit-details-marker { display: none; }
.dashboard-body .dashboard-view-menu > summary::after { margin-left: 8px; content: "+"; font-size: .85rem; }
.dashboard-body .dashboard-view-menu[open] > summary::after { content: "−"; }
.dashboard-body .dashboard-view-menu > .view-controls {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 168px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  box-shadow: 0 14px 34px rgba(25, 22, 28, .12);
}
.dashboard-body .dashboard-view-menu:not([open]) > .view-controls { display: none; }
.dashboard-body .quick-nav a,
.dashboard-body .view-controls button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  font-size: .69rem;
  font-weight: 700;
  text-decoration: none;
}
.dashboard-body .quick-nav a { display: inline-flex; align-items: center; }
.dashboard-body .quick-nav a:hover,
.dashboard-body .view-controls button:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--surface);
}
.dashboard-body .daily-stack { display: grid; gap: 20px; margin-bottom: 20px; }
.dashboard-body .daily-stack,
.dashboard-body .readiness-card,
.dashboard-body .card[id],
.dashboard-body .about-panel[id] { scroll-margin-top: 128px; }
.dashboard-body .sample-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}
.dashboard-body .sample-banner strong {
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.dashboard-body .sample-banner span { color: var(--muted); font-size: .74rem; }
.dashboard-body .daily-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .55fr);
  align-items: stretch;
  gap: 20px;
}
.dashboard-body .card,
.dashboard-body .today-card,
.dashboard-body .readiness-card,
.dashboard-body .metric-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}
.dashboard-body .card {
  margin: 0;
  padding: clamp(24px, 3vw, 38px);
}
.dashboard-body .main > .card { margin-bottom: 20px; }
.dashboard-body .daily-stack .card { margin: 0; }
.dashboard-body .today-card {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
}
.dashboard-body .today-card-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(28px, 4vw, 52px);
}
.dashboard-body .section-kicker {
  color: #684d78;
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
[data-theme="dark"] .dashboard-body .section-kicker { color: #bca5ca; }
.dashboard-body .section-heading h1,
.dashboard-body .section-heading h2,
.dashboard-body .card h2 {
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -.025em;
}
.dashboard-body .today-card h1 {
  max-width: 620px;
  color: var(--text);
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 4.7vw, 4.65rem);
  font-weight: 600;
  line-height: .93;
  letter-spacing: -.055em;
}
.dashboard-body .today-card .status-pill {
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
}
.dashboard-body .today-prescription {
  display: grid;
  grid-template-columns: .8fr .8fr 1.4fr;
  gap: 0;
  margin: 28px 0 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.dashboard-body .today-card .today-prescription div {
  padding: 14px 14px 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.dashboard-body .today-card .today-prescription div + div {
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.dashboard-body .today-prescription small,
.dashboard-body .load-comparison small,
.dashboard-body .summary-strip span,
.dashboard-body .metric-card span {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.dashboard-body .today-prescription strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: .95rem;
}
.dashboard-body .today-purpose {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
}
.dashboard-body .today-card .why-details,
.dashboard-body .readiness-card .why-details { border-color: var(--border); }
.dashboard-body .today-card .why-details summary,
.dashboard-body .readiness-card .why-details summary { color: var(--text); }
.dashboard-body .session-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.dashboard-body .today-card .session-notes p {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
}
.dashboard-body .today-card .session-notes b { color: var(--text); }
.dashboard-body .today-status-form {
  gap: 9px;
  margin: 26px -14px -14px;
  padding: 14px;
  border-top: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface-soft);
}
.dashboard-body .today-card input,
.dashboard-body .today-card select,
.dashboard-body input,
.dashboard-body select,
.dashboard-body textarea {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface-raised);
  color: var(--text);
}
.dashboard-body .today-card .today-status-form button,
.dashboard-body .primary-button,
.dashboard-body .mini-form button,
.dashboard-body .shoe-form button,
.dashboard-body .adherence-form button {
  border: 1px solid var(--text);
  border-radius: 2px;
  background: var(--text);
  color: var(--surface);
}
.dashboard-body .today-card .today-status-form button:hover,
.dashboard-body .primary-button:hover,
.dashboard-body .mini-form button:hover,
.dashboard-body .shoe-form button:hover,
.dashboard-body .adherence-form button:hover {
  border-color: #634773;
  background: #634773;
  color: #fff;
}
.dashboard-body .readiness-card {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 3vw, 38px);
  border-color: var(--border);
  border-top: 3px solid #684d78;
  background: var(--surface);
  color: var(--text);
}
.dashboard-body .readiness-card h2,
.dashboard-body .readiness-card .section-kicker,
.dashboard-body .readiness-card .why-details summary { color: var(--text); }
.dashboard-body .readiness-card .section-kicker { color: #684d78; }
[data-theme="dark"] .dashboard-body .readiness-card .section-kicker { color: #bca5ca; }
.dashboard-body .readiness-card .supporting-copy,
.dashboard-body .readiness-card .load-change,
.dashboard-body .readiness-card .missing-data,
.dashboard-body .readiness-card .why-details ul { color: var(--muted); }
.dashboard-body .readiness-card .load-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 26px 0 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.dashboard-body .readiness-card .load-comparison div {
  padding: 14px 10px 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.dashboard-body .readiness-card .load-comparison div + div {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.dashboard-body .readiness-card .load-comparison small { color: var(--muted); }
.dashboard-body .readiness-card .load-bar { height: 5px; background: var(--surface-soft); }
.dashboard-body .readiness-card .load-bar i { background: #684d78; }
.dashboard-body .summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}
.dashboard-body .summary-strip article { padding: 20px 22px; }
.dashboard-body .summary-strip article + article { border-color: var(--border); }
.dashboard-body .summary-strip span,
.dashboard-body .summary-strip small { color: var(--muted); }
.dashboard-body .summary-strip strong {
  margin: 7px 0 3px;
  color: var(--text);
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.42rem;
  font-weight: 600;
}
.dashboard-body .readiness-recovery-link {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  color: var(--text);
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
}
.dashboard-body .readiness-recovery-link:hover { border-color: #684d78; background: #eee9f0; }
.dashboard-body .dashboard-secondary-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr);
  gap: 30px;
  align-items: end;
  margin-top: 26px;
  padding: 34px 0 18px;
  border-top: 1px solid var(--border);
}
.dashboard-body .dashboard-secondary-heading h2 {
  margin: 0;
  color: var(--text);
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}
.dashboard-body .dashboard-secondary-heading > p { max-width: 500px; margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.65; }
.dashboard-body .workout-insights > .columns { margin-top: 22px; }
.dashboard-body .compact-run-panel,
.dashboard-body .chart-card { padding: clamp(22px, 3vw, 34px); }
.dashboard-body .panel-tools input,
.dashboard-body .panel-toggle {
  min-height: 38px;
  border-radius: 2px;
}
.dashboard-body .analysis-links a,
.dashboard-body .feedback-entry,
.dashboard-body .record-list > div,
.dashboard-body .trend-list > div,
.dashboard-body .shoe-list article {
  border-color: var(--border);
  border-radius: 2px;
  background: transparent;
}
.dashboard-body .analysis-links a:hover { background: var(--surface-soft); }
.dashboard-body .companion-grid { gap: 20px; }
.dashboard-body .goal-card,
.dashboard-body .records-card,
.dashboard-body .metric-card:nth-child(1),
.dashboard-body .metric-card:nth-child(2),
.dashboard-body .metric-card:nth-child(3) {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}
.dashboard-body .goal-card .section-kicker,
.dashboard-body .goal-card .caption,
.dashboard-body .goal-card .empty,
.dashboard-body .goal-card ul,
.dashboard-body .records-card .section-kicker,
.dashboard-body .records-card .missing-data,
.dashboard-body .records-card .record-list small,
.dashboard-body .metric-card span,
.dashboard-body .metric-card small { color: var(--muted); }
.dashboard-body .goal-card .goal-stats div {
  border-color: var(--border);
  border-radius: 2px;
  background: var(--surface-soft);
}
.dashboard-body .records-card { border-top: 3px solid #684d78; }
.dashboard-body .calendar-nav a {
  border-radius: 2px;
  background: transparent;
}
.dashboard-body table { border-color: var(--border); }
.dashboard-body th {
  color: var(--muted);
  font-size: .61rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.dashboard-body td { border-color: var(--border); }
.dashboard-body tbody tr:hover { background: var(--surface-soft); }
.dashboard-body .calendar td { background: transparent; }
.dashboard-body .metric-card {
  min-height: 138px;
  padding: 20px;
}
.dashboard-body .metric-card strong {
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}
.dashboard-body .recovery-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.dashboard-body .recovery-card > .section-heading {
  padding: clamp(25px, 3vw, 38px);
  background: var(--g-surface);
  color: var(--g-ink);
}
.dashboard-body .recovery-card > .section-heading .safety-label {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--g-purple-dark);
  font-size: .82rem;
  font-weight: 700;
}
.dashboard-body .recovery-card > .recovery-intro {
  max-width: 980px;
  margin: 0;
  padding: 24px clamp(24px, 3vw, 38px) 0;
}
.dashboard-body .recovery-layout { padding: 26px clamp(24px, 3vw, 38px) 38px; }
.dashboard-body .region-list button {
  border-radius: 2px;
  background: var(--surface-soft);
}
.dashboard-body .region-list button.is-selected,
.dashboard-body .region-list button[aria-pressed="true"] {
  border-color: #684d78;
  background: #684d78;
  color: #fff;
}
.dashboard-body .about-panel {
  grid-template-columns: .72fr 1fr .95fr;
  gap: clamp(24px, 3vw, 46px);
  align-items: center;
  margin: clamp(18px, 3vw, 34px) 0 0;
  padding: clamp(28px, 4vw, 52px);
  border: 0;
  border-radius: 4px;
  background: #1b191d;
  color: #f4f2f5;
  box-shadow: none;
}
.dashboard-body .about-panel h2 { color: #f4f2f5; }
.dashboard-body .about-panel .section-kicker,
.dashboard-body .about-links a { color: #c7b1d3; }
.dashboard-body .about-panel p { color: #bcb7c0; }
.dashboard-body .about-nature { border-radius: 2px; }

@media (max-width: 1180px) {
  .dashboard-body .sidebar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px 24px;
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .dashboard-body .sidebar-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .dashboard-body .sidebar-nav::-webkit-scrollbar { display: none; }
  .dashboard-body .sidebar-more > div {
    position: fixed;
    top: 112px;
    right: 20px;
    left: auto;
    max-height: min(520px, calc(100svh - 132px));
    overflow-y: auto;
  }
  .dashboard-body .connections { justify-self: end; }
  .dashboard-body .sidebar-footer { justify-self: end; }
  .dashboard-body .main { width: 100%; }
  .dashboard-body .dashboard-toolbar { grid-template-columns: 1fr auto auto; }
  .dashboard-body .daily-grid { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); }
  .dashboard-body .today-card { display: block; }
}

@media (max-width: 900px) {
  .dashboard-body .dashboard-toolbar { grid-template-columns: 1fr; gap: 14px; }
  .dashboard-body .quick-nav,
  .dashboard-body .dashboard-view-menu { grid-row: auto; grid-column: 1; justify-self: start; }
  .dashboard-body .daily-grid { grid-template-columns: 1fr; }
  .dashboard-body .readiness-card { min-height: 0; }
  .dashboard-body .today-card { display: block; }
  .dashboard-body .recovery-layout,
  .dashboard-body .companion-grid,
  .dashboard-body .about-panel { grid-template-columns: 1fr; }
  .dashboard-body .about-nature { min-height: 300px; }
  .dashboard-body .dashboard-secondary-heading { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 700px) {
  .dashboard-body .sidebar {
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
    background: rgba(250, 250, 249, .98);
  }
  [data-theme="dark"] .dashboard-body .sidebar { background: rgba(20, 19, 22, .98); }
  .dashboard-body .connections {
    grid-row: 2;
    grid-column: 1;
    justify-self: start;
  }
  .dashboard-body .sidebar-footer { grid-row: 1; grid-column: 2; }
  .dashboard-body .sidebar-nav {
    grid-row: 3;
    grid-column: 1 / -1;
    margin: 0;
  }
  .dashboard-body .sidebar-more > div { top: 132px; right: 14px; left: 14px; width: auto; }
  .dashboard-body .main { padding: 0 14px 56px; }
  .dashboard-body .dashboard-toolbar { padding: 22px 0 18px; }
  .dashboard-body .toolbar-title strong { font-size: 2rem; }
  .dashboard-body .quick-nav,
  .dashboard-body .view-controls { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .dashboard-body .view-controls { grid-template-columns: repeat(2, 1fr); }
  .dashboard-body .quick-nav a,
  .dashboard-body .view-controls button { justify-content: center; text-align: center; }
  .dashboard-body .today-card { grid-template-columns: 1fr; min-height: 0; }
  .dashboard-body .today-card-main { padding: 28px 20px; }
  .dashboard-body .today-prescription { grid-template-columns: 1fr; }
  .dashboard-body .today-card .today-prescription div,
  .dashboard-body .today-card .today-prescription div + div {
    padding: 11px 0;
    border: 0;
    border-top: 1px solid var(--border);
  }
  .dashboard-body .today-card .today-prescription div:first-child { border-top: 0; }
  .dashboard-body .session-notes { grid-template-columns: 1fr; }
  .dashboard-body .today-status-form { display: grid; grid-template-columns: 1fr; margin-right: 0; margin-left: 0; }
  .dashboard-body .summary-strip { grid-template-columns: 1fr; }
  .dashboard-body .summary-strip article + article { border-top: 1px solid var(--border); border-left: 0; }
  .dashboard-body .card { padding: 24px 20px; }
  .dashboard-body .recovery-card { padding: 0; }
  .dashboard-body .recovery-card > .section-heading { align-items: flex-start; }
  .dashboard-body .about-panel { padding: 28px 22px; }
}

@media (max-width: 440px) {
  .dashboard-body .connections { gap: 7px; }
  .dashboard-body .conn-line { font-size: .56rem; }
  .dashboard-body .sidebar-footer a { display: inline-flex; font-size: .64rem; }
  .dashboard-body .today-card h1 { font-size: 2.65rem; }
}

/* Gaman editorial system — one active layer shared by landing and product areas. */
:root {
  --g-bg: #f4f3f1;
  --g-surface: #ffffff;
  --g-surface-muted: #ebe9e7;
  --g-ink: #17151a;
  --g-muted: #66616b;
  --g-line: #d9d5dc;
  --g-purple: #5b3f72;
  --g-purple-dark: #392648;
  --g-purple-soft: #eee8f2;
  --g-danger: #a52b32;
  --g-radius: 14px;
  --g-shadow: 0 12px 30px rgba(28, 22, 32, .07);
  --g-container: 1240px;
  --g-speed: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--g-bg); color: var(--g-ink); font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(91, 63, 114, .42); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 10px 14px; transform: translateY(-150%); background: var(--g-ink); color: #fff; text-decoration: none; }
.skip-link:focus { transform: none; }
.section-kicker { margin: 0 0 10px; color: var(--g-purple); font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: .69rem; font-weight: 700; letter-spacing: .12em; line-height: 1.3; text-transform: uppercase; }

/* Landing */
.landing-body { background: var(--g-bg); color: var(--g-ink); }
.landing-header { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 clamp(22px, 4vw, 64px); border-bottom: 1px solid var(--g-line); background: rgba(255,255,255,.96); }
.landing-wordmark { color: var(--g-ink); font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 400; letter-spacing: -.01em; text-decoration: none; }
.landing-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 38px); }
.landing-nav a { padding: 8px 0; color: var(--g-ink); font-size: .76rem; font-weight: 700; text-decoration: none; }
.landing-nav a:hover { color: var(--g-purple); }
.landing-shell { width: 100%; max-width: none; margin: 0; }
.landing-hero { position: relative; min-height: calc(100svh - 72px); overflow: hidden; background: #28252a; isolation: isolate; }
.landing-hero-media { position: absolute; z-index: -3; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 49%; pointer-events: none; filter: saturate(.82) contrast(1.01) brightness(.98); }
.landing-hero::before { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(12,10,14,.61) 0%, rgba(12,10,14,.26) 43%, transparent 72%), linear-gradient(0deg, rgba(12,10,14,.35), transparent 50%); content: ""; }
.landing-content { position: absolute; top: 50%; left: clamp(24px, 7vw, 112px); width: min(680px, calc(100% - 48px)); transform: translateY(-45%); color: #fff; }
.landing-content h1 { max-width: none; margin: 0 0 18px; color: #fff; font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-size: clamp(3.2rem, 6.8vw, 6.8rem); font-weight: 400; letter-spacing: -.008em; line-height: .94; }
.landing-copy { margin: 0 0 28px; color: rgba(255,255,255,.9); font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.55; }
.landing-open-dashboard { min-height: 46px; padding: 0 22px; border: 1px solid #fff; border-radius: 4px; background: #fff; color: var(--g-ink); font-size: .78rem; font-weight: 700; cursor: pointer; transition: background var(--g-speed), color var(--g-speed); }
.landing-open-dashboard:hover { background: transparent; color: #fff; }
.landing-benefits, .landing-how-preview, .landing-safety, .landing-about { width: min(var(--g-container), calc(100% - 48px)); margin: 0 auto; }
.landing-benefits { padding: 112px 0 96px; }
.landing-benefits h2, .landing-how-preview h2, .landing-safety h2, .landing-about h2, .method-page h1, .method-page h2 { font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.01em; }
.landing-benefits-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.landing-benefits-copy h2 { max-width: 18ch; margin: 14px 0 20px; font-size: clamp(2rem, 3.6vw, 3.3rem); line-height: 1.08; }
.landing-benefits-copy > p:not(.section-kicker) { max-width: 46ch; color: var(--g-muted); font-size: 1.02rem; line-height: 1.7; }
.landing-preview-card { padding: clamp(24px, 3vw, 34px); border: 1px solid var(--g-line); border-radius: var(--g-radius); background: var(--g-surface); box-shadow: var(--g-shadow); }
.landing-preview-card h3 { margin: 0; font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.5rem; letter-spacing: -.005em; }
.landing-preview-card .section-kicker { margin: 0 0 4px; }
.landing-preview-card .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.landing-preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0 20px; padding-top: 20px; border-top: 1px solid var(--g-line); }
.landing-preview-stats small { display: block; margin-bottom: 4px; color: var(--g-muted); font-size: .68rem; }
.landing-preview-stats strong { font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 1.05rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.landing-preview-note { margin: 0; color: var(--g-muted); font-size: .85rem; line-height: 1.6; }
.landing-how-preview { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 9vw, 130px); padding: 100px clamp(28px, 5vw, 72px); border-radius: var(--g-radius); background: var(--g-ink); color: #fff; }
.landing-how-preview h2 { margin: 0 0 24px; font-size: clamp(2.3rem, 4vw, 4.3rem); line-height: .98; }
.landing-how-preview > div > p:not(.section-kicker) { color: rgba(255,255,255,.68); line-height: 1.7; }
.editorial-link { display: inline-flex; margin-top: 18px; padding-bottom: 5px; border-bottom: 1px solid currentColor; color: #fff; font-size: .78rem; font-weight: 700; text-decoration: none; }
.method-track { margin: 0; padding: 0; list-style: none; }
.method-track li { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.method-track b { color: #ac95bc; font-size: .7rem; }.method-track span { font-size: 1rem; font-weight: 700; }.method-track small { color: rgba(255,255,255,.55); }
.landing-safety { display: grid; grid-template-columns: .35fr 1fr 1fr; gap: 50px; padding: 110px 0; border-bottom: 1px solid var(--g-line); }
.landing-safety h2 { margin: 0; font-size: clamp(2rem, 3.5vw, 3.5rem); line-height: 1.02; }.landing-safety > p:last-child { margin: 0; color: var(--g-muted); line-height: 1.8; }
.landing-about { display: grid; grid-template-columns: 1fr .85fr; gap: clamp(50px, 8vw, 110px); padding: 110px 0; }
.landing-about-intro { display: block; padding-bottom: 0; }
.landing-about-intro h2 { grid-row: auto; max-width: none; margin: 0 0 28px; font-size: clamp(2.4rem, 4vw, 4.2rem); line-height: 1; }
.landing-about-intro > p:not(.section-kicker) { grid-column: auto; grid-row: auto; max-width: 64ch; margin: 0 0 16px; color: var(--g-muted); font-size: 1rem; line-height: 1.75; }
.landing-about-intro > p:last-child { margin-bottom: 0; }
.landing-about-photo { position: relative; min-height: 520px; margin: 0; overflow: hidden; border-radius: var(--g-radius); }.landing-about-photo img { width: 100%; height: 100%; object-fit: cover; }.landing-about-photo figcaption { position: absolute; right: 18px; bottom: 18px; padding: 8px 10px; background: rgba(20,17,22,.78); color: #fff; font-size: .72rem; }
.landing-footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 42px clamp(24px, 5vw, 72px); border-top: 1px solid var(--g-line); background: #fff; }.landing-footer p { color: var(--g-muted); font-size: .8rem; }.landing-footer nav, .landing-footer { flex-wrap: wrap; }.landing-footer nav { display: flex; gap: 24px; }.landing-footer a:not(.landing-wordmark) { font-size: .75rem; font-weight: 700; text-decoration: none; }

/* Product shell */
.dashboard-body { min-height: 100vh; background: var(--g-bg); color: var(--g-ink); }
.dashboard-body .app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.dashboard-body .sidebar { position: sticky; top: 0; display: flex; flex-direction: column; width: auto; height: 100vh; padding: 34px 24px 24px; border-right: 1px solid var(--g-line); background: #1a171c; color: #f8f6f9; }
.dashboard-wordmark { margin-bottom: 54px; color: #fff; font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-size: 1.5rem; letter-spacing: -.04em; text-decoration: none; }
.dashboard-body .sidebar-nav { display: grid; gap: 4px; }.dashboard-body .sidebar-nav a { min-height: 42px; padding: 13px 12px; border-radius: 7px; color: rgba(255,255,255,.68); font-size: .75rem; font-weight: 700; text-decoration: none; transition: background var(--g-speed), color var(--g-speed); }.dashboard-body .sidebar-nav a:hover, .dashboard-body .sidebar-nav a.active { background: rgba(255,255,255,.09); color: #fff; }.dashboard-body .sidebar-nav a.active { box-shadow: inset 3px 0 0 #a98cbb; }
.dashboard-body .connections { display: grid; gap: 8px; margin-top: auto; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.12); }.dashboard-body .conn-line { margin: 0; color: rgba(255,255,255,.75); font-size: .66rem; }.dashboard-body .conn-line::before { background: #78a57b; }.dashboard-body .conn-line.conn-off::before { background: #77717a; }
.dashboard-body .sidebar-footer { display: flex; justify-content: space-between; gap: 12px; }.dashboard-body .sidebar-footer a { color: rgba(255,255,255,.58); font-size: .66rem; text-decoration: none; }
.dashboard-body .main { width: min(100%, 1360px); min-width: 0; margin: 0 auto; padding: 48px clamp(28px, 5vw, 72px) 100px; }
.dashboard-page-header { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 38px; padding-bottom: 28px; border-bottom: 1px solid var(--g-line); }.dashboard-page-header h1 { margin: 0 0 8px; font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 5vw, 5.1rem); font-weight: 400; letter-spacing: -.05em; line-height: .92; }.dashboard-page-header > div > p:last-child { margin: 0; color: var(--g-muted); }.sample-label { display: grid; padding: 12px 15px; border-left: 3px solid var(--g-purple); background: var(--g-purple-soft); }.sample-label strong { font-size: .72rem; }.sample-label span { color: var(--g-muted); font-size: .65rem; }
.dashboard-body .daily-stack { display: block; }.dashboard-body .sample-banner { display: none; }
.dashboard-body .daily-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .65fr); gap: 18px; margin-bottom: 18px; }
.dashboard-body .today-card, .dashboard-body .readiness-card, .dashboard-body .card { border: 1px solid var(--g-line); border-radius: var(--g-radius); background: var(--g-surface); box-shadow: none; }
.dashboard-body .today-card { min-height: 0; }.dashboard-body .today-card-main { padding: clamp(28px, 4vw, 48px); }.dashboard-body .today-card h1 { color: var(--g-ink); font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-size: clamp(3rem, 5.2vw, 5.2rem); font-weight: 400; letter-spacing: -.008em; }
.dashboard-body .readiness-card { padding: 30px; background: var(--g-ink); color: #fff; }.dashboard-body .readiness-card h2 { color: #fff; font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; }.dashboard-body .readiness-card .supporting-copy, .dashboard-body .readiness-card small, .dashboard-body .readiness-card .load-change { color: rgba(255,255,255,.65); }
.dashboard-body .readiness-recovery-link { color: #fff; border-color: rgba(255,255,255,.4); }.dashboard-body .readiness-recovery-link:hover, .dashboard-body .readiness-recovery-link:focus-visible { border-color: #fff; background: #fff; color: var(--g-ink); }
.dashboard-body .summary-strip { border: 0; border-radius: var(--g-radius); background: var(--g-purple); color: #fff; box-shadow: none; }.dashboard-body .summary-strip article + article { border-color: rgba(255,255,255,.18); }.dashboard-body .summary-strip span, .dashboard-body .summary-strip small { color: rgba(255,255,255,.68); }.dashboard-body .summary-strip strong { color: #fff; }
.dashboard-body .card { margin-top: 18px; padding: clamp(24px, 3vw, 38px); }.dashboard-body .card h2, .dashboard-body .card h3 { color: var(--g-ink); font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; letter-spacing: -.02em; }.dashboard-body .card h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); }.dashboard-body .section-description, .dashboard-body .compact-summary, .dashboard-body .caption, .dashboard-body .empty { color: var(--g-muted); line-height: 1.6; }
.dashboard-body input, .dashboard-body select, .dashboard-body textarea { min-height: 44px; border: 1px solid var(--g-line); border-radius: 7px; background: #fff; color: var(--g-ink); }.dashboard-body textarea { min-height: 90px; }.dashboard-body button { min-height: 42px; border-radius: 7px; }.dashboard-body .primary-button, .dashboard-body form > button:not(.link-button) { border: 1px solid var(--g-purple); background: var(--g-purple); color: #fff; }.dashboard-body .link-button { background: transparent; }.dashboard-body .danger-link { color: var(--g-danger); }
.dashboard-body .tag, .dashboard-body .status-pill, .dashboard-body .safety-label { border-radius: 5px; }.dashboard-body .body-region.is-selected, .dashboard-body .region-list button.is-selected { fill: var(--g-purple); border-color: var(--g-purple); background: var(--g-purple); color: #fff; }.dashboard-body .mannequin-wrap { background: #f0eeef; }.dashboard-body .recovery-card { padding: clamp(24px, 3vw, 42px); }.dashboard-body .recovery-layout { align-items: start; }
.dashboard-body .chart-wrap { min-height: 340px; overflow: hidden; }.dashboard-body table { font-variant-numeric: tabular-nums; }.dashboard-body th { color: var(--g-muted); font-size: .65rem; text-transform: uppercase; }.dashboard-body td { border-color: var(--g-line); }.dashboard-body td a { color: var(--g-purple-dark); font-weight: 700; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.profile-grid .card { margin-top: 0; }.connection-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--g-line); }.connection-row span { display: grid; gap: 4px; }.connection-row small { color: var(--g-muted); }.connection-row b { color: var(--g-purple); font-size: .75rem; }
.mobile-product-nav { display: none; }

/* Method page */
.method-body { background: var(--g-bg); }.method-header { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 clamp(24px, 5vw, 72px); border-bottom: 1px solid var(--g-line); background: #fff; }.method-header > a:last-child { font-size: .75rem; font-weight: 700; text-decoration: none; }.method-page { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 100px 0; }.method-hero { max-width: 900px; margin-bottom: 80px; }.method-hero h1 { margin: 0 0 28px; font-size: clamp(3.2rem, 7vw, 7rem); line-height: .88; }.method-hero > p:last-child { max-width: 64ch; color: var(--g-muted); font-size: 1.05rem; line-height: 1.7; }.method-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--g-line); }.method-grid article { min-height: 300px; padding: 38px; border-right: 1px solid var(--g-line); border-bottom: 1px solid var(--g-line); }.method-grid article:nth-child(even) { border-right: 0; }.method-grid span { color: var(--g-purple); font-size: .7rem; font-weight: 700; text-transform: uppercase; }.method-grid h2 { margin: 70px 0 16px; font-size: 2rem; }.method-grid p, .method-safety p { color: var(--g-muted); line-height: 1.7; }.method-safety { display: grid; grid-template-columns: .75fr 1fr; gap: 70px; margin: 90px 0; padding: 48px; border-radius: var(--g-radius); background: var(--g-ink); color: #fff; }.method-safety h2 { margin: 0; color: #fff; font-size: 2.4rem; }.method-safety p { color: rgba(255,255,255,.7); }.method-limits { padding-top: 50px; border-top: 1px solid var(--g-line); }.method-limits ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; color: var(--g-muted); line-height: 1.5; }

@media (max-width: 900px) {
  .landing-benefits-layout, .landing-how-preview, .landing-safety, .landing-about, .method-safety { grid-template-columns: 1fr; }
  .landing-benefits-copy h2 { max-width: none; }
  .landing-about-photo { min-height: 420px; }
  .dashboard-body .app-shell { display: block; }.dashboard-body .sidebar { position: static; display: flex; flex-direction: row; align-items: center; width: 100%; height: auto; padding: 18px 24px; }.dashboard-wordmark { margin: 0; }.dashboard-body .sidebar-nav, .dashboard-body .connections { display: none; }.dashboard-body .sidebar-footer { margin-left: auto; }.dashboard-body .sidebar-footer a:first-child { display: none; }
  .dashboard-body .main { padding: 34px 24px 110px; }.dashboard-body .daily-grid { grid-template-columns: 1fr; }.profile-grid { grid-template-columns: 1fr; }
  .mobile-product-nav { position: fixed; z-index: 100; right: 12px; bottom: 12px; left: 12px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(26,23,28,.96); box-shadow: 0 12px 34px rgba(0,0,0,.22); backdrop-filter: blur(12px); }.mobile-product-nav a { min-width: 0; padding: 10px 3px; border-radius: 7px; color: rgba(255,255,255,.62); font-size: .62rem; font-weight: 700; text-align: center; text-decoration: none; }.mobile-product-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
}

@media (max-width: 640px) {
  .landing-header { min-height: 64px; }.landing-nav { gap: 14px; }.landing-nav a:nth-child(2), .landing-nav a:nth-child(3) { display: none; }.landing-hero { min-height: calc(100svh - 64px); }.landing-hero-media { object-position: 58% center; }.landing-content { left: 22px; width: calc(100% - 44px); }.landing-content h1 { font-size: clamp(3.1rem, 17vw, 5rem); }.landing-benefits, .landing-how-preview, .landing-safety, .landing-about { width: min(100% - 36px, var(--g-container)); }.landing-benefits { padding: 76px 0; }.landing-how-preview { padding: 54px 24px; }.method-track li { grid-template-columns: 34px 1fr; }.method-track small { grid-column: 2; }.landing-safety, .landing-about { padding: 76px 0; }.landing-footer { align-items: flex-start; flex-direction: column; }
  .dashboard-page-header { align-items: flex-start; flex-direction: column; }.dashboard-page-header h1 { font-size: 3.25rem; }.dashboard-body .main { padding-right: 16px; padding-left: 16px; }.dashboard-body .today-card-main, .dashboard-body .card, .dashboard-body .recovery-card { padding: 24px 18px; }.dashboard-body .today-prescription, .dashboard-body .columns, .dashboard-body .recovery-layout { grid-template-columns: 1fr; }.dashboard-body .summary-strip { grid-template-columns: 1fr; }.dashboard-body .summary-strip article + article { border-top: 1px solid rgba(255,255,255,.18); border-left: 0; }.dashboard-body .race-form, .dashboard-body .feedback-form, .dashboard-body .shoe-form { grid-template-columns: 1fr; }.dashboard-body .table-wrap { margin-right: -18px; margin-left: -18px; padding-left: 18px; }.dashboard-body .mannequin-wrap { min-height: 360px; }.mobile-product-nav a { font-size: .57rem; }
  .method-page { width: calc(100% - 36px); padding: 70px 0; }.method-grid { grid-template-columns: 1fr; }.method-grid article { min-height: 0; padding: 32px 0; border-right: 0; }.method-grid h2 { margin-top: 40px; }.method-safety { gap: 24px; padding: 30px 24px; }.method-limits ul { grid-template-columns: 1fr; }
}

/* Ask Gaman — compact floating chat assistant (dashboard only) */
.ask-launcher {
  position: fixed;
  right: clamp(16px, 3vw, 26px);
  bottom: clamp(16px, 3vw, 26px);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--g-purple-dark);
  border-radius: 50%;
  background: var(--g-purple);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(28, 22, 32, .22);
  transition: transform var(--g-speed), background var(--g-speed);
}
.ask-launcher:hover { background: var(--g-purple-dark); transform: translateY(-1px); }
.ask-launcher-mark { font-size: 1.35rem; line-height: 1; }
/* A small floating card anchored above the launcher — not a full-height drawer. */
.ask-panel {
  position: fixed;
  inset: auto;
  right: clamp(16px, 3vw, 26px);
  bottom: calc(clamp(16px, 3vw, 26px) + 56px);
  width: min(376px, calc(100vw - 32px));
  height: min(560px, calc(100dvh - 96px));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--g-line);
  border-radius: 16px;
  background: var(--g-surface);
  color: var(--g-ink);
  box-shadow: 0 20px 55px rgba(20, 17, 22, .3);
}
.ask-panel::backdrop { background: transparent; }
.ask-panel[open] { display: flex; flex-direction: column; }
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--g-line); }
.ask-head .section-kicker { margin: 0 0 1px; font-size: .6rem; }
.ask-head h2 { margin: 0; font-family: "Instrument Serif", Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.2rem; letter-spacing: 0; line-height: 1.05; }
.ask-close { position: relative; width: 30px; height: 30px; flex: none; border: 1px solid var(--g-line); border-radius: 8px; background: transparent; cursor: pointer; }
.ask-close::before, .ask-close::after { position: absolute; top: 50%; left: 50%; width: 12px; height: 1.5px; background: var(--g-ink); content: ""; }
.ask-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.ask-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.ask-close:hover { border-color: var(--g-ink); }
.ask-disclaimer { margin: 0; padding: 8px 15px; border-bottom: 1px solid var(--g-line); color: var(--g-muted); font-size: .66rem; line-height: 1.45; }
.ask-log { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 14px 15px; overflow-y: auto; }
.ask-msg { display: flex; }
.ask-user { justify-content: flex-end; }
.ask-bot { justify-content: flex-start; }
.ask-bubble { max-width: 88%; padding: 9px 12px; border-radius: 13px; font-size: .85rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-user .ask-bubble { border-bottom-right-radius: 4px; background: var(--g-purple); color: #fff; }
.ask-bot .ask-bubble { border-bottom-left-radius: 4px; border: 1px solid var(--g-line); background: var(--g-bg); color: var(--g-ink); white-space: normal; }
.ask-bot .ask-bubble p { margin: 0 0 6px; }
.ask-bot .ask-bubble p:last-child { margin-bottom: 0; }
.ask-bot .ask-bubble ul { margin: 6px 0; padding-left: 16px; }
.ask-bot .ask-bubble ul:last-child { margin-bottom: 0; }
.ask-bot .ask-bubble li { margin: 2px 0; }
.ask-bot .ask-bubble strong { font-weight: 700; }
.ask-typing .ask-bubble { color: var(--g-muted); letter-spacing: .15em; animation: ask-pulse 1.1s ease-in-out infinite; }
@keyframes ask-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.ask-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 1px; }
.ask-chip { padding: 6px 11px; border: 1px solid var(--g-line); border-radius: 999px; background: var(--g-surface); color: var(--g-purple-dark); font-size: .72rem; font-weight: 700; cursor: pointer; transition: background var(--g-speed), border-color var(--g-speed); }
.ask-chip:hover { border-color: var(--g-purple); background: var(--g-purple-soft); }
.ask-form { display: flex; align-items: flex-end; gap: 8px; padding: 11px 15px 13px; border-top: 1px solid var(--g-line); }
.ask-form textarea { flex: 1; min-height: 40px; max-height: 110px; padding: 9px 12px; border: 1px solid var(--g-line); border-radius: 10px; background: #fff; color: var(--g-ink); font: inherit; font-size: .85rem; line-height: 1.45; resize: none; }
.ask-form textarea:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.ask-send { min-height: 40px; padding: 0 15px; border: 1px solid var(--g-purple-dark); border-radius: 10px; background: var(--g-purple); color: #fff; font-size: .8rem; font-weight: 700; cursor: pointer; transition: background var(--g-speed); }
.ask-send:hover { background: var(--g-purple-dark); }
.ask-form.is-busy .ask-send { opacity: .55; pointer-events: none; }
@media (max-width: 900px) {
  .ask-launcher { bottom: 86px; }
  .ask-panel { bottom: calc(86px + 56px); }
}
@media (max-width: 640px) {
  .ask-launcher { right: 14px; bottom: 82px; }
  .ask-panel { right: 12px; left: 12px; width: auto; bottom: 136px; height: min(62dvh, 500px); max-height: calc(100dvh - 150px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
