:root {
  --ink: #161616;
  --black: #000000;
  --paper: #f3f1ed;
  --surface: #fbfaf7;
  --muted: #756d66;
  --line: #d9d0c8;
  --red: #710014;
  --red-bright: #94162d;
  --tan: #b38f70;
  --tan-soft: #eadfd5;
  --shadow: 0 16px 48px rgba(22, 22, 22, 0.09);
}


* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { margin: 0; color: var(--ink); background: var(--ink); font-family: Inter, sans-serif; }
.admin-preview-banner {
  position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; gap: 18px;
  min-height: 42px; padding: 8px 20px; background: var(--red); color: white; border-bottom: 1px solid rgba(255,255,255,.25);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.admin-preview-banner span { opacity: .78; letter-spacing: .02em; text-transform: none; }
.admin-preview-banner a { color: white; font-weight: 800; }
body:has(.admin-preview-banner) .topbar { top: 42px; }
body.demo-mode [data-record-session], body.demo-mode #resetTrainingButton,
body.demo-mode #createTeamButton, body.demo-mode #renameTeamButton,
body.demo-mode #profileForm button[type="submit"] { display: none !important; }

button, input, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

main { min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--paper);
  max-width: 1480px;
  margin: 0 auto;
  min-height: 84px;
  padding: 18px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--red);
}

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-builder-link, .topbar-admin-link, .menu-toggle {
  min-height: 38px; border: 1px solid var(--line); padding: 0 13px; background: rgba(255,255,255,.55);
  color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; cursor: pointer;
}
.topbar-builder-link.active { border-color: var(--ink); background: var(--ink); color: white; }
.topbar-admin-link { border-color: rgba(113,0,20,.35); color: var(--red); }
.topbar-admin-link:hover, .topbar-admin-link.active { border-color: var(--red); background: var(--red); color: white; }
.menu-toggle { display: flex; align-items: center; gap: 9px; }
.menu-toggle span { color: var(--red); font-size: 14px; }
.menu-toggle[aria-expanded="true"] { border-color: var(--red); color: var(--red); }
.app-menu {
  position: absolute; z-index: 120; left: 36px; top: calc(100% - 8px); width: min(310px, calc(100vw - 28px));
  display: grid; padding: 8px; border: 1px solid var(--line); border-top: 3px solid var(--red);
  background: var(--surface); box-shadow: 0 20px 55px rgba(22,22,22,.2);
  max-height: calc(100dvh - 110px); overflow-y: auto;
}
.app-tab {
  min-height: 43px; border: 0; border-bottom: 1px solid var(--line); padding: 0 12px; background: transparent;
  color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-align: left; cursor: pointer;
}
.app-tab:last-child { border-bottom: 0; }
.app-tab:hover { background: var(--paper); color: var(--ink); }
.app-tab.active { background: var(--ink); color: white; }

.brand {
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
  text-decoration: none;
}

.brand-wordmark { display: block; width: 190px; height: auto; max-height: 48px; object-fit: contain; }
.app-wordmark { display: block; color: inherit; font: 700 28px/1 "Barlow Condensed", sans-serif; white-space: nowrap; letter-spacing: .01em; }
.app-wordmark small { display: block; margin-top: 5px; font: 600 8px/1 Inter, sans-serif; letter-spacing: .17em; }
@media (max-width: 760px) { .brand .app-wordmark { font-size: clamp(16px, 3.8vw, 24px); } }

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--black);
  border-left: 3px solid var(--red);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.5);
}

.brand strong, .brand small { display: block; }
.brand strong { font: 800 18px/0.95 "Barlow Condensed", sans-serif; letter-spacing: 0.07em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 8px; letter-spacing: 0.16em; }

.private-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.private-badge span { width: 7px; height: 7px; background: var(--red); border-radius: 50%; box-shadow: 0 0 0 3px rgba(113,0,20,.14); }

