/* =====================================================================================================================
   Project RAZ website - the Training page only (training.html, <body class="training">): the plan generator, today's
   sessions, the calendar, progress and the plan. Built on style.css (its colours, cards, buttons and forms); nothing
   here changes how other pages look.
   ===================================================================================================================== */

.training .wrap { max-width: 1080px; }
.training main { padding: 24px 0 72px; }

/* chart colours (validated as sets against the dark card surface #1c1c1e): the phases in their fixed order, the two
   fitness lines, and the easy -> hard ramp (one blue, darkest = easiest) */
.training {
  --ph-prep: #3987e5; --ph-base: #d95926; --ph-build: #199e70; --ph-peak: #c98500; --ph-taper: #d55181;
  --fit: #3987e5; --fatigue: #d95926; --form-up: #3987e5; --form-down: #e66767;
  --mix-easy: #184f95; --mix-mod: #3987e5; --mix-hard: #86b6ef;
  --grid: #2c2c2a; --axis: #383835; --ink-muted: #898781; --done: #c3c2b7;
}

/* ------------------------------------------------------------------ the page head */
.t-head { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; margin: 8px 0 18px; }
.t-head .titles { flex: 1; min-width: 240px; }
.t-head h1 { font-size: 40px; letter-spacing: -1px; margin: 0 0 4px; }
.t-head .sub { font-size: 16px; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--fill-2);
        border: 1px solid var(--hairline); font-size: 14px; font-weight: 650; color: var(--label); white-space: nowrap; }
.pill .dim { color: var(--label-2); font-weight: 600; }
.pill svg { width: 16px; height: 16px; }

.t-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--fill-2); border: 1px solid var(--hairline);
          margin: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.t-tabs::-webkit-scrollbar { display: none; }
.t-tabs button { appearance: none; border: 0; background: transparent; color: var(--label-2); font: inherit; font-size: 15px; font-weight: 650;
                 padding: 9px 16px; border-radius: 10px; cursor: pointer; white-space: nowrap; flex: 1 0 auto; }
.t-tabs button:hover { color: var(--label); }
.t-tabs button.on { background: rgba(255, 255, 255, 0.1); color: var(--label); }

.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols > div { display: grid; gap: 18px; min-width: 0; }
.cols .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 20px; flex: 1; min-width: 0; }
.card-head .small { color: var(--label-2); }

/* ------------------------------------------------------------------ the race card and readiness ring */
.race-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.race-card .info { flex: 1; min-width: 220px; }
.race-card .big { font-size: 30px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.1; margin: 4px 0 6px; }
.ring { position: relative; width: 116px; height: 116px; flex: none; }
.ring svg { width: 116px; height: 116px; transform: rotate(-90deg); }
.ring .n { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.ring .n b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -0.8px; }
.ring .n span { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--label-2); }
.parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.parts .stat { padding: 10px 12px; }
.parts .stat .v { font-size: 18px; }

