:root {
  --bg: #131313;
  --card: #2e2f33;
  --text: #e0e0e0;
  --muted: #9a9a9a;
  --accent: #00a9ff;
  --accent-hover: #0087cc;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.wrap {
  /* Prior Flask app: max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-8 */
  width: min(80rem, 100%);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
@media (min-width: 640px) {
  .wrap { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .wrap { padding-left: 2rem; padding-right: 2rem; }
}

header, footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

/* Prior: header mb-10. Extra bottom rule so chrome reads as a real header bar. */
header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #3a3b40;
}

header form button { margin-top: 0; padding: 0.4rem 0.75rem; font-size: 0.9rem; font-weight: 500; }

footer { margin-top: 2.5rem; color: var(--muted); font-size: 0.9rem; }

.brand {
  display: block;
  /* Do not flex-shrink: prior logo was full-width image, not a squeezed flex child. */
  flex: 0 0 auto;
  min-width: auto;
  max-width: min(100%, 43.3125rem); /* intrinsic logo width 693px */
  line-height: 0;
}

.logo {
  /*
    Prior my-personal-coach used class "h-17 w-auto", but h-17 never compiled into
    static/css/styles.css — so the PNG showed near intrinsic size (693×219).
    Forcing height: 4.25rem + max-width: 14rem was squashing it to ~68×~215px.
  */
  display: block;
  width: min(100%, 43.3125rem);
  height: auto;
  max-height: 13.6875rem; /* 219px */
  object-fit: contain;
  object-position: left center;
}

.account {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.nav-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.35rem 0.15rem;
  border-bottom: 2px solid transparent;
}

.nav-link:hover { color: #fff; }
.nav-link.is-active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.page-head {
  margin: 0 0 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #3a3b40; /* prior nav: border-brand-gray */
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.875rem); /* prior text-2xl / text-3xl */
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.page-head h1 .muted {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  margin-left: 0.5rem;
}

.page-head .page-sub {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
}

.home-logo {
  /* Prior landing: max-w-xl (~36rem) centered. */
  display: block;
  width: min(100%, 36rem);
  height: auto;
  margin: 0.5rem auto 2rem;
}

.philosophy {
  max-width: 40rem;
  margin: 0 auto 0.5rem;
  padding-left: 1.25rem;
  border-left: 4px solid var(--accent);
}

.emphasis { color: #fff; font-weight: 600; }

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}

h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 0.5rem; }

label { display: block; margin-bottom: 0.35rem; }

input[type="email"], input[type="number"], input[type="text"], input[type="password"], input[type="date"], select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #4a4b50;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

input[type="date"] {
  color-scheme: dark;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  padding: 0.25rem;
  margin-left: 0.35rem;
  border-radius: 6px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover { background-color: #3a3b40; }

input[type="date"]:hover,
input[type="date"]:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 169, 255, 0.25);
}

.onboarding-page {
  /* Prior: max-w-2xl mx-auto — centred form, not flush left in the wide wrap. */
  width: min(100%, 42rem);
  margin: 0 auto;
}

.onboarding-intro {
  text-align: center;
  margin: 0 0 1.25rem;
}

.onboarding-intro h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  color: #fff;
}

.onboarding-intro p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.card.onboarding {
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
  padding: 1.5rem 1.35rem;
}

@media (min-width: 640px) {
  .card.onboarding { padding: 2rem; }
}

.onboarding-form .field { margin: 0 0 1.25rem; }

