/* ADP app: shared tokens, phone components and desktop shell.
   Neutral industrial, one teal accent, IBM Plex Sans.
   Phone: 390 px, 15 px body, 16 px inputs, 44 px minimum targets.
   Desktop: graphite sidebar from 900 px, 14 px body, 12-column grid. */

.t-light {
  --bg: #F2F4F6; --surface: #FFFFFF; --surface-2: #F8F9FA; --sunken: #ECEFF2;
  --line: #E0E4E8; --line-2: #C9CFD5;
  --text: #161A1F; --text-2: #46505A; --muted: #5E6872;
  --accent: #0D6E6B; --accent-hover: #0A5956; --on-accent: #FFFFFF; --accent-tint: #E3F1EF; --accent-text: #0B605D;
  --side: #1A1F25; --side-2: #232A31; --side-line: #313A43; --side-text: #CBD2D9; --side-muted: #8E98A2; --side-accent: #5CC6BE;
  --warn: #8F5300; --warn-bg: #FDF3E2; --warn-line: #EED4A6;
  --bad: #B3261E; --bad-bg: #FCEBEA;
  --good: #1D6A40; --good-bg: #E5F2EA; --on-good: #FFFFFF;
  --info: #1F4F82; --info-bg: #E9F0F8;
  --review: #5B47C9; --review-bg: #EEEBFB;
  --ev10: #2a78d6; --ev10-bg: #E8F1FC; --ev10-text: #1D5BA8;
  --ev50: #eb6834; --ev50-bg: #FDEEE7; --ev50-text: #A6441A;
  --shadow: 0 0 0 1px #E0E4E8, 0 1px 2px rgba(16, 24, 32, .05);
}

.t-dark {
  --bg: #101317; --surface: #171B20; --surface-2: #1C2127; --sunken: #20262C;
  --line: #2A3037; --line-2: #3B434C;
  --text: #E7EAED; --text-2: #B3BBC3; --muted: #919AA3;
  --accent: #3DB5AC; --accent-hover: #5CC6BE; --on-accent: #062120; --accent-tint: rgba(61, 181, 172, .13); --accent-text: #6FD0C8;
  --side: #0B0E11; --side-2: #151A1F; --side-line: #252C33; --side-text: #C4CBD2; --side-muted: #858F99; --side-accent: #5CC6BE;
  --warn: #F2BC6E; --warn-bg: rgba(242, 188, 110, .11); --warn-line: rgba(242, 188, 110, .28);
  --bad: #F4A29B; --bad-bg: rgba(244, 162, 155, .12);
  --good: #84D6A8; --good-bg: rgba(132, 214, 168, .12); --on-good: #0B2416;
  --info: #A3C8F2; --info-bg: rgba(120, 170, 230, .12);
  --review: #B4AAF2; --review-bg: rgba(144, 133, 233, .14);
  --ev10: #3987e5; --ev10-bg: rgba(57, 135, 229, .16); --ev10-text: #8DBBF2;
  --ev50: #d95926; --ev50-bg: rgba(217, 89, 38, .16); --ev50-text: #F2A07C;
  --shadow: 0 0 0 1px #262C33;
}