/* ------------------------------------------------------------------ meters (level, goals) */
.meter { height: 8px; border-radius: 4px; background: rgba(10, 132, 255, 0.18); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.meter.good > i { background: var(--green); }
.level { display: flex; gap: 16px; align-items: center; }
.level .badge-num { width: 64px; height: 64px; border-radius: 18px; flex: none; display: grid; place-items: center; text-align: center;
                    background: linear-gradient(135deg, var(--accent), #5e5ce6); line-height: 1; }
.level .badge-num b { font-size: 26px; font-weight: 800; display: block; }
.level .badge-num span { font-size: 9px; font-weight: 800; letter-spacing: 1.2px; display: block; margin-top: 2px; }
.level .txt { flex: 1; min-width: 0; }
.level .row1 { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; flex-wrap: wrap; }

.goal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 0; }
.goal + .goal { border-top: 1px solid var(--separator); }
.goal .t { font-weight: 650; }
.goal .d { color: var(--label-2); font-size: 13px; }
.goal .meter { grid-column: 1 / -1; }
.goal .r { font-size: 13px; color: var(--label-2); text-align: right; white-space: nowrap; }

/* ------------------------------------------------------------------ sessions */
.sess { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--hairline); cursor: pointer; text-align: left; width: 100%; color: inherit; font: inherit; appearance: none; }
.sess + .sess { margin-top: 10px; }
.sess:hover { background: rgba(255, 255, 255, 0.07); }
.sess .ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: rgba(10, 132, 255, 0.16); color: var(--teal); }
.sess .ic svg { width: 22px; height: 22px; }
.sess .ic.run { background: rgba(255, 159, 10, 0.16); color: var(--orange); }
.sess .ic.swim { background: rgba(100, 210, 255, 0.14); color: var(--teal); }
.sess .ic.strength, .sess .ic.other { background: var(--fill); color: var(--label-2); }
.sess .ic.race { background: rgba(255, 204, 0, 0.16); color: var(--gold); }
.sess .body { flex: 1; min-width: 0; }
.sess .ttl { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sess .meta { color: var(--label-2); font-size: 13px; margin-top: 2px; }
.sess .why { color: var(--label-3); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sess .mini { margin-top: 8px; height: 26px; }
.sess .mini svg { width: 100%; height: 26px; }
.st { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 750; letter-spacing: 0.3px; background: var(--fill); color: var(--label-2); }
.st.done { background: rgba(48, 209, 88, 0.18); color: var(--green); }
.st.partial { background: rgba(255, 159, 10, 0.18); color: var(--orange); }
.st.missed, .st.skipped { background: rgba(255, 69, 58, 0.16); color: #ff8a82; }
.st.key { background: rgba(10, 132, 255, 0.2); color: var(--teal); }
.st.game { background: rgba(255, 255, 255, 0.08); color: var(--label); }

/* the week: seven days, each a column */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hairline); padding: 8px 6px; min-height: 92px; min-width: 0; }
.day.today { border-color: rgba(10, 132, 255, 0.6); background: rgba(10, 132, 255, 0.07); }
.day.past { opacity: 0.82; }
.day .dn { font-size: 11px; font-weight: 750; letter-spacing: 0.8px; text-transform: uppercase; color: var(--label-2); display: flex; justify-content: space-between; gap: 4px; }
.day .dn b { color: var(--label); font-weight: 750; }
.chip { display: block; width: 100%; margin-top: 6px; padding: 5px 6px; border-radius: 8px; border: 0; cursor: pointer; text-align: left;
        background: rgba(255, 255, 255, 0.07); color: var(--label); font: inherit; font-size: 12px; line-height: 1.25; overflow: hidden; }
.chip:hover { background: rgba(255, 255, 255, 0.12); }
.chip .k { display: flex; align-items: center; gap: 5px; font-weight: 700; }
.chip .k svg { width: 13px; height: 13px; flex: none; }
.chip .k i { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-left: auto; background: var(--label-3); }
.chip.done .k i { background: var(--green); }
.chip.partial .k i { background: var(--orange); }
.chip.missed .k i, .chip.skipped .k i { background: var(--red); }
.chip .m { color: var(--label-2); font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.key { box-shadow: inset 2px 0 0 var(--accent); }
.chip.race { background: rgba(255, 204, 0, 0.14); }
.chip.add { display: grid; place-items: center; height: 26px; padding: 0; background: transparent; border: 1px dashed var(--separator); color: var(--label-3); }
.chip.add:hover { background: rgba(10, 132, 255, 0.12); border-color: var(--accent); color: var(--label); }
.chip.add svg { width: 14px; height: 14px; }

/* the calendar: a row of weeks */
.cal-week { padding: 14px 0; }
.cal-week + .cal-week { border-top: 1px solid var(--separator); }
.cal-week .wh { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.cal-week .wh b { font-size: 15px; }
.cal-week .wh .sp { flex: 1; }
.ph { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--label-2); }
.ph i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ------------------------------------------------------------------ the month calendar */
.mbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.mbar h2 { margin: 0 6px; font-size: 22px; min-width: 160px; text-align: center; }
.mbar .btn svg { width: 16px; height: 16px; }
.mbar .sp { flex: 1; }
.month { display: grid; gap: 4px; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) 76px; gap: 4px; }
.mhead > div { font-size: 11px; font-weight: 750; letter-spacing: 0.8px; text-transform: uppercase; color: var(--label-2); padding: 0 6px; }
.mweek { border-left: 3px solid var(--ph, transparent); padding-left: 3px; border-radius: 4px; }
.mcell { border-radius: 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hairline); padding: 6px; min-height: 104px; min-width: 0; cursor: pointer; }
.mcell:hover { background: rgba(255, 255, 255, 0.06); }
.mcell.today { border-color: rgba(10, 132, 255, 0.6); background: rgba(10, 132, 255, 0.07); }
.mcell.out { opacity: 0.45; }
.mcell.past:not(.out) .mdn { color: var(--label-3); }
.mdn { font-size: 12px; font-weight: 750; color: var(--label-2); margin-bottom: 2px; }
.mcell .chip { margin-top: 4px; }
.chip.ride { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); color: var(--label-2); }
.mtot { display: flex; flex-direction: column; justify-content: center; gap: 0; font-size: 11px; color: var(--label-2); padding: 0 4px; text-align: right; }
.mtot b { font-size: 14px; color: var(--label); font-weight: 750; }
.mtot span + b { margin-top: 6px; }
.mtot-h { text-align: right; }

