@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --bg: #F5F7FB; --card: #FFFFFF; --text: #0B1220; --muted: #5B6781; --line: #E3E8F1;
  --accent: #2B6DF0; --accent-soft: #E8F0FE; --ok: #15803D; --ok-soft: #DCFCE7;
  --warn: #B45309; --warn-soft: #FEF3C7; --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text);
  line-height: 1.5; -webkit-font-smoothing: antialiased; font-size: 16px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 140px;
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.wrap.wide { max-width: 900px; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-top: 6px; }
h2 { font-size: 15px; font-weight: 700; margin: 26px 0 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
h3 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.muted { color: var(--muted); } .small { font-size: 13.5px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.brand { font-weight: 800; letter-spacing: 0.16em; font-size: 13px; }
.brand span { color: var(--accent); }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.linkbtn { background: none; border: 0; color: var(--muted); font-size: 13.5px; text-decoration: underline; padding: 8px 0; }
.plan-title { margin-bottom: 16px; }
.back { display: inline-block; color: var(--muted); font-weight: 600; padding: 8px 0; font-size: 15px; }

.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; }
.cue { background: var(--accent); border-color: var(--accent); color: #fff; }
.cue .eyebrow { color: rgba(255,255,255,0.8); }
.cue-text { font-size: 22px; font-weight: 800; line-height: 1.25; margin-top: 4px; }
.cue-inline { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-size: 15px; }
details summary { font-weight: 700; cursor: pointer; }
details p { margin-top: 10px; color: var(--muted); }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 0; text-align: center; }
.day .d-label { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.day .d-s { display: block; font-size: 18px; font-weight: 800; }
.day.off .d-s { color: var(--line); }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day.done { background: var(--ok-soft); border-color: var(--ok-soft); }
.day.done .d-s { color: var(--ok); }

.session-card { display: flex; align-items: center; gap: 14px; }
.session-card.is-today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.s-letter { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.s-body { flex: 1; min-width: 0; } .s-name { font-weight: 700; }
.chev { color: var(--muted); font-size: 22px; }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.links { margin-top: 26px; }
.link { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.outro { margin-top: 22px; text-align: center; font-weight: 700; }

.list { list-style: none; }
.list li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.list li.is-cue { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.card .list li { border: 0; padding: 6px 0; margin: 0; border-radius: 0; }
.list + p, p + .list { margin-top: 8px; }

.warm .check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); margin-top: 10px; }
.warm .check + .check { margin-top: 0; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--accent); }
.exo .detail { color: var(--muted); margin-top: 4px; font-size: 15px; }
.exo.complete { background: #F7FDF9; border-color: #BBE5C8; }
.sets { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.set { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font-weight: 800; font-size: 17px; }
.set.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.rest-tag { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: auto; }
.s-note { margin: 4px 4px 12px; font-weight: 600; }

.btn { display: block; width: 100%; text-align: center; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); font-weight: 700; font-size: 16px; margin-top: 10px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { color: var(--muted); }
.btn.big { padding: 17px; margin-top: 18px; }

.form fieldset { border: 0; margin-bottom: 18px; }
.form legend, .field span { font-weight: 700; display: block; margin-bottom: 8px; }
.chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: grid; place-items: center; height: 46px; border: 2px solid var(--line); border-radius: 12px; font-weight: 700; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: block; margin-bottom: 14px; }
.login .form { text-align: left; margin-top: 18px; }
input[type=number], input[type=email], input[type=password], textarea { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); }
.error { color: #B91C1C; font-weight: 600; margin-bottom: 6px; }

.saved, .login { text-align: center; padding-top: 40px; }
.saved p, .login p { margin: 10px 0 18px; }
.login h1 { margin-top: 26px; }
.big-ok { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 40px; display: grid; place-items: center; }
.saved .card { text-align: left; }

.chart { width: 100%; height: auto; margin-top: 8px; }
.chart text { font-size: 11px; font-weight: 700; fill: var(--text); font-family: inherit; }
.chart text.ax { fill: var(--muted); font-weight: 500; }
.table { padding: 6px 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 6px; }
td { padding: 9px 6px; border-top: 1px solid var(--line); }
td.bad { color: #B91C1C; font-weight: 700; }

.timer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--text); color: #fff;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
.timer[hidden] { display: none; }
.timer.over { background: var(--ok); }
.t-label { font-size: 12.5px; opacity: 0.75; max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-time { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.t-actions { display: flex; gap: 8px; }
.t-actions button { background: rgba(255,255,255,0.14); border: 0; color: #fff; padding: 12px 14px; border-radius: 12px; font-weight: 700; }

.today-card { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); margin-top: 14px; }
.today-card.rest { border-color: var(--line); box-shadow: none; }
.today-name { font-size: 20px; font-weight: 800; margin: 4px 0 6px; line-height: 1.25; }
.checkin-due { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.stat-n { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-l { display: block; font-size: 13px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.step { text-align: center; padding: 10px 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--muted); }
.step.past { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.step.now { background: var(--accent); border-color: var(--accent); color: #fff; }
.demo { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 700; font-size: 15px; padding: 4px 0; }
.last { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.last strong { color: var(--text); }
.res { width: 100%; margin-top: 12px; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.record { font-weight: 800; color: var(--warn); background: var(--warn-soft); display: inline-block; padding: 6px 14px; border-radius: 999px; margin: 8px 0; }
.form.inline { display: grid; gap: 8px; }
.form.inline input { font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; }
.form.inline .btn { margin-top: 0; }

/* Page coach */
.pub-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pub-row:first-child { border-top: 0; }
.pub-row .btn { width: auto; margin: 0; padding: 10px 18px; }
.pub-row > div { flex: 1; min-width: 220px; overflow-wrap: anywhere; }
.demos-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.demos-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.coach .form.inline { grid-template-columns: 1fr 2fr auto; }
.coach .form.inline:has(#uid) { grid-template-columns: 1fr auto; }
.coach select { font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
@media (max-width: 600px) { .coach .form.inline { grid-template-columns: 1fr; } }
.banner { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 14px; margin: 12px 0 16px; font-size: 14px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 16px; }
.grid .card { margin: 0; }
.c-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.c-sessions { display: flex; align-items: center; gap: 6px; margin: 12px 0 8px; flex-wrap: wrap; }
.dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--line); color: var(--muted); }
.dot.on { background: var(--ok); color: #fff; }
.c-last { font-size: 14px; } .alerts { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.plan-edit .pl { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; flex-wrap: wrap; }
.plan-edit .pl.b { padding-left: 14px; }
.pl-text { flex: 1; min-width: 0; }
.pl-h { margin: 18px 0 4px; font-size: 15px; }
.pl-info { display: block; margin: -2px 0 6px 14px; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.edit { width: 36px; height: 36px; flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 10px; }
.pl textarea { flex-basis: 100%; }
.pl-nums { flex-basis: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 13.5px; font-weight: 600; }
.pl-nums label { display: grid; gap: 4px; }
.pl-nums span { grid-column: 1 / -1; font-weight: 400; }
.pl-actions { display: flex; gap: 8px; flex-basis: 100%; }
.pl-actions .btn { margin-top: 0; padding: 10px; }

@media (prefers-reduced-motion: no-preference) {
  .set, .chip span, .btn { transition: background-color .15s, border-color .15s; }
}
