/* =========================================================================
   ADAPT ATHLETICS — design system
   Warm paper ground, deep navy ink, single red accent.
   Intensity uses one ordered cool -> warm ramp; never a categorical palette.
   ========================================================================= */

:root {
  /* --- surfaces: warm paper ground, white cards, crisp navy-tinted lines - */
  --bg:            #F7F5EF;
  --bg-elev:       #FFFFFF;
  --surface:       #FFFFFF;
  --surface-2:     #EFECE3;
  --line:          #E2DED2;
  --line-strong:   #C7C2B2;

  /* --- ink: deep navy ---------------------------------------------------- */
  --ink:           #0A1B33;
  --ink-2:         #2B3D5C;
  --ink-3:         #53617C;
  --ink-4:         #8B94A9;

  /* --- navy stage (feature panels) --------------------------------------- */
  --navy:          #14294D;
  --navy-deep:     #0C1B36;
  --navy-ink:      #F4F6FA;
  --navy-ink-2:    #B9C6DE;

  /* --- accent ------------------------------------------------------------ */
  --accent:        #D91F3A;
  --accent-dim:    #B01830;
  --accent-ink:    #FFFFFF;
  --accent-wash:   rgba(217, 31, 58, 0.08);
  --accent-line:   rgba(217, 31, 58, 0.30);

  /* --- intensity ramp (ORDINAL: recovery -> rep; cool navy -> deep red) -- */
  --z-recovery:    #A9B7CF;
  --z-easy:        #7E96BD;
  --z-long:        #5878A2;
  --z-steady:      #6A6F9B;
  --z-tempo:       #935F82;
  --z-threshold:   #B84462;
  --z-cv:          #D91F3A;
  --z-vo2:         #A81430;
  --z-rep:         #7C0E23;

  /* --- semantic (reserved; never reused as series colours) --------------- */
  --ok:            #1E7C53;
  --warn:          #9A6B15;
  --risk:          #D91F3A;
  --crit:          #A81430;

  /* --- type --------------------------------------------------------------- */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* --- geometry ----------------------------------------------------------- */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --pad:  clamp(18px, 4vw, 40px);
  --maxw: 1240px;
}

/* =========================================================================
   Base
   ========================================================================= */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 560; letter-spacing: -0.021em; line-height: 1.12; }
p  { margin: 0 0 1em; }
a  { color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num  { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.narrow { max-width: 760px; }

.eyebrow {
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}
.eyebrow .dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-right: 9px; vertical-align: 1px;
}

.muted { color: var(--ink-3); }
.dim   { color: var(--ink-2); }

hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* =========================================================================
   Header / nav
   ========================================================================= */

.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247, 245, 239, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 28px;
  height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 620; letter-spacing: -0.03em; font-size: 15px;
  white-space: nowrap;
}
.brand .mark {
  width: 27px; height: auto; flex: none;
}
.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink-3); font-size: 13.5px; font-weight: 480;
  transition: color .15s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* account chip — always present, upgrades to the username when signed in */
.nav-account {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2) !important;
  border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 6px 11px;
  box-shadow: 0 2px 0 rgba(20, 41, 77, 0.08);
}
.nav-account:hover { border-color: var(--navy); color: var(--navy) !important; }
.nav-account.is-in { border-color: var(--navy); color: var(--navy) !important; background: var(--bg-elev); }
/* password fields carry a show/hide control so what was typed is never a guess */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 58px; width: 100%; }
.pw-show {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--ink-4); background: transparent;
  border: 1px solid var(--line); border-radius: 4px;
  padding: 4px 7px; cursor: pointer;
}
.pw-show:hover { color: var(--navy); border-color: var(--line-strong); }

.nav-account.is-admin::before {
  content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-right: 7px; vertical-align: 1px;
}

@media (max-width: 720px) {
  .nav a.hide-sm { display: none; }
  .nav { gap: 14px; }
}
@media (max-width: 520px) {
  .brand-name { display: none; }   /* the mark carries the brand on phones */
  .site-head .wrap { gap: 14px; }
}

/* =========================================================================
   Buttons
   ========================================================================= */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit; font-size: 13.5px; font-weight: 520;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-4); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  box-shadow: 0 3px 0 #a31226;
}
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #a31226; }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); border-color: var(--line-strong); background: transparent; }