/* ------------------------------------------------------------------ a coach's clients at a glance */
.co-bar h2 { min-width: 0; text-align: left; margin: 0 4px; font-size: 20px; white-space: nowrap; }
.co-bar h2 .dim { color: var(--label-2); font-weight: 600; font-size: 15px; margin-left: 4px; }
.co-bar .opts { gap: 6px; }
.co-bar .opt { height: 32px; font-size: 13px; }
.co-list { display: grid; }
.co-row { display: grid; grid-template-columns: minmax(190px, 1.6fr) minmax(240px, 2fr) 112px 122px auto; gap: 8px 14px; align-items: center;
          padding: 12px 0; border-top: 1px solid var(--separator); min-width: 0; }
.co-row > div { min-width: 0; }
.co-hrow { border-top: 0; padding: 0 0 6px; font-size: 11px; font-weight: 750; letter-spacing: 0.8px; text-transform: uppercase; color: var(--label-2); }
.co-hrow .co-wk > div { text-align: center; }
.co-hrow .co-wk > .today { color: var(--teal); }
.co-who { display: flex; gap: 10px; align-items: flex-start; }
.av { width: 34px; height: 34px; border-radius: 17px; flex: none; display: grid; place-items: center; background: var(--fill); color: var(--label); font-size: 13px; font-weight: 750; letter-spacing: 0.3px; }
.co-who .nm { min-width: 0; }
.co-who .nm > b { display: block; font-size: 16px; line-height: 1.25; }
.co-who .nm > .small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.co-f { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--fill-2); color: var(--label-2); white-space: nowrap; }
.co-f.l3 { background: rgba(255, 69, 58, 0.18); color: #ff8a82; }
.co-f.l2 { background: rgba(255, 159, 10, 0.16); color: var(--orange); }
.co-f.l1 { background: rgba(10, 132, 255, 0.18); color: var(--teal); }
.co-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.co-d { appearance: none; font: inherit; color: inherit; text-align: left; display: flex; flex-direction: column; gap: 3px; min-height: 46px; min-width: 0; padding: 4px;
        border-radius: 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--hairline); }
button.co-d { cursor: pointer; }
button.co-d:hover { background: rgba(255, 255, 255, 0.07); }
.co-d.today { border-color: rgba(10, 132, 255, 0.6); }
.co-dn { display: none; font-size: 10px; font-weight: 750; color: var(--label-3); text-align: center; line-height: 1; }
.co-p { display: grid; place-items: center; height: 18px; border-radius: 5px; color: var(--label-2); box-shadow: inset 0 0 0 1px var(--label-3); }
.co-p svg { width: 12px; height: 12px; }
.co-p.done { background: rgba(48, 209, 88, 0.24); color: var(--green); box-shadow: none; }
.co-p.partial { background: rgba(255, 159, 10, 0.24); color: var(--orange); box-shadow: none; }
.co-p.missed, .co-p.skipped { background: rgba(255, 69, 58, 0.22); color: #ff8a82; box-shadow: none; }
.co-p.ride { background: rgba(255, 255, 255, 0.12); color: var(--label-2); box-shadow: none; }
.co-p.race { background: rgba(255, 204, 0, 0.2); color: var(--gold); box-shadow: none; }
.co-p.key { border-left: 3px solid var(--accent); }
.co-more { font-size: 10px; font-weight: 700; color: var(--label-2); text-align: center; line-height: 1; }
.co-tot b, .co-form b { font-size: 16px; font-weight: 750; }
.co-tot .meter { height: 6px; margin: 6px 0 4px; }
.co-tot .small, .co-form .small { display: block; }
.co-form .tr { font-size: 12px; font-weight: 700; color: var(--label-2); margin-left: 4px; white-space: nowrap; }
.co-form .small { margin-top: 3px; }
.co-go { text-align: right; }
.co-note { grid-column: 1 / -1; appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
           padding: 8px 12px; margin-left: 44px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hairline); }