.onboarding fieldset {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.onboarding legend,
.field-label {
  display: block;
  margin: 0 0 0.45rem;
  font-weight: 600;
  color: #fff;
}

.onboarding label:not(.check):not(.time-part) {
  font-weight: 600;
  color: #fff;
}

.hint {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.sport-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  justify-content: center;
  margin-top: 0.65rem;
}

.onboarding .check { margin-top: 0.45rem; }

.onboarding button,
button.primary-wide {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
}

.time-parts {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
}

.time-part {
  flex: 1;
  margin: 0;
  min-width: 0;
}

.time-part-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.time-part input {
  width: 100%;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.time-sep {
  flex: 0 0 auto;
  padding-bottom: 0.65rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 1.15rem;
}

.dashboard {
  width: min(100%, 48rem);
  margin: 0 auto;
}

.dashboard-head {
  text-align: center;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 1.25rem;
}

.dashboard-head .page-sub {
  color: var(--muted);
}

.race-card {
  position: relative;
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
}

.race-kicker {
  margin: 0 2.5rem 0.15rem 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.race-title {
  margin: 0 2.5rem 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.race-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.race-stat {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  text-align: center;
}

.race-stat dt {
  font-size: 0.75rem;
  color: var(--muted);
}

.race-stat dd {
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .race-card { padding: 0.9rem 1rem; }
  .race-stats { grid-template-columns: repeat(2, 1fr); }
  .race-stat dd { font-size: 0.95rem; }
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.icon-button:hover,
.icon-button:focus-visible { color: #fff; background: #3a3b40; outline: none; }
.icon-button svg { width: 1.15rem; height: 1.15rem; }

summary.icon-button { list-style: none; }
summary.icon-button::-webkit-details-marker { display: none; }
summary.icon-button::marker { content: ""; }

.race-edit > summary {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
}
.race-edit[open] > summary { color: var(--accent); background: #3a3b40; }

.race-edit-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #3a3b40;
}

.race-edit-form .field { margin: 0 0 0.85rem; }
.race-edit-form label:not(.time-part),
.race-edit-form .field-label {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.race-edit-form button,
.new-goal-form button {
  margin-top: 0.75rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
}

.new-goal-form {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid #3a3b40;
}

.race-edit-form .check { margin: 0.6rem 0 0; font-size: 0.9rem; }
.race-stat dd.is-unset { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.race-card-none .race-title { margin-bottom: 0.75rem; }
.race-add { margin-top: 0; padding: 0.45rem 0.85rem; font-size: 0.9rem; }

.progress-card {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.progress-week { margin: 0; font-size: 1.15rem; font-weight: 700; color: #fff; }
.progress-pct { margin: 0; font-size: 0.9rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.progress-note { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--muted); }

.sport-ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.sport-tick {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #3a3b40;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
}

.sport-tick.is-done {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.1);
  color: #fff;
}

.sport-tick-mark {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  color: #041018;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.week-panel {
  margin: 0 0 1.25rem;
}

.week-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.5rem;
}

.week-panel .week-panel-head h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}

.week-panel .week-nav {
  margin: 0;
  gap: 0.85rem;
}

.goal-quote {
  margin: 0 0 1.15rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border-radius: 10px;
  color: var(--text);
  font-style: italic;
}

.parse-notes {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: #ffcc66;
  font-size: 0.9rem;
}

.parse-notes li { margin: 0.25rem 0; }

.center-hint { text-align: center; }

textarea.auto-expand {
  width: 100%;
  min-height: 5.5rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #4a4b50;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  resize: vertical;
  overflow: hidden;
}

textarea.auto-expand:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 169, 255, 0.25);
}

.grant { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid #3a3b40; }

.check { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.8rem; }
.check input { width: auto; }

button, .button {
  display: inline-block;
  margin-top: 0.8rem;
  background: var(--accent);
  color: #041018;
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

button:hover, .button:hover { background: var(--accent-hover); color: #041018; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.8rem; }
.actions button, .actions .button { margin-top: 0; }
.home-actions { justify-content: center; margin-top: 1.75rem; }

button.secondary, a.button.secondary {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px #4a4b50;
}

button.secondary:hover, a.button.secondary:hover { background: #3a3b40; color: var(--text); }

.error { color: var(--danger); }

.muted { color: var(--muted); }

.menu { position: relative; }
.menu-trigger {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.menu-trigger::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 11rem;
  padding: 0.35rem;
  background: var(--card);
  border: 1px solid #3a3b40;
  border-radius: 10px;
  z-index: 20;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.menu-panel a,
.menu-panel button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu-panel a:hover,
.menu-panel button:hover { background: #3a3b40; color: #fff; }
.menu-panel form { margin: 0; }

.settings { margin-top: 0; }
.settings h2,
.week h2,
.week-panel h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin: 1.75rem 0 0.85rem;
}
.settings .page-head + h2 { margin-top: 0; }
.settings .danger-zone { margin-top: 2.5rem; }
.settings .danger-zone h2 { margin-top: 0; }
.settings .danger-zone p { margin: 0; }
.week .week-nav { margin-top: 0.35rem; }
.tabs {
  display: flex;
  gap: 0.25rem;
  margin: 1rem 0 1.25rem;
  padding: 0.25rem;
  background: var(--card);
  border-radius: 10px;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  background: var(--bg);
  color: #fff;
}
.conn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-top: 1px solid #3a3b40;
}
.conn-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.85rem; min-width: 0; }
.conn-meta { display: block; color: var(--muted); font-size: 0.9rem; }
.conn-form { margin: 0.6rem 0 0.2rem; max-width: 24rem; }
.conn-form button { margin-top: 0.4rem; }
.brand-logo { display: block; width: auto; object-fit: contain; }
.brand-strava { height: 16px; max-width: 45vw; flex-shrink: 0; }
.brand-garmin {
  height: 22px;
  filter: brightness(0) invert(1);
}
.summary { margin: 0.75rem 0 1rem; }
.reading {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
  color: var(--text);
  max-width: 48rem;
}
.reading li { margin: 0.35rem 0; }
.training .paces { margin: 0 0 0.25rem; }
.training .sources { margin-bottom: 1rem; }

/* Volume table — prior plan/dashboard: card panel, accent caps header, row rules */
.volume-panel {
  margin: 1.25rem 0 0.5rem;
  background: var(--card);
  border-radius: 12px;
  padding: 0.35rem 0 0.15rem;
  overflow: hidden;
}
.volume-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.volume-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
.volume-table thead {
  border-bottom: 1px solid #3a3b40;
}
.volume-table th {
  padding: 0.85rem 1.25rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.volume-table tbody th {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.volume-table td {
  padding: 0.9rem 1.25rem;
  color: var(--text);
  white-space: nowrap;
  vertical-align: middle;
}
.volume-table tbody tr + tr {
  border-top: 1px solid #3a3b40;
}
.volume-table tbody tr:hover {
  background: rgba(19, 19, 19, 0.35);
}
.volume-cards { display: none; }
.volume-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin: 0.75rem 1rem;
}
.volume-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}
.volume-card dl {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.volume-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.volume-card dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.volume-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 500;
  text-align: right;
}
@media (max-width: 700px) {
  .volume-scroll { display: none; }
  .volume-cards { display: block; padding-bottom: 0.35rem; }
  .volume-panel { padding: 0.15rem 0; }
}

.avatar {
  /* Prior intended a large circular profile (h-30 + blue ring); keep presence obvious. */
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--card);
  color: var(--text);
  font-weight: 700;
}

.sources { margin: 0.25rem 0 0.75rem; }

.source {
  display: inline-block;
  margin-right: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.source-strava {
  color: var(--muted);
  font-weight: 400;
}
.source-strava .powered-by {
  color: var(--muted);
  font-weight: 400;
}
.source-strava .strava-name {
  color: #fc5200;
  font-weight: 500;
}

.strava-activity {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.strava-activity:hover { color: #fc5200; }

.doc { white-space: pre-wrap; }

.admin {
  width: calc(100% - 2rem);
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.narrow { max-width: 40rem; }

.finder { display: flex; gap: 0.5rem; align-items: center; margin: 0.5rem 0 1rem; }
.finder input { max-width: 28rem; margin: 0; padding: 0.4rem 0.6rem; }
.finder button { margin: 0; }

.sheet td:first-child input { min-width: 16rem; }
.sheet th { text-align: left; color: var(--muted); font-weight: 500; padding: 0.3rem; white-space: nowrap; }
.sheet td { padding: 0.2rem 0.3rem; vertical-align: middle; }
.sheet input, .sheet select { width: 100%; margin: 0; padding: 0.3rem 0.4rem; }
.sheet input[type="checkbox"] { width: auto; }
.sheet button { margin: 0; padding: 0.3rem 0.6rem; font-size: 0.85rem; }
.sheet tbody tr + tr td { border-top: 1px solid #3a3b40; }
.managers { max-width: 40rem; }

h1 .muted, h2 .muted { font-size: 0.8rem; font-weight: 400; margin-left: 0.4rem; }

.connect { margin-top: 1.5rem; max-width: 36rem; }
.connect p { color: var(--text); }
.strava-connect {
  margin-top: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.strava-connect img { display: block; height: 48px; width: auto; }
.strava-connect:hover { opacity: 0.92; }

.week h3,
.week-panel h3 { font-size: 1.05rem; font-weight: 700; margin: 1.25rem 0 0.25rem; color: #fff; }
.week-nav { display: flex; gap: 1rem; margin: 0.25rem 0 0.75rem; }
.session {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 0;
  border-top: 1px solid #3a3b40;
}
.session .muted, .session .source, .session .strava-activity { margin-left: 0.45rem; }
.row-actions, .session form, .fork-actions { display: flex; gap: 0.4rem; align-items: center; }
.session input, .session select { width: auto; margin: 0; padding: 0.3rem 0.45rem; }
.session button, .fork-actions button { margin: 0; padding: 0.3rem 0.6rem; font-size: 0.85rem; }
.state { margin-left: 0.45rem; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.state-done { color: var(--accent); }
.state-missed { color: var(--danger); }
.state-todo { color: var(--muted); }
.session { align-items: flex-start; padding: 0.75rem 0; }
.session-main { flex: 1; min-width: 0; }
.session-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; }
.session-head strong { color: #fff; }
.session-head .state { margin-left: 0; }
.priority {
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.priority-key { color: #f87171; background: rgba(239, 68, 68, 0.15); }
.priority-important { color: #facc15; background: rgba(234, 179, 8, 0.15); }
.priority-stretch { color: #60a5fa; background: rgba(59, 130, 246, 0.15); }
.session-meta { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--muted); }
.session-desc { margin: 0.35rem 0 0; font-size: 0.95rem; line-height: 1.45; }
.session-zones { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.45rem 0 0; }
.zone-chip {
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--bg);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.session-activity { margin: 0.35rem 0 0; font-size: 0.85rem; }
.session .session-activity > :first-child { margin-left: 0; }
.warning { color: #ffcc66; }
.fork { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fork-row { margin: 0.2rem 0; }
.fork-actions { margin-top: 0.6rem; }
@media (max-width: 700px) {
  .session, .fork { display: block; }
  .session .row-actions { flex-wrap: wrap; margin-top: 0.6rem; }
  header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .brand { max-width: 100%; }
  .logo {
    width: min(100%, 22rem);
    max-height: none;
  }
  .avatar {
    width: 3rem;
    height: 3rem;
  }
  .account { gap: 1rem; }
}

/* ===== Zones (Settings page) — owned by the training-maths work; appended, no existing rules edited ===== */
.zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 48rem;
}
.zones-block {
  background: var(--card);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.zones-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}
.zones-basis { margin: 0; color: #fff; font-weight: 600; }
.zones-tag {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.zones-note { max-width: 48rem; margin: 0 0 1rem; color: var(--text); }
.zones-offer { margin: 0.6rem 0 0; }
.zones-offer .hint { margin: 0 0 0.4rem; }
.zones-line { margin-top: 0.25rem; }
.zones-list { list-style: none; margin: 0.65rem 0 0; padding: 0; }
.zones-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-top: 1px solid #3a3b40;
}
.zones-list li span:first-child { color: var(--muted); }
.zones-edit { margin: 0.85rem 0 0.5rem; max-width: 48rem; }
.zones-edit > summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.zones-edit[open] > summary { color: var(--accent); }
.zones-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
}
.zones-form label { margin: 0; color: var(--text); }
.zones-form input { margin-top: 0.35rem; }
.zones-form .hint, .zones-form button { grid-column: 1 / -1; }
.zones-form button { justify-self: start; }
@media (max-width: 700px) {
  .zones, .zones-form { grid-template-columns: 1fr; }
}
/* ===== End zones ===== */