.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 14.5px; }

/* =========================================================================
   Landing — hero
   ========================================================================= */

.hero {
  position: relative;
  display: flex; align-items: center;
  min-height: clamp(540px, 82vh, 780px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-canvas { position: absolute; inset: 0; }
.hero-canvas svg { width: 100%; height: 100%; display: block; }
.hero-canvas::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 10%, rgba(247, 245, 239, 0.85) 38%, rgba(247, 245, 239, 0) 68%);
  pointer-events: none;
}
.hero .wrap { position: relative; width: 100%; }
.hero-copy { max-width: var(--maxw); }
.hero-copy .lede, .hero-copy h1 { text-shadow: 0 0 24px var(--bg), 0 0 8px var(--bg); }

/* slow drift + pixel shimmer */
@media (prefers-reduced-motion: no-preference) {
  .drift-a { animation: driftA 16s ease-in-out infinite alternate; }
  .drift-b { animation: driftA 11s ease-in-out infinite alternate-reverse; }
  .drift-c { animation: driftB 8s ease-in-out infinite alternate; }
}
@keyframes driftA { from { transform: translateX(0); } to { transform: translateX(-22px); } }
@keyframes driftB { from { transform: translateX(0); } to { transform: translateX(16px); } }

.hero h1 {
  font-size: clamp(38px, 6.4vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.04em;
  font-weight: 570;
  max-width: 14ch;
  margin-bottom: 24px;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.hero .lede {
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 44ch;
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: 12.5px; color: var(--ink-4); margin-top: 18px; }

/* stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat-strip .cell { background: var(--bg); padding: 26px var(--pad); }
.stat-strip .v { font-family: var(--mono); font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.04em; }
.stat-strip .k { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
@media (max-width: 860px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================================
   Sections
   ========================================================================= */

.section { padding: clamp(56px, 9vh, 104px) 0; border-bottom: 1px solid var(--line); }
.section-head { max-width: 68ch; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}
.section-head p { color: var(--ink-2); font-size: 16px; margin: 0 0 14px; }
.section-head p:last-child { margin-bottom: 0; }

/* principle cards */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.principle { background: var(--bg-elev); padding: 30px 28px; }
.principle .idx {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  letter-spacing: .1em; margin-bottom: 16px;
}
.principle h3 { font-size: 17.5px; margin-bottom: 10px; letter-spacing: -0.02em; }
.principle p { color: var(--ink-3); font-size: 14px; margin: 0; line-height: 1.6; }
.principle .cites { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }

.cite-chip {
  font-family: var(--mono); font-size: 10.5px;
  padding: 3px 7px; border-radius: 4px;
  border: 1px solid var(--line-strong); color: var(--ink-3);
  text-decoration: none; transition: color .15s, border-color .15s;
}
.cite-chip:hover { color: var(--accent); border-color: var(--accent-line); }

/* feature rows */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 72px);
  align-items: center; padding: clamp(38px, 6vh, 62px) 0;
  border-bottom: 1px solid var(--line);
}
.feature-row:last-child { border-bottom: 0; }
.feature-row h3 { font-size: clamp(20px, 2.6vw, 27px); letter-spacing: -0.03em; margin-bottom: 14px; }
.feature-row p { color: var(--ink-2); margin-bottom: 0; }
.feature-row ul { margin: 16px 0 0; padding-left: 0; list-style: none; }
.feature-row li {
  color: var(--ink-3); font-size: 14px; padding: 7px 0 7px 20px; position: relative;
  border-top: 1px solid var(--line);
}
.feature-row li::before {
  content: ""; position: absolute; left: 2px; top: 15px;
  width: 5px; height: 5px; border-radius: 1px; background: var(--accent-dim);
}
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; } }

/* =========================================================================
   Panels / cards (shared)
   ========================================================================= */

.panel {
  background: var(--bg-elev);
  border: 1.5px solid var(--navy);
  border-radius: 10px;
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-bottom: 1.5px solid var(--navy);
  background: var(--bg-elev);
}
.panel-head h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy);
}
.panel-head .spacer { margin-left: auto; }
.panel-body { padding: 18px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  padding: 3px 7px; border-radius: 4px;
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line);
  white-space: nowrap;
}
.tag-accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-wash); }
.tag-warn   { color: var(--warn); border-color: rgba(217,164,65,.32); background: rgba(217,164,65,.10); }
.tag-risk   { color: var(--risk); border-color: rgba(228,34,63,.32); background: rgba(228,34,63,.10); }
.tag-crit   { color: var(--crit); border-color: rgba(255,74,94,.32); background: rgba(255,74,94,.10); }
.tag-ok     { color: var(--ok);   border-color: rgba(63,169,122,.32); background: rgba(63,169,122,.10); }