/* ---------- Base ---------- */
.phone { width: 390px; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; box-sizing: border-box; overflow: hidden; }
.phone *, .phone *::before, .phone *::after { box-sizing: border-box; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.xs { width: 14px; height: 14px; }
svg.i.lg { width: 24px; height: 24px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.muted { color: var(--muted); }
.spacer { flex: 1; }

/* ---------- App bar ---------- */
.abar { display: flex; align-items: center; gap: 4px; min-height: 64px; padding: 8px 6px 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.abar.has-back { padding-left: 4px; }
.abar-t { flex: 1; min-width: 0; }
.abar-k { font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abar-h { font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; margin: 0; }
.ibtn { width: 44px; height: 44px; border-radius: 22px; border: none; background: transparent; color: var(--text-2); display: inline-grid; place-items: center; position: relative; cursor: pointer; text-decoration: none; flex: none; }
.ibtn:hover { background: var(--sunken); color: var(--text); }
.ibtn .dotb { position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); }

/* ---------- Layout ---------- */
.body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.sect-l { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 2px -6px; }
.sect-l .tag { letter-spacing: 0; text-transform: none; }
.card { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-t { font-size: 16px; font-weight: 600; margin: 0; line-height: 1.3; }
.card-c { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
a.cardlink { text-decoration: none; color: inherit; display: flex; }

/* ---------- Rows ---------- */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); min-height: 68px; }
.row:first-child { border-top: none; }
.row-main { flex: 1; min-width: 0; }
.row-k { font-size: 12px; color: var(--muted); font-weight: 500; }
.row-t { font-weight: 500; font-size: 15px; line-height: 1.3; }
.row-s { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 3px; }
.row.add { color: var(--accent-text); font-weight: 500; text-decoration: none; min-height: 56px; }
.row.add .plus { width: 44px; height: 44px; border-radius: 22px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; flex: none; }

/* Done toggle: an action until tapped, then a status (green) */
.done { width: 44px; height: 44px; border-radius: 22px; border: 1.5px solid var(--line-2); background: var(--surface); color: transparent; display: grid; place-items: center; flex: none; cursor: pointer; padding: 0; }
.done svg.i { width: 20px; height: 20px; stroke-width: 2.4; }
.done:hover { border-color: var(--accent); color: var(--accent); }
.done.on { background: var(--good); border-color: var(--good); color: var(--on-good); }

/* ---------- Tags and statuses ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-neutral { background: var(--sunken); color: var(--text-2); }
.tag-accent { background: var(--accent-tint); color: var(--accent-text); }
.tag-good { background: var(--good-bg); color: var(--good); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-bad { background: var(--bad-bg); color: var(--bad); }
.tag-info { background: var(--info-bg); color: var(--info); }
.ev10 { background: var(--ev10-bg); color: var(--ev10-text); }
.ev50 { background: var(--ev50-bg); color: var(--ev50-text); }
.stat { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.stat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.s-notstarted { background: var(--sunken); color: var(--text-2); }
.s-progress { background: var(--info-bg); color: var(--info); }
.s-review { background: var(--review-bg); color: var(--review); }
.s-delayed { background: var(--warn-bg); color: var(--warn); }
.s-blocked { background: var(--bad-bg); color: var(--bad); }
.s-moved { background: var(--sunken); color: var(--text-2); }
.s-moved::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.s-complete { background: var(--good-bg); color: var(--good); }

/* ---------- Buttons ---------- */
.btn { min-height: 44px; padding: 0 16px; border-radius: 8px; font: inherit; font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border: 1px solid transparent; text-decoration: none; white-space: nowrap; }
.btn-lg { min-height: 50px; font-size: 16px; font-weight: 600; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--accent-text); padding: 0 10px; }
.btn-ghost:hover { background: var(--accent-tint); }
.btn-danger { background: transparent; color: var(--bad); border-color: var(--line-2); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.savebar { padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 10px; }

/* ---------- Inputs ---------- */
.fld { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fld-l { font-size: 13.5px; font-weight: 500; color: var(--text-2); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fld-l small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.input, .textarea { width: 100%; min-height: 48px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; padding: 12px; outline: none; }
.textarea { min-height: 96px; resize: none; line-height: 1.45; display: block; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.pick { width: 100%; min-height: 48px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; padding: 0 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left; }
.pick .lab { flex: 1; min-width: 0; }
.pick .sub { display: block; font-size: 12.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rate { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rate button { min-height: 44px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-size: 15px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; cursor: pointer; }
.rate button:hover { border-color: var(--accent); }
.rate button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.rate-ends { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.segm { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--sunken); border-radius: 10px; padding: 3px; gap: 2px; }
.segm button { min-height: 40px; padding: 0 8px; border: none; background: transparent; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.segm button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 0 0 1px var(--line); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 15px; color: var(--text); cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line-2); position: relative; margin: 0; cursor: pointer; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 21px; }

/* ---------- Bottom navigation (graphite, matching the desktop sidebar) ---------- */
.bnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--side); padding: 6px 4px 12px; border-top: 1px solid var(--side-line); }
.bnav a { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--side-muted); font-size: 11.5px; font-weight: 500; text-decoration: none; border-radius: 10px; }
.bnav a:hover { color: #FFFFFF; }
.bnav .pill { width: 56px; height: 30px; border-radius: 15px; display: grid; place-items: center; position: relative; }
.bnav a.on { color: #FFFFFF; font-weight: 600; }
.bnav a.on .pill { background: rgba(92, 198, 190, .16); color: var(--side-accent); }
.bnav .pill .nb { position: absolute; top: 2px; right: 10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #C9302C; color: #FFFFFF; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }

/* ---------- Pieces ---------- */
.next { display: flex; gap: 14px; align-items: center; width: 100%; }
.next-d { width: 60px; height: 60px; border-radius: 12px; background: var(--side); color: #FFFFFF; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.next-d b { font-size: 24px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.next-d span { font-size: 11px; color: var(--side-muted); font-weight: 500; margin-top: 2px; }
.meter { position: relative; height: 8px; border-radius: 4px; background: var(--sunken); }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.strip > div { padding: 12px 14px; border-right: 1px solid var(--line); min-width: 0; }
.strip > div:last-child { border-right: none; }
.sk-l { font-size: 12px; color: var(--text-2); font-weight: 500; }
.sk-v { font-size: 22px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.sk-v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.refl { padding: 12px 14px; background: var(--surface-2); border-radius: 8px; border: 1px solid var(--line); font-size: 15px; }
.kv { display: flex; gap: 8px; flex-wrap: wrap; }
.kv span { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--sunken); font-size: 13px; color: var(--text-2); }
.kv b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }

/* Comments */
.cmts { display: flex; flex-direction: column; gap: 14px; }
.cmt { display: flex; gap: 10px; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--sunken); color: var(--text-2); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; }
.av.me { background: var(--side); color: #FFFFFF; }
.cmt-b { flex: 1; min-width: 0; }
.cmt-h { font-size: 13px; color: var(--muted); }
.cmt-h b { color: var(--text); font-weight: 600; }
.cmt-t { margin-top: 2px; font-size: 15px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer .textarea { min-height: 48px; }

/* Week plan */
.day { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.day:first-child { border-top: none; }
.day-d { text-align: center; padding-top: 2px; }
.day-d span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.day-d b { display: block; font-size: 20px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.day.today { background: var(--accent-tint); }
.day.today .day-d span, .day.today .day-d b { color: var(--accent-text); }
.day-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 24px; }
.pis { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.pi { display: flex; align-items: center; gap: 8px; font-size: 14.5px; min-height: 30px; }
.pi .ck { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; color: transparent; }
.pi .ck svg.i { width: 12px; height: 12px; stroke-width: 3; }
.pi.done .ck { background: var(--good); border-color: var(--good); color: var(--on-good); }
.pi .nm { flex: 1; min-width: 0; }
.pi .dur { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.day-add { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 4px; padding: 0 10px 0 6px; border-radius: 18px; border: none; background: transparent; color: var(--accent-text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.day-add:hover { background: var(--accent-tint); }
.lib { border-top: 1px solid var(--line); }
.lib-r { display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 16px; min-height: 60px; border-top: 1px solid var(--line); }
.lib-r:first-child { border-top: none; }

/* ---------- Score charts (HTML) ---------- */
.plot { position: relative; height: 170px; margin: 12px 0 0 40px; border-bottom: 1px solid var(--line-2); }
.plot .gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.plot .gl span { position: absolute; left: -40px; top: -9px; width: 34px; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plot .goal { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--text); z-index: 1; }
.plot .goal span { position: absolute; right: 0; top: -21px; font-size: 11.5px; font-weight: 600; color: var(--text); background: var(--surface); padding: 0 4px; }
.plot .dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, 50%); z-index: 2; box-shadow: 0 0 0 2px var(--surface); }
.plot .dot.d10 { background: var(--ev10); }
.plot .dot.d50 { background: var(--ev50); }
.plot .dv { position: absolute; transform: translate(-50%, -8px); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; z-index: 2; }
.plot-x { position: relative; height: 34px; margin-left: 40px; font-size: 11.5px; color: var(--muted); }
.plot-x span { position: absolute; top: 6px; transform: translateX(-50%); text-align: center; line-height: 1.25; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.sw.dash { width: 16px; height: 0; border-radius: 0; border-top: 2px dashed var(--text); }

/* Goals */
.goalrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.goalrow:first-child { border-top: none; }
.goalrow .g-t { font-weight: 500; }
.goalrow .g-s { grid-column: 1 / -1; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 14px; height: 6px; border-radius: 3px; background: var(--line-2); display: block; }
.pips i.on { background: var(--good); }

/* Phase timeline */
.ptl { display: grid; gap: 4px; }
.ptl-track { position: relative; height: 36px; background: var(--sunken); border-radius: 8px; overflow: hidden; }
.ptl-seg { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; border-right: 2px solid var(--surface); color: var(--text-2); }
.ptl-seg.past { background: var(--line); }
.ptl-seg.now { background: var(--accent-tint); color: var(--accent-text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ptl-seg.next { background: var(--sunken); }
.ptl-now { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px solid var(--text); z-index: 2; }
.ptl-x { position: relative; height: 18px; font-size: 11.5px; color: var(--muted); }
.ptl-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* ---------- Desktop shell ---------- */
.desk { display: flex; flex-wrap: wrap; background: var(--bg); color: var(--text); font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.desk *, .desk *::before, .desk *::after { box-sizing: border-box; }
.desk .btn { min-height: 40px; font-size: 14px; padding: 0 14px; }
.desk .row { min-height: 56px; }
.dside { flex: 1 1 248px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 16px 12px; gap: 2px; }
@media (min-width: 900px) { .dside { flex: 0 0 248px; } }
.dbrand { display: flex; gap: 10px; align-items: center; padding: 2px 8px 16px; }
.dbrand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--side-accent); color: #062120; display: grid; place-items: center; flex: none; }
.dbrand-name { color: #FFFFFF; font-weight: 600; font-size: 14px; line-height: 1.25; }
.dbrand-sub { font-size: 12px; color: var(--side-muted); }
.dwho { background: var(--side-2); border: 1px solid var(--side-line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.dwho .av { width: 32px; height: 32px; background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.dwho-n { color: #FFFFFF; font-weight: 500; font-size: 13.5px; line-height: 1.3; }
.dwho-r { font-size: 12px; color: var(--side-muted); }
.dnav { display: flex; flex-direction: column; gap: 1px; }
.dnav-g { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--side-muted); padding: 14px 10px 6px; }
.dnav-a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 6px; color: var(--side-text); text-decoration: none; font-size: 13.5px; }
.dnav-a:hover { background: rgba(255, 255, 255, .05); color: #FFFFFF; }
.dnav-a svg.i { color: var(--side-muted); width: 18px; height: 18px; }
.dnav-a.on { background: rgba(255, 255, 255, .09); color: #FFFFFF; font-weight: 500; }
.dnav-a.on svg.i { color: var(--side-accent); }
.dnav-a .lab { flex: 1; min-width: 0; }
.dnav-a .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; background: rgba(92, 198, 190, .16); color: #84DCD4; }
.dside-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--side-line); font-size: 12px; color: var(--side-muted); display: flex; flex-direction: column; gap: 6px; }
.dmain { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.dtop { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 64px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.crumbs b { color: var(--text); font-weight: 500; }
.dcontent { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1240px; width: 100%; margin: 0 auto; }
.ph { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; }
.title { font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin: 2px 0 4px; line-height: 1.25; }
.meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.note { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 9px 14px; border-radius: 8px; background: var(--info-bg); color: var(--info); }
.dgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c7 { grid-column: span 7; } .c6 { grid-column: span 6; } .c5 { grid-column: span 5; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; }
@media (max-width: 1100px) { .c8, .c7, .c6, .c5, .c4, .c3 { grid-column: span 12; } }
.card-h { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi-l { font-size: 12.5px; color: var(--text-2); font-weight: 500; display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.kpi-v { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.kpi-s { font-size: 12.5px; color: var(--muted); }
.scroll { overflow-x: auto; }

/* Calendar swimlanes (desktop) */
.cal { position: relative; min-width: 980px; }
.cal-row { display: grid; grid-template-columns: 188px minmax(0, 1fr); border-top: 1px solid var(--line); min-height: 44px; }
.cal-row.grp { min-height: 30px; background: var(--surface-2); }
.cal-row.tall { min-height: 60px; }
.cal-row.grp .cal-lab { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cal-lab { font-size: 13px; color: var(--text-2); padding: 0 14px; display: flex; align-items: center; border-right: 1px solid var(--line); }
.cal-track { position: relative; }
.cal-wk { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.cal-bar { position: absolute; top: 8px; height: 28px; border-radius: 6px; padding: 0 8px; font-size: 12px; font-weight: 600; display: flex; align-items: center; white-space: nowrap; overflow: hidden; min-width: 8px; }
.cal-bar.b10 { background: var(--ev10); color: #FFFFFF; }
.cal-bar.b50 { background: var(--ev50); color: #1F0E05; }
.cal-bar.bboth { background: var(--side); color: #FFFFFF; }
.cal-bar.btrain { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.cal-bar.bcycle { background: var(--sunken); color: var(--text-2); }
.cal-bar.bbreak { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1.5px var(--line-2); border-radius: 6px; }
.cal-bar.bnote { background: var(--warn-bg); color: var(--warn); }
.cal-bar.bphase { background: var(--accent-tint); color: var(--accent-text); }
.cal-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--bad); z-index: 3; pointer-events: none; }
.cal-today span { position: absolute; top: 2px; left: 4px; font-size: 11px; font-weight: 600; color: var(--bad); white-space: nowrap; }
.cal-head { display: grid; grid-template-columns: 188px minmax(0, 1fr); min-height: 40px; }
.cal-m { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-2); padding: 10px 8px; font-weight: 600; font-size: 13px; }

/* Week planner (desktop) */
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.wk-col { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 300px; }
.wk-col.today { box-shadow: 0 0 0 2px var(--accent); }
.wk-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.wk-h b { font-size: 15px; font-weight: 600; }
.wk-h span { font-size: 12px; color: var(--muted); font-weight: 500; }
.wk-col.today .wk-h b, .wk-col.today .wk-h span { color: var(--accent-text); }
.ses { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; background: var(--surface); }
.ses.done { background: var(--good-bg); border-color: transparent; }
.ses .s-t { font-weight: 500; line-height: 1.3; }
.ses .s-m { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.ses.done .s-m { color: var(--good); }
.wk-add { min-height: 36px; border: 1.5px dashed var(--line-2); border-radius: 8px; background: transparent; color: var(--accent-text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.wk-add:hover { border-color: var(--accent); background: var(--accent-tint); }

/* Reference tables (foundations page) */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }

/* Competition plan */
.plan-sec { padding: 14px 16px; border-top: 1px solid var(--line); }
.plan-sec:first-child { border-top: none; }
.plan-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.plan-h h3 { font-size: 15px; font-weight: 600; margin: 0; }
.tline { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 12px; font-size: 14.5px; }
.tline .t { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13.5px; color: var(--text-2); font-weight: 500; padding-top: 1px; }
.cues { display: flex; flex-direction: column; gap: 10px; }
.cue { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; font-size: 14.5px; }
.cue b { font-weight: 600; font-size: 13.5px; color: var(--text-2); padding-top: 1px; }
.wif { display: flex; flex-direction: column; gap: 10px; }
.wif > div { font-size: 14.5px; }
.wif .if { font-weight: 600; }
.wa { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; background: var(--sunken); border-radius: 10px; padding: 12px 14px; color: var(--text); margin: 0; }
