/* IP Coaching — graphite, chalk and plate blue */

@font-face { font-family: 'Mona Condensed'; src: url('../fonts/MonaSansCondensed-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Mona Condensed'; src: url('../fonts/MonaSansCondensed-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Mona Sans'; src: url('../fonts/MonaSans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Mona Sans'; src: url('../fonts/MonaSans-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --graphite: #1b2026;   /* page */
  --iron: #232931;       /* raised surfaces */
  --iron-2: #2b323b;     /* inputs */
  --steel-line: #36404b; /* hairlines */
  --chalk: #e9edf1;      /* text */
  --steel: #939eab;      /* secondary text */
  --plate: #2f6ad9;      /* 20 kg plate blue: primary actions */
  --plate-hi: #82aaf6;   /* blue for text on dark */
  --up: #6cc98f;
  --down: #e6a94f;
  --danger: #ec6b60;

  --display: 'Mona Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif-condensed, system-ui, sans-serif;
  --text: 'Mona Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-input: 10px;
  --r-block: 16px;
  --gutter: 16px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--graphite);
  color: var(--chalk);
  font: 400 16px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--plate-hi); }
:focus-visible { outline: 2px solid var(--plate-hi); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: 32px; line-height: 1.05; }
h2 { font-size: 23px; line-height: 1.15; }
h3 { font-size: 19px; line-height: 1.2; }
p { margin: 0; }
.num { font-family: var(--display); font-weight: 800; letter-spacing: 0.01em; }
.muted { color: var(--steel); }
.small { font-size: 14px; line-height: 1.45; }
.stack > * + * { margin-top: 12px; }

/* ---------- layout ---------- */
.shell { max-width: 640px; margin: 0 auto; padding: calc(var(--safe-t) + 8px) var(--gutter) calc(var(--tabbar-h) + var(--safe-b) + 32px); min-height: 100vh; min-height: 100dvh; }
.shell.wide { max-width: 760px; }
.shell.no-tabbar { padding-bottom: calc(var(--safe-b) + 40px); }

.topbar { display: flex; align-items: center; gap: 12px; min-height: 52px; margin-bottom: 8px; }
.topbar .mark { width: 30px; height: 30px; flex: none; border-radius: 50%; }
.topbar .brand { font-family: var(--display); font-weight: 700; font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px 8px 2px; margin-left: -2px; background: none; border: 0; color: var(--plate-hi); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.topbar .spacer { flex: 1; }

.page-head { margin: 8px 0 20px; }
.page-head .sub { margin-top: 6px; color: var(--steel); }

.section { margin-top: 28px; }
.section > h2 { margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--steel-line); background: var(--iron); color: var(--chalk); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: #4a5562; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: var(--plate); border-color: var(--plate); color: #fff; }
.btn.primary:hover { background: #2a60c7; }
.btn.danger { color: var(--danger); background: transparent; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--plate-hi); padding: 0 10px; }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--steel); cursor: pointer; }
.icon-btn:hover { background: var(--iron-2); color: var(--chalk); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn[disabled] { opacity: .3; cursor: default; background: transparent; }

/* ---------- forms ---------- */
.field { display: block; }
.field + .field { margin-top: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 600; color: var(--steel); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--iron-2); border: 1px solid var(--steel-line); border-radius: var(--r-input);
  font-size: 16px; color: var(--chalk); outline: none; transition: border-color .15s, background .15s;
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--plate); background: #2f3640; }
.input::placeholder, .textarea::placeholder { color: #6f7a87; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--steel); line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--plate); flex: none; }
.form-error { color: var(--danger); font-size: 14px; margin-top: 12px; }
.form-note { color: var(--up); font-size: 14px; margin-top: 12px; }

/* ---------- auth ---------- */
.auth { max-width: 420px; margin: 0 auto; padding: calc(var(--safe-t) + 40px) var(--gutter) 48px; }
.auth .logo { width: 64px; height: 64px; border-radius: 50%; display: block; margin-bottom: 24px; }
.auth h1 { font-size: 38px; }
.auth .lead { color: var(--steel); margin: 10px 0 28px; }
.auth .switch { margin-top: 24px; text-align: center; font-size: 15px; color: var(--steel); }
.auth .switch button { background: none; border: 0; color: var(--plate-hi); font-weight: 600; cursor: pointer; padding: 6px; }

/* ---------- week strip (the plates) ---------- */
.weeks { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
.weeks::-webkit-scrollbar { display: none; }
.week { flex: 1 0 48px; max-width: 76px; height: 58px; border: 1px solid var(--steel-line); border-radius: 12px; background: var(--iron); display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--steel); position: relative; }
.week .n { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; }
.week .t { font-size: 11px; line-height: 1; margin-top: -10px; }
.week.now .t { color: var(--plate-hi); }
.week[aria-pressed="true"] { background: var(--plate); border-color: var(--plate); color: #fff; }
.week[aria-pressed="true"] .t { color: #dbe6ff; }
.week .dots { position: absolute; bottom: 6px; display: flex; gap: 3px; }
.week .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--steel-line); }
.week .dots i.on { background: var(--up); }
.week[aria-pressed="true"] .dots i { background: rgba(255,255,255,.35); }
.week[aria-pressed="true"] .dots i.on { background: #fff; }

/* ---------- day list ---------- */
.days { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--steel-line); }
.day-row { display: flex; align-items: center; gap: 14px; padding: 16px 2px; border-bottom: 1px solid var(--steel-line); text-decoration: none; color: inherit; }
.day-row:hover .day-name { color: var(--plate-hi); }
.day-row .idx { font-family: var(--display); font-weight: 800; font-size: 26px; color: var(--steel); width: 28px; text-align: center; flex: none; }
.day-row .day-name { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.15; }
.day-row .day-sub { font-size: 14px; color: var(--steel); margin-top: 2px; }
.day-row .state { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; flex: none; }
.day-row .state.done { color: var(--up); }
.day-row .state.partial { color: var(--plate-hi); }
.day-row .state svg { width: 16px; height: 16px; }
.day-row .chev { color: var(--steel); width: 18px; height: 18px; flex: none; }

/* ---------- workout (logging) ---------- */
.coach-note { border-left: 3px solid var(--plate); padding: 2px 0 2px 12px; color: var(--steel); font-size: 15px; white-space: pre-wrap; }
.exercise { padding: 20px 0 22px; border-bottom: 1px solid var(--steel-line); }
.exercise:first-of-type { border-top: 1px solid var(--steel-line); }
.ex-name { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; }
.ex-rx { margin-top: 4px; font-size: 15px; color: var(--chalk); }
.ex-rx b { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: .01em; }
.ex-note { margin-top: 6px; font-size: 14px; color: var(--steel); white-space: pre-wrap; }

.sets { margin-top: 14px; display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) minmax(78px, 1.1fr); gap: 8px 8px; align-items: center; }
.sets .hdr { font-size: 12.5px; color: var(--steel); font-weight: 600; padding-left: 2px; }
.sets .set-n { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--steel); text-align: center; }
.cell { position: relative; }
.num-input {
  width: 100%; height: 54px; padding: 0 30px 0 12px; border-radius: var(--r-input);
  background: var(--iron-2); border: 1px solid var(--steel-line);
  font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: .01em;
  color: var(--chalk); outline: none; -moz-appearance: textfield; appearance: textfield;
}
.num-input::-webkit-outer-spin-button, .num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-input::placeholder { color: #56606c; }
.num-input:focus { border-color: var(--plate); background: #2f3640; }
.num-input.filled { border-color: #45505d; }
.cell .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--steel); pointer-events: none; }
.cell .delta { position: absolute; right: 8px; top: 7px; width: 14px; height: 14px; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.prev { background: none; border: 0; padding: 4px 2px; text-align: left; color: var(--steel); font-size: 13px; line-height: 1.25; cursor: pointer; border-radius: 8px; }
.prev .num { display: block; font-size: 18px; color: var(--chalk); opacity: .75; font-weight: 700; }
.prev:hover .num { color: var(--plate-hi); opacity: 1; }
.prev.none { cursor: default; }

.session-box { margin-top: 28px; }
.done-toggle { margin-top: 14px; }
.done-toggle[aria-pressed="true"] { background: transparent; border-color: var(--up); color: var(--up); }

/* ---------- lists (coach) ---------- */
.search { margin-bottom: 8px; }
.client-row { display: flex; align-items: center; gap: 14px; padding: 15px 2px; border-bottom: 1px solid var(--steel-line); text-decoration: none; color: inherit; }
.client-row:first-child { border-top: 1px solid var(--steel-line); }
.client-row:hover .cname { color: var(--plate-hi); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--iron-2); border: 1px solid var(--steel-line); font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--chalk); flex: none; }
.cname { font-weight: 600; font-size: 16.5px; }
.cmeta { font-size: 14px; color: var(--steel); margin-top: 1px; }
.cmeta .warn { color: var(--down); }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--steel-line); color: var(--steel); white-space: nowrap; }
.pill.active { color: var(--up); border-color: rgba(108, 201, 143, .45); }
.pill.draft { color: var(--down); border-color: rgba(230, 169, 79, .45); }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--iron); border-radius: 12px; margin: 4px 0 20px; }
.tab { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--steel); font-weight: 600; font-size: 15px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--iron-2); color: var(--chalk); box-shadow: inset 0 0 0 1px var(--steel-line); }