/* =========================================================================
   App layout
   ========================================================================= */

.app-shell {
  display: grid;
  grid-template-columns: 348px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 61px);
  align-items: start;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-elev);
  position: sticky; top: 61px;
  max-height: calc(100vh - 61px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 9px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 3px solid var(--bg-elev); }

.main { min-width: 0; padding: 26px var(--pad) 90px; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* form */
.form-section { border-bottom: 1px solid var(--line); }
.form-section > summary {
  list-style: none; cursor: pointer;
  padding: 13px 18px;
  font-size: 12px; font-weight: 560; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 9px;
  user-select: none;
}
.form-section > summary::-webkit-details-marker { display: none; }
.form-section > summary::after {
  content: "+"; margin-left: auto; font-family: var(--mono); color: var(--ink-4); font-size: 14px;
}
.form-section[open] > summary::after { content: "\2013"; }
.form-section > summary:hover { color: var(--ink); }
.form-section .body { padding: 4px 18px 20px; }

.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; font-weight: 480;
}
.field .hint { font-size: 11.5px; color: var(--ink-4); margin-top: 5px; line-height: 1.45; }

input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  font: inherit; font-size: 13.5px;
  font-family: var(--mono);
  transition: border-color .15s, background .15s;
}
textarea { font-family: var(--sans); resize: vertical; min-height: 72px; }
select { font-family: var(--sans); cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-4) 50%), linear-gradient(135deg, var(--ink-4) 50%, transparent 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-4); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--bg); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.seg { display: flex; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.seg button {
  flex: 1; border: 0; background: transparent; color: var(--ink-3);
  font: inherit; font-size: 12.5px; padding: 6px 4px; border-radius: 4px; cursor: pointer;
  transition: background .15s, color .15s; white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 560; }
.seg button:hover:not([aria-pressed="true"]) { color: var(--ink); }

.check { display: flex; align-items: flex-start; gap: 9px; padding: 5px 0; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.check input { width: 15px; height: 15px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }

.daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.daypick button {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-3);
  border-radius: 5px; padding: 7px 0; font: inherit; font-size: 11px; cursor: pointer;
  font-family: var(--mono); transition: all .13s;
}
.daypick button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.daypick button:hover:not([aria-pressed="true"]) { border-color: var(--ink-4); color: var(--ink); }

.sidebar-actions { padding: 16px 18px 24px; display: grid; gap: 9px; }

/* =========================================================================
   App main content
   ========================================================================= */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; color: var(--ink-3);
  font: inherit; font-size: 13.5px; padding: 11px 15px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 540; }

.tabpanel[hidden] { display: none; }

/* pace grid */
.pace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pace-cell {
  background: var(--bg-elev); padding: 14px 15px 15px;
  border: 1px solid var(--line-strong); border-left: 3px solid var(--zc, var(--line-strong));
  border-radius: 8px;
  box-shadow: 0 2px 0 rgba(20, 41, 77, 0.08);
}
.pace-cell .zname { font-size: 11.5px; color: var(--ink-3); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.pace-cell .pval { font-family: var(--mono); font-size: 20px; letter-spacing: -0.045em; }
.pace-cell .pval small { font-size: 11px; color: var(--ink-4); letter-spacing: 0; margin-left: 3px; }
.pace-cell .palt { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); margin-top: 4px; }
.pace-cell .pdelta { font-family: var(--mono); font-size: 11px; margin-top: 7px; }
.pace-cell .pdelta.slower { color: var(--risk); }
.pace-cell .pdelta.same { color: var(--ink-4); }

/* week table */
.week { margin-bottom: 14px; }
.week-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0;
  border-bottom: 0;
}
.week-head .wk { font-family: var(--mono); font-size: 12.5px; color: var(--accent); letter-spacing: .04em; }
.wk-toggle { background: none; border: 1px dashed transparent; border-radius: 4px; padding: 2px 6px;
  cursor: pointer; transition: border-color .15s, background .15s; }