.co-note:hover { background: rgba(255, 255, 255, 0.06); }
.co-note .q, .sess .q { color: var(--label); font-size: 14px; }
.sess .q { display: block; margin-top: 4px; }
.co-fb { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid transparent; }
.co-fb:hover { background: rgba(255, 255, 255, 0.07); }
.co-fb .ttl { gap: 6px; }
.st.new { background: var(--accent); color: #fff; }
.co .legend i { box-sizing: border-box; }
@media (max-width: 900px) {
  .co-hrow { display: none; }
  .co-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "who who who" "wk wk wk" "tot form go" "note note note"; padding: 14px 0; }
  .co-hrow + .co-row { border-top: 0; }
  .co-who { grid-area: who; }
  .co-go { grid-area: go; }
  .co-wk { grid-area: wk; }
  .co-tot { grid-area: tot; }
  .co-form { grid-area: form; text-align: right; }
  .co-note { grid-area: note; }
  .co-dn { display: block; }
  .co-d { min-height: 52px; align-items: stretch; }
  .co-note { margin-left: 0; }
}

/* ------------------------------------------------------------------ the workout builder */
.sheet-card.wide { max-width: 860px; }
.blks { display: grid; gap: 8px; }
.blk { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); }
.blk .bn { width: 24px; height: 24px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--label-2); }
.blk .bf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--label-2); }
.blk .bf input, .blk .bf select { height: 36px; padding: 0 10px; border-radius: 9px; font-size: 14px; }
.blk .bf select { width: auto; }
.blk .bh { font-size: 12px; color: var(--teal); min-width: 0; }
.blk .bx { display: flex; gap: 0; }
.blk .bx .btn { padding: 0 6px; font-size: 16px; color: var(--label-2); }
.blk .bx .btn:disabled { opacity: 0.25; }
.bprev { padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--hairline); }
.bprev svg { width: 100%; height: 70px; display: block; }
.btot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: var(--label-2); }
.btot b { color: var(--label); font-size: 16px; }

/* ------------------------------------------------------------------ the generator */
.steps { display: flex; gap: 6px; margin: 0 0 18px; }
.steps i { height: 4px; border-radius: 2px; flex: 1; background: var(--fill); }
.steps i.on { background: var(--accent); }
.wiz h2 { font-size: 26px; margin-bottom: 6px; }
.wiz .lead { color: var(--label-2); margin: 0 0 18px; }
.wiz .foot { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.wiz .foot .sp { flex: 1; }
.tiles3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pick { appearance: none; border: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.04); color: var(--label); border-radius: 16px;
        padding: 18px; text-align: left; cursor: pointer; font: inherit; transition: border-color 0.15s, background-color 0.15s; width: 100%; }