.program-row { padding: 16px 0; border-bottom: 1px solid var(--steel-line); }
.program-row:first-child { border-top: 1px solid var(--steel-line); }
.program-row .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.empty { padding: 28px 20px; border: 1px dashed var(--steel-line); border-radius: var(--r-block); text-align: center; color: var(--steel); }
.empty h3 { color: var(--chalk); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

/* ---------- editor ---------- */
.ed-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ed-meta .full { grid-column: 1 / -1; }
.ed-meta .field + .field { margin-top: 0; }
.ed-day { margin-top: 22px; background: var(--iron); border: 1px solid var(--steel-line); border-radius: var(--r-block); padding: 14px 14px 16px; }
.ed-day-head { display: flex; align-items: center; gap: 8px; }
.ed-day-head .idx { font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--plate-hi); width: 24px; text-align: center; flex: none; }
.ed-day-head .input { font-family: var(--display); font-weight: 700; font-size: 20px; }
.ed-day .day-notes { margin-top: 10px; min-height: 46px; }
.ed-ex { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--graphite); border: 1px solid var(--steel-line); }
.ed-ex-head { display: flex; gap: 6px; align-items: center; }
.ed-ex-head .input { font-weight: 600; }
.ed-ex-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 10px; margin-top: 10px; align-items: end; }
.ed-ex-grid .field + .field { margin-top: 0; }
.ed-ex-grid .field > span { font-size: 12.5px; margin-bottom: 4px; }
.ed-ex .ex-notes { margin-top: 10px; }
.seg { display: inline-flex; border: 1px solid var(--steel-line); border-radius: var(--r-input); overflow: hidden; height: 46px; }
.seg button { width: 40px; border: 0; background: var(--iron-2); color: var(--steel); font-family: var(--display); font-weight: 800; font-size: 19px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--steel-line); }
.seg button[aria-pressed="true"] { background: var(--plate); color: #fff; }
.ed-add { margin-top: 12px; }
.ed-footer { position: sticky; bottom: 0; margin: 28px calc(-1 * var(--gutter)) 0; padding: 12px var(--gutter) calc(12px + var(--safe-b)); background: rgba(27, 32, 38, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--steel-line); display: flex; gap: 10px; align-items: center; }
.ed-footer .status { font-size: 13.5px; color: var(--steel); flex: 1; min-width: 0; }

/* ---------- progress ---------- */
.week-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(46px, 1fr); gap: 6px; align-items: end; overflow-x: auto; padding-bottom: 4px; }
.wbar { display: grid; gap: 6px; justify-items: center; }
.wbar .track { width: 100%; height: 64px; border-radius: 8px; background: var(--iron); border: 1px solid var(--steel-line); position: relative; overflow: hidden; }
.wbar .fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--plate); }
.wbar .fill.full { background: var(--up); }
.wbar .lbl { font-size: 12.5px; color: var(--steel); }
.wbar .lbl b { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--chalk); }
.prog-day { margin-top: 30px; }
.prog-day > h3 { margin-bottom: 4px; }
.prog-ex { border-bottom: 1px solid var(--steel-line); }
.prog-ex > button { display: block; width: 100%; padding: 14px 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.prog-ex .head { display: flex; align-items: center; gap: 12px; }
.prog-ex .name { font-weight: 600; flex: 1; min-width: 0; }
.prog-ex .trend { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.trend.up { color: var(--up); }
.trend.down { color: var(--down); }
.trend.flat { color: var(--steel); }
.spark { width: 72px; height: 26px; flex: none; }
.spark polyline { fill: none; stroke: var(--plate-hi); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--plate-hi); }
.wk-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(50px, 1fr); gap: 4px; margin-top: 10px; overflow-x: auto; }
.wk-cell { padding: 6px 2px 7px; border-radius: 8px; background: var(--iron); text-align: center; min-width: 0; }
.wk-cell .w { font-size: 11.5px; color: var(--steel); line-height: 1.1; }
.wk-cell .v { font-family: var(--display); font-weight: 800; font-size: 15px; line-height: 1.25; white-space: nowrap; }
.wk-cell.empty .v { color: #56606c; }
.wk-cell.best { box-shadow: inset 0 0 0 1px var(--plate); }
.prog-detail { padding: 0 0 16px; overflow-x: auto; }
.prog-detail table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.prog-detail th, .prog-detail td { padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--steel-line); white-space: nowrap; }
.prog-detail th { color: var(--steel); font-weight: 600; font-size: 12.5px; }
.prog-detail td { font-family: var(--display); font-weight: 700; font-size: 15.5px; }
.prog-detail td:first-child, .prog-detail th:first-child { text-align: left; color: var(--steel); font-family: var(--text); font-weight: 600; font-size: 12.5px; }
.prog-notes { margin-top: 10px; display: grid; gap: 8px; }
.prog-notes .n { font-size: 14px; color: var(--steel); }
.prog-notes .n b { color: var(--chalk); font-weight: 600; }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(27, 32, 38, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--steel-line); padding-bottom: var(--safe-b); }
.tabbar nav { max-width: 640px; margin: 0 auto; display: flex; }
.tabbar a { flex: 1; height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--steel); font-size: 12px; font-weight: 600; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--chalk); }
.tabbar a[aria-current="page"] svg { color: var(--plate-hi); }