.wk-toggle:hover { border-color: var(--accent-line); background: var(--accent-wash); }
.week-head .ph { font-size: 13px; font-weight: 540; }
.week-head .meta { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

table.days { width: 100%; border-collapse: collapse; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); overflow: hidden; }
table.days th {
  text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-4); font-weight: 500; padding: 9px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
table.days td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13.5px; }
table.days tr:last-child td { border-bottom: 0; }
table.days tr.off td { color: var(--ink-4); background: rgba(10,27,51,.02); }
table.days tr.quality td { background: rgba(217,31,58,.035); }
td.day-name { width: 74px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
td.day-vol  { width: 92px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.sess { margin-bottom: 9px; }
.sess:last-child { margin-bottom: 0; }
.sess .stitle { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.sess .slabel { font-weight: 540; }
.sess .sdetail { color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
.sess .sdetail .mono { color: var(--ink-2); }
.sess .snote { color: var(--ink-4); font-size: 12px; margin-top: 3px; font-style: italic; }
.zdot { width: 7px; height: 7px; border-radius: 2px; flex: none; display: inline-block; background: var(--zc, var(--line-strong)); }

@media (max-width: 700px) {
  table.days td.day-vol { display: none; }
  table.days th.col-vol { display: none; }
}

/* charts */
.chart-wrap { padding: 4px 4px 0; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 16px 4px; font-size: 12px; color: var(--ink-3); }
.chart-legend .key { display: flex; align-items: center; gap: 6px; }
.chart-legend .swatch { width: 9px; height: 9px; border-radius: 2px; }
.chart-caption { font-size: 12px; color: var(--ink-4); padding: 6px 16px 14px; line-height: 1.5; }

.chart-tip {
  position: fixed; z-index: 200; pointer-events: none;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 9px 11px;
  font-size: 12px; box-shadow: 0 8px 26px rgba(10,27,51,.18);
  opacity: 0; transition: opacity .1s;
}
.chart-tip.on { opacity: 1; }
.chart-tip .t-k { color: var(--ink-3); font-size: 11px; margin-bottom: 3px; }
.chart-tip .t-v { font-family: var(--mono); font-size: 13px; }

/* data table toggle (a11y: never color-alone) */
details.data-table summary {
  cursor: pointer; font-size: 12px; color: var(--ink-4); padding: 8px 16px 14px; list-style: none;
}
details.data-table summary::-webkit-details-marker { display: none; }
details.data-table summary::before { content: "\25B8  "; }
details[open].data-table summary::before { content: "\25BE  "; }
details.data-table summary:hover { color: var(--ink-2); }
table.plain { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.plain th, table.plain td { text-align: left; padding: 7px 16px; border-top: 1px solid var(--line); }
table.plain th { color: var(--ink-4); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
table.plain td { font-family: var(--mono); color: var(--ink-2); }
table.plain td:first-child { font-family: var(--sans); }

/* stack of info blocks */
.stack { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13px; }
.kv dt { color: var(--ink-4); }
.kv dd { margin: 0; font-family: var(--mono); color: var(--ink); }

.list-rows { display: grid; }
.list-row { padding: 13px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; padding-top: 0; }
.list-row .lr-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 4px; }
.list-row .lr-title { font-weight: 540; font-size: 14px; }
.list-row .lr-body { color: var(--ink-3); font-size: 13px; line-height: 1.55; }
.list-row .lr-body strong { color: var(--ink-2); font-weight: 500; }

/* evidence grade */
.grade {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  width: 19px; height: 19px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.grade-A { background: rgba(63,169,122,.16);  color: var(--ok);   border: 1px solid rgba(63,169,122,.35); }
.grade-B { background: rgba(217,31,58,.10);  color: #B01830; border: 1px solid var(--accent-line); }
.grade-C { background: rgba(217,164,65,.12);  color: var(--warn); border: 1px solid rgba(217,164,65,.32); }
.grade-D { background: rgba(228,34,63,.12);  color: var(--risk); border: 1px solid rgba(228,34,63,.32); }

/* callouts */
.callout {
  border: 1px solid var(--line); border-left: 2px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 13px 16px; font-size: 13px; color: var(--ink-2); line-height: 1.6;
}
.callout.warn { border-left-color: var(--warn); }
.callout.risk { border-left-color: var(--risk); }
.callout strong { color: var(--ink); font-weight: 560; }

.empty {
  text-align: center; padding: 90px 20px; color: var(--ink-4);
  border: 1px dashed var(--line-strong); border-radius: var(--r);
}
.empty h3 { color: var(--ink-2); font-size: 17px; margin-bottom: 10px; }
.empty p { max-width: 44ch; margin: 0 auto; font-size: 13.5px; }

/* =========================================================================
   AI panel
   ========================================================================= */

.ai-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-4); padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.ai-status .led { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); flex: none; }
.ai-status.live .led { background: var(--ok); box-shadow: 0 0 0 3px rgba(63,169,122,.16); }
.ai-status.live { color: var(--ink-3); }

.chat-log { display: grid; gap: 14px; padding: 18px; max-height: 460px; overflow-y: auto; }
.msg { font-size: 13.5px; line-height: 1.62; }
.msg .who { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 5px; font-family: var(--mono); }
.msg.user .bubble { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 13px; color: var(--ink-2); }
.msg.ai .bubble { color: var(--ink-2); }
.msg.ai .bubble p { margin: 0 0 .75em; }
.msg.ai .bubble p:last-child { margin: 0; }
.msg.ai .bubble strong { color: var(--ink); font-weight: 560; }
.msg.ai .bubble code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 3px; color: var(--accent-dim); }
.msg.ai .bubble ul { margin: .5em 0; padding-left: 18px; }
.msg.err .bubble { color: var(--risk); font-size: 13px; }

.chat-form { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 40px; max-height: 140px; font-size: 13.5px; padding: 9px 11px; }

.suggests { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 14px; }
.suggests button {
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink-3);
  border-radius: 20px; padding: 5px 12px; font: inherit; font-size: 12px; cursor: pointer;
  transition: all .14s;
}
.suggests button:hover { color: var(--accent); border-color: var(--accent-line); }

.dots span {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-4); margin-right: 4px; animation: blink 1.2s infinite;
}
.dots span:nth-child(2) { animation-delay: .18s; }
.dots span:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* =========================================================================
   Research
   ========================================================================= */

.ref-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.ref-filters button {
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink-3);
  border-radius: 20px; padding: 6px 14px; font: inherit; font-size: 12.5px; cursor: pointer;
  transition: all .14s;
}
.ref-filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 540; }
.ref-filters button:hover:not([aria-pressed="true"]) { color: var(--ink); border-color: var(--ink-4); }