.pick:hover { background: rgba(255, 255, 255, 0.07); }
.pick.on { border-color: var(--accent); background: rgba(10, 132, 255, 0.12); box-shadow: 0 0 0 1px var(--accent) inset; }
.pick .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(10, 132, 255, 0.18); color: var(--teal); margin-bottom: 12px; }
.pick .ic svg { width: 26px; height: 26px; }
.pick b { display: block; font-size: 18px; }
.pick span { display: block; color: var(--label-2); font-size: 14px; margin-top: 2px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { appearance: none; border: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.05); color: var(--label); border-radius: 18px;
       height: 36px; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.opt:hover { background: rgba(255, 255, 255, 0.09); }
.opt.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fieldset { margin: 0 0 18px; }
.fieldset > .caps { display: block; margin: 0 0 8px 4px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.from-game { font-size: 11px; font-weight: 700; color: var(--green); margin-left: 6px; letter-spacing: 0.3px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--label-3); font-size: 13px; margin: 2px 4px 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--separator); }
.hours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.hours label { display: block; text-align: center; }
.hours label span { display: block; font-size: 12px; font-weight: 700; color: var(--label-2); margin-bottom: 4px; }
.hours input { text-align: center; padding: 0 4px; }
.sumline { margin: 10px 4px 0; font-size: 14px; color: var(--label-2); }
.sumline b { color: var(--label); }

/* methods: the choice and how each scored */
.methods { display: grid; gap: 10px; }
.method { appearance: none; display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 6px 16px; align-items: center; width: 100%; text-align: left;
          font: inherit; color: inherit; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); cursor: pointer; }
