/* Training Planner: one stylesheet for every page. Mobile first; colours are tokens with a
   dark-mode set. Plan-page parts are at the end. */

:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --text: #1d2420;
  --muted: #5f6b64;
  --line: #d8ddd8;
  --accent: #1f7a4d;
  --accent-ink: #ffffff;
  --accent-soft: #e4f2ea;
  --warn: #b45309;
  --warn-soft: #fff4e5;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 10px;

  /* Phases (overview bars, week badges) */
  --ph-base: #8fb8a0;
  --ph-build: #3f8f66;
  --ph-peak: #1f5f43;
  --ph-taper: #c9a227;

  /* Day types (week grid) */
  --t-rest: transparent;
  --t-easy: #e4f2ea;
  --t-long: #dce9f7;
  --t-hard: #fde8d7;
  --t-cross: #ece6f6;
  --t-race: #1f7a4d;
  --t-race-ink: #ffffff;
  --t-edge-easy: #3f8f66;
  --t-edge-long: #2f6db3;
  --t-edge-hard: #c2570c;
  --t-edge-cross: #7656b0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141816; --surface: #1d2320; --text: #e8ece9; --muted: #9aa69f;
    --line: #313a35; --accent: #4cc48a; --accent-ink: #0d1a12; --accent-soft: #1d3327;
    --warn: #f5a623; --warn-soft: #332a14; --danger: #ff7b6e; --danger-soft: #3a1d1a;
    --ph-base: #4f7a62; --ph-build: #3fa874; --ph-peak: #6fd6a2; --ph-taper: #d9b23a;
    --t-easy: #1d3327; --t-long: #1b2a3b; --t-hard: #3a2716; --t-cross: #2a2338;
    --t-race: #4cc48a; --t-race-ink: #0d1a12;
    --t-edge-easy: #4cc48a; --t-edge-long: #6aa7ea; --t-edge-hard: #f0904a; --t-edge-cross: #a98be0;
  }
}
:root[data-theme="dark"] {
  --bg: #141816; --surface: #1d2320; --text: #e8ece9; --muted: #9aa69f;
  --line: #313a35; --accent: #4cc48a; --accent-ink: #0d1a12; --accent-soft: #1d3327;
  --warn: #f5a623; --warn-soft: #332a14; --danger: #ff7b6e; --danger-soft: #3a1d1a;
  --ph-base: #4f7a62; --ph-build: #3fa874; --ph-peak: #6fd6a2; --ph-taper: #d9b23a;
  --t-easy: #1d3327; --t-long: #1b2a3b; --t-hard: #3a2716; --t-cross: #2a2338;
  --t-race: #4cc48a; --t-race-ink: #0d1a12;
  --t-edge-easy: #4cc48a; --t-edge-long: #6aa7ea; --t-edge-hard: #f0904a; --t-edge-cross: #a98be0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 6px; }
h2 { font-size: 1.15rem; margin: 0 0 6px; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1180px; }
.skip { position: absolute; left: -999px; }
.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; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

/* ---- site header and footer */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 6px 4px; border-bottom: 3px solid var(--accent-ink); border-left: 3px solid var(--accent-ink); transform: skewX(-12deg); opacity: .9; }
.site-head nav { display: flex; gap: 16px; font-size: .95rem; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover { color: var(--text); }
main { padding-top: 20px; padding-bottom: 48px; }
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; padding: 18px 0 32px; }
.site-foot .disclaimer { margin: 0 0 10px; max-width: 70ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.foot-links a { color: var(--muted); }

/* ---- cards, buttons, notes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card h2 { margin: 0 0 4px; font-size: 1.1rem; }
.card .hint { margin: 0 0 14px; color: var(--muted); font-size: .92rem; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; }
.inline-note { font-size: .9rem; margin-top: 6px; }
.inline-note.warn { color: var(--warn); background: var(--warn-soft); padding: 8px 10px; border-radius: 8px; }
.inline-note.err { color: var(--danger); }
.note-box { border-radius: 8px; padding: 10px 12px; font-size: .92rem; }
.note-box.err { background: var(--danger-soft); color: var(--danger); }
.note-box ul { margin: 4px 0 0; padding-left: 20px; }
.message h1 { font-size: 1.4rem; }
.message p { max-width: 62ch; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 24px; }
.prose li { margin-bottom: 4px; }

/* ---- intake form (index.php) */
.intro { margin: 4px 0 4px; }
.intro p { margin: 4px 0 0; color: var(--muted); }
.steps { display: flex; gap: 8px; margin: 16px 0 20px; flex-wrap: wrap; }
.steps button {
  flex: 1 1 140px; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 8px 10px; border-radius: var(--radius); font: inherit; text-align: left; cursor: pointer;
}
.steps button .n { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.steps button.active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.steps button:disabled { cursor: default; opacity: .6; }
section.step { display: none; }
section.step.active { display: block; }
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.event {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer;
  background: var(--surface); text-align: left; font: inherit; color: var(--text);
}
.event:hover { border-color: var(--accent); }
.event.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.event strong { display: block; }
.event span { color: var(--muted); font-size: .88rem; }
.event .soon { display: block; margin-top: 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); }
.family-title { margin: 18px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.family-title:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.field label, .field > .lbl { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.field small { display: block; color: var(--muted); font-size: .82rem; margin-top: 3px; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices label {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; font-weight: 500; font-size: .92rem; background: var(--surface);
}
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choices input { margin: 0; accent-color: var(--accent); }
.choices label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.full { grid-column: 1 / -1; }
.reduced-row { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; }
.reduced-row label { font-weight: 500 !important; font-size: .85rem !important; }
.signoff { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.signoff input { margin-top: 5px; accent-color: var(--accent); }
.summary dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; }
.refusal h2 { font-size: 1.3rem; }
.refusal .reason { font-size: 1.05rem; border-left: 4px solid var(--warn); padding: 6px 12px; background: var(--warn-soft); border-radius: 0 8px 8px 0; }
@media (max-width: 480px) { .summary dl { grid-template-columns: 1fr; } .summary dt { margin-top: 6px; } }

/* ================================================================ plan page */
.plan-head { margin-bottom: 16px; }
.plan-head .kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 4px; }
.plan-head .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.plan-head .meta strong { color: var(--text); font-weight: 600; }
.plan-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.callout { border-radius: var(--radius); padding: 12px 14px; font-size: .92rem; margin-bottom: 16px; background: var(--warn-soft); color: var(--text); border: 1px solid var(--line); }
.callout strong { color: var(--warn); }
.callout.info { background: var(--accent-soft); border-color: var(--accent); margin: 12px 0 0; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.delete-box { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--danger); border-radius: var(--radius); background: var(--danger-soft); font-size: .93rem; }
.delete-box p { margin: 0 0 8px; }
.delete-box .actions { justify-content: flex-start; margin: 0; }
.made-with { margin: 20px 0 0; color: var(--muted); font-size: .9rem; }
.told-actions { margin: 14px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .9rem; }

.cols { display: grid; gap: 16px; }
@media (min-width: 860px) { .cols { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.assumptions { margin: 0; padding-left: 20px; }
.assumptions li { margin-bottom: 6px; }
table.paces, table.plain { border-collapse: collapse; width: 100%; font-size: .93rem; }
table.paces th, table.paces td, table.plain th, table.plain td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.paces th { font-weight: 500; color: var(--muted); }
table.paces td { font-variant-numeric: tabular-nums; font-weight: 600; }
table.plain th { color: var(--muted); font-weight: 600; font-size: .85rem; }
table.plain td { font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
dl.inputs { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0 0; font-size: .93rem; }
dl.inputs dt { color: var(--muted); }
dl.inputs dd { margin: 0; }
details > summary { cursor: pointer; font-weight: 600; }
details.more { margin-top: 12px; }

/* Race-day card */
.race-card { border-color: var(--accent); background: var(--accent-soft); }
.race-card h2 { color: var(--text); }

/* Overview: one bar per week, height = training volume */
.overview { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(14px, 1fr); align-items: end; gap: 3px; height: 150px; margin: 14px 0 4px; padding-top: 18px; }
.overview a { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-decoration: none; color: var(--muted); position: relative; }
.overview .bar { display: block; border-radius: 4px 4px 1px 1px; background: var(--ph-build); min-height: 3px; position: relative; }
.overview .bar.base { background: var(--ph-base); }
.overview .bar.build { background: var(--ph-build); }
.overview .bar.peak { background: var(--ph-peak); }
.overview .bar.taper { background: var(--ph-taper); }
.overview .bar.cutback, .overview .bar.reduced { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255,255,255,.45) 4px 7px); }
.overview .bar .race-flag { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); font-size: .8rem; color: var(--accent); }
.overview .wk { font-size: .68rem; text-align: center; margin-top: 3px; font-variant-numeric: tabular-nums; }
.overview a:hover .bar, .overview a:focus-visible .bar { outline: 2px solid var(--text); outline-offset: 1px; }
.overview a.now .wk { color: var(--text); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted); margin: 6px 0 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; background: var(--ph-build); }
.legend i.base { background: var(--ph-base); } .legend i.peak { background: var(--ph-peak); } .legend i.taper { background: var(--ph-taper); }
.legend i.cutback { background: var(--ph-build) repeating-linear-gradient(135deg, transparent 0 3px, rgba(255,255,255,.5) 3px 5px); }
@media (max-width: 520px) { .overview { gap: 2px; height: 120px; } .overview .wk { font-size: .6rem; } }

/* Week grid */
.weeks-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 26px 0 8px; }
.weeks-head h2 { margin: 0; font-size: 1.25rem; }
.week { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; scroll-margin-top: 12px; }
.week.now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.week-head { padding: 10px 14px 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.week-head h3 { margin: 0; font-size: 1.02rem; }
.week-head .vol { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.week-head .focus { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .9rem; font-style: italic; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; color: #fff; background: var(--ph-build); vertical-align: 1px; }
.badge.base { background: var(--ph-base); color: #10261a; } .badge.peak { background: var(--ph-peak); } .badge.taper { background: var(--ph-taper); color: #2b2205; }
.badge.tag { background: transparent; color: var(--warn); border: 1px solid currentColor; }
.badge.now { background: var(--accent); color: var(--accent-ink); }

/* Days: a stacked list on phones; seven columns from 760px. Each day is a button followed by
   its description; on wide screens the open description moves under the whole row. */
.days { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.day {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 2px 10px; align-items: baseline;
  width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--t-rest);
  border: 0; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; padding: 9px 12px 9px 10px; cursor: pointer;
}
.day:hover { filter: brightness(0.97); }
.day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.day .dname { font-weight: 600; font-size: .88rem; grid-row: span 2; }
.day .dname small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.day .dtype { font-weight: 600; }
.day .damt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.day .dpace { grid-column: 2 / 4; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.day .dalso { grid-column: 2 / 4; font-size: .8rem; color: var(--muted); }
.day .hard-dot { color: var(--t-edge-hard); font-size: .75rem; margin-left: 3px; vertical-align: 1px; }
.day.rest .dtype { color: var(--muted); font-weight: 500; }
.day.easy { background: var(--t-easy); border-left-color: var(--t-edge-easy); }
.day.long { background: var(--t-long); border-left-color: var(--t-edge-long); }
.day.hard { background: var(--t-hard); border-left-color: var(--t-edge-hard); }
.day.cross { background: var(--t-cross); border-left-color: var(--t-edge-cross); }
.day.race { background: var(--t-race); color: var(--t-race-ink); border-left-color: var(--t-race); }
.day.race .dpace, .day.race .dname small, .day.race .dalso { color: inherit; opacity: .85; }
.day.race .hard-dot { color: inherit; }
.day[aria-expanded="true"] { box-shadow: inset 0 -3px 0 var(--text); }
.day.today .dname::after { content: "Today"; display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--accent); }
.day-desc { padding: 10px 14px 12px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: .95rem; }
.day-desc p { margin: 0 0 6px; }
.day-desc p:last-child { margin-bottom: 0; }
.day-desc .when { font-weight: 700; }
.js .day-desc { display: none; }
.js .day-desc.open { display: block; }
.days > .day-cell:nth-last-child(2) .day, .days > .day-desc:last-child { border-bottom: 0; }

/* Each day sits in a cell with its "done" checkbox (training days only; needs JS to be kept). */
.day-cell { position: relative; }
.day-cell .day { height: 100%; }
.done { display: none; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; align-items: center; justify-content: center; cursor: pointer; }
.js .done { display: flex; }
.done input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.js .day-cell.has-done .day { padding-right: 46px; }
.day-cell.is-done .day { opacity: .6; }
.day-cell.is-done .day .dtype::after { content: " ✓"; color: var(--accent); }
.day-cell.is-done .day.race .dtype::after { color: inherit; }
.done-count { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.done-count.all { color: var(--accent); font-weight: 700; }

/* Glossary: an underlined term in a session; tap for the definition. */
.gloss { position: relative; }
.gloss-term { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.gloss-term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.gloss-term[aria-expanded="true"] { text-decoration-style: solid; text-decoration-color: var(--accent); }
/* Fixed and placed by plan.js, so the week card's rounded-corner clipping cannot cut it off. */
.gloss-pop { position: fixed; left: 8px; top: 8px; z-index: 20; width: min(300px, calc(100vw - 32px)); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 6px 20px rgba(0,0,0,.15); font-size: .88rem; font-style: normal; font-weight: 400; line-height: 1.45; text-align: left; }
.gloss-pop[hidden] { display: none; }
dl.glossary dt { font-weight: 700; margin-top: 14px; scroll-margin-top: 12px; }
dl.glossary dd { margin: 2px 0 0; }

/* Feedback and "Email me this link" */
.fb-rate { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fb-rate .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.fb-more { margin-top: 12px; }
.fb-more label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.fb-more .actions { justify-content: flex-start; }
.fb-thanks { margin: 6px 0 0; color: var(--accent); font-weight: 600; }
.email-form { display: flex; gap: 8px; flex-wrap: wrap; }
.email-form input { flex: 1 1 220px; width: auto; }

@media (min-width: 760px) {
  .days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .day {
    display: flex; flex-direction: column; gap: 1px; align-items: stretch; min-height: 104px;
    border-left: 0; border-top: 4px solid transparent; border-bottom: 0; border-right: 1px solid var(--line); padding: 7px 8px 9px;
  }
  .day-cell.sun .day { border-right: 0; }
  .done { top: 4px; right: 4px; transform: none; width: 30px; height: 30px; }
  .js .day-cell.has-done .day { padding-right: 8px; }
  .js .day-cell.has-done .day .dname { padding-right: 24px; }
  .day.easy { border-top-color: var(--t-edge-easy); }
  .day.long { border-top-color: var(--t-edge-long); }
  .day.hard { border-top-color: var(--t-edge-hard); }
  .day.cross { border-top-color: var(--t-edge-cross); }
  .day.race { border-top-color: var(--t-race); }
  .day .dname { font-size: .8rem; display: flex; gap: 5px; align-items: baseline; }
  .day .dname small { display: inline; }
  .day .dtype { font-size: .9rem; line-height: 1.25; }
  .day .damt { text-align: left; font-size: 1.05rem; }
  .day .dpace { font-size: .78rem; line-height: 1.3; }
  .day .dalso { font-size: .75rem; }
  .day.today .dname::after { display: inline; margin-left: auto; }
  .day-desc { order: 1; grid-column: 1 / -1; border-top: 1px solid var(--line); border-bottom: 0; }
  .js .day-desc.open { display: block; }
}
.key { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }

/* Triathlon and cycling plans */
/* Swim and easy-ride day colours (DESIGN-tri-cycling.md section 4; long rides use the long
   colour, hard rides and bricks the hard one), the second session of a double and a brick's two
   parts inside a day cell, the week's time by sport, and the zones card beside the run paces. */
:root {
  --t-swim: #def0f5; --t-edge-swim: #1f86a3;
  --t-bike: #f4efd6; --t-edge-bike: #9a7b0a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --t-swim: #16303a; --t-edge-swim: #5cc3e0; --t-bike: #302a14; --t-edge-bike: #d8b84a; }
}
:root[data-theme="dark"] { --t-swim: #16303a; --t-edge-swim: #5cc3e0; --t-bike: #302a14; --t-edge-bike: #d8b84a; }
.day.swim { background: var(--t-swim); border-left-color: var(--t-edge-swim); }
.day.bike { background: var(--t-bike); border-left-color: var(--t-edge-bike); }
.day .dbrick, .day .dsecond { grid-column: 2 / 4; font-size: .85rem; font-variant-numeric: tabular-nums; }
.day .dbrick { color: var(--muted); }
.day .dsecond { font-weight: 600; }
.day .dsecond::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--t-edge-easy); }
.day .dsecond.s-swim::before { background: var(--t-edge-swim); }
.day .dsecond.s-bike::before { background: var(--t-edge-bike); }
.day .dsecond.s-long::before { background: var(--t-edge-long); }
.day .dsecond.s-hard::before { background: var(--t-edge-hard); }
.day .dsecond.s-cross::before { background: var(--t-edge-cross); }
.day .dsecond-t { font-weight: 400; color: var(--muted); }
.day.race .dbrick, .day.race .dsecond-t { color: inherit; opacity: .85; }
.week-head .sports { flex-basis: 100%; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
table.plain td.nw { white-space: nowrap; }
.stack { display: grid; gap: 16px; }
.stack > .card { margin: 0; }
.gloss-multi { display: block; margin-top: 4px; color: var(--muted); }
@media (min-width: 760px) {
  .day.swim { border-top-color: var(--t-edge-swim); }
  .day.bike { border-top-color: var(--t-edge-bike); }
  .day .dbrick, .day .dsecond { font-size: .78rem; line-height: 1.3; }
  .day .dsecond { margin-top: 3px; }
}