.ref { padding: 18px 0; border-top: 1px solid var(--line); }
.ref-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ref-cite { font-size: 14px; font-weight: 520; }
.ref-src { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); margin-bottom: 8px; }
.ref-use { font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.ref-use strong { color: var(--ink-2); font-weight: 500; }

/* =========================================================================
   Footer
   ========================================================================= */

.site-foot { padding: 46px 0 60px; color: var(--ink-4); font-size: 12.5px; }
.site-foot .cols { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
.site-foot a { color: var(--ink-3); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }
.site-foot .disc { max-width: 62ch; margin-top: 26px; line-height: 1.6; }

/* =========================================================================
   Print
   ========================================================================= */

@media print {
  :root { --bg: #fff; --bg-elev: #fff; --surface: #f7f7f7; --ink: #111; --ink-2: #333; --ink-3: #555; --ink-4: #777; --line: #ddd; --line-strong: #ccc; }
  .site-head, .sidebar, .tabs, .chat-form, .suggests, .sidebar-actions, .btn { display: none !important; }
  .app-shell { grid-template-columns: 1fr; }
  .tabpanel[hidden] { display: block !important; }
  .week { break-inside: avoid; }
}

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

/* =========================================================================
   Glossary
   ========================================================================= */

.glossary { display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.gloss { background: var(--bg-elev); padding: 22px 24px; }
.gloss h4 { font-size: 15.5px; margin: 0 0 3px; letter-spacing: -.015em; }
.gloss .gloss-alt { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); margin-bottom: 10px; }
.gloss .gloss-plain { color: var(--ink-3); font-size: 13.5px; line-height: 1.65; margin: 0; }
@media (min-width: 900px) { .glossary { grid-template-columns: 1fr 1fr; } }

/* =========================================================================
   Supercompensation graphic
   ========================================================================= */

.superc { padding: 8px 0 0; }
.superc svg { display: block; width: 100%; height: auto; overflow: visible; }
.superc .sc-curve {
  fill: none; stroke: var(--accent); stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 600; stroke-dashoffset: 600;
}
.superc.on .sc-curve { animation: sc-draw 2.6s cubic-bezier(.5,0,.3,1) forwards; }
@keyframes sc-draw { to { stroke-dashoffset: 0; } }

.superc .sc-base { stroke: var(--line-strong); stroke-width: 1.2; stroke-dasharray: 4 5; }

.superc .sc-area { fill: var(--accent); opacity: 0; }
.superc.on .sc-area { animation: sc-fade 1.2s ease 2.1s forwards; }
@keyframes sc-fade { to { opacity: .08; } }

/* The dot travelling the curve (SMIL drives the motion; CSS just fades it in
   once the curve has drawn, and gives it a soft glow). */
.superc .sc-runner {
  fill: var(--accent); opacity: 0;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 70%, transparent));
}
.superc.on .sc-runner { animation: sc-appear .6s ease 2.5s forwards; }
@keyframes sc-appear { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .superc .sc-curve { stroke-dashoffset: 0; animation: none; }
  .superc .sc-area { opacity: .08; animation: none; }
  .superc .sc-runner { display: none; }
}

input[type="date"] { font-family: var(--mono); color-scheme: light; }

/* =========================================================================
   Plan navigation, today, and the paid-month horizon
   ========================================================================= */

#jumpToday { white-space: nowrap; flex: none; }
.week { scroll-margin-top: 118px; }

.week-nav {
  position: sticky; top: 60px; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0 12px; margin-bottom: 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.wk-strip {
  display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none;
}
.wk-strip::-webkit-scrollbar { display: none; }
.wk-strip button {
  min-width: 30px; height: 28px; padding: 0 4px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3);
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm);
  cursor: pointer;
}
.wk-strip button:hover { color: var(--ink); border-color: var(--line-strong); }
.wk-strip button.sel {
  color: var(--accent-ink); background: var(--accent); border-color: var(--accent);
  font-weight: 600;
}
.wk-strip button.now:not(.sel) {
  color: var(--accent); border-color: var(--accent-line); font-weight: 600;
}
.wk-strip button.lk:not(.sel) { color: var(--ink-4); }
.wk-strip button.now.lk:not(.sel) { color: var(--accent); }
.admin-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em;
  color: var(--warn); border: 1px solid var(--warn);
  padding: 3px 7px; border-radius: 3px; flex: none;
}