.method:hover { background: rgba(255, 255, 255, 0.07); }
.method.on { border-color: var(--accent); background: rgba(10, 132, 255, 0.1); box-shadow: 0 0 0 1px var(--accent) inset; }
.method .nm { font-weight: 750; font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.method .ds { color: var(--label-2); font-size: 13px; grid-column: 1; }
.method .fit { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.method .fit b { font-size: 20px; font-weight: 800; }
.method .fit .meter { margin-top: 6px; }

/* the easy / moderate / hard split */
.mix { display: grid; gap: 8px; }
.mix .lbl { display: flex; justify-content: space-between; font-size: 13px; color: var(--label-2); margin-bottom: 4px; }
.seg { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.seg i { display: block; height: 100%; }
.seg i:first-child { border-radius: 4px 0 0 4px; }
.seg i:last-child { border-radius: 0 4px 4px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--label-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 2px; width: 14px; border-radius: 1px; }

.why-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.why-list li { position: relative; padding-left: 26px; color: var(--label-2); }
.why-list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(10, 132, 255, 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%2364d2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9.5l2.6 2.6L13 6.6'/%3E%3C/svg%3E") center / 18px no-repeat; }
.notes { margin: 0; padding: 0 0 0 18px; color: var(--label-2); display: grid; gap: 6px; }

/* phases: one bar split by date */
.phasebar { display: flex; gap: 2px; height: 28px; border-radius: 4px; overflow: hidden; }
.phasebar > div { display: flex; align-items: center; padding: 0 8px; min-width: 0; font-size: 12px; font-weight: 750; color: #fff; white-space: nowrap; overflow: hidden; }
.phasebar > div.tight { padding: 0; }
.phasebar > div:first-child { border-radius: 4px 0 0 4px; }
.phasebar > div:last-child { border-radius: 0 4px 4px 0; }
.phasebar .peak-txt { color: #0b0b0b; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--ink-muted); font-size: 11px; font-family: inherit; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.tip { position: fixed; z-index: 60; pointer-events: none; background: rgba(44, 44, 46, 0.97); border: 1px solid var(--hairline); border-radius: 10px;
       padding: 8px 10px; font-size: 13px; line-height: 1.4; box-shadow: var(--shadow); max-width: 260px; opacity: 0; transition: opacity 0.1s; }
.tip.show { opacity: 1; }
.tip b { font-weight: 700; }
.tip .k { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* the prediction */
.predict { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.predict .stat .v { font-size: 22px; }

/* badges */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bdg { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); }
.bdg .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 204, 0, 0.16); color: var(--gold); margin-bottom: 8px; }
.bdg .ic svg { width: 22px; height: 22px; }
.bdg b { display: block; font-size: 14px; }
.bdg span { display: block; font-size: 12px; color: var(--label-2); margin-top: 2px; }
.bdg.locked { opacity: 0.45; }
.bdg.locked .ic { background: var(--fill); color: var(--label-2); }

/* the board */
.board .row { min-height: 44px; padding: 10px 14px; }
.board .rk { width: 28px; font-weight: 800; color: var(--label-2); }
.board .row.me { background: rgba(10, 132, 255, 0.12); }

/* what changed */
.log { display: grid; gap: 12px; }
.log .e { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); }
.log .e .when { font-size: 12px; font-weight: 700; color: var(--label-2); letter-spacing: 0.4px; text-transform: uppercase; }
.log .e p { margin: 6px 0 0; color: var(--label-2); font-size: 14px; }
.adapted { border-color: rgba(10, 132, 255, 0.45); background: linear-gradient(180deg, rgba(10, 132, 255, 0.1), rgba(10, 132, 255, 0.03)), var(--glass); }
.adapted ul { margin: 8px 0 0; padding: 0 0 0 18px; color: var(--label-2); display: grid; gap: 6px; }

/* ------------------------------------------------------------------ the session sheet */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); display: flex; align-items: flex-start; justify-content: center;
         padding: 40px 16px; overflow-y: auto; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet-card { width: 100%; max-width: 640px; background: rgba(28, 28, 30, 0.98); border: 1px solid var(--hairline); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.sheet-card .x { float: right; margin: -6px -8px 0 10px; color: var(--label-2); padding: 6px; }
.sheet-card .x svg { width: 22px; height: 22px; }
.sheet-card h2 { font-size: 24px; margin: 0 0 4px; }
.facts4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.facts4 .stat { padding: 10px 12px; }
.facts4 .stat .v { font-size: 18px; }
.struct { margin: 6px 0 4px; }
.struct svg { width: 100%; height: 84px; display: block; }
.steps-t { width: 100%; font-size: 14px; margin-top: 12px; }
.steps-t td { padding: 8px 6px; white-space: normal; }
.steps-t td:first-child { width: 6px; padding: 0; }
.steps-t td:first-child i { display: block; width: 4px; height: 26px; border-radius: 2px; }
.steps-t .tg { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale button { appearance: none; min-width: 38px; height: 36px; border-radius: 10px; border: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.05);
                color: var(--label); font: inherit; font-weight: 700; cursor: pointer; }
.scale button.on { background: var(--accent); border-color: var(--accent); }
.in-game { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(10, 132, 255, 0.1); margin: 14px 0 0; font-size: 14px; color: var(--label-2); }
.in-game svg { width: 22px; height: 22px; flex: none; color: var(--teal); }

/* celebrating */
.cheer { text-align: center; padding: 10px 0 4px; }
.cheer .xp { font-size: 54px; font-weight: 800; letter-spacing: -1.6px; line-height: 1; }
.cheer .lv { font-size: 18px; font-weight: 750; margin-top: 8px; }
.cheer .badges { margin-top: 16px; text-align: left; }

/* ------------------------------------------------------------------ phones */
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .t-head h1 { font-size: 32px; }
  .tiles3 { grid-template-columns: 1fr; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .predict { grid-template-columns: 1fr; }
  .facts4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week { gap: 3px; }
  .day { padding: 6px 3px; min-height: 80px; border-radius: 9px; }
  .day .dn { flex-direction: column; align-items: center; gap: 0; letter-spacing: 0.4px; }
  .chip { padding: 4px; font-size: 11px; }
  .chip .m { display: none; }
  .chip .k span { display: none; }
  .hours { gap: 3px; }
  .mgrid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
  .mtot, .mtot-h { display: none; }
  .mweek { padding-left: 2px; }
  .mcell { min-height: 64px; padding: 4px 2px; border-radius: 7px; }
  .mcell .chip.add { display: none; }
  .mdn { font-size: 11px; text-align: center; }
  .mhead > div { padding: 0; text-align: center; font-size: 10px; }
  .mbar h2 { font-size: 18px; min-width: 0; }
  .blk { grid-template-columns: minmax(0, 1fr); }
  .blk .bn { display: none; }
  .blk .bx { justify-content: flex-end; }
  .hours input { font-size: 15px; height: 44px; }
  .method { grid-template-columns: minmax(0, 1fr) 72px; padding: 12px; }
  .sheet { padding: 16px 10px; }
  .sheet-card { padding: 18px 16px; border-radius: 18px; }
  .ring, .ring svg { width: 96px; height: 96px; }
  .ring .n b { font-size: 26px; }
}