.admin-dashboard-view { display: grid; gap: 30px; }
.admin-dashboard-heading { align-items: end; }
.admin-dashboard-heading #adminIdentity { color: var(--muted); }
.admin-preview-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 26px;
  border: 1px solid rgba(255,255,255,.13); border-left: 4px solid var(--red); background: var(--ink); color: white;
  box-shadow: var(--shadow);
}
.admin-preview-panel h2, .admin-section-title h2 { margin: 4px 0 0; font: 800 clamp(24px, 3vw, 38px)/.95 "Barlow Condensed", sans-serif; letter-spacing: .02em; }
.admin-preview-panel p:last-child { margin: 8px 0 0; color: rgba(255,255,255,.68); }
.admin-preview-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-preview-actions a {
  min-height: 40px; display: inline-flex; align-items: center; padding: 0 15px; border: 1px solid rgba(255,255,255,.35);
  color: white; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-decoration: none;
}
.admin-preview-actions a:hover { border-color: white; background: white; color: var(--ink); }
.admin-dashboard-status { min-height: 20px; margin: -12px 0; color: var(--red); font-weight: 700; }
.admin-section-title { margin-bottom: 14px; }
.admin-section-title p:last-child { margin: 8px 0 0; color: var(--muted); }
.admin-stat-grid, .admin-funnel-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.admin-stat-card, .admin-funnel-card { padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.admin-stat-card strong, .admin-funnel-card strong { display: block; font: 800 34px/1 "Barlow Condensed", sans-serif; }
.admin-stat-card span, .admin-funnel-card span { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.admin-metric-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.admin-metric-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.admin-metric-table th, .admin-metric-table td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: right; }
.admin-metric-table th { color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.admin-metric-table th:first-child, .admin-metric-table td:first-child { text-align: left; }
.admin-metric-table tbody tr:last-child td { border-bottom: 0; }
.admin-last-updated { margin: -12px 0 0; color: var(--muted); font-size: 11px; }
.library-readonly-value { color: var(--muted); font-size: 11px; }
.admin-submission-list { display: grid; gap: 12px; }
.admin-submission-empty { padding: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.admin-submission-card { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(150px, .8fr) minmax(220px, 1.4fr); gap: 12px; padding: 18px; border: 1px solid var(--line); border-left: 4px solid var(--tan); background: var(--surface); }
.admin-submission-card label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.admin-submission-card input, .admin-submission-card select { width: 100%; min-height: 40px; border: 1px solid var(--line); padding: 0 10px; background: white; }
.admin-submission-meta { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; }
.admin-submission-equipment { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.admin-submission-equipment label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); background: white; font-size: 10px; }
.admin-submission-equipment input { width: auto; min-height: 0; }
.admin-submission-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; }
.admin-submission-actions button { min-height: 38px; border: 1px solid var(--line); padding: 0 14px; background: white; font-size: 9px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.admin-submission-actions [data-submission-action="approve"] { border-color: var(--red); background: var(--red); color: white; }

.hero {
  padding: 36px max(36px, calc((100vw - 1408px) / 2)) 64px;
  background: var(--ink);
  color: white;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(430px, .8fr);
  gap: 72px;
  align-items: start;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 38%;
  height: 5px;
  background: var(--red);
  pointer-events: none;
}

.hero-logo {
  position: absolute;
  width: min(520px, 42vw);
  right: 2vw;
  top: 50%;
  opacity: .07;
  transform: translateY(-50%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; align-self: start; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
}

.hero .eyebrow { color: var(--tan); }

h1, h2 { font-family: "Barlow Condensed", sans-serif; margin: 0; }
h1 { max-width: 760px; font-size: clamp(54px, 6vw, 92px); line-height: .88; letter-spacing: -.035em; }
h1 em { color: var(--tan); font-style: normal; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 5px; text-underline-offset: 8px; }

.lede { max-width: 590px; margin: 26px 0 0; color: #b9bab7; font-size: 15px; line-height: 1.65; }

.builder-stack { position: relative; z-index: 1; display: grid; gap: 12px; }

.builder-controls {
  position: relative;
  padding: 28px;
  background: #0e0e0e;
  border: 1px solid #38302f;
  border-top: 3px solid var(--red);
  border-radius: 4px;
  display: grid;
  gap: 20px;
}

.big-ten-about-link { margin-top: 18px; border: 0; border-bottom: 1px solid var(--tan); padding: 0 0 4px; background: transparent; color: var(--paper); font-size: 10px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.big-ten-about-link:hover { color: var(--tan); }

.control-label {
  display: block;
  margin-bottom: 9px;
  color: #8e908b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .17em;
}

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #34373c; border-radius: 4px; overflow: hidden; }
.segmented button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid #34373c;
  background: transparent;
  color: #a6a7a3;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--red); color: white; }
.view-segmented { grid-template-columns: repeat(2, 1fr); }

.builder-controls input,
.builder-controls .setup-select {
  width: 100%;
  height: 46px;
  border: 1px solid #34373c;
  border-radius: 4px;
  padding: 0 14px;
  background: transparent;
  color: white;
  outline: none;
}
.builder-controls .setup-select { padding: 0 38px 0 14px; color-scheme: dark; cursor: pointer; }
.builder-controls input:focus,
.builder-controls .setup-select:focus { border-color: var(--red-bright); }

.equipment-toggle {
  width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #34373c; border-radius: 4px; background: transparent;
  color: white; display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  font-size: 10px; font-weight: 800; letter-spacing: .1em;
}
.equipment-control { align-self: end; }
.equipment-toggle strong { color: var(--tan); font-size: 11px; }
.equipment-panel { padding: 12px; border: 1px solid #34373c; border-top: 0; background: #151515; }
.equipment-panel[hidden] { display: none; }
.equipment-panel-actions { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 10px; }
.equipment-panel-actions button { border: 0; padding: 5px 7px; background: #292929; color: #bbb; font-size: 9px; font-weight: 700; cursor: pointer; }
.equipment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.equipment-option { min-height: 29px; display: flex; align-items: center; gap: 7px; color: #d2d2cf; font-size: 10px; cursor: pointer; }
.equipment-option input { width: 15px; height: 15px; padding: 0; border: 0; background: transparent; accent-color: var(--red); }
.equipment-panel > p { margin: 10px 0 0; color: #858682; font-size: 9px; line-height: 1.45; }

.generate-button {
  height: 46px;
  border: 0;
  border-radius: 4px;
  padding: 0 18px;
  background: var(--red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.generate-button:hover { background: var(--red-bright); transform: translateY(-1px); }
.advanced-options { grid-column: 1 / -1; border: 1px solid #38302f; border-radius: 4px; color: #f3f1ed; background: #0e0e0e; }
.advanced-options summary { display: flex; justify-content: space-between; align-items: center; padding: 9px 11px; cursor: pointer; list-style: none; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.advanced-options summary::-webkit-details-marker { display: none; }
.advanced-options summary span { font-size: 13px; transition: transform .15s; }
.advanced-options[open] summary span { transform: rotate(180deg); }
.advanced-options > label { display: block; padding: 2px 11px 0; }
.builder-controls .advanced-options .control-label { margin-bottom: 5px; font-size: 9px; }
.builder-controls .advanced-options .setup-select { width: 100%; height: 34px; padding-left: 10px; font-size: 11px; background-color: #0e0e0e !important; }
.advanced-options > p { margin: 8px 11px 11px; color: #c5bdb6; font-size: 10px; line-height: 1.5; }
.advanced-options summary:focus-visible { outline: 2px solid #b38f70; outline-offset: 2px; }
.beta-feedback-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.beta-feedback-links button { font-size: 10px; }
#feedbackForm { display: grid; gap: 15px; }
#feedbackForm > p { font-size: 12px; line-height: 1.6; margin: 0; }
#feedbackForm textarea { width: 100%; min-height: 115px; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); font: 14px/1.5 Inter, sans-serif; }
.feedback-context { color: var(--muted); }
.admin-feedback-inbox { display: grid; gap: 12px; }
.admin-feedback-message { min-width: 0; padding: 16px; border: 1px solid #625a54; border-left: 3px solid var(--red); border-radius: 4px; }
.admin-feedback-message.reviewed { border-left-color: var(--tan); }
.admin-feedback-message h3 { margin: 8px 0; font-size: 17px; overflow-wrap: anywhere; }
.admin-feedback-message p { margin: 8px 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.admin-feedback-message .feedback-body { white-space: pre-wrap; }
.admin-feedback-message small { display: block; line-height: 1.6; overflow-wrap: anywhere; }
.admin-feedback-message button { margin-top: 12px; }
.admin-feedback-message .feedback-meta { color: var(--tan); }
.admin-users-actions, .admin-users-toolbar, .admin-users-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.admin-users-view h1 { font-size: clamp(36px, 4vw, 52px); }
.admin-users-actions button { white-space: nowrap; }
.admin-users-toolbar { justify-content: space-between; margin: 24px 0 16px; }
.admin-users-toolbar label { display: grid; gap: 8px; flex: 1; max-width: 420px; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.admin-users-toolbar input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); font: 14px Inter, sans-serif; }
.admin-users-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.admin-users-table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; }
.admin-users-table th, .admin-users-table td { padding: 14px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
.admin-users-table th { font-size: 10px; letter-spacing: .05em; }
.admin-users-table th button { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.admin-users-table td small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.admin-users-table .admin-user-name { padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--red); font: 700 13px Inter, sans-serif; text-align: left; cursor: pointer; }
.admin-users-pagination { justify-content: space-between; margin-top: 18px; }
.admin-users-pagination span, .admin-users-note { font-size: 12px; line-height: 1.6; }
.admin-users-note { color: var(--muted); margin-top: 22px; }
html[data-theme="dark"] .admin-users-table-wrap { background: #161616; color: #f3f1ed; }
html[data-theme="dark"] .admin-users-table .admin-user-name { color: #f3f1ed; }
.generate-button > span[aria-hidden="true"] { font-size: 21px; }

.workspace {
  max-width: 1480px;
  margin: 0 auto;
  padding: 48px 36px 80px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.coverage-panel, .program-area {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.coverage-panel { position: sticky; top: 20px; padding: 24px; }
.panel-heading, .program-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
h2 { font-size: 29px; line-height: 1; letter-spacing: .01em; }
.score { width: 53px; height: 53px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--ink); color: white; }
.score strong { font: 700 22px/17px "Barlow Condensed", sans-serif; }
.score span { color: var(--tan); font-size: 9px; }

.coverage-list { display: grid; gap: 7px; margin: 26px 0; }
.coverage-item { min-height: 33px; padding: 0 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 700; letter-spacing: .07em; }
.coverage-item span:last-child { min-width: 21px; height: 21px; display: grid; place-items: center; background: #ecebe6; color: var(--muted); border-radius: 50%; font-size: 10px; }
.coverage-item.covered { border-color: #ceb9a8; background: #f6eee8; }
.coverage-item.covered span:last-child { background: var(--red); color: white; }
.coverage-hint { margin: 15px 0 -10px; padding: 10px; border-left: 2px solid var(--red); background: var(--paper); color: var(--muted); font-size: 9px; line-height: 1.45; }
.coverage-panel.drag-enabled .coverage-item { cursor: grab; user-select: none; }
.coverage-panel.drag-enabled .coverage-item:hover { border-color: var(--red); transform: translateX(2px); }
.coverage-panel.drag-enabled .coverage-item:active { cursor: grabbing; }
.coverage-item.dragging { opacity: .45; }
.touch-drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none;
  max-width: 190px; padding: 10px 12px; border: 1px solid var(--red); border-left-width: 4px;
  background: var(--ink); color: white; box-shadow: 0 12px 30px rgba(0,0,0,.28);
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
}
.touch-dragging { user-select: none; -webkit-user-select: none; }
.supplemental-bank { margin: -10px 0 24px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 7px; }
.supplemental-bank[hidden] { display: none; }
.supplemental-bank .control-label { margin-bottom: 3px; }
.supplemental-item { background: var(--paper); }

.validation-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-left: 3px solid var(--red); background: var(--tan-soft); }
.validation-card.invalid { border-left-color: var(--red); background: #f3dfe3; }
.validation-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; background: var(--red); color: white; border-radius: 50%; font-weight: 800; }
.validation-card.invalid .validation-icon { background: var(--red); }
.validation-card strong { font: 700 14px/1 "Barlow Condensed", sans-serif; letter-spacing: .05em; }
.validation-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }

.loading-guide { margin-top: 22px; padding: 14px; background: var(--paper); border-top: 2px solid var(--tan); }
.loading-guide strong { display: block; margin-bottom: 8px; font: 700 12px/1 "Barlow Condensed", sans-serif; letter-spacing: .08em; }
.loading-guide p { margin: 5px 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.loading-guide b { color: var(--ink); }

.program-area { padding: 28px; min-width: 0; }
.program-heading { padding-bottom: 22px; border-bottom: 1px solid var(--line); align-items: end; }
.superset-hint { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.program-actions { display: flex; gap: 8px; }
.text-button { min-height: 33px; border: 1px solid var(--line); background: transparent; padding: 0 11px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; cursor: pointer; }
.text-button:hover { border-color: var(--ink); color: var(--ink); }
.pdf-button { border-color: var(--red); color: var(--red); }
.pdf-button:hover { border-color: var(--red); background: var(--red); color: white; }
.save-program-button { border-color: var(--tan); color: #765a43; }
.save-program-button:hover { border-color: var(--tan); background: var(--tan); color: white; }

.program-legend { margin-top: 16px; border: 1px solid var(--line); border-left: 3px solid var(--red); background: var(--paper); }
.program-legend summary {
  min-height: 42px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between;
  color: var(--ink); font-size: 9px; font-weight: 800; letter-spacing: .11em; cursor: pointer; list-style: none;
}
.program-legend summary::-webkit-details-marker { display: none; }
.program-legend summary span { display: inline-block; color: var(--red); font-size: 17px; line-height: 1; }
.program-legend[open] summary span { transform: rotate(45deg); }
.program-legend-grid { padding: 12px 13px 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); }
.program-legend-grid p { min-width: 0; margin: 0; display: flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.program-legend-grid strong { flex: 0 0 auto; color: var(--red); font: 800 12px/1 "Barlow Condensed", sans-serif; letter-spacing: .04em; }

.print-program { display: none; }

.days-grid { display: grid; gap: 20px; margin-top: 24px; }
.day-card { border: 1px solid var(--line); border-top: 3px solid var(--red); background: white; overflow: hidden; }
.day-header { min-height: 55px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink); color: white; }
.day-header h3 { margin: 0; font: 700 19px/1 "Barlow Condensed", sans-serif; letter-spacing: .04em; }
.day-header input { width: min(220px, 48%); border: 0; border-bottom: 1px solid #4b4e54; border-radius: 0; padding: 7px 0; background: transparent; color: #c8c9c6; font-size: 10px; text-align: right; outline: none; }
.day-header input:focus { border-color: var(--tan); color: white; }
.day-note-field { display: grid; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f7f4f0; }
.day-note-field > span { color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: .07em; }
.day-note-field small { color: var(--muted); font-size: 9px; font-weight: 600; }
.day-note-input { width: 100%; min-height: 54px; resize: vertical; border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; background: white; color: var(--ink); font: 12px/1.45 Inter, sans-serif; }
.day-note-input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.exercise-column-headings {
  display: grid; grid-template-columns: 44px minmax(300px, 1fr) 162px 132px; gap: 10px;
  padding: 10px 24px 2px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em;
}
.loading-headings { display: grid; grid-template-columns: 48px 48px 52px; gap: 7px; text-align: center; }

.exercise-list { padding: 8px 16px; }
.exercise-list:empty { min-height: 86px; display: grid; place-items: center; }
.exercise-list:empty::before { content: "DROP BIG 10 MOVEMENTS HERE"; color: #aaa099; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.exercise-list.drop-target { background: #f3e7e9; outline: 2px dashed var(--red); outline-offset: -8px; }
.exercise-row {
  min-height: 57px;
  display: grid;
  grid-template-columns: 44px minmax(300px, 1fr) 162px 132px;
  align-items: center;
  gap: 10px;
  margin: 0 -8px;
  padding: 0 8px;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(22, 22, 22, 0.07);
}
.exercise-row.superset-shade-a { background: #eee1d3; border-left-color: var(--tan); }
.exercise-row.superset-shade-b { background: #efdae1; border-left-color: var(--red); }
.exercise-row.standalone-row { background: white; border-left-color: #dedbd5; }
.exercise-row.superset-start { margin-top: 10px; }
.exercise-row.superset-end { margin-bottom: 10px; }
.exercise-order { display: flex; align-items: center; gap: 6px; }
.superset-label { min-width: 23px; color: var(--ink); font: 800 14px/1 "Barlow Condensed", sans-serif; letter-spacing: .03em; }
.row-grip {
  width: 18px; height: 30px; padding: 0; border: 0; background: transparent; color: #8f8983;
  display: grid; place-items: center; font-size: 13px; letter-spacing: -4px; cursor: grab;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.row-grip:hover { color: var(--red); }
.row-grip:active { cursor: grabbing; }
.exercise-row.dragging-row { opacity: .38; }
.exercise-row.row-drop-before { box-shadow: 0 -3px 0 var(--red); }
.exercise-list.row-drop-end { box-shadow: inset 0 -3px 0 var(--red); }
.exercise-drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 1001; pointer-events: none;
  max-width: min(290px, calc(100vw - 30px)); padding: 11px 14px; border-left: 4px solid var(--red);
  background: var(--ink); color: white; box-shadow: 0 12px 30px rgba(0,0,0,.3);
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
}
.exercise-main { min-width: 0; display: grid; grid-template-columns: 145px minmax(185px, 1fr); gap: 9px; align-items: center; }
.exercise-row input, .exercise-row select {
  height: 35px;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  outline: none;
}
.exercise-row input:focus, .exercise-row select:focus { border-color: var(--line); background: #fbfaf6; }
.exercise-row select:is(.pattern-select, .exercise-select) {
  border: 1px solid var(--line) !important;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23710014' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 10px 7px;
  padding-right: 23px !important;
  cursor: pointer;
}
.pattern-select { padding-left: 7px; color: var(--red); background-color: #f5e9eb !important; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pattern-select.accessory { color: #675d56; background-color: #ede5df !important; }
.exercise-choice { min-width: 0; }
.exercise-select-line { display: grid; grid-template-columns: minmax(130px, 1fr) auto auto; align-items: center; gap: 7px; }
.exercise-select { width: 100%; padding-left: 8px; background-color: #fff; color: var(--ink); font-size: 11px; font-weight: 600; }
.exercise-select option { color: var(--ink); }
.custom-exercise-name { width: 100%; margin-top: 3px; padding: 0 8px; font-size: 11px; font-weight: 600; background: #fbfaf6 !important; border-color: var(--line) !important; }
.equipment-warning { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: white; font-size: 10px; font-weight: 800; }
.equipment-warning[hidden] { display: none; }
.exercise-video-button { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--red); border-radius: 50%; background: var(--red); color: white; font-size: 9px; cursor: pointer; }
.exercise-video-button[hidden] { display: none; }
.exercise-video-button:hover, .exercise-video-button:focus-visible { background: var(--red-bright); outline: 2px solid rgba(113, 0, 20, .2); outline-offset: 2px; }
.exercise-row.equipment-unavailable { box-shadow: inset 0 0 0 1px rgba(113, 0, 20, .32); }
.exercise-row.equipment-unavailable .exercise-select { color: var(--red); }
.loading-fields { display: grid; grid-template-columns: 48px 48px 52px; gap: 7px; }
.loading-field { min-width: 0; display: grid; }
.loading-field > span { display: none; }
.loading-fields input, .loading-fields select { width: 100%; padding: 0 6px; color: var(--muted); font-size: 10px; text-align: center; border-color: var(--line); background: rgba(255,255,255,.45); }
.loading-fields .rpe-input { appearance: none; border: 1px solid var(--line); border-radius: 4px; padding: 0 17px 0 5px; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23710014' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center; color: var(--ink); font-weight: 700; cursor: pointer; }
.row-actions { display: flex; justify-content: flex-end; gap: 3px; }
.row-actions button { width: 26px; height: 26px; border: 1px solid var(--line); background: transparent; color: #999a95; cursor: pointer; }
.row-actions .superset-button { width: 44px; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.row-actions .superset-button.active { border-color: var(--red); background: var(--red); color: white; }
.row-actions .superset-button[hidden] { display: block; visibility: hidden; }
.row-actions button:hover { border-color: var(--ink); color: var(--ink); }
.row-actions .remove-button:hover { border-color: var(--red); color: var(--red); }

.add-button { margin: 7px 16px 14px; border: 1px dashed #b9bab5; background: transparent; padding: 9px 13px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; cursor: pointer; }
.add-button:hover { border-color: var(--ink); color: var(--ink); }
.save-note { margin: 18px 0 0; color: var(--muted); font-size: 10px; text-align: right; }
.save-note.flash { color: var(--red); }

.content-view { max-width: 1240px; min-height: calc(100vh - 84px); margin: 0 auto; padding: 64px 36px 88px; }
.builder-guide-link { display: block; margin-top: 12px; font-size: 11px; }
.guide-heading { flex-wrap: wrap; gap: 20px; }
.guide-heading h1 { font: 800 clamp(32px, 4vw, 52px)/1.05 "Barlow Condensed", sans-serif; margin: 8px 0 14px; }
.guide-intro { max-width: 850px; margin: 28px 0; font-size: 16px; line-height: 1.7; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.guide-card { min-width: 0; padding: 26px; border: 1px solid var(--line); border-top: 3px solid var(--red); background: var(--paper); color: var(--ink); }
.guide-card h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; font: 700 26px/1.15 "Barlow Condensed", sans-serif; }
.guide-card h2 > span { color: var(--tan); font-size: 21px; }
.guide-card p, .guide-card li { font-size: 14px; line-height: 1.75; }
.guide-card p { margin: 0 0 16px; }
.guide-card p:last-child { margin-bottom: 0; }
.guide-card ul, .guide-card ol { margin: 0 0 16px; padding-left: 22px; }
.guide-card table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13px; line-height: 1.5; }
.guide-card th, .guide-card td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.guide-card thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.guide-checklist, .guide-help { margin-top: 24px; }
.guide-checklist ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; list-style-type: "✓  "; padding-left: 22px; margin-bottom: 0; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
html[data-theme="dark"] .guide-card { background: #1d1b1b; color: #f3f1ed; border-color: #665b52; border-top-color: #710014; }
html[data-theme="dark"] .guide-card :is(th, td) { border-color: #665b52; }
@media (max-width: 700px) {
  .guide-grid, .guide-checklist ul { grid-template-columns: minmax(0, 1fr); }
  .guide-card { padding: 20px 16px; }
  .guide-card h2 { font-size: 24px; }
  .guide-card th, .guide-card td { padding: 9px 5px; }
  .guide-actions > button { width: 100%; }
}
.admin-dashboard-view.content-view { max-width: none; min-height: 100vh; padding: 0; margin: 0; color: var(--paper); background: var(--ink); }

.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-side { position: sticky; top: 0; align-self: start; height: 100vh; padding: 0 14px 20px; border-right: 1px solid rgba(243,241,237,.28); background: #242424; }
.admin-side-brand { display: flex; align-items: center; gap: 10px; height: 84px; margin: 0 -14px 24px; padding: 14px 20px; border-bottom: 1px solid rgba(243,241,237,.28); text-decoration: none; color: var(--paper); }
.admin-side-brand img { width: 42px; height: 48px; object-fit: contain; }
.admin-side-brand span { font: 800 26px/.85 "Barlow Condensed", sans-serif; letter-spacing: .08em; }
.admin-side-brand small { display: block; margin-top: 6px; font: 600 10px/1 Inter, sans-serif; letter-spacing: .14em; }
.admin-side > button { display: block; width: 100%; min-height: 46px; margin-bottom: 5px; padding: 0 16px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--paper); text-align: left; font-size: 12px; cursor: pointer; }
.admin-side > button:hover, .admin-side > button.active { border-left-color: var(--red-bright); background: var(--red); color: white; }
.admin-main { min-width: 0; }
.admin-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px; height: 84px; padding: 0 28px; border-bottom: 1px solid rgba(243,241,237,.28); background: #242424; }
.admin-side-toggle, .admin-icon-button, .admin-profile-button { border: 0; background: transparent; color: var(--paper); cursor: pointer; }
.admin-side-toggle { font-size: 22px; }
.admin-search-wrap { position: relative; flex: 1; }
.admin-search-wrap input { width: 100%; height: 45px; padding: 0 18px; border: 1px solid rgba(243,241,237,.48); border-radius: 24px; outline-offset: 3px; background: #242424; color: white; }
.admin-search-wrap input::placeholder { color: var(--paper); }
.admin-top-actions { position: relative; display: flex; align-items: center; gap: 12px; }
.admin-icon-button { position: relative; font-size: 24px; }
.admin-icon-button span { position: absolute; top: -4px; right: -7px; min-width: 17px; padding: 2px 4px; border-radius: 15px; background: var(--red-bright); font: 700 10px Inter, sans-serif; }
.admin-profile-button { display: flex; align-items: center; gap: 9px; font-size: 20px; }
.admin-profile-button span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--tan); border-radius: 50%; font: 700 12px Inter, sans-serif; }
.admin-popover { position: absolute; z-index: 50; top: calc(100% + 12px); right: 0; width: min(340px, calc(100vw - 24px)); padding: 16px; border: 1px solid rgba(243,241,237,.48); border-radius: 6px; box-shadow: 0 18px 35px #0009; background: #242424; color: white; font-size: 12px; }
.admin-popover button { display: block; width: 100%; min-height: 35px; border: 0; border-top: 1px solid rgba(243,241,237,.26); background: none; color: white; text-align: left; cursor: pointer; }
.admin-popover p { margin: 8px 0; line-height: 1.4; }
.admin-search-results { left: 0; right: auto; width: min(520px, 100%); max-height: 360px; overflow: auto; }
.admin-search-results strong { display: block; margin: 10px 0 3px; color: var(--tan); text-transform: uppercase; }
.admin-body { display: grid; gap: 18px; padding: 28px; }
.admin-dashboard-view .admin-dashboard-heading { margin: 0; align-items: center; }
.admin-dashboard-view .admin-dashboard-heading h1 { font-size: clamp(36px, 4vw, 55px); }
.admin-dashboard-view .admin-dashboard-heading .eyebrow, .admin-dashboard-view #adminIdentity { color: var(--paper); }
.admin-dashboard-view .admin-dashboard-heading button { color: var(--paper); border-color: rgba(243,241,237,.48); background: #242424; }
.admin-dashboard-view .admin-stat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.admin-dashboard-view .admin-stat-card, .admin-dashboard-view .admin-funnel-card, .admin-panel { border: 1px solid rgba(243,241,237,.26); border-radius: 7px; background: #242424; color: white; }
.admin-dashboard-view .admin-stat-card { min-height: 115px; padding: 18px; }
.admin-dashboard-view .admin-stat-card span { color: var(--paper); font-size: 10px; line-height: 1.3; }
.admin-dashboard-view .admin-stat-card strong { margin-top: 14px; font-size: 37px; }
.admin-insights-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: stretch; }
.admin-bottom-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px; align-items: start; }
.admin-panel { min-width: 0; padding: 20px; }
.admin-dashboard-view .admin-section-title h2, .admin-weekly h3 { margin: 0; font: 800 25px/1 "Barlow Condensed", sans-serif; }
.admin-dashboard-view .admin-section-title p { color: var(--paper); font-size: 11px; line-height: 1.4; }
.admin-dashboard-view .admin-metric-table-wrap { border-color: rgba(243,241,237,.26); background: var(--ink); }
.admin-dashboard-view .admin-metric-table { min-width: 420px; }
.admin-dashboard-view .admin-metric-table td, .admin-dashboard-view .admin-metric-table th { padding: 10px 12px; border-color: rgba(243,241,237,.18); font-size: 11px; }
.admin-dashboard-view .admin-metric-table th { color: var(--paper); }
.admin-dashboard-view .admin-funnel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-dashboard-view .admin-funnel-card { padding: 13px; text-align: center; border: 0; background: transparent; }
.admin-dashboard-view .admin-funnel-card strong { display: grid; place-items: center; width: min(130px, 100%); aspect-ratio: 1; margin: 0 auto 12px; border-radius: 50%; background: radial-gradient(closest-side, #242424 75%, transparent 77%), conic-gradient(var(--red-bright) var(--progress), #4a403f 0); font-size: 35px; }
.admin-dashboard-view .admin-funnel-card span { color: white; font-size: 11px; line-height: 1.4; }
.admin-dashboard-view .admin-funnel-card p { color: var(--paper); font-size: 10px; line-height: 1.4; }
.admin-weekly { margin-top: 12px; padding-top: 16px; border-top: 1px solid rgba(243,241,237,.26); }
.admin-weekly h3 { font-size: 20px; }
.admin-weekly-summary { margin: 8px 0; font-size: 12px; color: var(--paper); }
.admin-weekly-summary strong { color: white; font-size: 22px; }
.admin-weekly-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.admin-weekly-bar { display: grid; gap: 5px; align-items: end; font-size: 10px; color: var(--paper); }
.admin-weekly-bar meter { width: 100%; height: 15px; accent-color: var(--red-bright); }
.admin-dashboard-view .admin-preview-actions a { border-color: rgba(243,241,237,.48); border-radius: 4px; }
.admin-dashboard-view .admin-submission-empty, .admin-dashboard-view .admin-submission-card { background: var(--ink); color: var(--paper); border-color: rgba(243,241,237,.26); }
.admin-dashboard-view .admin-submission-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-dashboard-view .admin-submission-card input, .admin-dashboard-view .admin-submission-card select, .admin-dashboard-view .admin-submission-equipment label { background: #fff; color: #161616; }
.admin-dashboard-view .admin-last-updated { margin: 0; color: var(--paper); }
@media (max-width: 1200px) { .admin-dashboard-view .admin-stat-grid { grid-template-columns: repeat(3, 1fr); } .admin-bottom-grid { grid-template-columns: 1fr 1fr; } .admin-bottom-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 920px) { .admin-shell { grid-template-columns: 1fr; } .admin-side { display: none; position: fixed; top: 84px; left: 0; z-index: 45; width: 250px; height: calc(100vh - 84px); } .admin-shell.nav-open .admin-side { display: block; } .admin-insights-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .admin-topbar { padding: 0 14px; } .admin-body { padding: 18px 12px; } .admin-dashboard-view .admin-stat-grid { grid-template-columns: repeat(2, 1fr); } .admin-bottom-grid { grid-template-columns: 1fr; } .admin-bottom-grid > :first-child { grid-column: auto; } .admin-dashboard-view .admin-metric-table { min-width: 420px; } .admin-dashboard-heading { gap: 14px; flex-wrap: wrap; } }
.content-hero { position: relative; overflow: hidden; padding: 54px; background: var(--ink); color: white; border-bottom: 5px solid var(--red); }
.content-hero::after { content: "10"; position: absolute; right: 24px; bottom: -44px; color: rgba(255,255,255,.045); font: 800 230px/.8 "Barlow Condensed", sans-serif; }
.content-hero > * { position: relative; z-index: 1; }
.content-hero h1, .section-heading h1 { font-size: clamp(46px, 6vw, 76px); line-height: .9; }
.content-hero h1 em { color: var(--tan); font-style: normal; }
.content-hero > p:last-child { max-width: 700px; margin: 22px 0 0; color: #c2c2bf; font-size: 14px; line-height: 1.7; }
.content-hero.compact { padding-block: 46px; }
.content-grid { display: grid; gap: 15px; margin-top: 22px; }
.about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.big-ten-explainer { margin-top: 22px; padding: 34px 42px 38px; border: 1px solid rgba(243,241,237,.4); border-top: 4px solid var(--red); background: #242424; color: var(--paper); }
.big-ten-explainer-heading .eyebrow { margin: 0 0 7px; color: var(--tan); }
.big-ten-explainer h2 { font: 800 clamp(34px, 4vw, 48px)/.95 "Barlow Condensed", sans-serif; }
.big-ten-explainer-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; margin-top: 28px; }
.big-ten-explainer-columns > div + div { border-left: 1px solid rgba(243,241,237,.28); padding-left: 36px; }
.big-ten-explainer h3 { margin: 0; color: var(--tan); font: 800 19px/1 "Barlow Condensed", sans-serif; letter-spacing: .03em; }
.big-ten-explainer p:not(.eyebrow) { margin: 12px 0 0; color: var(--paper); font-size: 13px; line-height: 1.7; }
.content-card { position: relative; min-height: 210px; padding: 30px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.content-card-featured { border-top: 4px solid var(--red); }
.content-card h2, .auth-required h2, .saved-empty h2, .account-card h2, .account-logged-in h2, .coach-card h2 { margin: 0; font: 800 28px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.content-card p { max-width: 480px; margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.content-number { display: block; margin-bottom: 30px; color: var(--red); font: 800 12px/1 "Barlow Condensed", sans-serif; letter-spacing: .12em; }
.content-note { margin-top: 18px; padding: 24px 28px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; border-left: 4px solid var(--red); background: var(--tan-soft); }
.content-note strong { font: 800 15px/1 "Barlow Condensed", sans-serif; letter-spacing: .06em; }
.content-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.content-note button { border: 0; padding: 0; background: transparent; color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.about-actions { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.about-action-card { padding: 28px; border: 1px solid var(--line); border-top: 4px solid var(--red); background: var(--surface); box-shadow: var(--shadow); }
.about-action-card:nth-child(2) { border-top-color: var(--tan); }
.about-action-card h2 { margin: 0; font: 800 30px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.about-action-card > p:not(.eyebrow) { min-height: 58px; margin: 13px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-bottom: 28px; border-bottom: 2px solid var(--ink); }
.section-heading > div > p:last-child { max-width: 650px; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.device-only-label { flex: 0 0 auto; padding: 10px 12px; border: 1px solid var(--tan); color: #765a43; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.auth-required, .saved-empty { margin-top: 25px; padding: 44px 30px; border: 1px dashed var(--line); background: rgba(255,255,255,.4); text-align: center; }
.auth-required p, .saved-empty p { margin: 13px auto 22px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.primary-action { min-height: 45px; border: 0; padding: 0 18px; background: var(--red); color: white; font-size: 9px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.primary-action:hover { background: var(--red-bright); }

.profile-form { margin-top: 24px; padding: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; border: 1px solid var(--line); border-top: 4px solid var(--red); background: var(--surface); box-shadow: var(--shadow); }
.profile-form label, .account-card label { display: grid; gap: 8px; }
.profile-form label > span, .account-card label > span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.profile-form input, .profile-form select, .profile-form textarea, .account-card input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 0; padding: 0 13px; background: white; color: var(--ink); outline: none; }
.profile-form textarea { min-height: 120px; padding-block: 12px; resize: vertical; }
.profile-form input:focus, .profile-form select:focus, .profile-form textarea:focus, .account-card input:focus { border-color: var(--red); }
.profile-goals { grid-column: 1 / -1; }
.profile-photo-control { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; }
.profile-photo-preview { flex: 0 0 88px; width: 88px; height: 88px; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.profile-photo-preview img, .coach-profile-photo { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-preview span { font: 700 28px Inter, sans-serif; }
.profile-photo-control > div:last-child { min-width: 0; flex: 1; }
.profile-photo-control input[type="file"] { max-width: 100%; height: auto; padding: 8px; font-size: 11px; }
.profile-photo-control p, .profile-form label small { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 6px 0 0; }
.profile-form label small:empty { display: none; }
.profile-location { grid-column: 1 / -1; }
.coach-personal-details { margin: 18px 0; }
.coach-personal-details dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 14px; }
.coach-personal-details dt { color: var(--tan); font-size: 10px; font-weight: 700; margin-bottom: 5px; }
.coach-personal-details dd { margin: 0; font-size: 13px; }
.coach-profile-photo { display: block; width: 80px; height: 80px; border-radius: 50%; border: 1px solid var(--line); margin-bottom: 16px; }
.profile-section-heading { grid-column: 1 / -1; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.profile-section-heading p { margin: 0; font: 800 20px/1 "Barlow Condensed", sans-serif; letter-spacing: .04em; }
.profile-section-heading span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.athlete-details-heading { margin-top: 8px; padding-top: 20px; border-top: 2px solid var(--tan); }
.profile-form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.profile-form-actions p { margin: 0; color: var(--red); font-size: 10px; font-weight: 700; }
.profile-tabs { margin-top: 24px; display: inline-flex; border: 1px solid var(--line); background: var(--surface); }
.profile-tabs button { min-height: 44px; border: 0; border-right: 1px solid var(--line); padding: 0 18px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; cursor: pointer; }
.profile-tabs button:last-child { border-right: 0; }
.profile-tabs button.active { background: var(--ink); color: white; }
#profileTabs button[aria-selected="true"] { background: #710014; color: #f3f1ed; box-shadow: inset 0 -4px 0 #b38f70; }
.coming-soon-label { display: inline-block; margin-left: 8px; font-size: 9px; letter-spacing: .04em; color: var(--muted); }
button.coming-soon:disabled { cursor: not-allowed; opacity: .7; }
.home-card.coming-soon:disabled { background: #161616; border-color: #514945; color: #f3f1ed; transform: none; box-shadow: none; }
.home-card.coming-soon .home-card-chevron { visibility: hidden; }
.account-feedback-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }

.training-history { margin-top: 24px; }
.training-history-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: 24px 26px; border-top: 4px solid var(--red); background: var(--ink); color: white; }
.training-history-heading h2 { margin: 5px 0 0; font: 800 34px/1 "Barlow Condensed", sans-serif; }
.training-history-heading > p { max-width: 540px; margin: 0; color: #c8c9c6; font-size: 11px; line-height: 1.55; }
.history-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-top: 0; background: var(--surface); }
.history-summary-card { padding: 18px 20px; border-right: 1px solid var(--line); }
.history-summary-card:last-child { border-right: 0; }
.history-summary-card span, .workout-record-meta span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.history-summary-card strong { display: block; margin-top: 5px; font: 800 28px/1 "Barlow Condensed", sans-serif; }
.history-view-tabs { display: flex; margin-top: 18px; border: 1px solid var(--line); background: var(--surface); }
.history-view-tabs button { flex: 1; min-height: 48px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.history-view-tabs button:last-child { border-right: 0; }
.history-view-tabs button.active { background: var(--ink); color: white; }
.history-filters { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px 0; }
.history-filters label { display: grid; gap: 6px; min-width: min(260px, 100%); }
.history-filters label span, .save-program-dialog label span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.history-filters select, #workoutWeek, .save-program-dialog select { min-height: 42px; border: 1px solid var(--line); padding: 0 12px; background: var(--surface); color: var(--ink); }
.profile-team-details { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 16px; align-items: baseline; grid-column: 1 / -1; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); }
.profile-team-details span { font-size: 10px; font-weight: 800; color: var(--muted); }
.profile-team-details strong { font-size: 14px; }
.training-history-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.danger-action { border-color: var(--red) !important; color: var(--red) !important; }
.reset-choice-actions { display: grid; gap: 8px; margin-top: 18px; }
.reset-choice-actions button { min-height: 44px; }
.personal-best-list { margin-top: 20px; }
.personal-best-list h3 { font: 800 24px/1 "Barlow Condensed", sans-serif; }
.personal-best-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.personal-best-grid article { display: grid; gap: 5px; padding: 16px; border: 1px solid var(--line); border-left: 3px solid var(--red); background: var(--surface); }
.personal-best-grid span, .personal-best-grid small { font-size: 10px; color: var(--muted); }
.personal-best-grid strong { font-size: 14px; }
.personal-best-grid b { font: 800 24px/1 "Barlow Condensed", sans-serif; }
.save-program-dialog { width: min(420px, calc(100vw - 32px)); border: 1px solid var(--line); border-top: 4px solid var(--red); padding: 28px; background: var(--surface); color: var(--ink); box-shadow: 0 22px 70px rgba(0,0,0,.35); }
.save-program-dialog::backdrop { background: rgba(0,0,0,.7); }
.save-program-dialog form, .save-program-dialog label { display: grid; gap: 16px; }
.save-program-dialog h2 { font-size: 36px; }
.save-program-dialog p:not(.eyebrow) { margin: 0; font-size: 13px; line-height: 1.55; }
.save-program-dialog label { gap: 7px; }
.save-program-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.team-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 24px 0 16px; }
.team-toolbar label { display: grid; gap: 6px; min-width: min(300px, 100%); }
.team-toolbar label span { font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.team-toolbar select, .save-program-dialog input { min-height: 44px; border: 1px solid var(--line); padding: 0 12px; background: white; color: var(--ink); }
.team-notice, .team-athlete-detail { margin-top: 14px; padding: 22px; border: 1px solid var(--line); border-left: 4px solid var(--red); background: var(--surface); }
.team-notice h2 { margin-bottom: 10px; }
.team-notice p, .team-athlete-detail p { font-size: 12px; line-height: 1.55; }
.team-link-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.team-link-actions input { flex: 1 1 280px; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.team-athlete-detail > h3 { margin: 26px 0 0; }
.team-athlete-detail .history-summary { margin-top: 12px; border-top: 1px solid var(--line); }
.team-athlete-detail .recorded-session-list { margin-top: 0; }
.team-athlete-detail .recorded-session-card { box-shadow: none; }
.athlete-list-button { width: 100%; margin: 8px 0; border: 1px solid var(--line); padding: 14px 16px; background: var(--surface); text-align: left; cursor: pointer; font-weight: 700; }
.athlete-list-button span { float: right; color: var(--red); font-size: 10px; }
.team-log { border-top: 1px solid var(--line); padding: 14px 0; }
.team-log strong, .team-log small { display: block; }
.team-log small { margin-top: 5px; color: var(--muted); }
.exercise-changed { display: inline-block; margin-left: 6px; color: var(--red); font-size: 9px; font-weight: 800; }
.history-empty, .workout-recorder-empty { margin-top: 20px; padding: 40px 24px; border: 1px dashed var(--line); text-align: center; }
.history-empty h3, .workout-recorder-empty h2 { margin: 0; font: 800 28px/1 "Barlow Condensed", sans-serif; }
.history-empty p, .workout-recorder-empty p { margin: 10px 0 20px; color: var(--muted); font-size: 11px; }
.recorded-session-list { display: grid; gap: 14px; margin-top: 18px; }
.recorded-session-card { border: 1px solid var(--line); border-top: 4px solid var(--tan); background: var(--surface); box-shadow: var(--shadow); }
.recorded-session-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.recorded-session-head h3 { margin: 4px 0 0; font: 800 25px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.recorded-session-head .recorded-program-name { display: inline-block; margin: 0 0 6px; padding: 5px 9px; border-left: 3px solid var(--red); background: var(--tan-soft); color: var(--ink); font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.recorded-session-head .recorded-week { margin: 1px 0 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.recorded-session-head .recorded-session-focus { margin-top: 7px; color: var(--ink); font-size: 13px; font-weight: 800; }
.recorded-session-head div > p:last-child:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.recorded-session-head div > p.recorded-session-focus:last-child { color: var(--ink); font-size: 13px; font-weight: 800; }
.recorded-session-head time { flex: 0 0 auto; padding: 8px 10px; background: var(--ink); color: white; font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.recorded-session-table { width: 100%; border-collapse: collapse; }
.recorded-session-table th, .recorded-session-table td { padding: 11px 20px; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; }
.recorded-session-table th { color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.recorded-session-table tbody tr:last-child td { border-bottom: 0; }
.recorded-session-table .weekly-change { white-space: nowrap; font-weight: 800; }
.coach-detail-tabs { margin: 22px 0 0; }
.coach-progress-controls { display: grid; gap: 7px; margin: 20px 0 14px; }
.coach-progress-controls label { font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.coach-progress-controls select { width: min(100%, 420px); min-height: 44px; padding: 0 12px; border: 1px solid var(--line); background: white; color: var(--ink); }
.coach-progress-card { max-width: 100%; min-width: 0; overflow: hidden; }
.coach-progress-card .history-exercise-head { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.coach-progress-card .history-metric { text-align: left; }
.history-exercise-list { display: grid; gap: 12px; margin-top: 18px; }
.history-exercise-card { border: 1px solid var(--line); border-left: 4px solid var(--red); background: var(--surface); box-shadow: var(--shadow); }
.history-exercise-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 22px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.history-exercise-head h3 { margin: 3px 0 0; font: 800 24px/1 "Barlow Condensed", sans-serif; }
.history-metric { text-align: right; }
.history-metric span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.history-metric strong { display: block; margin-top: 4px; font: 800 20px/1 "Barlow Condensed", sans-serif; }
.history-trend.up strong { color: #247243; }
.history-trend.down strong { color: var(--red); }
.monthly-progress-chart { padding: 18px 20px 16px; border-bottom: 1px solid var(--line); background: #fbfaf8; }
.progress-chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.progress-chart-heading span, .progress-chart-heading small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.monthly-progress-chart svg { display: block; width: 100%; height: 165px; margin-top: 7px; overflow: visible; }
.chart-grid { stroke: #ded9d3; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.monthly-progress-chart circle { fill: white; stroke: var(--red); stroke-width: 3; }
.monthly-progress-chart .chart-point { cursor: pointer; }
.monthly-progress-chart .chart-point:hover, .monthly-progress-chart .chart-point:focus { fill: var(--red); stroke: var(--ink); outline: none; }
.chart-axis { fill: var(--muted); font: 700 8px Inter, sans-serif; }
.chart-date { fill: var(--muted); font: 700 9px Inter, sans-serif; }
.chart-point-detail { min-height: 20px; margin: 0 0 10px; font-size: 11px; font-weight: 700; color: var(--red); }
.progress-chart-note { margin: -5px 0 12px; color: var(--muted); font-size: 9px; text-align: center; }
.progress-point-strip { display: flex; gap: 8px; padding-bottom: 2px; overflow-x: auto; }
.progress-point { min-width: 92px; padding: 9px 10px; border: 1px solid var(--line); background: white; }
.progress-point span, .progress-point small { display: block; color: var(--muted); font-size: 8px; font-weight: 700; }
.progress-point strong { display: block; margin: 4px 0; font: 800 17px/1 "Barlow Condensed", sans-serif; }
.progress-point.up small { color: #247243; }
.progress-point.down small { color: var(--red); }
.history-log-table { width: 100%; border-collapse: collapse; }
.history-log-table th, .history-log-table td { padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: 10px; text-align: left; }
.history-log-table th { color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.history-log-table tr:last-child td { border-bottom: 0; }

.workout-record-meta { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 20px; align-items: end; padding: 20px 22px; border: 1px solid var(--line); border-top: 4px solid var(--red); background: var(--surface); }
.workout-record-meta strong { display: block; margin-top: 6px; font: 800 28px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.workout-record-meta label { display: grid; gap: 7px; }
.workout-record-meta input { min-height: 42px; border: 1px solid var(--line); padding: 0 11px; background: white; }
.workout-day-tabs { display: flex; gap: 7px; margin: 18px 0; overflow-x: auto; }
.workout-day-tabs button { min-width: 106px; min-height: 42px; border: 1px solid var(--line); padding: 0 13px; background: var(--surface); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; cursor: pointer; }
.workout-day-tabs button.active { border-color: var(--red); background: var(--red); color: white; }
#workoutLogForm { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.workout-log-heading { display: flex; justify-content: space-between; gap: 24px; padding: 22px 24px; background: var(--ink); color: white; }
.workout-log-heading h2 { margin: 4px 0 0; font: 800 30px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.workout-log-heading > p { max-width: 400px; margin: 0; color: #c8c9c6; font-size: 10px; line-height: 1.5; }
.workout-log-list { padding: 8px 18px; }
.workout-log-row { display: grid; grid-template-columns: minmax(220px, 1fr) 110px 110px 190px; gap: 12px; align-items: center; min-height: 72px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.workout-log-row:last-child { border-bottom: 0; }
.workout-log-row.workout-shade-0 { background: #f3e8e5; }
.workout-log-row.workout-shade-1 { background: #eee5dc; }
.workout-log-row.workout-superset { padding-inline: 12px; border-left: 3px solid var(--red); }
.workout-exercise .workout-order { display: inline-block; margin-right: 8px; padding: 5px 7px; background: var(--ink); color: white; font-size: 11px; }
.workout-log-row.skipped { background: #f1efec; }
.workout-log-row.skipped .workout-exercise, .workout-log-row.skipped .workout-input { opacity: .48; }
.workout-exercise span { display: block; color: var(--red); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.workout-exercise strong { display: block; margin-top: 4px; font-size: 12px; }
.workout-exercise small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.workout-exercise .workout-previous { clear: both; margin-top: 7px; color: var(--tan); font-size: 12px; font-weight: 600; line-height: 1.4; }
.workout-input { display: grid; gap: 5px; }
.workout-input span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.workout-input input { width: 100%; min-height: 40px; border: 1px solid var(--line); padding: 0 9px; background: white; }
.workout-row-actions { display: grid; grid-template-columns: 1fr; gap: 6px; }
.workout-row-actions button { min-height: 36px; border: 1px solid var(--line); padding: 0 8px; background: transparent; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; cursor: pointer; }
.workout-row-actions button:hover, .workout-row-actions button:focus-visible { border-color: var(--red); color: var(--red); outline: none; }
.workout-row-actions button:disabled { opacity: .35; cursor: not-allowed; }
.workout-skip-button.active { border-color: var(--red) !important; background: var(--red) !important; color: white !important; }
.workout-changeout-select { grid-column: 1 / -1; width: 100%; min-height: 38px; border: 1px solid var(--red); padding: 0 8px; background: white; color: var(--ink); font-size: 10px; }
.workout-log-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; border-top: 1px solid var(--line); }
.workout-log-actions p { margin: 0; color: var(--red); font-size: 10px; font-weight: 700; }

.saved-program-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.saved-program-card { padding: 25px; border: 1px solid var(--line); border-top: 3px solid var(--red); background: var(--surface); box-shadow: var(--shadow); }
.saved-program-card h2 { margin: 5px 0 0; font: 800 27px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.program-detail-weeks { display: flex; gap: 7px; margin: 22px 0; overflow-x: auto; padding-bottom: 8px; }
.program-detail-weeks button { flex: 0 0 auto; min-width: 84px; min-height: 42px; border: 1px solid var(--line); background: var(--surface); font-size: 11px; font-weight: 800; cursor: pointer; }
.program-detail-weeks button.active { background: var(--ink); color: white; border-color: var(--ink); }
.program-detail-sessions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.program-session-choice { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-top: 3px solid var(--red); background: var(--surface); text-align: left; cursor: pointer; }
.program-session-choice.active { outline: 2px solid var(--red); }
.program-session-choice span, .program-session-choice small { color: var(--muted); font-size: 10px; font-weight: 800; }
.program-session-choice strong { font: 800 23px/1 "Barlow Condensed", sans-serif; }
.program-detail-outline { margin-top: 18px; }
.program-detail-prompt, .program-session-outline { padding: 24px; border: 1px solid var(--line); background: var(--surface); }
.program-session-outline { padding: 0 0 22px; }
.program-outline-head { padding: 22px; }
.program-outline-head h2 { margin: 5px 0; font: 800 30px/1 "Barlow Condensed", sans-serif; }
.program-outline-head > p:last-child, .program-complete-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.session-coach-note { margin: 0 22px 18px; padding: 16px 18px; border-left: 4px solid var(--red); background: var(--paper); }
.session-coach-note strong { display: block; color: var(--red); font-size: 10px; letter-spacing: .1em; }
.session-coach-note p { margin: 7px 0 0; color: var(--ink); font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.recorder-coach-note { margin: 0 0 20px; }
.program-session-outline > button, .program-complete-note { margin: 18px 22px 0; }
.outline-shade-0 { background: #f3e8e5; }
.outline-shade-1 { background: #eee5dc; }
.saved-program-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 23px; }
.saved-program-meta span { padding: 6px 8px; background: var(--paper); color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.saved-program-actions { display: flex; gap: 8px; }
.saved-program-actions button { min-height: 38px; border: 1px solid var(--line); padding: 0 13px; background: transparent; font-size: 8px; font-weight: 800; letter-spacing: .09em; cursor: pointer; }
.saved-program-actions .open-program { border-color: var(--red); background: var(--red); color: var(--ink); }
.saved-program-actions .record-program { border-color: var(--ink); background: var(--ink); color: white; }
.saved-program-actions .delete-program { color: var(--muted); }

.coach-directory { margin-top: 22px; }
.coach-card { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 28px; align-items: center; padding: 30px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.coach-monogram { aspect-ratio: 1; display: grid; place-items: center; background: var(--ink); color: white; border-bottom: 5px solid var(--red); font: 800 42px/1 "Barlow Condensed", sans-serif; }
.coach-monogram img { display: block; width: 100%; height: 100%; object-fit: contain; }
.coach-card h2 { font-size: 38px; }
.coach-speciality { margin: 12px 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.coach-card a { color: var(--red); font-size: 11px; font-weight: 800; text-decoration: none; }

.device-warning { margin-top: 22px; padding: 18px 22px; display: flex; gap: 20px; border-left: 4px solid var(--red); background: #f3dfe3; }
.device-warning strong { color: var(--red); font-size: 10px; letter-spacing: .1em; }
.device-warning p { margin: 0; color: #5e4d50; font-size: 11px; line-height: 1.55; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.account-card { padding: 28px; display: grid; gap: 17px; border: 1px solid var(--line); border-top: 3px solid var(--red); background: var(--surface); box-shadow: var(--shadow); }
.account-card .primary-action { justify-self: start; }
.form-status { min-height: 16px; margin: 0; color: var(--red); font-size: 10px; font-weight: 700; }
.account-logged-in { margin-top: 24px; padding: 30px; border: 1px solid var(--line); border-top: 4px solid var(--red); background: var(--surface); box-shadow: var(--shadow); }
.account-logged-in p { margin: 10px 0 22px; color: var(--muted); font-size: 12px; }
.account-logged-in-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.secondary-action { min-height: 45px; border: 1px solid var(--line); padding: 0 16px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; cursor: pointer; }

.library-view { max-width: 1240px; margin: 0 auto; padding: 58px 36px 80px; }
.library-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding-bottom: 26px; border-bottom: 2px solid var(--ink); }
.library-heading h2 { font-size: clamp(38px, 5vw, 62px); }
.library-heading > div:first-child > p:last-child { max-width: 620px; margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.library-total { min-width: 112px; padding: 16px; border-left: 4px solid var(--red); background: var(--ink); color: white; text-align: right; }
.library-total strong, .library-total span { display: block; }
.library-total strong { font: 800 34px/1 "Barlow Condensed", sans-serif; }
.library-total span { margin-top: 5px; color: var(--tan); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.library-toolbar { margin-top: 22px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.library-toolbar label { width: min(360px, 100%); }
.library-toolbar select, .library-add-panel input:not([type="checkbox"]), .library-add-panel select { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 0; padding: 0 13px; background: var(--surface); color: var(--ink); outline: none; }
.library-toolbar select:focus, .library-add-panel input:not([type="checkbox"]):focus, .library-add-panel select:focus { border-color: var(--red); }
.library-add-toggle, .library-save-button { min-height: 46px; border: 0; padding: 0 18px; background: var(--red); color: white; font-size: 10px; font-weight: 800; letter-spacing: .09em; cursor: pointer; }
.library-add-toggle:hover, .library-save-button:hover { background: var(--red-bright); }
.library-add-panel { margin-top: 18px; padding: 22px; display: grid; grid-template-columns: .7fr 1.4fr 1fr auto; gap: 16px; align-items: end; border: 1px solid var(--line); border-top: 3px solid var(--red); background: var(--surface); box-shadow: var(--shadow); }
.library-add-panel h3 { margin: 0; font: 800 24px/1 "Barlow Condensed", sans-serif; }
.library-add-panel .eyebrow { margin-bottom: 7px; }
.library-equipment-fieldset { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.library-video-url-field { grid-column: 1 / -1; }
.library-video-url-field small { margin-left: 5px; color: var(--muted); font: inherit; }
.library-equipment-fieldset legend { margin-bottom: 8px; }
.library-equipment-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.library-equipment-option { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 9px; font-weight: 700; cursor: pointer; }
.library-equipment-option:has(input:checked) { border-color: var(--red); background: #f8edef; color: var(--red); }
.library-equipment-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--red); }
.library-form-actions { display: flex; gap: 7px; }
.library-cancel-button { min-height: 46px; border: 1px solid var(--line); padding: 0 13px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.library-status { min-height: 19px; margin: 13px 0 0; color: var(--red); font-size: 10px; font-weight: 700; }
.library-table-wrap { margin-top: 5px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow-x: auto; }
.library-table { width: 100%; border-collapse: collapse; }
.library-table th { height: 39px; padding: 0 14px; background: var(--ink); color: #c8c9c6; font-size: 8px; font-weight: 800; letter-spacing: .12em; text-align: left; }
.library-table th:last-child { width: 68px; }
.library-table td { height: 51px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 11px; }
.library-table tr:last-child td { border-bottom: 0; }
.library-sort-button { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.library-sort-button:hover, .library-sort-button:focus-visible { color: white; outline: none; }
.library-sort-button span { color: var(--tan); font-size: 11px; }
.library-exercise-name { font-weight: 700; }
.library-movement-tag { display: inline-block; padding: 6px 8px; background: #f5e9eb; color: var(--red); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.library-default { color: var(--muted); }
.library-equipment-button { max-width: 290px; border: 1px solid var(--line); padding: 7px 9px; background: transparent; color: var(--muted); font-size: 9px; line-height: 1.35; text-align: left; cursor: pointer; }
.library-equipment-button:hover, .library-equipment-button:focus-visible { border-color: var(--red); color: var(--red); outline: none; }
.library-video-button { min-width: 92px; border: 1px solid var(--line); padding: 7px 10px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-align: left; cursor: pointer; }
.library-video-button.has-video { border-color: var(--red); color: var(--red); }
.library-video-button:hover, .library-video-button:focus-visible { background: #f8edef; border-color: var(--red); color: var(--red); outline: none; }
.library-delete { width: 32px; height: 32px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.library-delete:hover { border-color: var(--red); color: var(--red); }
.library-empty { margin-top: 18px; padding: 36px; border: 1px dashed var(--line); color: var(--muted); text-align: center; font-size: 11px; }
.library-equipment-dialog, .library-video-dialog { width: min(680px, calc(100% - 28px)); border: 0; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, .3); }
.library-equipment-dialog::backdrop, .library-video-dialog::backdrop { background: rgba(20, 20, 20, .72); }
.library-equipment-dialog form, .library-video-dialog form { padding: 26px; border-top: 4px solid var(--red); }
.library-equipment-dialog h3, .library-video-dialog h3 { margin: 6px 0 0; font: 800 30px/1 "Barlow Condensed", sans-serif; }
.library-equipment-exercise { margin: 9px 0 22px; color: var(--muted); font-size: 12px; font-weight: 700; }
.library-equipment-help { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.library-dialog-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 8px; }
.library-video-exercise { margin: 9px 0 22px; color: var(--muted); font-size: 12px; font-weight: 700; }
.library-video-dialog label { display: block; }
.library-video-dialog input { width: 100%; min-height: 46px; margin-top: 7px; border: 1px solid var(--line); border-radius: 0; padding: 0 13px; background: #fff; color: var(--ink); outline: none; }
.library-video-dialog input:focus { border-color: var(--red); }
.library-video-help, .library-video-status { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.library-video-status { min-height: 15px; color: var(--red); font-weight: 700; }
.library-video-preview { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 14px; overflow: hidden; background: #080808; }
.library-video-preview iframe, .library-video-preview video { width: 100%; height: 100%; display: block; border: 0; object-fit: contain; }
.library-video-preview a { width: 100%; height: 100%; display: grid; place-items: center; padding: 24px; color: white; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-align: center; }
.library-video-actions { align-items: center; }
.library-remove-video { min-height: 46px; margin-right: auto; border: 1px solid var(--red); padding: 0 13px; background: transparent; color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.exercise-video-viewer-inner { padding: 24px; border-top: 4px solid var(--red); }
.exercise-video-viewer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.exercise-video-viewer-heading h3 { margin: 6px 0 0; font: 800 30px/1 "Barlow Condensed", sans-serif; }
.exercise-video-close { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 24px; cursor: pointer; }

/* Compact desktop builder. The existing tablet and phone layout remains below. */
@media (min-width: 1280px) {
  .hero { padding: 24px max(28px, calc((100vw - 1540px) / 2)) 26px; grid-template-columns: minmax(0, 1fr) minmax(540px, 1fr); gap: 30px; align-items: center; }
  .hero-logo { width: 30vw; right: 30%; opacity: .035; }
  .hero-copy h1 { font-size: clamp(54px, 5vw, 77px); }
  .hero-copy .eyebrow { margin-bottom: 10px; }
  .hero-copy .lede { max-width: 500px; margin-top: 16px; font-size: 14px; line-height: 1.5; }
  .builder-stack { gap: 8px; }
  .builder-controls { padding: 17px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
  .builder-controls .control-label { margin-bottom: 6px; font-size: 11px; }
  .builder-controls input { height: 46px; }
  .builder-controls .segmented button { min-height: 44px; font-size: 12px; }
  .builder-controls .equipment-toggle { min-height: 46px; font-size: 11px; }
  .builder-controls .generate-button { grid-column: 1 / -1; height: 46px; font-size: 12px; }
  .builder-controls .equipment-panel { position: absolute; z-index: 3; width: calc(50% - 28px); background: var(--ink); box-shadow: var(--shadow); }

  .workspace { max-width: none; margin: 0; padding: 20px max(28px, calc((100vw - 1540px) / 2)) 50px; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; }
  .coverage-panel { position: sticky; top: 16px; padding: 17px 14px; }
  .coverage-panel h2 { font-size: 24px; }
  .coverage-panel .score { width: 46px; height: 46px; }
  .coverage-list { gap: 2px; margin: 15px 0; }
  .coverage-item { min-height: 31px; padding: 0 6px; font-size: 11px; letter-spacing: .01em; }
  .coverage-panel .validation-card { padding: 10px; }
  .coverage-panel .loading-guide { margin-top: 10px; padding: 10px; }

  .program-area { min-width: 0; padding: 14px; display: flex; flex-direction: column; }
  .program-heading { flex: 0 0 auto; min-height: 54px; padding: 4px 0 12px; align-items: center; }
  .program-heading .eyebrow { margin-bottom: 3px; }
  .program-heading h2 { font-size: 24px; }
  .program-heading .superset-hint { margin-top: 4px; font-size: 11px; }
  .program-actions { flex-wrap: wrap; justify-content: flex-end; }
  .program-actions .text-button { min-height: 33px; font-size: 10px; }
  .days-grid { order: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; margin-top: 14px; }
  .day-card { min-width: 0; }
  .day-header { min-height: 53px; }
  .day-header h3 { font-size: 22px; }
  .day-header input { font-size: 11px; }
  .exercise-column-headings { grid-template-columns: 28px minmax(0, 1fr) 126px; gap: 6px; padding: 10px 12px 3px; font-size: 10px; }
  .exercise-column-headings > span:last-child { display: none; }
  .loading-headings { grid-template-columns: 38px 38px 42px; gap: 4px; }
  .exercise-list { padding: 4px 10px; }
  .exercise-row { min-height: 74px; grid-template-columns: 28px minmax(0, 1fr) 126px; grid-template-areas: "order main loading" ". actions actions"; gap: 3px 6px; margin: 0 -4px; padding: 6px 4px; }
  .exercise-order { grid-area: order; flex-direction: column; gap: 2px; }
  .superset-label { min-width: 0; font-size: 16px; }
  .exercise-main { grid-area: main; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 5px; }
  .exercise-select-line { grid-template-columns: minmax(0, 1fr) auto auto; gap: 3px; }
  .exercise-row input, .exercise-row select { height: 34px; border-radius: 4px; }
  .pattern-select { padding-inline: 3px; font-size: 10px; }
  .exercise-select { padding-inline: 4px; font-size: 12px; }
  .loading-fields { grid-area: loading; grid-template-columns: 38px 38px 42px; gap: 4px; }
  .loading-fields input, .loading-fields select { padding-inline: 3px; font-size: 12px; }
  .loading-fields .rpe-input { padding: 0 17px 0 5px; }
  .row-actions { grid-area: actions; justify-content: flex-end; }
  .row-actions button { width: 24px; height: 23px; }
  .row-actions .superset-button { width: 46px; font-size: 10px; }
  .add-button { margin: 6px 13px 12px; font-size: 11px; }
  .program-legend { order: 2; margin-top: 14px; }
  .program-legend summary { font-size: 11px; }
  .program-legend-grid p { font-size: 11px; }
  .save-note { order: 3; font-size: 11px; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; }
  .workspace { grid-template-columns: 1fr; }
  .coverage-panel { position: static; }
  .coverage-list { grid-template-columns: repeat(2, 1fr); }
  .exercise-column-headings { display: none; }
  .library-add-panel { grid-template-columns: 1fr 1fr; }
  .library-equipment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .content-note { grid-template-columns: 1fr; gap: 10px; }
  .admin-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-funnel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .admin-preview-banner { position: relative; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 10px; }
  body:has(.admin-preview-banner) .topbar { top: 0; }
  .topbar { padding: 15px 18px; gap: 10px; }
  .topbar-actions { gap: 7px; }
  .private-badge { display: none; }
  .topbar-builder-link, .topbar-admin-link, .menu-toggle { min-height: 36px; padding-inline: 9px; font-size: 7px; }
  .menu-toggle { gap: 6px; }
  .app-menu { left: 18px; top: calc(100% - 5px); }
  .app-tab { min-height: 42px; font-size: 8px; }
  .brand { gap: 7px; }
  .brand-wordmark { width: clamp(86px, 27vw, 150px); max-height: 38px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand small { display: none; }
  .admin-dashboard-view { gap: 22px; }
  .admin-dashboard-heading { align-items: flex-start; }
  .admin-preview-panel { align-items: flex-start; flex-direction: column; padding: 20px; }
  .admin-stat-grid, .admin-funnel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stat-card, .admin-funnel-card { padding: 16px; }
  .admin-submission-card { grid-template-columns: 1fr; }
  .admin-submission-meta, .admin-submission-equipment, .admin-submission-actions { grid-column: 1; }
  .hero { padding: 24px 18px 42px; }
  h1 { font-size: 52px; }
  .builder-controls { padding: 20px; }
  .workspace { padding: 24px 14px 52px; }
  .coverage-panel.drag-enabled {
    position: sticky; top: 0; z-index: 50; padding: 11px 12px 10px;
    border-top: 3px solid var(--red); box-shadow: 0 12px 28px rgba(22,22,22,.2);
  }
  .coverage-panel.drag-enabled .panel-heading { align-items: center; }
  .coverage-panel.drag-enabled .panel-heading .eyebrow { display: none; }
  .coverage-panel.drag-enabled .panel-heading h2 { font-size: 20px; }
  .coverage-panel.drag-enabled .score { width: 38px; height: 38px; }
  .coverage-panel.drag-enabled .score strong { font-size: 18px; }
  .coverage-panel.drag-enabled .coverage-hint { margin: 7px 0; padding: 6px 8px; font-size: 8px; }
  .coverage-panel.drag-enabled .coverage-list {
    display: flex; gap: 6px; margin: 7px 0; padding-bottom: 4px; overflow-x: auto;
    overscroll-behavior-x: contain; scrollbar-width: thin;
  }
  .coverage-panel.drag-enabled .coverage-item {
    flex: 0 0 132px; min-height: 32px; touch-action: pan-x;
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  }
  .coverage-panel.drag-enabled .supplemental-bank {
    margin: 0; padding-top: 7px; display: flex; gap: 6px; border-top: 1px solid var(--line); overflow-x: auto;
  }
  .coverage-panel.drag-enabled .supplemental-bank .control-label { display: none; }
  .coverage-panel.drag-enabled .supplemental-bank .coverage-item { flex: 0 0 132px; }
  .coverage-panel.drag-enabled .validation-card,
  .coverage-panel.drag-enabled .loading-guide { display: none; }
  .program-area { padding: 19px 13px; }
  .program-heading { align-items: flex-start; flex-direction: column; }
  .program-actions { width: 100%; }
  .program-actions button { flex: 1; }
  .program-actions { flex-wrap: wrap; }
  .program-actions .pdf-button { flex-basis: 100%; }
  .program-legend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exercise-list { padding: 5px 10px; }
  .exercise-row {
    grid-template-columns: 31px minmax(0, 1fr) 73px;
    grid-template-areas: "order main actions" "order loading actions";
    gap: 5px; margin-left: -5px; margin-right: -5px; padding: 8px 5px;
  }
  .exercise-order { display: flex; flex-direction: column; justify-content: center; gap: 3px; text-align: center; }
  .exercise-order { grid-area: order; }
  .exercise-main { grid-area: main; }
  .loading-fields { grid-area: loading; grid-template-columns: 45px 45px 55px; }
  .loading-field { gap: 3px; }
  .loading-field > span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-align: center; }
  .loading-field input::placeholder { color: transparent; }
  .row-actions { grid-area: actions; }
  .superset-label { min-width: 0; }
  .row-grip { width: 28px; height: 34px; font-size: 15px; }
  .exercise-main { grid-template-columns: 1fr; gap: 3px; }
  .pattern-select, .exercise-select { width: 100%; }
  .exercise-select-line { grid-template-columns: minmax(0, 1fr) auto; }
  .row-actions { align-items: center; }
  .move-button { display: none; }
  .row-actions .remove-button { display: block; }
  .add-button { margin-left: 10px; }
  .equipment-grid { grid-template-columns: 1fr; }
  .library-view { padding: 34px 14px 54px; }
  .library-heading { gap: 14px; }
  .library-heading h2 { font-size: 38px; }
  .library-total { min-width: 88px; padding: 12px; }
  .library-toolbar { align-items: stretch; flex-direction: column; }
  .library-toolbar label { width: 100%; }
  .library-add-panel { grid-template-columns: 1fr; padding: 17px; }
  .library-equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-form-actions > button { flex: 1; }
  .library-table-wrap { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .library-table { min-width: 0; display: block; }
  .library-table thead { display: none; }
  .library-table tbody { display: grid; gap: 10px; }
  .library-table tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-top: 3px solid var(--red); background: var(--surface); box-shadow: var(--shadow); }
  .library-table td { min-height: 0; height: auto; display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 11px; }
  .library-table td::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
  .library-table td:first-child { grid-column: 1 / -1; font-size: 14px; }
  .library-table td:last-child { display: flex; align-items: flex-end; justify-content: flex-end; }
  .library-equipment-button, .library-video-button { max-width: none; width: 100%; min-height: 38px; }
  .library-equipment-dialog form, .library-video-dialog form { padding: 20px; }
  .library-video-actions { flex-wrap: wrap; }
  .library-remove-video { margin-right: 0; }
  .content-view { padding: 34px 14px 58px; }
  .content-hero { padding: 38px 24px; }
  .content-hero h1, .section-heading h1 { font-size: 44px; }
  .about-grid, .about-actions, .saved-program-list, .account-grid, .profile-form, .big-ten-explainer-columns { grid-template-columns: 1fr; }
  .big-ten-explainer { padding: 26px 24px; }
  .big-ten-explainer-columns { gap: 24px; }
  .big-ten-explainer-columns > div + div { border-left: 0; border-top: 1px solid rgba(243,241,237,.28); padding: 24px 0 0; }
  .profile-goals, .profile-section-heading, .profile-form-actions { grid-column: auto; }
  .profile-form-actions { align-items: stretch; flex-direction: column; }
  .section-heading { flex-direction: column; gap: 16px; }
  .content-card { min-height: 0; }
  .coach-card { grid-template-columns: 82px minmax(0, 1fr); gap: 17px; padding: 20px; }
  .coach-card h2 { font-size: 30px; }
  .training-history-heading, .workout-log-heading { align-items: flex-start; flex-direction: column; }
  .history-summary { grid-template-columns: 1fr; }
  .history-summary-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .history-summary-card:last-child { border-bottom: 0; }
  .history-view-tabs { width: 100%; }
  .recorded-session-head { flex-direction: column; gap: 12px; }
  .recorded-session-table-wrap { overflow-x: auto; }
  .recorded-session-table { min-width: 520px; }
  .history-exercise-head { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .history-exercise-head > div:first-child { grid-column: 1 / -1; }
  .history-metric { text-align: left; }
  .history-log-table { min-width: 540px; }
  .history-exercise-card { overflow-x: auto; }
  .monthly-progress-chart { min-width: 540px; }
  .workout-record-meta { grid-template-columns: 1fr; }
  .workout-log-row { grid-template-columns: 1fr 1fr; }
  .workout-exercise { grid-column: 1 / -1; }
  .workout-row-actions { grid-column: 1 / -1; }
  .saved-program-actions { flex-wrap: wrap; }
  .device-warning { flex-direction: column; gap: 7px; }
}

@page { size: A4 portrait; margin: 12mm; }

@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body { margin: 0; background: white; color: #161616; }
  body:has(#builder:not([hidden])) { background: white; }
  body > main { display: none !important; }
  .print-program { display: block !important; font-family: Inter, Arial, sans-serif; }
  .print-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 16px; border-bottom: 3px solid #710014; }
  .print-brand { display: flex; align-items: center; gap: 10px; }
  .print-brand img { width: 42px; height: 42px; object-fit: contain; }
  .print-brand strong, .print-brand span { display: block; }
  .print-brand strong { font: 800 18pt/1 "Barlow Condensed", Arial, sans-serif; letter-spacing: .04em; }
  .print-brand span { margin-top: 3px; font-size: 6.5pt; font-weight: 700; letter-spacing: .12em; }
  .print-title { max-width: 58%; text-align: right; }
  .print-title p { margin: 0 0 3px; color: #710014; font-size: 7pt; font-weight: 800; letter-spacing: .14em; }
  .print-title h1 { margin: 0; color: #161616; font: 800 25pt/.95 "Barlow Condensed", Arial, sans-serif; text-transform: uppercase; }
  .print-title > span { display: block; margin-top: 5px; color: #736b65; font-size: 7pt; font-weight: 800; letter-spacing: .12em; }
  .print-days { display: grid; gap: 14px; margin-top: 16px; }
  .print-day { break-inside: avoid; border: 1px solid #d5d1cc; border-top: 3px solid #710014; }
  .print-day-header { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 11px; background: #161616; color: white; }
  .print-day-header h2 { margin: 0; font: 800 14pt/1 "Barlow Condensed", Arial, sans-serif; letter-spacing: .05em; }
  .print-day-header p { margin: 0; color: #d5b08d; font-size: 7.5pt; font-weight: 700; }
  .print-session-note { margin: 7px 11px 9px; padding: 7px 9px; border-left: 2px solid #710014; background: #f3f1ed; color: #161616; font-size: 8pt; line-height: 1.35; white-space: pre-wrap; }
  .print-session-note strong { color: #710014; margin-right: 4px; }
  .print-day table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .print-day th { padding: 6px 7px; background: #eeeae5; color: #736b65; font-size: 6.5pt; font-weight: 800; letter-spacing: .08em; text-align: left; }
  .print-day th:nth-child(1), .print-day td:nth-child(1) { width: 7%; text-align: center; }
  .print-day th:nth-child(2), .print-day td:nth-child(2) { width: 33%; }
  .print-day th:nth-child(3), .print-day td:nth-child(3) { width: 25%; }
  .print-day th:nth-child(4), .print-day td:nth-child(4) { width: 9%; text-align: center; }
  .print-day th:nth-child(5), .print-day td:nth-child(5) { width: 17%; text-align: center; }
  .print-day th:nth-child(6), .print-day td:nth-child(6) { width: 9%; text-align: center; }
  .print-history .print-day th:nth-child(2), .print-history .print-day td:nth-child(2) { width: 28%; }
  .print-history .print-day th:nth-child(3), .print-history .print-day td:nth-child(3) { width: 20%; }
  .print-history .print-day th:nth-child(5), .print-history .print-day td:nth-child(5) { width: 13%; }
  .print-history .print-day th:nth-child(6), .print-history .print-day td:nth-child(6) { width: 23%; }
  .print-day td { padding: 6px 7px; border-top: 1px solid #e4e0dc; font-size: 7.5pt; vertical-align: middle; }
  .print-order { font-weight: 800; }
  .print-exercise { font-weight: 700; }
  .print-pattern { color: #710014; font-size: 6.5pt; font-weight: 800; text-transform: uppercase; }
  .print-superset-a { background: #faf5f0; }
  .print-superset-b { background: #f7edef; }
  .print-empty { padding: 14px !important; color: #736b65; text-align: center !important; }
  .print-footer { margin-top: 12px; padding-top: 8px; display: grid; gap: 5px; border-top: 1px solid #d5d1cc; color: #736b65; font-size: 6.5pt; font-weight: 700; letter-spacing: .08em; text-align: center; }
  .print-footer span:first-child { color: #710014; font-size: 6pt; }
}

/* Saved programs, session logging and progress — shared soft-square layout. */
#saved-programs, #record-workout { max-width: 1480px; padding-top: 36px; }
.saved-workspace { display:grid; grid-template-columns:minmax(260px,.8fr) minmax(0,1.7fr); gap:28px; align-items:start; margin-top:24px; }
.saved-workspace .saved-program-list { display:grid; grid-template-columns:1fr; margin:0; gap:18px; }
.saved-program-card { border:1px solid var(--line); border-radius:6px; box-shadow:none; padding:24px; }
.saved-program-card.selected { background:var(--red); color:white; border-color:var(--red); }
.saved-program-card.selected .eyebrow, .saved-program-card.selected .saved-program-meta { color:var(--paper); }
.saved-program-card.selected .saved-program-meta span { background:transparent; border-color:#ffffff55; color:white; }
.saved-program-card.selected .saved-program-actions button { color:white; border-color:#ffffff66; }
.saved-program-card .eyebrow { font-size:12px; line-height:1.5; }
.saved-open-button { width:100%; min-height:44px; margin-top:20px; background:var(--paper); color:var(--ink); border:1px solid var(--line); border-radius:6px; font-weight:700; cursor:pointer; }
.saved-program-card.selected .saved-open-button, .saved-program-card.selected .saved-program-actions .open-program { color:var(--ink); }
.saved-detail-panel { min-width:0; padding:28px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.saved-detail-panel .section-heading { margin:0 0 24px; }
.saved-detail-panel h1 { font-size:36px; line-height:1.1; }
.saved-detail-panel .section-heading .eyebrow { display:none; }
#savedTabs { display:flex; border:0; border-bottom:1px solid var(--line); background:transparent; }
#savedTabs button { font-size:16px; min-width:110px; border:0; border-bottom:3px solid transparent; background:transparent; }
#savedTabs button.active { color:var(--red); border-bottom-color:var(--red); }
.program-detail-weeks { display:flex; overflow-x:auto; gap:8px; padding-bottom:8px; }
.program-detail-weeks button { min-width:42px; min-height:44px; border-radius:6px; font-size:15px; padding:8px; }
.program-detail-weeks button.active { background:var(--red); color:white; }
.program-detail-sessions { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin:20px 0; }
.program-session-choice { border-radius:6px; min-height:160px; text-align:left; padding:18px; }
.program-session-choice > span:first-child { font-size:20px; font-weight:800; }
.program-session-choice small { font-size:12px; }
.program-session-choice.active { border-color:var(--red); background:#f6eeec; color:var(--ink); }
.program-session-choice .session-choice-cta { display:block; margin-top:18px; padding:12px 8px; text-align:center; background:var(--paper); color:var(--ink); font-size:13px; font-weight:800; border:1px solid var(--line); border-radius:6px; }
.program-session-choice.active .session-choice-cta { background:var(--red); color:white; }
.program-session-outline { box-shadow:none; border:0; border-top:1px solid var(--line); background:transparent; }
.program-outline-head { padding:20px 0; }
.program-outline-head h2 { font-size:26px; }
.program-outline-head p { font-size:14px; line-height:1.5; }
.saved-detail-panel .recorded-session-table th, .saved-detail-panel .recorded-session-table td { font-size:13px; padding:12px 8px; }
.program-overview-table { table-layout:fixed; min-width:520px; }
.program-overview-table .overview-order-column { width:58px; }
.program-overview-table .overview-exercise-column { width:auto; }
.program-overview-table col:nth-child(3),
.program-overview-table col:nth-child(4) { width:62px; }
.program-overview-table col:last-child { width:130px; }
.saved-detail-panel .program-overview-table th:first-child,
.saved-detail-panel .program-overview-table td:first-child { padding-right:3px; }
.saved-detail-panel .program-overview-table th:nth-child(2),
.saved-detail-panel .program-overview-table td:nth-child(2) { padding-left:3px; font-weight:700; }
.recorder-workspace { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:24px; align-items:start; }
.workout-record-meta { grid-column:1 / -1; margin:0; background:transparent; border:0; padding:0; }
#workoutLogForm { grid-column:1; grid-row:2; border:0; box-shadow:none; background:transparent; min-width:0; }
.recorder-summary { grid-column:2; grid-row:2; padding:12px 24px; border:1px solid var(--line); border-radius:6px; }
.recorder-summary div { padding:24px 0; font-size:22px; font-weight:700; border-bottom:1px solid var(--line); }
.recorder-summary div:last-child { border:0; }
.recorder-summary strong { color:var(--red); font-size:38px; }
.workout-log-heading { padding:0 0 20px; color:var(--ink); background:transparent; }
.workout-log-heading > p { font-size:13px; color:var(--muted); }
.recorder-columns, .workout-log-row { display:grid; grid-template-columns:minmax(180px,1.4fr) minmax(130px,1fr) 100px 100px 90px; gap:12px; }
.recorder-columns { background:var(--ink); color:white; border-radius:6px; padding:16px 12px; font-size:14px; font-weight:700; }
.workout-log-list { padding:0; }
.recorder-group-title { margin-top:18px; padding:14px 16px; background:var(--tan-soft); color:var(--red); font-size:17px; font-weight:800; border-radius:6px 6px 0 0; }
.recorder-group-title span { margin-left:12px; color:var(--ink); font-weight:400; font-size:13px; }
.workout-log-row { padding:16px 12px; min-height:90px; }
.workout-log-row.workout-superset { border-left:0; }
.workout-log-row.workout-shade-0, .workout-log-row.workout-shade-1 { background:#eeeae5; }
.workout-exercise strong { font-size:16px; }
.workout-exercise span { font-size:12px; letter-spacing:0; }
.workout-exercise .workout-order { float:left; margin:0 12px 0 0; font-size:15px; background:var(--red); border-radius:4px; padding:10px; }
.workout-target { font-size:14px; line-height:1.6; }
.workout-target > span, .workout-input > span { display:none; }
.workout-input input { font-size:20px; text-align:center; border-radius:6px; min-height:46px; }
.workout-row-actions button { font-size:11px; padding:4px; border-radius:6px; }
.recorder-legend { color:var(--muted); font-size:13px; margin:24px 0; }
.workout-log-actions { padding:20px 0; }
.progress-controls { display:grid; grid-template-columns:minmax(200px,1fr) minmax(180px,1fr); gap:24px; margin:24px 0; }
.progress-controls label, .progress-controls > div { display:grid; gap:8px; color:var(--muted); font-size:14px; }
.progress-controls select, .progress-controls strong { display:block; min-height:48px; border:1px solid var(--line); border-radius:6px; background:var(--surface); padding:12px; color:var(--ink); font-size:16px; font-weight:400; }
.history-exercise-card { border:0; background:transparent; box-shadow:none; overflow:visible; }
.history-exercise-head { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; padding:0; border:0; margin-bottom:20px; }
.history-exercise-head > div:first-child { grid-column:auto; }
.history-metric { border-radius:6px; padding:24px; background:var(--ink); text-align:left; color:white; }
.history-metric span { color:var(--tan); font-size:13px; }
.history-metric strong { font-size:42px; color:white; margin-top:12px; }
.history-exercise-list, .history-exercise-card { min-width:0; max-width:100%; }
.monthly-progress-chart { width:100%; min-width:0; max-width:100%; overflow:hidden; border:1px solid var(--line); border-radius:6px; padding:24px; background:var(--surface); }
.monthly-progress-chart svg { display:block; width:100%; max-width:100%; height:auto; aspect-ratio:3 / 1; min-height:0; }
.monthly-progress-chart circle { fill:var(--tan); stroke:var(--surface); stroke-width:2; }
.chart-axis, .chart-date { font-size:12px; }
.chart-point-detail { font-size:14px; margin-top:12px; }
.progress-chart-heading span { font-size:17px; }
.progress-point-strip { margin-top:16px; }
.recent-results { padding:18px 0; }
.recent-results summary { cursor:pointer; font-size:14px; }
.personal-best-grid article { border-radius:6px; }
@media(max-width:1100px) {
.recorder-workspace { grid-template-columns:1fr; }
.recorder-summary { grid-column:1; grid-row:2; display:flex; justify-content:space-around; padding:10px; gap:12px; }
.recorder-summary div { padding:8px; border:0; font-size:16px; }
.recorder-summary strong { font-size:24px; }
#workoutLogForm { grid-row:3; }
.saved-workspace { grid-template-columns:260px minmax(0,1fr); gap:18px; }
.saved-detail-panel { padding:18px; }
}
@media(max-width:760px) {
.saved-workspace { grid-template-columns:1fr; }
.saved-workspace .saved-program-list { display:flex; overflow-x:auto; padding-bottom:8px; scroll-snap-type:x proximity; }
.saved-program-card { min-width:260px; flex:0 0 85%; scroll-snap-align:start; }
.saved-detail-panel { padding:16px; }
#saved-programs, #record-workout { padding:28px 14px 60px; }
.recorder-columns { display:none; }
.workout-log-row { grid-template-columns:1fr 1fr; gap:12px; }
.workout-exercise { grid-column:1 / -1; }
.workout-target { grid-column:1 / -1; }
.workout-target > span, .workout-input > span { display:block; font-size:12px; }
.workout-row-actions { grid-column:1 / -1; }
.workout-log-heading { display:block; }
.workout-log-heading > p { margin-top:12px; }
.recorder-group-title span { display:block; margin:6px 0 0; }
.recorder-summary { flex-wrap:wrap; justify-content:flex-start; }
.progress-controls { grid-template-columns:1fr; gap:14px; }
.history-exercise-head { gap:8px; }
.history-metric { padding:16px 10px; }
.history-metric strong { font-size:25px; }
.history-metric span { font-size:12px; line-height:1.5; }
.monthly-progress-chart { padding:14px; overflow-x:auto; }
.monthly-progress-chart { overflow:hidden; }
.monthly-progress-chart svg { min-width:0; width:100%; }
.program-detail-sessions { display:flex; overflow-x:auto; }
.program-session-choice { min-width:170px; }
}

/* Charcoal canvas across the app; pale surfaces retain their own ink text. */
@media screen {
  .content-view, .library-view { color: var(--paper); }
  .content-view > .section-heading, .library-heading { border-bottom-color: rgba(243,241,237,.55); }
  .content-view > .section-heading .eyebrow, .library-heading .eyebrow,
  .admin-section-title .eyebrow { color: var(--tan); }
  .content-view > .section-heading > div > p:last-child, .library-heading > div:first-child > p:last-child,
  .admin-dashboard-heading #adminIdentity, .admin-section-title p:last-child, .admin-last-updated {
    color: #d0cbc5;
  }
  .content-hero, .admin-preview-panel, .training-history-heading,
  .library-total, .history-metric, .recorder-columns {
    border: 1px solid rgba(243,241,237,.65);
    border-left: 4px solid var(--red);
  }
  .content-hero { border-bottom: 5px solid var(--red); }
  .training-history-heading { border-top: 4px solid var(--red); }
  .admin-preview-panel { background: #242424; }

  .content-card, .content-note, .about-action-card, .auth-required, .saved-empty,
  .profile-form, .profile-tabs, .history-summary, .history-view-tabs, .profile-team-details,
  .personal-best-grid article, .team-notice, .team-athlete-detail, .athlete-list-button,
  .recorded-session-card, .saved-program-card, .saved-detail-panel, .account-card,
  .account-logged-in, .coach-card, .library-add-panel, .library-table-wrap,
  .monthly-progress-chart {
    color: var(--ink);
  }
  .auth-required, .saved-empty { background: var(--surface); }
  .device-warning { color: var(--ink); }
  .saved-detail-panel .section-heading { border-bottom-color: var(--line); }
  .saved-detail-panel .section-heading h1 { color: var(--ink); }
  .saved-detail-panel .section-heading > div > p:last-child { color: var(--muted); }
  .saved-program-card.selected { color: white; }
  .saved-program-card.selected .saved-program-link:hover { color: var(--paper); }
  .profile-tabs button.active, .history-view-tabs button.active { border: 1px solid var(--line); }
  .personal-best-list > h3, .team-athlete-detail + h3 { color: var(--paper); }
  .admin-dashboard-status, .library-status { color: #e4b6aa; }
  .admin-section-title h2, .library-heading h2 { color: var(--paper); }
  .admin-submission-card h2 { color: var(--paper); }
  .library-total { color: white; }
  .library-table-wrap { border-color: var(--line); }
  .library-empty, .history-empty, .workout-recorder-empty {
    border-color: rgba(243,241,237,.55); color: var(--paper);
  }
  .history-empty p, .workout-recorder-empty p { color: #d0cbc5; }

  .content-view > .section-heading .secondary-action, .training-history-actions .secondary-action,
  .team-toolbar > .secondary-action, #workoutBackButton {
    color: var(--paper); border-color: rgba(243,241,237,.65);
  }
  .content-view > .section-heading .secondary-action:hover, .training-history-actions .secondary-action:hover,
  .team-toolbar > .secondary-action:hover, #workoutBackButton:hover {
    background: var(--paper); color: var(--ink);
  }
  .training-history-actions .danger-action { color: #f0b6af !important; border-color: #f0b6af !important; }
  .team-toolbar label span, .history-filters label span,
  .progress-controls label, .progress-controls > div { color: #d0cbc5; }
  .team-notice .secondary-action, .team-athlete-detail .secondary-action { color: var(--ink); border-color: var(--line); }
  #savedTabs button { color: #d0cbc5; }
  #savedTabs button.active { color: var(--paper); border-bottom-color: var(--tan); }
  #savedTabs { border-bottom-color: rgba(243,241,237,.45); }

  .workout-record-meta, .workout-log-heading { color: var(--paper); }
  .workout-record-meta span, .workout-log-heading > p, .recorder-legend { color: #d0cbc5; }
  .workout-log-heading .eyebrow { color: var(--tan); }
  .recorder-summary { border-color: rgba(243,241,237,.65); color: var(--paper); }
  .recorder-summary div { border-bottom-color: rgba(243,241,237,.3); }
  .recorder-summary strong { color: #e2b7a1; }
  .recorder-columns { background: #242424; color: var(--paper); }
  .workout-log-row { color: var(--paper); border-bottom-color: rgba(243,241,237,.35); }
  .workout-log-row:not(.workout-superset) .workout-exercise span { color: #e2b7a1; }
  .workout-log-row .workout-exercise .workout-previous { color: var(--tan); }
  .workout-log-row:not(.workout-superset) .workout-input > span { color: #d0cbc5; }
  .workout-log-row:not(.workout-superset) .workout-row-actions button { color: var(--paper); border-color: rgba(243,241,237,.65); }
  .workout-log-row.workout-superset { color: var(--ink); }
  .workout-log-row.workout-superset .workout-row-actions button { color: var(--ink); }
  .workout-log-row.skipped { color: var(--ink); }
  .workout-log-row.skipped .workout-row-actions button { color: var(--ink); border-color: var(--line); }
  .workout-log-row input, .workout-log-row select { color: var(--ink); }
  .workout-log-actions { border-top-color: rgba(243,241,237,.5); }
  .workout-log-actions p { color: #e4b6aa; }

  .history-metric { background: #242424; color: var(--paper); }
  .history-metric strong { color: var(--paper); }
  .history-metric.history-trend.down strong { color: #f0b6af; }
  .recent-results { color: var(--paper); }
  .recent-results .history-log-table th { color: #d0cbc5; }
  .recent-results .history-log-table th, .recent-results .history-log-table td { border-bottom-color: rgba(243,241,237,.3); }
  .monthly-progress-chart { background: var(--surface); }
}

/* Keep all dashboard copy legible on its charcoal surfaces. */
.admin-dashboard-view .admin-side > button,
.admin-dashboard-view .admin-stat-card,
.admin-dashboard-view .admin-stat-card span,
.admin-dashboard-view .admin-stat-card strong,
.admin-dashboard-view .admin-panel,
.admin-dashboard-view .admin-section-title p,
.admin-dashboard-view .admin-metric-table th,
.admin-dashboard-view .admin-metric-table td,
.admin-dashboard-view .admin-funnel-card,
.admin-dashboard-view .admin-funnel-card span,
.admin-dashboard-view .admin-funnel-card strong,
.admin-dashboard-view .admin-funnel-card p,
.admin-dashboard-view .admin-weekly-summary,
.admin-dashboard-view .admin-weekly-summary strong,
.admin-dashboard-view .admin-weekly-bar,
.admin-dashboard-view .admin-submission-empty,
.admin-dashboard-view .admin-submission-card,
.admin-dashboard-view .admin-submission-card label span,
.admin-dashboard-view .admin-submission-meta,
.admin-dashboard-view .admin-last-updated,
.admin-dashboard-view #adminIdentity,
.admin-dashboard-view .admin-dashboard-heading .eyebrow,
.admin-dashboard-view .admin-search-wrap input::placeholder {
  color: var(--paper);
}

/* Login-first landing page. */
body:has(#account:not([hidden]) #accountForms:not([hidden])) .topbar { display: none; }
#account.content-view:has(#accountForms:not([hidden])) { max-width: none; padding: 0; margin: 0; }
.auth-landing { display: grid; grid-template-columns: 55% 45%; min-height: 100vh; }
.auth-brand-panel { display: flex; flex-direction: column; justify-content: center; gap: 54px; padding: clamp(40px, 6vw, 110px); background: var(--ink); color: var(--paper); }
.auth-brand-identity { display: flex; flex-direction: column; align-items: flex-start; }
.auth-brand-identity img { display: block; width: clamp(125px, 14vw, 185px); aspect-ratio: 1; object-fit: contain; }
.auth-brand-identity p { margin: 8px 0 0; font: 800 clamp(44px, 5.6vw, 86px)/.83 "Barlow Condensed", sans-serif; letter-spacing: .08em; }
.auth-brand-identity p span { display: block; margin-top: 15px; color: var(--tan); font: 700 clamp(11px, 1.2vw, 18px)/1 Inter, sans-serif; letter-spacing: .26em; }
.auth-brand-identity p.auth-app-name { font-size: clamp(36px, 4.8vw, 70px); letter-spacing: .01em; }
@media (max-width: 900px) { .auth-brand-identity p.auth-app-name { font-size: clamp(27px, 7vw, 38px); } }
.auth-brand-copy { max-width: 650px; }
.auth-red-rule { display: block; width: 88px; height: 3px; margin-bottom: 32px; background: var(--red-bright); }
.auth-brand-copy h2 { font: 800 clamp(42px, 4.3vw, 68px)/.94 "Barlow Condensed", sans-serif; letter-spacing: .01em; }
.auth-brand-copy p { max-width: 520px; margin: 18px 0 25px; font-size: 14px; line-height: 1.6; }
.auth-brand-copy button { border: 0; border-bottom: 1px solid var(--tan); padding: 0 0 4px; background: transparent; color: var(--tan); font-size: 11px; cursor: pointer; }
.auth-form-panel { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(32px, 5vw, 84px); background: var(--paper); color: var(--ink); }
#account .auth-form { display: grid; gap: 17px; max-width: 530px; width: 100%; margin: 0 auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
#account .auth-form .eyebrow { margin: 0; color: var(--red); }
#account .auth-form h1 { margin: 0; font: 800 clamp(48px, 5vw, 76px)/.9 "Barlow Condensed", sans-serif; }
#account .auth-form-intro { margin: 0 0 14px; color: #514b47; font-size: 14px; line-height: 1.5; }
#account .auth-form label { display: grid; gap: 8px; }
#account .auth-form label > span:first-child { color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
#account .auth-form input { width: 100%; height: 52px; border: 1px solid var(--line); border-radius: 5px; padding: 0 15px; background: var(--surface); color: var(--ink); font-size: 14px; }
#account .auth-form input:focus { border-color: var(--red); outline: 2px solid rgba(113,0,20,.14); }
.auth-password-field { position: relative; display: block; }
#account .auth-password-field input { padding-right: 80px; }
.auth-password-toggle { position: absolute; right: 7px; top: 6px; min-height: 40px; border: 0; padding: 0 10px; background: transparent; color: var(--red); font-size: 11px; font-weight: 800; cursor: pointer; }
.auth-forgot { justify-self: end; border: 0; border-bottom: 1px solid var(--red); padding: 0 0 3px; background: transparent; color: var(--red); font-size: 11px; font-weight: 700; cursor: pointer; }
#account .auth-form .form-status { min-height: 0; margin: 0; color: var(--red); font-size: 12px; }
#account .auth-form .form-status:empty { display: none; }
#account .auth-submit, #account .auth-switch { width: 100%; min-height: 53px; border-radius: 5px; font-size: 12px; letter-spacing: .05em; cursor: pointer; }
#account .auth-submit { justify-self: stretch; background: var(--red); color: var(--paper); }
#account .auth-submit:hover { background: var(--red-bright); }
.auth-divider { display: flex; align-items: center; gap: 16px; color: #756d66; font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#account .auth-switch { border: 1px solid var(--red); padding: 0 12px; background: transparent; color: var(--red); font-weight: 800; }
#account .auth-switch:hover { background: #eadfd5; }
.auth-device-note { width: min(530px, 100%); margin: 0 auto; border: 1px solid var(--line); border-radius: 5px; padding: 14px 18px; font-size: 12px; }
.auth-device-note summary { cursor: pointer; font-weight: 600; }
.auth-device-note p { margin: 12px 0 0; color: #514b47; line-height: 1.55; }
#about-app .big-ten-explainer { margin-top: 0; background: var(--ink); }
@media (max-width: 900px) { .auth-landing { grid-template-columns: 1fr; } .auth-brand-panel { gap: 15px; padding: 22px 24px; } .auth-brand-identity { flex-direction: row; align-items: center; gap: 13px; } .auth-brand-identity img { width: 58px; } .auth-brand-identity p { font-size: 30px; } .auth-brand-identity p span { margin-top: 6px; font-size: 8px; } .auth-brand-copy { display: none; } .auth-form-panel { min-height: calc(100vh - 110px); padding: 30px 24px 40px; } }

/* Post-login navigation. */
.home-view { min-height: calc(100vh - 84px); padding: clamp(28px, 4vw, 58px) 28px 80px; background: var(--ink); color: var(--paper); }
.home-inner { width: min(1360px, 100%); margin: 0 auto; }
.home-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 0 0 30px; }
.home-heading-logo { width: clamp(76px, 10vw, 125px); height: auto; object-fit: contain; }
.home-icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.home-heading .eyebrow { margin: 0 0 8px; color: var(--tan); letter-spacing: .23em; }
.home-heading h1 { margin: 0; font: 800 clamp(54px, 7vw, 98px)/.9 "Barlow Condensed", sans-serif; letter-spacing: .025em; }
.home-heading > p:last-child { margin: 10px 0 0; color: var(--paper); font-size: 17px; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.home-card { display: flex; align-items: center; gap: 20px; width: 100%; min-height: 125px; border: 1px solid rgba(243,241,237,.65); border-radius: 8px; padding: 20px 25px; background: var(--ink); color: var(--paper); text-align: left; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.home-card:hover, .home-card:focus-visible { border-color: var(--paper); background: #252525; transform: translateY(-2px); }
.home-card:focus-visible, .home-admin-link:focus-visible { outline: 3px solid var(--tan); outline-offset: 3px; }
.home-card-featured { background: var(--red); border-color: var(--red); }
.home-card-featured:hover, .home-card-featured:focus-visible { background: var(--red-bright); border-color: var(--red-bright); }
.home-card-icon { flex: none; display: grid; place-items: center; width: 67px; height: 67px; border: 1px solid currentColor; border-radius: 8px; font: 500 37px/1 Inter, sans-serif; }
.home-card-icon svg { width: 35px; height: 35px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-card-copy { display: grid; gap: 6px; min-width: 0; }
.home-card-copy strong { font: 800 clamp(24px, 2.2vw, 34px)/1 "Barlow Condensed", sans-serif; letter-spacing: .035em; }
.home-card-copy small { font-size: 15px; line-height: 1.4; }
.home-card-chevron { margin-left: auto; font-size: 35px; font-weight: 300; }
.home-admin-link { margin-top: 28px; border: 0; border-bottom: 1px solid var(--tan); padding: 0 0 5px; background: transparent; color: var(--tan); font-size: 12px; font-weight: 700; letter-spacing: .12em; cursor: pointer; }
@media (max-width: 760px) { .home-view { padding: 28px 18px 55px; } .home-heading-logo { width: 65px; } .home-grid { grid-template-columns: 1fr; gap: 12px; } .home-card { min-height: 96px; padding: 14px 17px; gap: 15px; } .home-card-icon { width: 55px; height: 55px; } .home-card-icon svg { width: 29px; height: 29px; } .home-card-copy strong { font-size: 27px; } .home-card-copy small { font-size: 14px; } }

/* Team overview shares the main app shell and brand. */
.team-dashboard-filters { display:flex; flex-wrap:wrap; gap:16px; margin:20px 0; }
.team-dashboard-filters label { display:grid; gap:8px; flex:1 1 180px; min-width:0; }
.team-dashboard-filters label > span, .team-reason-field > span { font-size:12px; font-weight:700; letter-spacing:.07em; }
.team-dashboard-filters select, .team-dashboard-filters input, .team-schedule-row select, .team-reason-field input, #signupForm select { min-height:44px; width:100%; padding:10px 12px; border:1px solid rgba(243,241,237,.4); border-radius:5px; background:#161616; color:#f3f1ed; font:inherit; color-scheme:dark; }
.team-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:20px 0 12px; }
.team-stat-grid article { padding:18px; border:1px solid rgba(243,241,237,.4); border-radius:5px; display:grid; gap:10px; }
.team-stat-grid span { font-size:12px; font-weight:700; }
.team-stat-grid strong { font:700 32px/1 'Barlow Condensed',Arial,sans-serif; color:#f3f1ed; }
.team-small-note { color:#f3f1ed; font-size:13px; line-height:1.6; }
.team-overview-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(250px,1fr); gap:18px; }
.team-dashboard-card { border:1px solid rgba(243,241,237,.4); padding:20px; margin:18px 0; background:#161616; border-radius:5px; min-width:0; }
.team-dashboard-card h2 { font-size:24px; margin:0 0 16px; }
.team-dashboard-card h3 { margin-top:24px; font-size:19px; }
.team-table-wrap { overflow-x:auto; }
.team-overview-table { border-collapse:collapse; width:100%; font-size:14px; }
.team-overview-table th { font-size:11px; text-align:left; padding:12px 8px; }
.team-overview-table td { padding:14px 8px; border-top:1px solid rgba(243,241,237,.2); }
.team-overview-table .secondary-action { min-height:36px; padding:6px 12px; }
.team-schedule-preview { display:grid; gap:5px; padding:12px 0; border-bottom:1px solid rgba(243,241,237,.2); }
.team-schedule-preview strong { color:#b38f70; }
.team-recent-row { display:grid; grid-template-columns:minmax(120px,1fr) minmax(130px,1fr) auto auto; gap:15px; align-items:center; padding:14px 0; border-top:1px solid rgba(243,241,237,.2); font-size:14px; }
.team-attention-row { display:block; width:100%; text-align:left; background:transparent; color:#f3f1ed; border:0; border-left:3px solid #710014; padding:10px; margin:8px 0; font:inherit; }
.team-block-progress { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:7px; }
.team-block-progress button { background:#161616; color:#f3f1ed; border:1px solid rgba(243,241,237,.4); border-radius:4px; padding:10px 3px; display:grid; gap:8px; }
.team-block-progress button.active { background:#710014; border-color:#b38f70; }
.team-schedule-rows { display:grid; gap:12px; }
.team-schedule-row { display:grid; grid-template-columns:1fr minmax(150px,.6fr) minmax(150px,.6fr); gap:18px; align-items:center; padding:16px; border:1px solid rgba(243,241,237,.3); border-radius:5px; }
.team-schedule-row > span:first-child { display:grid; gap:7px; }
.team-schedule-row small { display:block; font-size:12px; margin-bottom:6px; }
.team-excuse-checkbox { display:flex; align-items:center; gap:12px; margin:18px 0; }
.team-excuse-checkbox input { width:20px; height:20px; accent-color:#710014; }
.team-reason-field { display:grid; gap:8px; margin-bottom:16px; }
#teamSchedule input[readonly] { opacity:.7; }
#exportDialog { max-width:540px; }
#exportDialog label { margin:18px 0 10px; display:grid; gap:8px; }
#exportDialog > button, #exportFileLink { margin:8px 0; }
#exportPhotosDialog { max-width: 540px; }
#exportPhotosDialog > button, #exportPhotosZip { margin: 8px 0; }
#exportPhotosDialog p { line-height: 1.6; }
#exportPhotosSave { width: 100%; }
.export-help { font-size:13px; line-height:1.6; }
#signupBigTenDialog p { line-height:1.7; }
.equipment-warning { display:block; font-size:12px; line-height:1.5; margin-top:6px; color:#f3f1ed; border-left:3px solid #710014; padding-left:8px; }
@media(max-width:800px) {
 .team-overview-grid { grid-template-columns:1fr; }
 .team-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .team-block-progress { grid-template-columns:repeat(6,minmax(0,1fr)); }
 .team-schedule-row { grid-template-columns:1fr 1fr; }
 .team-schedule-row > small { grid-column:1 / -1; }
 .team-recent-row { grid-template-columns:1fr auto; }
 #teamTabs { overflow-x:auto; white-space:nowrap; }
 #teamTabs button { flex-shrink:0; }
}
/* Coach tools use the same charcoal, cream and burgundy as the app. */
#teamOverview .team-notice, #teamSchedule .team-notice { background: var(--ink); color: var(--surface); border: 1px solid rgba(243,241,237,.25); }
#teamOverview .team-notice h2, #teamSchedule .team-notice h2, #teamSchedule .team-notice p { color: var(--surface); }
#teamTabs { background: var(--ink); border: 1px solid rgba(243,241,237,.25); }
#teamTabs button { color: var(--surface); }
#teamTabs button.active { background: var(--red); color: var(--surface); }
#teamSchedule .team-notice .secondary-action { background: transparent; color: var(--surface); border-color: var(--surface); }
.equipment-warning { width: auto; height: auto; border-radius: 0; background: transparent; font-size: 12px; line-height: 1.4; border: 0; padding: 0; }
.quick-replace-button { display: inline-block; padding: 2px 6px; border: 1px solid currentColor; border-radius: 4px; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.save-incomplete-checkbox { display: flex !important; align-items: center; gap: 10px; }
.save-incomplete-checkbox input { width: 18px !important; height: 18px; flex: 0 0 18px; }
.movement-radar-card { margin: 0 0 24px; padding: 24px; background: #161616; color: #f3f1ed; border: 1px solid rgba(243,241,237,.3); border-top: 4px solid #710014; min-width: 0; }
.movement-radar-card h3 { margin: 6px 0 10px; font: 800 28px/1.1 "Barlow Condensed", sans-serif; color: #f3f1ed; }
.movement-radar-card header p, .radar-method { margin: 8px 0; font-size: 14px; line-height: 1.5; }
.movement-radar-card .eyebrow { color: #b38f70; }
.radar-chart-wrap { width: 100%; max-width: 720px; margin: auto; }
.radar-chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.radar-grid { fill: none; stroke: rgba(243,241,237,.18); stroke-width: 1; }
.radar-scale { fill: #b38f70; font: 12px Inter,sans-serif; }
.radar-label { fill: #f3f1ed; font: 600 15px Inter,sans-serif; }
.radar-baseline { fill: none; stroke: #b38f70; stroke-width: 2; stroke-dasharray: 6 5; }
.radar-current-line { stroke: #f3f1ed; stroke-width: 3; }
.radar-area { fill: #710014; fill-opacity: .6; stroke: none; }
.radar-point { fill: #710014; stroke: #f3f1ed; stroke-width: 3; cursor: pointer; }
.radar-point:hover, .radar-point:focus { fill: #b38f70; stroke-width: 5; outline: none; }
.radar-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; font-size: 14px; }
.radar-legend span::before { content: ''; display: inline-block; width: 24px; margin-right: 8px; border-top: 3px solid #f3f1ed; vertical-align: middle; }
.radar-legend .radar-legend-first::before { border-top: 2px dashed #b38f70; }
.radar-readout { min-height: 42px; margin: 18px 0 8px; font-size: 14px; line-height: 1.5; }
.radar-method { color: #f3f1ed; opacity: .8; }
.radar-details summary { cursor: pointer; padding: 14px 0; font-size: 14px; font-weight: 700; }
.radar-table-wrap { overflow-x: auto; }
.radar-details table { border-collapse: collapse; width: 100%; font-size: 14px; }
.radar-details th, .radar-details td { padding: 10px 8px; border-bottom: 1px solid rgba(243,241,237,.2); text-align: left; }
.radar-details thead th { font-size: 12px; }
.personal-best-button { width: 100%; display: grid; gap: 5px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.personal-best-button:focus-visible { outline: 2px solid #710014; outline-offset: 6px; }
.personal-best-button:hover strong { text-decoration: underline; }
@media(max-width:600px) { .movement-radar-card { padding: 16px 12px; } .radar-chart-wrap svg { min-height: 290px; } .radar-label { font-size: 28px; } }

.radar-change-label { fill: #b38f70; font-weight: 800; }
.program-progress-tools { margin-bottom: 22px; color: #f3f1ed; }
.progress-program-label, .program-comparison-controls label { display: grid; gap: 8px; font-size: 14px; font-weight: 700; }
.progress-program-label { max-width: 520px; }
.program-progress-tools select { width: 100%; min-height: 44px; border: 1px solid rgba(243,241,237,.5); border-radius: 6px; padding: 8px 12px; background: #161616; color: #f3f1ed; font: inherit; }
.program-comparison { margin-top: 14px; padding: 0 16px; border: 1px solid rgba(243,241,237,.3); background: #161616; }
.program-comparison summary { cursor: pointer; padding: 16px 0; font-size: 14px; font-weight: 700; }
.program-comparison-controls { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.program-comparison-table-wrap { overflow-x: auto; }
.program-comparison-table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 14px; }
.program-comparison-table th, .program-comparison-table td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid rgba(243,241,237,.2); }
.program-comparison-table thead th { color: #b38f70; }
.program-comparison-table strong, .program-comparison-table b, .program-comparison-table small { display: block; margin-bottom: 6px; }
.program-comparison-table b { color: #b38f70; font-size: 18px; }
.program-comparison-table small { font-size: 12px; line-height: 1.5; }
.program-comparison-note { font-size: 14px; line-height: 1.5; padding: 12px 0; }
@media(max-width:600px) { .program-comparison-controls { grid-template-columns: 1fr; } .history-view-tabs button { padding: 8px 5px; letter-spacing: .04em; } }
@media(max-width:600px) and (orientation:portrait) {
  .radar-chart-wrap svg { min-height: 330px; }
  .radar-chart-wrap .radar-label { font-size: 20px; }
  .radar-chart-wrap .radar-scale { font-size: 14px; }
}

/* Builder notices sit immediately below setup, before the generated days. */
.builder-warnings { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--cream, #f3f1ed); border-left: 4px solid #710014; background: #161616; color: #f3f1ed; text-align: left; scroll-margin-top: 130px; }
.builder-warnings[hidden] { display: none; }
.builder-warnings p { margin: 0; font-size: 14px; line-height: 1.5; }
.builder-warnings p + p { margin-top: 10px; }
.builder-warnings .equipment-warning { margin: 0; font-size: 14px; color: #f3f1ed; }
.builder-warnings .bodyweight-notice { font-weight: 600; }
.builder-warnings .quick-replace-button { margin-left: 6px; padding: 5px 8px; }
@media (max-width: 600px) { .builder-warnings .quick-replace-button { margin: 6px 0 0; display: block; } }

/* Appearance preference: the existing cream surfaces remain the light option.
   Screen-only rules keep printed and exported programs on their readable white paper. */
.theme-choice { padding: 10px 12px 14px; border-bottom: 1px solid var(--line); }
.theme-choice > span { display: block; margin-bottom: 9px; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.theme-choice > div { display: flex; gap: 8px; }
.theme-choice button { flex: 1; min-height: 36px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.theme-choice button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #f3f1ed; }
@media screen {
  html[data-theme="dark"] { color-scheme: dark; --muted: #c5bdb6; --line: #514945; --tan-soft: #2b2420; }
  html[data-theme="dark"] body { color: #f3f1ed; background: #161616; }
  html[data-theme="dark"] :is(.topbar, .app-menu, .coverage-panel, .program-area, .day-card,
    .content-card, .about-action-card, .profile-form, .profile-card, .auth-required, .saved-empty,
    .saved-program-card, .saved-detail-panel, .program-detail-prompt, .program-session-outline, .program-session-choice,
    .team-notice, .team-athlete-detail, .team-athlete-card, .coach-card, .account-card, .account-logged-in,
    .library-add-panel, .library-table-wrap, .library-equipment-dialog, .library-video-dialog,
    .save-program-dialog, .auth-form-panel, #workoutLogForm, .history-session-card, .monthly-progress-chart) {
    background-color: #161616 !important; color: #f3f1ed !important;
  }
  html[data-theme="dark"] :is(.day-note-field, .program-legend, .loading-guide, .coverage-hint,
    .coverage-item, .supplemental-item, .content-note, .session-coach-note, .saved-program-meta span,
    .program-detail-weeks button, .training-history-tabs button, .profile-tabs button, .library-equipment-option) {
    background-color: #211e1d !important; color: #f3f1ed !important;
  }
  html[data-theme="dark"] #profileTabs button[aria-selected="true"] { background-color: #710014 !important; color: #f3f1ed !important; border-color: #b38f70; }
  html[data-theme="dark"] .saved-detail-panel { background: #161616 !important; color: #f3f1ed !important; }
  html[data-theme="dark"] #programDetailTitle { color: #f3f1ed !important; }
  html[data-theme="dark"] #programDetailMeta { color: #c5bdb6; }
  html[data-theme="dark"] #programDetailExportButton { background: #211e1d; color: #f3f1ed !important; border-color: #8a7562; }
  html[data-theme="dark"] .program-detail-weeks button.active { background-color: #710014 !important; color: #f3f1ed !important; border-color: #b38f70; }
  html[data-theme="dark"] .program-session-choice { background-color: #211e1d !important; color: #f3f1ed !important; border-color: #625a54; border-top-color: #710014; }
  html[data-theme="dark"] .program-session-choice.active { background-color: #302127 !important; border-color: #b38f70; outline: 2px solid #b38f70; }
  html[data-theme="dark"] .program-session-choice .session-choice-cta { background: #302820; color: #f3f1ed; border-color: #8a7562; }
  html[data-theme="dark"] .program-session-choice.active .session-choice-cta { background: #710014; color: #f3f1ed; border-color: #b38f70; }
  html[data-theme="dark"] .exercise-row { border-bottom-color: #514945; }
  html[data-theme="dark"] .exercise-row.superset-shade-a { background: #392f27 !important; }
  html[data-theme="dark"] .exercise-row.superset-shade-b { background: #302127 !important; }
  html[data-theme="dark"] .workout-log-row.workout-shade-0 { background: #231f1c !important; }
  html[data-theme="dark"] .workout-log-row.workout-shade-1 { background: #261c20 !important; }
  html[data-theme="dark"] :is(.exercise-row.standalone-row, .workout-log-row.workout-superset, .workout-log-row.skipped) { background-color: #1d1b1b; color: #f3f1ed; }
  html[data-theme="dark"] :is(.validation-card, .validation-card.invalid) { background: #2b2420; color: #f3f1ed; }
  html[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    background-color: #1d1b1b !important; color: #f3f1ed !important; border-color: #625a54;
  }
  html[data-theme="dark"] :is(input, textarea)::placeholder { color: #a9a29b; opacity: 1; }
  html[data-theme="dark"] .exercise-row select:is(.pattern-select, .exercise-select) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23f3f1ed' stroke-width='1.5'/%3E%3C/svg%3E");
  }
  html[data-theme="dark"] .exercise-row .pattern-select { background-color: #322323 !important; }
  html[data-theme="dark"] .exercise-row .pattern-select.accessory { background-color: #302820 !important; }
  html[data-theme="dark"] .loading-fields .rpe-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23f3f1ed' stroke-width='1.5'/%3E%3C/svg%3E");
  }
  html[data-theme="dark"] :is(.topbar-actions button, .app-tab, .program-actions button, .row-actions button,
    .primary-action, .secondary-action, .text-button, .saved-program-actions button, .workout-row-actions button,
    .library-equipment-button, .library-video-button, .auth-switch, .auth-forgot, .auth-password-toggle) { color: #f3f1ed !important; }
  html[data-theme="dark"] :is(.menu-toggle, .topbar-builder-link, .topbar-admin-link, .private-badge) { background-color: #1d1b1b; }
  html[data-theme="dark"] :is(.topbar-builder-link.active, .app-tab.active, .topbar-admin-link.active) { background-color: #710014; }
  html[data-theme="dark"] :is(.app-tab:hover, .text-button:hover, .secondary-action:hover) { background-color: #302820; color: #f3f1ed; }
  html[data-theme="dark"] :is(.superset-label, .exercise-select option, .day-note-field > span, .program-legend summary,
    .loading-guide b, .profile-form label, .account-card label, .auth-form label, #account .auth-form label > span:first-child, .coach-card h2,
    .saved-program-card h2, .saved-program-card h3, .saved-detail-panel .section-heading h1, .session-coach-note p, .program-session-outline, .session-outline-table,
    .library-table, .library-table button, .library-equipment-dialog, .library-video-dialog,
    .workout-input > span, .workout-log-row .workout-row-actions button) { color: #f3f1ed !important; }
  html[data-theme="dark"] :is(.program-legend summary span, .program-legend-grid strong, .content-number,
    .coverage-panel .eyebrow, .program-heading .eyebrow, .library-table th, .saved-program-meta, .library-toolbar label) { color: #b38f70; }
  html[data-theme="dark"] .brand-wordmark { filter: invert(1); }
  html[data-theme="dark"] .score { border: 1px solid #b38f70; }
  html[data-theme="dark"] .saved-open-button { background: #710014 !important; color: #f3f1ed !important; }
  html[data-theme="dark"] .history-log-table { color: #f3f1ed; }
  /* Saved session tables and related training surfaces share the dark palette. */
  html[data-theme="dark"] .outline-shade-0 { background: #392f27; }
  html[data-theme="dark"] .outline-shade-1 { background: #302127; }
  html[data-theme="dark"] .program-overview-table { color: #f3f1ed; }
  html[data-theme="dark"] .program-overview-table td { color: #f3f1ed; }
  html[data-theme="dark"] .recorded-session-card,
  html[data-theme="dark"] .history-exercise-card,
  html[data-theme="dark"] .history-summary,
  html[data-theme="dark"] .profile-team-details,
  html[data-theme="dark"] .personal-best-grid article,
  html[data-theme="dark"] .progress-point,
  html[data-theme="dark"] .workout-record-meta { background: #211e1d; color: #f3f1ed; }
  html[data-theme="dark"] .library-table tr,
  html[data-theme="dark"] .athlete-list-button,
  html[data-theme="dark"] .coach-card { background: #211e1d !important; color: #f3f1ed; }
  html[data-theme="dark"] .library-equipment-option:has(input:checked) { background: #302127 !important; color: #f3f1ed !important; border-color: #b38f70; }
  html[data-theme="dark"] .library-video-button:hover,
  html[data-theme="dark"] .library-video-button:focus-visible { background: #302127; color: #f3f1ed; border-color: #b38f70; }
  html[data-theme="dark"] .coach-card a,
  html[data-theme="dark"] .athlete-list-button span { color: #b38f70 !important; }
  html[data-theme="dark"] .recorded-session-head .recorded-program-name,
  html[data-theme="dark"] .recorded-session-head .recorded-session-focus { color: #f3f1ed !important; }
  html[data-theme="dark"] .recorded-session-table { color: #f3f1ed; }
  html[data-theme="dark"] .session-coach-note { background: #211e1d !important; color: #f3f1ed; }
  html[data-theme="dark"] .session-coach-note strong,
  html[data-theme="dark"] .progress-point.up small { color: #b38f70 !important; }
  html[data-theme="dark"] .progress-point.down small { color: #f0b6af; }
  html[data-theme="dark"] .chart-point-detail { color: #f3f1ed; }
  html[data-theme="dark"] .chart-line { stroke: #b38f70; }
  html[data-theme="dark"] .chart-grid { stroke: #514945; }
  html[data-theme="dark"] .workout-log-row { color: #f3f1ed; }
  html[data-theme="dark"] .workout-log-row .workout-exercise > span:not(.workout-order) { color: #b38f70; }
  html[data-theme="dark"] .workout-log-row .workout-exercise .workout-order { color: #f3f1ed; }
  html[data-theme="dark"] .history-view-tabs { background: #211e1d; }
  html[data-theme="dark"] .history-view-tabs button { color: #f3f1ed; }
  html[data-theme="dark"] .history-view-tabs button.active,
  html[data-theme="dark"] .training-history-tabs button.active { background: #710014 !important; color: #f3f1ed; border-color: #b38f70; }
  html[data-theme="light"] .workout-log-row,
  html[data-theme="light"] .recent-results { color: #161616; }
  html[data-theme="light"] .workout-log-row:not(.workout-superset) .workout-exercise span { color: #710014; }
  html[data-theme="light"] .workout-log-row .workout-exercise .workout-order { color: #f3f1ed; }
  html[data-theme="light"] .workout-log-row .workout-exercise .workout-previous { color: #765a43; }
  html[data-theme="light"] .workout-log-row .workout-input > span,
  html[data-theme="light"] .workout-log-row .workout-row-actions button,
  html[data-theme="light"] .recent-results .history-log-table th { color: #675e57; }
  html[data-theme="light"] #savedTabs button { color: #161616; }
  html[data-theme="light"] #savedTabs button.active { color: #f3f1ed; background: #710014; }
  html[data-theme="dark"] .theme-choice button[aria-pressed="true"] { background: #710014; }
  html[data-theme="dark"] :is(button, input, select, textarea):focus-visible { outline: 2px solid #b38f70; outline-offset: 2px; }
}

/* Admin analytics use the normal app frame and navigation. */
.admin-dashboard-view.content-view { max-width: 1240px; min-height: calc(100vh - 84px); margin: 0 auto; padding: 64px 36px 88px; background: transparent; }
.admin-content, .admin-content .admin-main { min-width: 0; }
.admin-content .admin-body { padding: 0; }
.admin-dashboard-tools { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; padding: 0; background: transparent; }
.admin-dashboard-tools .admin-search-wrap input { border-radius: 4px; }
.admin-content .admin-panel, .admin-content .admin-stat-card { background: #161616; border-color: rgba(243,241,237,.4); border-radius: 4px; }
@media (max-width: 600px) {
  .admin-dashboard-view.content-view { padding: 32px 18px 56px; }
  .admin-dashboard-tools { gap: 10px; }
  .admin-dashboard-tools .admin-search-wrap input { padding-inline: 10px; }
}

.admin-account-dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); overflow-y: auto; }
.admin-account-dialog h3 { margin: 24px 0 10px; color: var(--tan); font-size: 16px; }
.admin-account-dialog p, .admin-account-dialog li { font-size: 14px; line-height: 1.6; }
.support-account-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.support-account-details dt { font-size: 11px; color: var(--tan); font-weight: 700; margin-bottom: 6px; }
.support-account-details dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.account-activity-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.account-activity-stats > div { min-width: 0; padding: 14px 12px; border: 1px solid var(--line); border-top: 3px solid var(--red); background: rgba(179,143,112,.08); }
.account-activity-stats dt { margin-bottom: 8px; color: var(--tan); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.account-activity-stats dd { margin: 0; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.support-recovery-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-search-results [data-admin-account] { padding: 10px 0; font-size: 13px; line-height: 1.5; }
.admin-search-results [data-admin-account] small { display: block; color: var(--tan); font-size: 10px; margin-top: 4px; }
@media (max-width: 600px) {
  .support-account-details { grid-template-columns: 1fr; }
  .account-activity-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Exercise details keep the existing table and workout typography. */
.exercise-name-details { display: inline; padding: 4px 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.exercise-name-details:hover { color: inherit; text-decoration-style: solid; }
.exercise-name-details:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Keep the exercise dialog close control visible in both themes, including iOS. */
#exerciseVideoViewerClose { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; padding: 0; border: 1px solid #b38f70; border-radius: 5px; background: #f3f1ed; color: #161616; opacity: 1; }
#exerciseVideoViewerClose:hover { background: #e4ddd4; }
#exerciseVideoViewerClose:focus-visible { outline: 2px solid #b38f70; outline-offset: 3px; }
#exerciseVideoViewerClose svg { display: block; color: #161616; pointer-events: none; }
html[data-theme="dark"] #exerciseVideoViewerStatus { color: #f3f1ed; }

html[data-theme="dark"] #account .auth-form-intro { color: #c9c3bc; }
html[data-theme="dark"] #account .form-status { color: #f3f1ed; }