table.days tr.today td { background: var(--accent-wash); }
table.days tr.today td.day-name { color: var(--accent); font-weight: 700; }
table.days tr.today td.day-name::after {
  content: "today";
  display: block; font-size: 8.5px; letter-spacing: 0.12em; font-weight: 600;
}

.week.locked .week-head { opacity: 0.85; }
.wk-unlock {
  margin: 26px 0 12px;
  font-size: 12px; color: var(--ink-4);
  font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.week.locked { margin-bottom: 10px; }

/* =========================================================================
   Editorial two-column prose sections (desktop)
   ========================================================================= */

.duo { display: grid; gap: 18px 72px; align-items: start; }
@media (min-width: 940px) {
  .duo { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .duo .duo-head { position: sticky; top: 92px; }
  .duo .duo-body p:first-child { margin-top: 6px; }
}
.duo .duo-body p { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; max-width: 62ch; }

/* =========================================================================
   Setup / Plan modes and the build transition
   ========================================================================= */

.app-shell.mode-setup { display: block; }
.app-shell.mode-setup .main { display: none; }
.app-shell.mode-setup .sidebar {
  position: static; max-height: none; overflow: visible;
  max-width: 760px; margin: 0 auto;
  border-right: 0; background: transparent;
  padding-top: 18px;
}
.app-shell.mode-plan .sidebar { display: none; }
.app-shell.mode-plan { grid-template-columns: 1fr; }

.tabs { scroll-margin-top: 70px; }
.tabs-edit {
  margin-left: auto; align-self: center;
  border: 0; background: transparent; color: var(--ink-4);
  font: inherit; font-size: 12.5px; cursor: pointer; padding: 8px 4px;
  white-space: nowrap;
}
.tabs-edit:hover { color: var(--ink); }

#building {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
#building[hidden] { display: none; }
.building-inner { text-align: center; }
.building-spin {
  width: 34px; height: 34px; margin: 0 auto 18px;
  border: 3px solid var(--line-strong); border-top-color: var(--accent);
  border-radius: 50%;
  animation: bspin 0.8s linear infinite;
}
@keyframes bspin { to { transform: rotate(360deg); } }
.building-msg { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); letter-spacing: 0.04em; }

/* =========================================================================
   Landing pace demo + founder mark
   ========================================================================= */

.demo-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.demo-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
input.demo-input {
  font-family: var(--mono); font-size: 19px; font-weight: 600;
  width: 118px; flex: none; height: 46px; text-align: center;
  color: var(--ink); background: var(--bg-elev);
  border: 1.5px solid var(--ink); border-radius: var(--r-sm);
}
input.demo-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.demo-presets { display: flex; gap: 6px; }
.demo-presets button {
  font-family: var(--mono); font-size: 12px;
  height: 32px; padding: 0 12px;
  color: var(--ink-3); background: transparent;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  cursor: pointer;
}
.demo-presets button:hover { color: var(--ink); border-color: var(--ink-4); }


/* =========================================================================
   Bio stage — the photographs behind the text, the runner in front
   ========================================================================= */

.bio-stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--navy-deep);
  box-shadow: 0 0 0 5px rgba(20, 41, 77, 0.05), 0 34px 70px -42px rgba(10, 27, 51, 0.65);
}
.bs-photos { position: absolute; inset: 0; display: flex; }
.bs-img { flex: 1; background-size: cover; }
.bs-austin { background-image: url("../assets/austin.jpg"); background-position: 32% 56%; }
.bs-park  { background-image: url("../assets/central-park.jpg"); background-position: center 40%; }
.bs-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 27, 54, 0.88) 0%, rgba(12, 27, 54, 0.72) 42%, rgba(12, 27, 54, 0.38) 100%),
    linear-gradient(0deg, rgba(12, 27, 54, 0.5), rgba(12, 27, 54, 0.08) 40%);
}
.bs-content {
  position: relative;
  display: flex; align-items: flex-end; gap: 28px;
  padding: clamp(30px, 5vw, 54px);
}
.bs-text { flex: 1; max-width: 56ch; padding-bottom: 6px; }
.bs-text h2 {
  color: var(--navy-ink);
  font-size: clamp(26px, 2.8vw, 34px);
  margin-bottom: 18px;
}
.bs-text p {
  color: var(--navy-ink-2);
  font-size: 15px; line-height: 1.7;
}
.bs-text p:last-child { margin-bottom: 0; }
.bs-cut {
  flex: none;
  width: clamp(160px, 22vw, 250px); height: auto;
  margin-bottom: -6px;
  filter: drop-shadow(-18px 14px 30px rgba(0, 0, 0, 0.5));
}
@media (max-width: 760px) {
  .bs-photos { flex-direction: column; }
  .bs-content { flex-direction: column; align-items: center; }
  .bs-text { max-width: none; }
  .bs-cut { width: min(220px, 58%); margin-bottom: -4px; }
  .bs-scrim {
    background:
      linear-gradient(0deg, rgba(12, 27, 54, 0.92) 12%, rgba(12, 27, 54, 0.72) 55%, rgba(12, 27, 54, 0.5) 100%);
  }
}