/* ---------- banners, toast, dialog ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--iron); border: 1px solid var(--steel-line); font-size: 14px; margin-bottom: 16px; }
.banner .grow p + p { margin-top: 4px; }
.banner.offline { border-color: rgba(230, 169, 79, .5); }
.banner svg { width: 20px; height: 20px; flex: none; color: var(--plate-hi); margin-top: 1px; }
.banner.offline svg { color: var(--down); }
.banner .x { margin: -8px -8px -8px 0; }
.sync { font-size: 13px; color: var(--steel); display: inline-flex; align-items: center; gap: 6px; }
.sync::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--up); }
.sync.pending::before { background: var(--down); }
.sync.saving::before { background: var(--plate-hi); }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); display: grid; justify-items: center; pointer-events: none; z-index: 40; padding: 0 16px; }
.toast { max-width: 520px; padding: 12px 16px; border-radius: 12px; background: var(--chalk); color: var(--graphite); font-weight: 600; font-size: 14.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); animation: toast-in .2s ease-out; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

dialog { border: 1px solid var(--steel-line); border-radius: 18px; background: var(--iron); color: var(--chalk); padding: 22px; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); }
dialog::backdrop { background: rgba(10, 12, 15, .7); }
dialog h2 { margin-bottom: 8px; }
dialog .body { color: var(--steel); font-size: 15px; }
dialog .body .field { margin-top: 14px; }
dialog .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }

.loading { padding: 60px 0; text-align: center; color: var(--steel); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--steel-line); border-top-color: var(--plate-hi); border-radius: 50%; margin: 0 auto 12px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.kv { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--steel-line); }
.kv:first-child { border-top: 1px solid var(--steel-line); }
.kv .k { font-size: 13.5px; color: var(--steel); }
.link-box { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--iron-2); border: 1px solid var(--steel-line); border-radius: var(--r-input); padding: 10px 12px; font-size: 14px; }

.setup { max-width: 560px; margin: 0 auto; padding: 48px var(--gutter); }
.setup code { background: var(--iron-2); padding: 2px 6px; border-radius: 6px; }

@media (min-width: 700px) {
  :root { --gutter: 24px; }
  h1 { font-size: 36px; }
  .sets { grid-template-columns: 30px minmax(0, 150px) minmax(0, 130px) 1fr; }
}
@media (max-width: 480px) {
  .ed-ex-grid { grid-template-columns: 1fr 1fr; }
  .ed-ex-grid .sets-field { grid-column: 1 / -1; }
  .ed-day { padding: 12px 10px 14px; }
  .ed-ex { padding: 10px; }
  .ed-ex-head .icon-btn, .ed-day-head .icon-btn { width: 34px; }
}
@media (max-width: 360px) {
  .num-input { font-size: 22px; padding-right: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.form-actions { margin-top: 22px; }
.auth .check { margin-top: 18px; }
.install-btn { margin-top: 10px; }

.spacer-12 { height: 12px; }
.foot-note { margin-top: 24px; }
.list-foot { margin-top: 18px; }
.cname .pill { margin-left: 8px; vertical-align: 2px; }
.danger-zone { margin-top: 44px; }
.page-head + .coach-note { margin: -6px 0 8px; }
.section > .coach-note { margin-bottom: 14px; }
.row > .input { flex: 1; min-width: 0; }
.program-list { margin-top: 14px; }
.empty .link-box { max-width: 420px; margin: 16px auto 0; text-align: left; }
.client-row .chev, .day-row .chev { color: var(--steel); }
.tabs + [role="tabpanel"] > .select { margin-bottom: 8px; }

/* privacy page */
.legal h1 { margin-bottom: 10px; }
.legal h2 { margin: 28px 0 8px; }
.legal p + p { margin-top: 10px; }
.legal ul { margin: 0; padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal p, .legal li { max-width: 68ch; }
.setup h1 { margin-bottom: 12px; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.chev { width: 18px; height: 18px; }
.wbar .lbl.now { color: var(--chalk); font-weight: 600; }
@media (max-width: 480px) {
  .ed-ex-head { gap: 2px; }
  .ed-ex-head .input { font-weight: 400; padding-inline: 12px; }
  .ed-ex-head .icon-btn { width: 32px; }
}

/* ---------- PDF import & notes ---------- */
.row.wrap { flex-wrap: wrap; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.empty .empty-actions .btn { margin-top: 0; }
.banner.import { border-color: rgba(47, 106, 217, .55); margin-top: -4px; }
.banner .warn-line { color: var(--down); margin-top: 6px; }
.ex-notes { min-height: 46px; resize: vertical; overflow: hidden; line-height: 1.45; font-size: 15px; }
.ed-meta .textarea { overflow: hidden; }
.ex-note p + details, .ex-note p + p { margin-top: 4px; }
details.howto summary, details.coach-tips summary {
  cursor: pointer; color: var(--plate-hi); font-weight: 600; font-size: 14px; padding: 6px 0;
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
}
details.howto summary::-webkit-details-marker, details.coach-tips summary::-webkit-details-marker { display: none; }
details.howto summary::before, details.coach-tips summary::before {
  content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; margin-right: 2px;
}
details[open].howto summary::before, details[open].coach-tips summary::before { transform: rotate(45deg); }
details.howto p { color: var(--steel); font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; max-width: 68ch; }
details.coach-tips { margin: -4px 0 12px; }
details.coach-tips .coach-note { margin-top: 6px; line-height: 1.55; }