/* =========================================================================
   Setup mode — the framed instrument
   ========================================================================= */

.setup-head { display: none; }

.app-shell.mode-setup { padding: clamp(20px, 5vh, 56px) var(--pad) 90px; }
.app-shell.mode-setup .sidebar {
  border: 1.5px solid var(--navy);
  border-radius: 12px;
  background: var(--bg-elev);
  box-shadow: 0 0 0 5px rgba(20, 41, 77, 0.05), 0 30px 60px -38px rgba(10, 27, 51, 0.5);
  padding: 0 0 26px;
  overflow: hidden;
  counter-reset: setupsec;
}

/* title bar: navy chrome with classic grip stripes */
.mode-setup .setup-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px;
  background: var(--navy);
}
.mode-setup .setup-title {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.26em; color: var(--bg);
}
.mode-setup .setup-grip {
  flex: 1; height: 9px; margin: 0 18px;
  background-image: repeating-linear-gradient(180deg,
    rgba(247, 245, 239, 0.32) 0 1px, transparent 1px 4px);
}
.mode-setup .setup-sub {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.22em; color: rgba(247, 245, 239, 0.55);
}

/* numbered sections with a boxed +/– toggle */
.mode-setup .form-section { border-bottom: 1px solid var(--line); }
.mode-setup .form-section > summary {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--navy);
  padding: 15px 20px;
}
.mode-setup .form-section > summary:hover { background: var(--surface); }
.mode-setup .form-section > summary::before {
  counter-increment: setupsec;
  content: counter(setupsec, decimal-leading-zero);
  font-size: 10px; font-weight: 400; letter-spacing: 0.08em;
  color: var(--accent);
}
.mode-setup .form-section > summary::after {
  content: "+"; margin-left: auto; align-self: center;
  width: 18px; height: 18px; line-height: 16px; text-align: center;
  border: 1px solid var(--line-strong); border-radius: 4px;
  font-size: 12px; font-weight: 400; color: var(--ink-4);
}
.mode-setup .form-section[open] > summary::after { content: "\2013"; }
.mode-setup .form-section .body { padding: 6px 20px 22px; }

/* mono field chrome */
.mode-setup input, .mode-setup select, .mode-setup textarea {
  font-family: var(--mono); font-size: 12.5px;
}
.mode-setup .target-field {
  background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 12px 12px 14px;
  margin-bottom: 16px;
}
.mode-setup .target-field select {
  height: 46px; font-size: 14px; font-weight: 600; color: var(--navy);
  border-color: var(--line-strong);
}
.mode-setup .daypick { gap: 5px; }
.mode-setup .daypick button {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em;
  text-transform: uppercase;
  height: 34px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--bg-elev);
  box-shadow: 0 2px 0 rgba(20, 41, 77, 0.08);
}
.mode-setup .daypick button[aria-pressed="true"] {
  background: var(--navy); border-color: var(--navy); color: var(--bg);
  box-shadow: 0 2px 0 rgba(20, 41, 77, 0.3);
}
.mode-setup .daypick button:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(20, 41, 77, 0.15); }

/* the one big control */
.mode-setup .sidebar-actions { padding: 22px 20px 2px; }
.mode-setup #buildBtn {
  width: 100%; height: 52px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  border-radius: 8px;
  box-shadow: 0 3px 0 #a31226;
}
.mode-setup #buildBtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #a31226; }
.mode-setup .btn-ghost {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}

/* =========================================================================
   Instrument chrome — the framed-card language shared with the builder
   ========================================================================= */

.instrument {
  border: 1.5px solid var(--navy);
  border-radius: 12px;
  background: var(--bg-elev);
  box-shadow: 0 0 0 5px rgba(20, 41, 77, 0.05), 0 30px 60px -38px rgba(10, 27, 51, 0.5);
  overflow: hidden;
}
.instrument-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background: var(--navy);
}
.instrument-head .i-title {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.26em; color: var(--bg);
}
.instrument-head .i-grip {
  flex: 1; height: 9px; margin: 0 18px;
  background-image: repeating-linear-gradient(180deg,
    rgba(247, 245, 239, 0.32) 0 1px, transparent 1px 4px);
}
.instrument-head .i-sub {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.22em; color: rgba(247, 245, 239, 0.55);
}
.instrument-body { padding: 20px; }
.instrument-body .demo-bar { margin-bottom: 18px; }

/* photography, framed like the instruments */
.photo-row {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 340px));
  margin-top: 26px;
}
.photo-card {
  margin: 0;
  border: 1.5px solid var(--navy); border-radius: 10px;
  overflow: hidden; background: var(--bg-elev);
  box-shadow: 0 0 0 5px rgba(20, 41, 77, 0.05), 0 22px 44px -30px rgba(10, 27, 51, 0.5);
}
.photo-card img { display: block; width: 100%; height: auto; }
.photo-card figcaption {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.22em;
  color: var(--ink-3);
  padding: 9px 14px;
  border-top: 1.5px solid var(--navy);
  background: var(--bg-elev);
}
.demo-presets { flex-wrap: wrap; }
@media (max-width: 640px) {
  .instrument-head .i-sub { display: none; }
  .instrument-head .i-grip { margin-right: 0; }
}
