/* RG coach v3. Layout + components. Colors and fonts come from themes.css custom properties.
   Principles: the score is the hero (odometer numbers in the display face), one deep scoreboard surface per
   screen, the --hi color only where points are gained, rows and rules rather than card grids, and the
   brand's skeleton poses / apparatus drawings as illustration. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body);
  font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums;
  min-height: 100vh; display: flex; flex-direction: column;
}
body.no-scroll { overflow: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-s); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 80; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: var(--radius-s); }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.display, .h2, .brand-name {
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking);
  font-stretch: var(--display-stretch); font-style: var(--display-style);
}
.num { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.h2 { font-size: calc(28px * max(var(--display-scale), .8)); line-height: 1; }
.h3 { font-size: 17px; font-weight: 700; }
.nowrap { white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1480px; margin: 0 auto; padding: 0 32px; height: 64px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; flex: none; }
.brand-mark { width: 30px; height: 30px; display: grid; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-name { font-size: calc(26px * max(var(--display-scale), .8)); line-height: 1; }
.nav { display: flex; gap: 2px; align-items: stretch; height: 100%; }
.nav a {
  display: flex; align-items: center; padding: 0 12px; text-decoration: none; color: var(--muted);
  font-weight: 600; font-size: 15px; position: relative;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 4px; background: var(--primary); }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.save-ind {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; background: none;
  color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; border-radius: var(--radius-s);
}
.save-ind:hover { background: var(--sunk); color: var(--ink); }
.save-ind svg { width: 18px; height: 18px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.save-ind .si-spin { display: none; stroke: var(--muted); stroke-dasharray: 20 20; transform-origin: 10px 10px; }
.save-ind[data-state="pending"] .si-ok, .save-ind[data-state="saving"] .si-ok { display: none; }
.save-ind[data-state="pending"] .si-spin, .save-ind[data-state="saving"] .si-spin { display: block; animation: spin .8s linear infinite; }
.save-ind[data-state="error"], .save-ind[data-state="memory"] { color: var(--bad); }
.save-ind[data-state="error"] svg, .save-ind[data-state="memory"] svg { stroke: var(--bad); }
.save-ind.just { color: var(--ok); }

main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 40px 32px 96px; }
body[data-route="composer"] main { max-width: 1480px; padding-top: 28px; }
main:focus { outline: none; }
.footer { border-top: 1px solid var(--line); padding: 20px 32px 28px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; max-width: 1480px; margin: 0 auto; width: 100%; }
.footer-data { margin-left: auto; border: 0; background: none; color: var(--accent-text); font-weight: 600; font-size: 13px; cursor: pointer; min-height: 40px; padding: 0 8px; border-radius: var(--radius-s); }
.footer-data:hover { background: var(--sunk); }

.tabbar, .more-sheet { display: none; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-btn);
  border: 2px solid transparent; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s; white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-quiet { background: transparent; color: var(--accent-text); padding: 0 12px; }
.btn-quiet:hover { background: var(--sunk); }
.btn-on-deep { background: var(--on-deep); color: var(--deep); }
.btn-on-deep:hover { background: var(--accent-on-deep); color: var(--deep); }
.btn-ghost-deep { background: transparent; color: var(--on-deep); border-color: var(--deep-line); }
.btn-ghost-deep:hover { border-color: var(--on-deep); }
.btn-on-hi { background: var(--on-hi); color: var(--hi); }
.btn-on-hi:hover { filter: brightness(1.15); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-link { border: 0; background: none; padding: 0 4px; min-height: 44px; display: inline-flex; align-items: center; color: var(--accent-text); font-weight: 700; cursor: pointer; text-decoration: none; font-size: 15px; }
.btn-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; flex: none;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover:not(:disabled) { border-color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.field { display: grid; gap: 8px; }
.label { font-weight: 600; font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; }
.input, .select { min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); width: 100%; }
.input:hover, .select:hover { border-color: var(--muted); }
.textarea { min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--radius-s); background: var(--sunk); font-size: 13px; font-weight: 700; color: var(--ink); }

.seg { justify-self: start; display: inline-flex; padding: 4px; gap: 4px; background: var(--sunk); border-radius: calc(var(--radius-s) + 4px); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--radius-s); font-weight: 700; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 0 var(--line); }
.seg input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 1px; }
.seg small { font-weight: 500; font-size: 13px; color: inherit; }

/* element form (Fix it dialog) */
.adder { padding: 0; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { flex: 1 0 auto; min-height: 52px; padding: 0 18px; border: 0; background: none; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--primary); }
.tab-panel { padding: 20px 0; display: grid; gap: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 40px; padding: 0 14px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pill .glyph { width: 16px; height: 16px; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cat-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.cat-list li + li { border-top: 1px solid var(--line); }
.cat-item { width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 52px; padding: 8px 14px; border: 0; background: var(--surface); text-align: left; cursor: pointer; }
.cat-item:hover { background: var(--sunk); }
.cat-item[aria-pressed="true"] { background: var(--sunk); box-shadow: inset 4px 0 0 var(--primary); }
.cat-item small { display: block; color: var(--muted); font-size: 12px; }
.cat-item .v { font-weight: 700; }
.cat-none { padding: 20px; color: var(--muted); }
.config { display: grid; gap: 14px; padding: 16px; background: var(--sunk); border-radius: var(--radius-s); }
.config-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.config-head .v { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 28px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: var(--radius-s); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 40px; text-align: center; font-weight: 700; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; flex: none; }
.check.is-na { color: var(--muted); cursor: not-allowed; }
.check.is-na small { font-size: 12px; }
.crit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.comps { display: flex; flex-wrap: wrap; gap: 6px; }
.comps button { min-width: 52px; min-height: 44px; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius-s); font-weight: 700; cursor: pointer; }
.switch { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: var(--radius-s); background: var(--line); position: relative; cursor: pointer; margin: 0; transition: background-color .15s; flex: none; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 1px; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }
.glyph { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.glyph .fill { fill: currentColor; stroke: none; }
.glyph.g-da path { stroke-width: 1.6; }

/* ---------- odometer (signature motion) ---------- */
.odo { --odo-h: 1.2em; display: inline-flex; align-items: flex-start; height: var(--odo-h); line-height: var(--odo-h); overflow: hidden; vertical-align: bottom; }
.odo-c { display: inline-block; height: var(--odo-h); overflow: hidden; }
.odo-s { display: flex; flex-direction: column; transform: translateY(calc(var(--d, 0) * -1 * var(--odo-h))); transition: transform .75s cubic-bezier(.2, .85, .25, 1); will-change: transform; }
.odo-s span { display: block; height: var(--odo-h); line-height: var(--odo-h); text-align: center; overflow: hidden; }
.odo-x { line-height: var(--odo-h); }
.odo-c:nth-last-child(2) .odo-s { transition-delay: 45ms; }
.odo-c:nth-last-child(4) .odo-s { transition-delay: 90ms; }
.odo-c:nth-last-child(5) .odo-s { transition-delay: 130ms; }
.odo-instant .odo-s { transition: none !important; }
.odo-x { display: inline-block; }
.odo.odo-up { animation: odoUp 1s ease-out; }
.odo.odo-down { animation: odoDown 1s ease-out; }
@keyframes odoUp { 0%, 35% { color: var(--odo-up, var(--ok)); } }
@keyframes odoDown { 0%, 35% { color: var(--odo-down, var(--bad)); } }
.delta-tag {
  position: absolute; right: 0; bottom: 100%; padding: 2px 8px; border-radius: var(--radius-s); font-family: var(--font-body);
  font-size: 14px; font-weight: 800; white-space: nowrap; pointer-events: none; animation: deltaUp 1.5s cubic-bezier(.2, .8, .2, 1) forwards;
}
.delta-tag.is-up { background: var(--hi); color: var(--on-hi); }
.delta-tag.is-down { background: var(--bad); color: #fff; }
@keyframes deltaUp { 0% { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }

/* ---------- illustration ---------- */
.pose { overflow: visible; }
.pose .pb { fill: none; stroke: currentColor; stroke-width: var(--sw); stroke-linecap: round; stroke-linejoin: round; }
.pose .pj { fill: currentColor; }
.pose .pa { fill: none; stroke: var(--pose-app, currentColor); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.pose .pa-fill { fill: var(--pose-app, currentColor); stroke: none; }
.pose .pa-arc { fill: none; stroke: var(--pose-app, currentColor); stroke-width: 4; stroke-dasharray: 6 9; stroke-linecap: round; opacity: .8; }
.app-art { display: grid; place-items: center; }
.app-art svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.app-art svg .thin { stroke-width: 1.8; opacity: .6; }

/* element tiles: body = a little carpet with the skeleton, R = signal, DA = the apparatus drawn */
.rt-art, .el-art, .li-art-wrap { flex: none; display: grid; place-items: center; }
.rt-art, .el-art { width: 48px; height: 48px; border-radius: var(--radius-s); background: var(--carpet); color: #fff; padding: 6px; }
.rt-art svg, .el-art svg { width: 100%; height: 100%; }
.rt-row.rt-R .rt-art, .el-row .el-art:has(.pa-arc) { background: var(--hi); color: var(--on-hi); --pose-app: var(--on-hi); }
.rt-row.rt-DA .rt-art, .el-art:has(.app-art) { background: var(--surface); color: var(--accent-text); box-shadow: inset 0 0 0 1.5px var(--line); }
.rt-art .app-art svg, .el-art .app-art svg { width: 34px; height: 34px; }

/* the carpet seen from above */
.carpet-art { width: 100%; height: auto; overflow: visible; }
.ca-floor { fill: var(--carpet); }
.ca-grid path { stroke: var(--carpet-line); stroke-width: .35; }
.ca-edge { fill: none; stroke: #fff; stroke-width: 1.1; opacity: .9; }
.ca-path { fill: none; stroke: var(--carpet-path); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.hh-carpet-play .ca-path, .rt-empty-art .ca-path { stroke-dashoffset: 1; animation: draw 3.4s cubic-bezier(.5, 0, .3, 1) .3s forwards; }
.ca-mark circle { fill: var(--carpet); stroke: var(--carpet-path); stroke-width: 1.4; }
.ca-mark text { font-family: var(--font-display); font-weight: 800; font-size: 7px; fill: #fff; letter-spacing: 0; }
.hh-carpet-play .ca-mark { opacity: 0; animation: pop .4s ease-out forwards; animation-delay: calc(.9s + var(--i) * .5s); }
.ca-sk { color: #fff; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(var(--tx, 0), 0) scale(.6); } to { opacity: 1; } }

/* ---------- section heads, empty states ---------- */
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 3px solid var(--ink); }
.page-head { display: grid; gap: 18px; margin-bottom: 32px; }
.page-head h1 { font-size: calc(clamp(48px, 7vw, 96px) * var(--display-scale)); line-height: .9; }
.page-head .lede { max-width: 62ch; color: var(--muted); font-size: 18px; }
.empty { display: grid; justify-items: start; gap: 16px; padding: 48px 0; max-width: 640px; }
.empty h1 { font-size: calc(clamp(40px, 5vw, 64px) * var(--display-scale)); line-height: .95; }
.empty-art { grid-template-columns: 180px 1fr; gap: 32px; align-items: center; max-width: 820px; }
.empty-art > div:last-child { display: grid; gap: 14px; }
.empty-pose { width: 180px; height: 180px; background: var(--carpet); color: #fff; padding: 18px; border-radius: var(--radius); }
.te-art { width: 72px; height: 72px; flex: none; background: var(--carpet); color: #fff; padding: 8px; border-radius: var(--radius-s); display: grid; }

/* ---------- Home ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0; align-items: stretch; }
.home-hero.is-new { gap: 56px; align-items: center; }
.hh-board { background: var(--deep); color: var(--on-deep); padding: 36px 40px 32px; border-radius: var(--radius) 0 0 var(--radius); display: grid; gap: 18px; align-content: start; --odo-up: var(--accent-on-deep); }
.hh-k { color: var(--on-deep-muted); font-weight: 600; font-size: 15px; }
.hh-big { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(clamp(96px, 13vw, 184px) * var(--display-scale)); line-height: 1; color: var(--on-deep); }
.hh-locked { font-size: calc(clamp(72px, 9vw, 128px) * var(--display-scale)); color: var(--accent-on-deep); }
.hh-lock { max-width: 46ch; color: var(--on-deep-muted); }
.hh-parts { display: grid; grid-template-columns: repeat(4, max-content); gap: 0; margin: 0; border-top: 1px solid var(--deep-line); }
.hh-parts div { padding: 12px 28px 0 0; margin-right: 28px; border-right: 1px solid var(--deep-line); }
.hh-parts div:last-child { border-right: 0; }
.hh-parts dt { color: var(--on-deep-muted); font-size: 14px; font-weight: 600; }
.hh-parts dd { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(36px * var(--display-scale)); line-height: 1.05; }
.hh-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hh-carpet { background: var(--carpet); border-radius: 0 var(--radius) var(--radius) 0; padding: 28px; display: grid; place-items: center; }
.home-hero.is-new .hh-carpet { border-radius: var(--radius); padding: 0; background: none; }
.hh-carpet .carpet-art { max-width: 460px; }
.hh-intro { display: grid; gap: 22px; }
.hh-title { font-size: calc(clamp(64px, 9vw, 136px) * var(--display-scale)); line-height: .86; }
.hh-lede { font-size: 19px; color: var(--muted); max-width: 52ch; }
.trend { margin: 0; display: grid; gap: 4px; max-width: 420px; }
.trend svg { width: 100%; height: auto; overflow: visible; }
.tr-base { stroke: var(--deep-line); stroke-width: 1; }
.tr-line { fill: none; stroke: var(--accent-on-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tr-pt { fill: var(--deep); stroke: var(--accent-on-deep); stroke-width: 2; }
.tr-pt.is-last { fill: var(--accent-on-deep); }
.tr-pt:hover { stroke-width: 4; }
.tr-lab { fill: var(--on-deep); font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.trend figcaption { color: var(--on-deep-muted); font-size: 14px; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.today-stats { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; padding: 16px 0 8px; }
.streak { display: flex; align-items: baseline; gap: 10px; font-weight: 600; color: var(--muted); }
.streak-n { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(56px * var(--display-scale)); line-height: .9; color: var(--ink); }
.week { display: grid; gap: 6px; flex: 1; min-width: 180px; font-size: 14px; color: var(--muted); font-weight: 600; }
.week-bar, .th-bar { display: block; height: 10px; background: var(--sunk); border-radius: var(--radius-s); overflow: hidden; }
.week-bar i, .th-bar i { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-s); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.drill-checks { list-style: none; margin: 0; padding: 0; }
.drill-checks li { display: grid; grid-template-columns: 48px minmax(0, 1fr) 52px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dc-main b { display: block; }
.dc-main small { color: var(--muted); font-size: 14px; }
.dc-art { width: 52px; height: 52px; color: var(--ink); opacity: .85; }
.drill-checks li.is-done .dc-main b { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.check-btn { width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; transition: background-color .2s, transform .2s; }
.check-btn svg { width: 22px; height: 22px; fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check-btn:hover svg { stroke: var(--line); }
.check-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); animation: tick .35s ease-out; }
.check-btn[aria-pressed="true"] svg { stroke: var(--on-primary); }
@keyframes tick { 50% { transform: scale(1.15); } }
.today-empty { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; padding: 18px 0; }
.today-empty p { flex: 1 1 220px; color: var(--muted); max-width: 48ch; margin-bottom: 12px; }
.comp-rows { list-style: none; margin: 0; padding: 0; }
.comp-rows button { width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); }
.comp-rows button:hover .cr-main b { text-decoration: underline; text-underline-offset: 4px; }
.cr-art { width: 48px; height: 48px; color: var(--accent-text); }
.cr-art svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.cr-art svg .thin { stroke-width: 1.4; opacity: .6; }
.cr-main small { display: block; color: var(--muted); font-size: 14px; }
.cr-d { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(34px * var(--display-scale)); line-height: 1; }
.cr-d small { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 6px; font-style: normal; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line); }
.quick-a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; padding: 22px 24px 22px 0; text-decoration: none; color: var(--ink); }
.quick-a + .quick-a { padding-left: 24px; border-left: 1px solid var(--line); }
.quick-a b { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(28px * var(--display-scale)); line-height: 1; margin-bottom: 4px; }
.quick-a small { color: var(--muted); font-size: 14px; display: block; }
.quick-a:hover b { color: var(--accent-text); }
.quick-art { width: 72px; height: 72px; color: var(--accent-text); --pose-app: var(--accent-text); }
.quick-art > svg { width: 100%; height: 100%; }
.quick-wave svg { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.hist-list { list-style: none; margin: 0; padding: 0; }
.hist-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 4px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hist-app { width: 32px; height: 32px; color: var(--accent-text); }
.hist-app svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.6; }
.hist-app svg .thin { stroke-width: 1.4; opacity: .6; }
.hist-main { min-width: 0; display: grid; }
.hist-main small { font-size: 14px; overflow-wrap: anywhere; }
.hist-total { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: 30px; text-align: right; }
.hist-lock { font-family: var(--font-body); font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted); padding: 3px 10px; border-radius: var(--radius-s); background: var(--sunk); }
.hist-tools { display: flex; gap: 4px; align-items: center; }
.hist-del { border-color: transparent; background: transparent; }

/* ---------- Analyse ---------- */
.analyse { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; align-items: start; }
.hero-title { font-size: calc(clamp(56px, 8vw, 112px) * var(--display-scale)); line-height: .88; margin-bottom: 20px; }
.hero-lede { font-size: 19px; color: var(--muted); max-width: 54ch; margin-bottom: 40px; }
.an-past { margin-top: 32px; font-weight: 600; }
.plan-note { padding: 4px 8px 4px 14px; border-radius: var(--radius-s); background: var(--sunk); font-size: 15px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.plan-note a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 28px 0; border-top: 1px solid var(--line); }
.step:first-of-type { border-top: 3px solid var(--ink); }
.step-n { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(48px * var(--display-scale)); line-height: .9; color: var(--accent-text); }
.step-body { display: grid; gap: 16px; min-width: 0; }
.app-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.app-pick label { position: relative; }
.app-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.app-pick .app-tile { display: grid; justify-items: center; gap: 8px; padding: 18px 8px 14px; min-height: 120px; border: 2px solid var(--line); border-radius: var(--radius-s); background: var(--surface); font-weight: 700; transition: border-color .15s, background-color .15s; }
.app-tile svg { width: 56px; height: 56px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.app-tile svg .thin { stroke-width: 1.4; opacity: .6; }
.app-pick input:hover + .app-tile { border-color: var(--muted); }
.app-pick input:checked + .app-tile { border-color: var(--primary); background: var(--carpet); color: #fff; }
.app-pick input:checked + .app-tile svg { stroke: #fff; }
.app-pick input:focus-visible + .app-tile { outline: 3px solid var(--primary); outline-offset: 2px; }
.drop { display: grid; place-items: center; text-align: center; gap: 10px; padding: 36px 20px; min-height: 190px; border: 2px dashed var(--muted); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s; position: relative; }
.drop:hover, .drop.is-over { border-color: var(--primary); background: var(--sunk); }
.drop:focus-within { outline: 3px solid var(--primary); outline-offset: 2px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop svg { width: 40px; height: 40px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop strong { font-size: 18px; }
.video-card { display: grid; gap: 12px; }
.video-card video { width: 100%; aspect-ratio: 16 / 9; background: #0d0f14; border-radius: var(--radius); object-fit: contain; }
.video-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.video-meta .file { font-weight: 700; overflow-wrap: anywhere; }
.tips { position: sticky; top: 96px; padding: 28px; display: grid; gap: 20px; background: var(--deep); color: var(--on-deep); border-radius: var(--radius); }
.tips .muted { color: var(--on-deep-muted); }
.carpet-figure { width: 100%; height: auto; }
.carpet-figure .c-line { fill: none; stroke: #fff; stroke-width: 1.5; }
.carpet-figure .c-zone { fill: var(--carpet); }
.carpet-figure .c-cone { fill: var(--accent-on-deep); opacity: .14; }
.carpet-figure .c-cone-line { stroke: var(--accent-on-deep); stroke-width: 1.2; stroke-dasharray: 4 4; fill: none; }
.carpet-figure .c-phone { fill: var(--accent-on-deep); }
.carpet-figure text { font-size: 11px; fill: var(--on-deep-muted); font-family: var(--font-body); }
.tip-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tip-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.tip-list svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-on-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.tip-list b { display: block; }

/* the analysis run */
.run { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; min-height: 60vh; }
.run-stage { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--deep); }
.run-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.run-stage .carpet-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.run-skeleton { position: absolute; left: 50%; top: 50%; width: 46%; height: auto; transform: translate(-50%, -50%); color: #fff; overflow: visible; }
.run-skeleton .sk-bone { stroke-width: 4.5; }
.run-skeleton .sk-joint { fill: #fff; }
.run-scan { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent-on-deep); top: 0; animation: scan 1.6s cubic-bezier(.6, 0, .4, 1) infinite alternate; }
@keyframes scan { to { top: calc(100% - 2px); } }
.run-box { position: absolute; border: 2px solid var(--accent-on-deep); border-radius: var(--radius-s); left: 33%; top: 12%; width: 34%; height: 78%; opacity: 0; transition: opacity .4s; }
.run-box.on { opacity: 1; }
.run-steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 4px; }
.run-steps li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; min-height: 48px; padding: 0 4px; color: var(--muted); border-bottom: 1px solid var(--line); }
.run-steps li .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; }
.run-steps li .tick svg { width: 14px; height: 14px; fill: none; stroke: var(--on-primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.run-steps li.active { color: var(--ink); font-weight: 700; }
.run-steps li.active .tick { border-color: var(--primary); border-top-color: transparent; animation: spin .8s linear infinite; }
.run-steps li.done { color: var(--ink); }
.run-steps li.done .tick { background: var(--primary); border-color: var(--primary); }
.run-steps li.done .tick svg { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.run-bar { height: 8px; background: var(--sunk); border-radius: var(--radius-s); overflow: hidden; margin-top: 24px; }
.run-bar i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s linear; }
.run-title { font-size: calc(clamp(40px, 5vw, 64px) * var(--display-scale)); line-height: .92; }

/* ---------- Results ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -8px 0 8px -6px; padding: 0 8px; border-radius: var(--radius-s); color: var(--accent-text); font-weight: 700; text-decoration: none; }
.back-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.locked-wrap { position: relative; }
.locked-wrap.is-locked .locked-content { filter: blur(14px) saturate(.7); pointer-events: none; user-select: none; }
.unlock {
  position: absolute; z-index: 5; left: 50%; top: 80px; transform: translateX(-50%);
  width: min(560px, calc(100% - 24px)); padding: 32px; background: var(--surface); border-top: 6px solid var(--hi);
  border-radius: var(--radius); box-shadow: 0 30px 70px -24px var(--scrim); display: grid; gap: 18px;
}
.unlock h2 { font-size: calc(44px * var(--display-scale)); line-height: .95; margin-bottom: 8px; }
.unlock-opts { display: grid; gap: 10px; }
.unlock-opt { position: relative; }
.unlock-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.unlock-opt > span { display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; border: 2px solid var(--line); border-radius: var(--radius-s); }
.unlock-opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; }
.unlock-opt input:checked + span { border-color: var(--primary); }
.unlock-opt input:checked + span .radio { border-color: var(--primary); }
.unlock-opt input:checked + span .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.unlock-opt input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.unlock-opt b { display: block; }
.unlock-opt .price { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: 26px; text-align: right; line-height: 1; }
.unlock-opt .price small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--muted); }
.unlock-foot { text-align: center; }

.res-hero { position: relative; overflow: hidden; background: var(--deep); color: var(--on-deep); border-radius: var(--radius); padding: 32px 40px 36px; display: grid; gap: 28px; --odo-up: var(--accent-on-deep); --odo-down: var(--bad-on-deep); }
.rh-art { position: absolute; right: -30px; bottom: -60px; width: 360px; height: 440px; color: var(--on-deep); opacity: .07; pointer-events: none; --pose-app: var(--on-deep); }
.rh-art svg { width: 100%; height: 100%; }
.rh-top { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 24px; }
.rh-title { font-family: var(--font-body); font-weight: 700; font-size: 20px; letter-spacing: 0; }
.rh-meta { color: var(--on-deep-muted); font-size: 14px; margin-top: 4px; max-width: 60ch; }
.rh-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.rh-score { position: relative; display: grid; grid-template-columns: auto minmax(280px, 520px); gap: 24px 56px; align-items: end; }
.rh-total { display: grid; gap: 8px; }
.rh-k { color: var(--on-deep-muted); font-weight: 600; font-size: 15px; }
.rh-big { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(clamp(110px, 15vw, 210px) * var(--display-scale)); line-height: 1; }
.rh-big:focus { outline: none; }
.rh-trend { font-weight: 700; font-size: 15px; }
.rh-trend.up { color: var(--ok-on-deep); }
.rh-trend.down { color: var(--bad-on-deep); }
.rh-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; align-self: end; }
.rh-parts div { padding: 14px 20px 14px 0; border-top: 1px solid var(--deep-line); }
.rh-parts div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--deep-line); }
.rh-parts dt { color: var(--on-deep-muted); font-size: 14px; font-weight: 600; }
.rh-parts dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(clamp(40px, 4.4vw, 60px) * var(--display-scale)); line-height: 1; }
.rh-parts dd.rh-eq { font-family: var(--font-body); font-size: 14px; font-weight: 500; font-style: normal; font-stretch: 100%; color: var(--on-deep-muted); margin-top: 8px; }
.rh-eq b { color: var(--on-deep); font-size: 16px; }
.rh-pen.is-pen { color: var(--bad-on-deep); }
.locked-content.is-revealing .rh-big { animation: reveal 1.2s cubic-bezier(.2, .8, .2, 1); }
@keyframes reveal { from { letter-spacing: .08em; opacity: .3; } }

.review-card { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; padding: 18px 20px; margin-top: 16px; border: 2px solid var(--ink); border-radius: var(--radius); }
.review-card .rv-icon { width: 26px; height: 26px; fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; margin-top: 2px; }
.review-card .rv-main { display: grid; gap: 4px; }
.radio-row { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.radio-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.radio-row b { display: block; font-weight: 700; }
.radio-row small { display: block; color: var(--muted); font-size: 14px; }
.radio-row:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.radio-row.is-dis { cursor: not-allowed; }
.radio-row.is-dis b { color: var(--muted); }
.rv-scope { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.rv-price { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--sunk); font-size: 15px; }
.rv-price b { font-size: 17px; }
.rv-price span { color: var(--muted); }
.rv-price.is-included { background: var(--hi); color: var(--on-hi); }
.rv-price.is-included span { color: var(--on-hi); }

/* top gains: the --hi block */
.gains { margin: 24px 0 40px; background: var(--hi); color: var(--on-hi); border-radius: var(--radius); padding: 32px 40px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 24px 48px; }
.gains-head { display: grid; gap: 14px; align-content: start; justify-items: start; }
.gains-title { font-size: calc(clamp(40px, 4.6vw, 64px) * var(--display-scale)); line-height: .92; }
.gains-list { list-style: none; margin: 0; padding: 0; }
.gains-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; padding: 14px 0; border-top: 2px solid var(--on-hi); }
.gains-list li.is-sample { border-top-width: 1px; opacity: .92; }
.g-v { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(56px * var(--display-scale)); line-height: .95; }
.gains-list li.is-sample .g-v { font-size: calc(36px * var(--display-scale)); }
.g-txt b { display: block; font-size: 17px; }
.g-txt small { display: block; font-size: 14px; }
.g-go { border: 0; background: none; color: var(--on-hi); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; min-height: 44px; padding: 0 4px; }
.gains .drill-btn { background: transparent; color: var(--on-hi); border-color: var(--on-hi); }

.res-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.player video { width: 100%; aspect-ratio: 16 / 9; background: #0d0f14; border-radius: var(--radius) var(--radius) 0 0; object-fit: contain; }
.player .no-video { aspect-ratio: 16 / 4; display: grid; place-items: center; text-align: center; padding: 16px; background: var(--sunk); border-radius: var(--radius) var(--radius) 0 0; color: var(--muted); }
.timeline { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); padding: 12px 16px 14px; margin-bottom: 40px; }
.tl-grid { display: grid; grid-template-columns: 84px minmax(0, 1fr); row-gap: 4px; }
.tl-lane-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; font-weight: 600; }
.tl-track { position: relative; height: 44px; border-bottom: 1px dashed var(--line); }
.tl-ruler { position: relative; height: 22px; }
.tl-ruler span { position: absolute; top: 4px; transform: translateX(-50%); font-size: 12px; color: var(--muted); }
.tl-mark { position: absolute; top: 4px; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--ink); color: var(--ink); cursor: pointer; padding: 0; }
.tl-mark .glyph { width: 18px; height: 18px; }
.tl-mark.is-zero { border-style: dashed; color: var(--bad); border-color: var(--bad); }
.tl-mark.is-unsure { background: var(--hi); color: var(--on-hi); border-color: var(--on-hi); }
.tl-mark.is-unsure::after { content: "?"; position: absolute; right: -6px; top: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.tl-mark.is-active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.tl-mark::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--primary); pointer-events: none; }

.els-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; padding-bottom: 14px; border-bottom: 3px solid var(--ink); }
.els-filter, .lib-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.els-filter button, .lib-filters button { min-height: 40px; padding: 0 12px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
.els-filter button span { color: var(--muted); font-weight: 600; }
.els-filter button[aria-pressed="true"], .els-filter button[aria-selected="true"], .lib-filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.els-filter button[aria-pressed="true"] span, .els-filter button[aria-selected="true"] span { color: var(--bg); opacity: .75; }
.el-list { list-style: none; margin: 0 0 48px; padding: 0; }
.el-none { padding: 24px 0; color: var(--muted); }
.el-row { padding: 16px 0 16px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; display: grid; gap: 12px; }
.el-row.is-active { box-shadow: -14px 0 0 var(--sunk), 14px 0 0 var(--sunk); background: var(--sunk); }
.el-top { display: grid; grid-template-columns: 52px 48px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; }
.el-time { font-weight: 700; }
.el-time button { all: unset; cursor: pointer; padding: 0 6px; margin-left: -6px; border-radius: var(--radius-s); min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; box-sizing: border-box; }
.el-time button:hover { background: var(--sunk); }
.el-time button:focus-visible { outline: 3px solid var(--primary); }
.el-id { display: grid; gap: 2px; min-width: 0; }
.el-name { font-weight: 700; font-size: 17px; line-height: 1.3; }
.el-meta { color: var(--muted); font-size: 14px; }
.el-status { font-size: 14px; }
.el-value { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(40px * var(--display-scale)); line-height: 1; text-align: right; }
.el-value.zero { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 3px; }
.st { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.st svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.st-ok { color: var(--ok); }
.st-bad { color: var(--bad); }
.st-muted { color: var(--muted); font-weight: 600; }
.st-unsure { color: var(--ink); }
.qm { width: 20px; height: 20px; border-radius: 50%; background: var(--hi); color: var(--on-hi); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.coach { margin-left: 114px; padding-left: 18px; border-left: 4px solid var(--line); display: grid; gap: 10px; }
.tone-bad .coach { border-left-color: var(--bad); }
.tone-unsure .coach { border-left-color: var(--hi); }
.tone-ok .coach { border-left-color: var(--primary); }
.coach-title { font-weight: 700; font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.coach-gain { background: var(--hi); color: var(--on-hi); padding: 1px 8px; border-radius: var(--radius-s); font-weight: 800; font-size: 15px; }
.coach-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0; }
.coach-more summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--accent-text); min-height: 36px; display: inline-flex; align-items: center; }
.coach-more p { font-size: 14px; max-width: 70ch; margin-bottom: 8px; }
.ctl-pair { display: inline-flex; align-items: center; gap: 8px; }
.coach-dl dt { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.coach-dl dd { margin: 0; font-size: 14px; line-height: 1.45; }
.coach-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.drill-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-btn); border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; text-align: left; }
.drill-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.drill-btn:hover { background: var(--sunk); }
.drill-btn.is-added { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.gains .drill-btn.is-added { background: var(--on-hi); color: var(--hi); }
.fix-btn { min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--accent-text); font-weight: 700; cursor: pointer; border-radius: var(--radius-s); font-size: 14px; margin-left: auto; }
.fix-btn:hover { background: var(--sunk); }
.choice { display: grid; gap: 8px; padding: 14px; margin: 0 0 0 114px; border: 0; border-radius: var(--radius-s); background: var(--hi); color: var(--on-hi); }
.choice-q { font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.choice-q .qmark { width: 22px; height: 22px; border-radius: 50%; background: var(--on-hi); color: var(--hi); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.choice-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-opt { position: relative; }
.choice-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-opt > span { display: grid; gap: 2px; padding: 10px 12px; min-height: 56px; border-radius: var(--radius-s); background: var(--surface); color: var(--ink); border: 2px solid transparent; }
.choice-opt b { display: flex; justify-content: space-between; gap: 8px; }
.choice-opt small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.choice-opt input:checked + span { border-color: var(--ink); }
.choice-opt input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.side { position: sticky; top: 96px; display: grid; gap: 20px; }
.req { padding: 22px 24px; display: grid; gap: 10px; font-size: 15px; border: 2px solid var(--ink); border-radius: var(--radius); }
.req h2 { font-size: 18px; font-weight: 700; }
.req-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.req-row.is-bad { color: var(--bad); font-weight: 700; }
.req-bar { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; width: 100%; }
.req-bar i { height: 6px; background: var(--sunk); border-radius: 2px; }
.req-bar i.on { background: var(--primary); }
.sb-note { font-size: 13px; color: var(--muted); }
.sb-label { color: var(--muted); font-size: 15px; font-weight: 500; display: block; }

/* ---------- Composer ---------- */
.cmp-head { display: grid; gap: 14px; margin-bottom: 24px; }
.cmp-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cmp-name {
  flex: 1; min-width: 0; border: 0; border-bottom: 2px solid transparent; background: none; padding: 0; margin: 0;
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style);
  font-size: calc(clamp(36px, 4vw, 56px) * var(--display-scale)); line-height: 1.05; color: var(--ink); text-overflow: ellipsis;
}
.cmp-name:hover { border-bottom-color: var(--line); }
.cmp-name:focus-visible { outline: none; border-bottom-color: var(--primary); }
.cmp-saved { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ok); }
.cmp-saved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cmp-saved[data-state="saving"] { color: var(--muted); }
.cmp-saved[data-state="error"] { color: var(--bad); }
.cmp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.seg-app span svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.seg-app span svg .thin { stroke-width: 1.4; opacity: .6; }
.cmp-menu { position: relative; }
.cmp-bar .btn svg { width: 16px; height: 16px; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-s); background: var(--sunk); font-size: 13px; }
.pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 25; min-width: 300px; max-height: 60vh; overflow: auto; padding: 6px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-s); box-shadow: 8px 8px 0 -2px var(--sunk); display: grid; }
.pop-right { left: auto; right: 0; }
.pop > button, .pop > label { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: var(--radius-s); text-align: left; cursor: pointer; font-weight: 600; color: var(--ink); }
.pop > button:hover, .pop > label:hover { background: var(--sunk); }
.pop .is-bad { color: var(--bad); }
.pop-comp button { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 56px; padding: 6px 10px; border: 0; background: none; border-radius: var(--radius-s); text-align: left; cursor: pointer; color: var(--ink); }
.pop-comp button:hover { background: var(--sunk); }
.pop-comp.is-cur button { background: var(--sunk); box-shadow: inset 4px 0 0 var(--primary); }
.pop-comp small { display: block; color: var(--muted); font-size: 13px; }
.pc-art svg { width: 28px; height: 28px; fill: none; stroke: var(--accent-text); stroke-width: 2.6; }
.pc-art svg .thin { stroke-width: 1.4; opacity: .6; }
.pc-d { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 24px; }
.pop-none { padding: 12px; color: var(--muted); }

.cmp-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.lib { position: sticky; top: 84px; height: calc(100vh - 104px); display: flex; flex-direction: column; gap: 10px; min-height: 420px; }
.lib-head { display: flex; align-items: center; gap: 12px; }
.lib-title { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(28px * var(--display-scale)); line-height: 1; }
.lib-mini, .lib-done { display: none; }
.lib-search { position: relative; }
.lib-search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.lib-search input { width: 100%; min-height: 48px; padding: 0 14px 0 44px; border: 2px solid var(--ink); border-radius: var(--radius-s); background: var(--surface); }
.lib-hint { font-size: 13px; color: var(--muted); }
.lib-list { flex: 1; overflow: auto; margin: 0 -6px; padding: 0 6px 24px; overscroll-behavior: contain; }
.lib-sec { position: sticky; top: 0; z-index: 1; background: var(--bg); padding: 12px 0 6px; font-size: 13px; font-weight: 800; color: var(--muted); border-bottom: 2px solid var(--ink); }
.lib-ul { list-style: none; margin: 0; padding: 0; }
.lib-item { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 56px; padding: 7px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); border-radius: 0; transition: background-color .15s; }
.lib-item:hover { background: var(--sunk); }
.lib-item:hover .li-v { color: var(--accent-text); }
.li-art { width: 38px; height: 38px; color: var(--accent-text); --pose-app: var(--accent-text); }
.lib-item .app-art svg { width: 34px; height: 34px; }
.li-main { min-width: 0; display: grid; }
.li-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.li-sub { font-size: 12.5px; color: var(--muted); }
.li-v { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(26px * var(--display-scale)); line-height: 1; }
.lib-item.is-used { color: var(--muted); }
.lib-item.is-used .li-art { color: var(--muted); opacity: .6; }
.lib-item.is-used .li-sub { color: var(--bad); font-weight: 600; }
.lib-item.just-added { animation: added .7s ease-out; }
@keyframes added { 0% { background: var(--hi); color: var(--on-hi); } }
.lib-none { padding: 20px 4px; color: var(--muted); }

.routine-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 3px solid var(--ink); }
.rt-list { list-style: none; margin: 0; padding: 0; position: relative; }
.rt-row { position: relative; display: grid; grid-template-columns: 32px 26px 48px minmax(0, 1fr) 64px auto; gap: 6px 12px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--line); background: var(--bg); transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.rt-list.is-sorting .rt-row.is-dragging { transition: none; z-index: 5; box-shadow: 0 18px 40px -16px var(--scrim); background: var(--surface); }
.rt-row.is-grabbed { background: var(--sunk); box-shadow: inset 4px 0 0 var(--primary); }
.rt-row.is-new { animation: rowIn .45s cubic-bezier(.2, .8, .2, 1); }
.rt-row.is-flash { animation: rowFlash .9s ease-out; }
.rt-row.is-new.is-flash { animation: rowIn .45s cubic-bezier(.2, .8, .2, 1), rowFlash .9s ease-out; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes rowFlash { 0%, 20% { background: color-mix(in srgb, var(--hi) 45%, var(--bg)); } }
.grip { width: 32px; height: 48px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: grab; touch-action: none; border-radius: var(--radius-s); padding: 0; }
.grip svg { width: 18px; height: 18px; fill: currentColor; }
.grip:hover { color: var(--ink); background: var(--sunk); }
.grip[aria-pressed="true"] { color: var(--on-primary); background: var(--primary); }
.rt-list.is-sorting .grip { cursor: grabbing; }
.rt-idx { font-weight: 700; color: var(--muted); font-size: 14px; padding-top: 14px; text-align: right; }
.rt-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding-top: 2px; }
.rt-name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.rt-kind { font-size: 13px; color: var(--muted); }
.rt-why { font-size: 13px; color: var(--bad); font-weight: 600; }
.rt-why.soft { color: var(--muted); font-weight: 500; }
.rt-v { position: relative; text-align: right; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(34px * var(--display-scale)); line-height: 1; padding-top: 6px; }
.rt-row.is-zero .rt-v { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 3px; }
.rt-row.is-soft .rt-v { color: var(--muted); }
.rt-tools { display: flex; gap: 2px; align-items: center; padding-top: 2px; }
.rt-tools .icon-btn { border-color: transparent; background: transparent; }
.rt-tools .icon-btn:hover { border-color: var(--line); background: var(--sunk); }
.rt-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.ctl-k { font-size: 13px; font-weight: 700; color: var(--muted); }
.ctl-hint { font-size: 12.5px; color: var(--muted); }
.mini-step { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.mini-step button { width: 40px; height: 40px; border: 0; background: none; font-size: 20px; font-weight: 700; cursor: pointer; border-radius: var(--radius-s); color: var(--ink); }
.mini-step button:hover:not(:disabled) { background: var(--sunk); }
.mini-step button:disabled { opacity: .3; cursor: not-allowed; }
.mini-step output { min-width: 30px; text-align: center; font-weight: 800; font-size: 17px; }
.tog { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; }
.tog svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tog[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.crit-row { display: flex; flex-wrap: wrap; gap: 5px; }
.r-ctl { flex-direction: column; align-items: flex-start; }
.r-phase { display: grid; gap: 6px; }
.r-crits { display: flex; flex-wrap: wrap; gap: 6px; }
.r-crits .crit { text-align: left; }
.crit .crit-v { font-weight: 700; opacity: .7; white-space: nowrap; }
.crit { min-height: 36px; padding: 0 10px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.crit:hover:not(:disabled) { border-color: var(--ink); }
.crit[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.crit:disabled { color: var(--muted); background: var(--sunk); border-style: dashed; cursor: not-allowed; text-decoration: line-through; text-decoration-color: var(--muted); }
.second { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; }
.second select { min-height: 36px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); padding: 0 8px; font-size: 13px; max-width: 220px; min-width: 0; flex: 1 1 auto; }
.comps-inline { display: flex; flex-wrap: wrap; gap: 4px; }
.comps-inline button { min-width: 50px; min-height: 36px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ink); }
.comps-inline button.ghost { min-width: 36px; border-style: dashed; color: var(--muted); }

.rt-empty { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; padding: 28px 0; }
.rt-empty-art { background: none; }
.rt-empty-txt { display: grid; gap: 12px; }
.rt-empty-txt h3 { font-size: calc(40px * var(--display-scale)); line-height: .95; }
.rt-empty-txt p { color: var(--muted); max-width: 52ch; }
.tpl-list { display: grid; gap: 0; border-top: 2px solid var(--ink); margin-top: 6px; }
.tpl { display: grid; gap: 2px; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); }
.tpl b { font-size: 17px; }
.tpl span { font-size: 14px; color: var(--muted); }
.tpl:hover b { color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; }

.board { position: sticky; top: 84px; background: var(--deep); color: var(--on-deep); border-radius: var(--radius); padding: 24px 24px 22px; display: grid; gap: 18px; --odo-up: var(--accent-on-deep); --odo-down: var(--bad-on-deep); max-height: calc(100vh - 104px); overflow: auto; }
.board-toggle { display: none; }
.board-k { color: var(--on-deep-muted); font-size: 14px; font-weight: 700; }
.board-d { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(124px * var(--display-scale)); line-height: 1; color: var(--on-deep); margin-top: 2px; }
.board-eq { display: flex; gap: 10px; align-items: baseline; color: var(--on-deep-muted); font-weight: 600; margin-top: 8px; }
.board-eq b { color: var(--on-deep); font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: calc(30px * var(--display-scale)); }
.board-more { display: grid; gap: 18px; }
.board-total { display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--deep-line); }
.board-tot { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(52px * var(--display-scale)); line-height: 1; color: var(--accent-on-deep); }
.board-note { font-size: 12.5px; color: var(--on-deep-muted); }
.meters { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--deep-line); }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.meter-k { font-size: 14px; font-weight: 600; color: var(--on-deep-muted); }
.meter-n { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: 26px; line-height: 1; }
.meter-n small { font-size: .6em; color: var(--on-deep-muted); }
.meter-bar { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; }
.meter-bar i { height: 8px; border-radius: 2px; background: var(--deep-line); transition: background-color .3s; }
.meter-bar i.on { background: var(--accent-on-deep); }
.meter.is-over .meter-n { color: var(--bad-on-deep); }
.groups { padding-top: 14px; border-top: 1px solid var(--deep-line); display: grid; gap: 8px; }
.groups .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: var(--radius-s); font-size: 13px; font-weight: 700; }
.gchip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.gchip.ok { background: var(--deep-line); color: var(--on-deep); }
.gchip.ok svg { stroke: var(--ok-on-deep); }
.gchip.miss { background: transparent; color: var(--bad-on-deep); box-shadow: inset 0 0 0 1.5px var(--bad-on-deep); }
.board-pen { font-size: 14px; color: var(--on-deep-muted); }
.board-pen b { color: var(--on-deep); }
.board-warns { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--deep-line); display: grid; gap: 6px; }
.board-warns li > button, .board-warns li > span { width: 100%; display: grid; grid-template-columns: 16px 1fr; gap: 8px; padding: 6px 0; border: 0; background: none; color: var(--on-deep); font-size: 13.5px; text-align: left; line-height: 1.4; }
.board-warns li > button { cursor: pointer; }
.board-warns li > button:hover span { text-decoration: underline; text-underline-offset: 3px; }
.board-warns svg { width: 16px; height: 16px; fill: none; stroke: var(--bad-on-deep); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.board-warns li.ok svg { stroke: var(--ok-on-deep); }
.fab { display: none; }

/* ---------- Train ---------- */
.train { display: grid; gap: 40px; }
.train-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.th-title h1 { font-size: calc(clamp(64px, 9vw, 120px) * var(--display-scale)); line-height: .85; }
.th-date { color: var(--muted); font-weight: 600; margin-top: 10px; }
.th-board { display: flex; background: var(--deep); color: var(--on-deep); border-radius: var(--radius); }
.th-stat { padding: 20px 28px; display: grid; gap: 4px; align-content: start; min-width: 150px; }
.th-stat + .th-stat { border-left: 1px solid var(--deep-line); }
.th-n { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(64px * var(--display-scale)); line-height: .9; color: var(--accent-on-deep); }
.th-n small { font-size: .5em; color: var(--on-deep-muted); }
.th-k { color: var(--on-deep-muted); font-size: 14px; font-weight: 600; }
.th-bar { background: var(--deep-line); margin-top: 6px; }
.th-bar i { background: var(--accent-on-deep); }
.train-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start; }
.train-side { display: grid; gap: 40px; position: sticky; top: 96px; }
.drill-list { list-style: none; margin: 0; padding: 0; }
.drill { position: relative; display: grid; grid-template-columns: auto 88px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.drill:not(:has(.check-btn)) { grid-template-columns: 88px minmax(0, 1fr) auto; }
.check-lg { width: 52px; height: 52px; }
.drill-art { width: 88px; height: 88px; background: var(--carpet); color: #fff; padding: 10px; border-radius: var(--radius-s); display: grid; }
.drill-main { display: grid; gap: 6px; min-width: 0; }
.drill-name { font-size: 20px; font-weight: 800; }
.drill-dose { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(30px * var(--display-scale)); line-height: 1.05; color: var(--ink); }
.drill-dose small { font-family: var(--font-body); font-size: 14px; font-weight: 500; font-style: normal; font-stretch: 100%; color: var(--muted); letter-spacing: 0; }
.drill-why { max-width: 66ch; }
.drill-how summary { cursor: pointer; font-weight: 700; color: var(--accent-text); min-height: 40px; display: inline-flex; align-items: center; }
.drill-how ol { margin: 4px 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.drill-safe { font-size: 14px; color: var(--muted); }
.drill-src { font-size: 13px; color: var(--muted); }
.drill.is-done .drill-name { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.drill.is-done .drill-art { background: var(--sunk); color: var(--muted); }
.drill-del { border-color: transparent; background: transparent; }
.train-empty { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: start; padding: 24px 0; }
.train-empty .te-art { width: 120px; height: 120px; padding: 14px; }
.train-empty h3 { font-size: calc(36px * var(--display-scale)); line-height: .95; margin-bottom: 8px; }
.train-empty p { color: var(--muted); margin-bottom: 14px; max-width: 52ch; }
.rest { padding: 18px 0; }
.others { margin-top: 18px; }
.others > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.wk { display: grid; gap: 2px; margin-top: 8px; }
.wk-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(7, 34px); gap: 4px; align-items: center; }
.wk-headrow { font-size: 12px; font-weight: 800; color: var(--muted); }
.wk-day { text-align: center; }
.wk-day.is-today { color: var(--on-primary); background: var(--primary); border-radius: var(--radius-s); }
.wk-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; padding-right: 4px; }
.wk-cell { width: 34px; height: 34px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.wk-cell svg { width: 18px; height: 18px; fill: none; stroke: var(--on-primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wk-cell.is-planned { background: var(--sunk); border-color: var(--primary); }
.wk-cell.is-done { background: var(--primary); border-color: var(--primary); }
.wk-cell.is-missed { border-style: dashed; }
.heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin-top: 10px; }
.heat i, .heat-legend i { aspect-ratio: 1; border-radius: var(--radius-s); background: var(--sunk); display: block; }
.heat .lv1, .heat-legend .lv1 { background: color-mix(in srgb, var(--primary) 30%, var(--sunk)); }
.heat .lv2, .heat-legend .lv2 { background: color-mix(in srgb, var(--primary) 55%, var(--sunk)); }
.heat .lv3, .heat-legend .lv3 { background: color-mix(in srgb, var(--primary) 78%, var(--sunk)); }
.heat .lv4, .heat-legend .lv4 { background: var(--primary); }
.heat-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.heat-legend i { width: 12px; }
.log { list-style: none; margin: 14px 0 0; padding: 0; }
.log li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.drill-lib .lib-filters { margin: 14px 0 6px; }
.drill-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.drill-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.drill-row .drill-art { width: 56px; height: 56px; padding: 6px; }
.dr-main b { display: block; }
.dr-main small { color: var(--muted); font-size: 13px; }

/* ---------- Music ---------- */
.music { display: grid; gap: 32px; }
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 8px 40px; align-items: end; padding: 28px 32px; background: var(--deep); color: var(--on-deep); border-radius: var(--radius); }
.verdict .muted { color: var(--on-deep-muted); }
.verdict .big { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(clamp(80px, 11vw, 150px) * var(--display-scale)); line-height: .85; }
.verdict .what { font-size: 20px; font-weight: 700; }
.verdict .what.bad { color: var(--bad-on-deep); }
.verdict .what.ok { color: var(--ok-on-deep); }
.wave-wrap { position: relative; }
.wave-wrap canvas { width: 100%; height: 200px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.wave-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); margin-top: 10px; }
.wave-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.music audio { width: 100%; }

/* ---------- Plans ---------- */
.plans { width: 100%; border-collapse: collapse; table-layout: fixed; }
.plans th, .plans td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.plans thead th { border-bottom: 3px solid var(--ink); padding-top: 28px; vertical-align: bottom; }
.plans tbody th { font-weight: 600; color: var(--muted); width: 22%; }
.plans .pname { font-size: 18px; font-weight: 800; display: block; margin-bottom: 8px; }
.plans .price { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(clamp(36px, 3.8vw, 56px) * var(--display-scale)); line-height: 1; }
.plans .per { display: block; margin-top: 6px; color: var(--muted); font-size: 15px; font-weight: 500; }
.plans .is-pick { background: var(--sunk); }
.pick-tag { display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: var(--radius-s); background: var(--hi); color: var(--on-hi); font-size: 13px; font-weight: 800; }
.plans td .yes svg, .plan-card .yes svg { width: 20px; height: 20px; fill: none; stroke: var(--ok); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.plans td.cta, .plans tfoot td { border-bottom: 0; }
.plans-mobile { display: none; }
.plan-card { padding: 20px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.plan-card:first-child { border-top: 3px solid var(--ink); }
.plan-card ul { margin: 0; padding: 0 0 0 18px; color: var(--muted); }
.plans-foot { margin-top: 24px; color: var(--muted); font-size: 14px; max-width: 70ch; }

/* ---------- Club ---------- */
.sample-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-s); background: var(--hi); color: var(--on-hi); margin-bottom: 28px; max-width: 760px; }
.sample-note svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; margin-top: 1px; }
.club-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); margin: 0 0 40px; background: var(--deep); color: var(--on-deep); border-radius: var(--radius); padding: 6px 8px; }
.club-sum div { padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.club-sum div + div { border-left: 1px solid var(--deep-line); }
.club-sum dt { color: var(--on-deep-muted); font-size: 14px; font-weight: 600; }
.club-sum dd { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(44px * var(--display-scale)); line-height: 1.05; }
.club-sum .wide dd { font-family: var(--font-body); font-weight: 700; font-style: normal; font-stretch: 100%; letter-spacing: 0; font-size: 18px; line-height: 1.35; }
.club-sum .wide .muted { color: var(--on-deep-muted); }
.club-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 12px; }
.club-sort { flex: 0 1 280px; }
.club-table { border-top: 3px solid var(--ink); }
.club-row { display: grid; grid-template-columns: minmax(130px, 1.1fr) minmax(100px, .9fr) 92px 70px 190px minmax(160px, 1.6fr); gap: 4px 20px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.club-row .r { text-align: right; }
.club-headrow { padding-top: 12px; padding-bottom: 12px; color: var(--muted); font-size: 14px; font-weight: 700; }
[data-rows] .club-row { cursor: pointer; min-height: 60px; }
[data-rows] .club-row:hover { background: var(--sunk); }
.c-name { display: flex; flex-direction: column; align-items: flex-start; }
.c-name small { font-size: 13px; }
.club-open { all: unset; cursor: pointer; font-weight: 800; font-size: 17px; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; text-decoration-thickness: 2px; border-radius: var(--radius-s); margin-bottom: -10px; }
.club-open:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.c-app { display: flex; align-items: center; gap: 8px; }
.c-total { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: 30px; }
.c-d { font-weight: 700; }
.c-k { display: none; }
.spark { display: inline-flex; align-items: center; gap: 10px; }
.spark svg { overflow: visible; flex: none; }
.sp-line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sp-end { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.sp-hit { fill: transparent; }
.sp-hit:hover { fill: var(--primary); fill-opacity: .25; }
.sp-delta { font-weight: 700; font-size: 14px; }
.sp-delta.up { color: var(--ok); }
.sp-delta.down { color: var(--bad); }
.c-ded { font-size: 15px; }

/* ---------- dialogs, toasts ---------- */
.dialog { border: 0; padding: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); width: min(640px, calc(100vw - 24px)); max-height: min(88vh, 880px); box-shadow: 0 30px 80px -20px var(--scrim); }
.dialog::backdrop { background: var(--scrim); }
.dlg { display: grid; grid-template-rows: auto 1fr auto; max-height: min(88vh, 880px); }
.dlg-head { padding: 22px 24px 14px; display: flex; justify-content: space-between; gap: 16px; align-items: start; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 24px; font-weight: 800; }
.dlg-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.dlg-body { padding: 18px 24px; overflow: auto; display: grid; gap: 16px; align-content: start; }
.dlg-foot { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dlg-share .dlg-body { justify-items: start; }
.share-preview { justify-self: center; display: grid; place-items: center; width: 100%; padding: 16px; background: var(--sunk); border-radius: var(--radius-s); }
.share-preview canvas { height: min(52vh, 520px); width: auto; max-width: 100%; border-radius: var(--radius-s); box-shadow: 0 0 0 1px var(--line); background: var(--bg); }
.share-preview[data-format="square"] canvas { height: auto; width: min(100%, 420px); }
.data-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border-top: 3px solid var(--ink); }
.data-sum div { padding: 12px 10px 4px 0; }
.data-sum dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.data-sum dd { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: 40px; line-height: 1; }
.data-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.is-bad { color: var(--bad); }

.preview-bar { display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px; background: var(--signal); color: var(--on-signal); font-weight: 800; font-size: 16px; text-decoration: none; }
.preview-bar:hover { text-decoration: underline; }
.toast-region { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 70; display: grid; gap: 8px; width: max-content; max-width: min(560px, calc(100vw - 24px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; min-height: 52px; background: var(--deep); color: var(--on-deep); border-radius: var(--radius-s); font-weight: 600; box-shadow: 0 16px 36px -14px var(--scrim); animation: toastin .25s ease-out; }
.toast svg { width: 20px; height: 20px; fill: none; stroke: var(--accent-on-deep); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.toast > span { padding-right: 8px; }
.toast-act { margin-left: auto; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--radius-s); background: var(--on-deep); color: var(--deep); font-weight: 800; cursor: pointer; flex: none; }
.toast-out { opacity: 0; transition: opacity .3s; }
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } }
.noscript { padding: 24px; }

/* ---------- floor map (unchanged from v2) ---------- */
.floor { margin-bottom: 40px; }
.floor-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 3px solid var(--ink); }
.floor-toggle { font-size: 15px; }
.floor-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
.floor-map { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.floor-svg { width: 100%; height: auto; overflow: visible; }
.f-carpet { fill: var(--sunk); }
.f-edge { fill: none; stroke: var(--ink); stroke-width: .08; }
.f-grid line { stroke: var(--muted); stroke-width: .03; stroke-dasharray: .18 .22; opacity: .7; }
.fz.is-in { fill: var(--brand); fill-opacity: .13; }
.fz.is-out { fill: var(--bad); fill-opacity: .14; stroke: var(--bad); stroke-width: .05; stroke-dasharray: .2 .15; }
.f-path { fill: none; stroke: var(--primary); stroke-width: .09; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.f-start { fill: var(--surface); stroke: var(--ink); stroke-width: .07; }
.f-end { fill: var(--ink); }
.f-pos { fill: var(--brand); stroke: var(--surface); stroke-width: .1; pointer-events: none; }
.f-cap, .f-dim { font-size: .48px; fill: var(--muted); font-family: var(--font-body); font-weight: 600; }
.fm { cursor: pointer; color: var(--ink); outline: none; }
.fm-hit { fill: transparent; }
.fm-dot { fill: var(--surface); stroke: var(--ink); stroke-width: .06; }
.fm-glyph { overflow: visible; }
.fm-glyph path, .fm-glyph circle { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.fm-glyph .fill { fill: currentColor; stroke: none; }
.fm-DA .fm-dot { fill: var(--ink); stroke: var(--surface); stroke-width: .05; }
.fm.is-zero .fm-dot { stroke: var(--bad); stroke-dasharray: .14 .1; }
.fm.is-zero { color: var(--bad); }
.fm-DA.is-zero .fm-dot { fill: var(--surface); stroke: var(--bad); }
.fm.is-unsure .fm-dot { fill: var(--hi); stroke: var(--on-hi); }
.fm.is-unsure { color: var(--on-hi); }
.fm.is-active .fm-dot { fill: var(--primary); stroke: var(--primary); }
.fm.is-active { color: var(--on-primary); }
.fm:hover .fm-dot { stroke-width: .12; }
.fm:focus-visible .fm-hit { stroke: var(--primary); stroke-width: .12; fill: var(--surface); fill-opacity: .4; }
.floor-read { display: grid; gap: 14px; align-content: start; }
.cov { display: flex; gap: 16px; align-items: center; }
.cov-grid { display: grid; grid-template-columns: repeat(3, 18px); gap: 3px; flex: none; }
.cov-grid i { width: 18px; height: 18px; border-radius: var(--radius-s); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--muted); }
.cov-grid i.on { background: var(--primary); box-shadow: none; }
.cov-n { display: block; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(48px * var(--display-scale)); line-height: 1; }
.cov-n small { font-size: .5em; color: var(--muted); margin-left: 2px; }
.cov-code { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--sunk); }
.cov-code.is-bad b { color: var(--bad); }
.floor-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; color: var(--muted); }
.floor-legend li { display: flex; align-items: center; gap: 8px; }
.floor-legend svg { width: 20px; height: 20px; flex: none; }
.lg-start { fill: var(--surface); stroke: var(--ink); stroke-width: 1.6; }
.lg-end { fill: var(--ink); }
.lg-zone { fill: var(--brand); fill-opacity: .18; }
.lg-pos { fill: var(--brand); }
.lg-miss { fill: var(--bad); fill-opacity: .16; stroke: var(--bad); stroke-width: 1.2; stroke-dasharray: 2.5 2; }

/* skeleton morph for the analysis run (poses from brand/poses.json) */
@keyframes sk-larm { 0%,100% { d: path("M90 50 L83 30 L77 10"); } 25% { d: path("M100 63 L124 55 L141 46"); } 50% { d: path("M70 140 L60 158 L57 176"); } 75% { d: path("M90 56 L76 36 L93 14"); } }
@keyframes sk-rarm { 0%,100% { d: path("M110 50 L117 30 L123 10"); } 25% { d: path("M108 64 L84 60 L66 55"); } 50% { d: path("M74 143 L66 162 L64 180"); } 75% { d: path("M110 56 L124 36 L107 14"); } }
@keyframes sk-lleg { 0%,100% { d: path("M95 96 L97 132 L99 170"); } 25% { d: path("M98 102 L136 99 L172 96"); } 50% { d: path("M98 110 L99 145 L100 180"); } 75% { d: path("M96 96 L97 132 L98 170"); } }
@keyframes sk-rleg { 0%,100% { d: path("M105 96 L103 132 L101 170"); } 25% { d: path("M104 102 L66 100 L30 92"); } 50% { d: path("M103 108 L104 72 L106 34"); } 75% { d: path("M104 96 L128 114 L101 130"); } }
@keyframes sk-torso { 0%,100% { d: path("M90 50 L110 50 L105 96 L95 96 L90 50"); } 25% { d: path("M100 63 L108 64 L104 102 L98 102 L100 63"); } 50% { d: path("M70 140 L74 143 L103 108 L98 110 L70 140"); } 75% { d: path("M90 56 L110 56 L104 96 L96 96 L90 56"); } }
@keyframes sk-head { 0%,100% { cx: 100px; cy: 34px; } 25% { cx: 108px; cy: 46px; } 50% { cx: 56px; cy: 150px; } 75% { cx: 100px; cy: 40px; } }
@keyframes sk-bun { 0%,100% { cx: 100px; cy: 22.4px; } 25% { cx: 110.6px; cy: 34.7px; } 50% { cx: 45.7px; cy: 155.4px; } 75% { cx: 100px; cy: 28.4px; } }
.sk-bone { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.sk-joint { fill: currentColor; }
.run-skeleton .sk-larm { animation: sk-larm 6s cubic-bezier(.6,0,.2,1) infinite; }
.run-skeleton .sk-rarm { animation: sk-rarm 6s cubic-bezier(.6,0,.2,1) infinite; }
.run-skeleton .sk-lleg { animation: sk-lleg 6s cubic-bezier(.6,0,.2,1) infinite; }
.run-skeleton .sk-rleg { animation: sk-rleg 6s cubic-bezier(.6,0,.2,1) infinite; }
.run-skeleton .sk-torso { animation: sk-torso 6s cubic-bezier(.6,0,.2,1) infinite; }
.run-skeleton .sk-head { animation: sk-head 6s cubic-bezier(.6,0,.2,1) infinite; }
.run-skeleton .sk-bun { animation: sk-bun 6s cubic-bezier(.6,0,.2,1) infinite; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .cmp-grid { grid-template-columns: 300px minmax(0, 1fr) 290px; gap: 22px; }
  .board-d { font-size: calc(104px * var(--display-scale)); }
}
@media (max-width: 1180px) {
  .nav a { padding: 0 9px; font-size: 14px; }
  .nav a[aria-current="page"]::after { left: 9px; right: 9px; }
  .analyse, .res-grid, .train-grid { grid-template-columns: 1fr; gap: 40px; }
  .tips, .side, .train-side { position: static; }
  .run { grid-template-columns: 1fr; gap: 24px; }
  /* composer: library + routine, the scoreboard becomes a sticky strip over the routine */
  .cmp-grid { grid-template-columns: 300px minmax(0, 1fr); }
  .board { grid-column: 2; grid-row: 1; position: sticky; top: 64px; z-index: 12; padding: 12px 16px; border-radius: 0 0 var(--radius) var(--radius); gap: 10px; max-height: none; overflow: visible; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .routine { grid-column: 2; grid-row: 2; }
  .lib { grid-column: 1; grid-row: 1 / span 2; }
  .board-main { display: flex; align-items: baseline; gap: 14px; order: -1; }
  .board-main .board-k { display: none; }
  .board-d { font-size: calc(56px * var(--display-scale)); margin: 0; }
  .board-eq { margin: 0; font-size: 14px; }
  .board-eq b { font-size: calc(22px * var(--display-scale)); }
  .board-toggle { display: flex; align-items: center; justify-content: flex-end; gap: 12px; border: 0; background: none; color: var(--on-deep); font-weight: 700; font-size: 14px; cursor: pointer; min-height: 44px; padding: 0; }
  .board-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; transition: transform .2s; }
  .board-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .bt-d { display: none; }
  .bt-groups { display: inline-flex; gap: 4px; }
  .bt-groups i { width: 10px; height: 10px; border-radius: 50%; background: var(--ok-on-deep); }
  .bt-groups i.miss { background: transparent; box-shadow: inset 0 0 0 2px var(--bad-on-deep); }
  .board-more { display: none; grid-column: 1 / -1; padding-bottom: 6px; }
  .cmp.board-open .board-more { display: grid; }
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .hh-board { border-radius: var(--radius) var(--radius) 0 0; }
  .hh-carpet { border-radius: 0 0 var(--radius) var(--radius); }
  .home-hero.is-new .hh-carpet { max-width: 520px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .gains { grid-template-columns: 1fr; }
  .train-head { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .floor-grid { grid-template-columns: 1fr; }
  .floor-map { max-width: 460px; }
  .club-headrow { display: none; }
  .club-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 14px 4px; }
  .c-name { grid-column: 1; grid-row: 1; }
  .c-total { grid-column: 2; grid-row: 1; text-align: right; }
  .c-app { grid-column: 1; grid-row: 2; }
  .c-d { grid-column: 2; grid-row: 2; text-align: right; }
  .c-trend, .c-ded { grid-column: 1 / -1; }
  .c-k { display: block; font-family: var(--font-body); font-style: normal; font-stretch: 100%; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
  .c-d .c-k { display: inline; margin-right: 6px; }
  .club-sum { grid-template-columns: 1fr 1fr; }
  .club-sum div:nth-child(3) { border-left: 0; }
  .club-sum div:nth-child(n+3) { border-top: 1px solid var(--deep-line); }
  .club-sum .wide { grid-column: 1 / -1; border-left: 0; }
  .drill-rows { grid-template-columns: 1fr; }
  .coach-dl { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 820px) {
  .topbar-in { padding: 0 16px; height: 56px; gap: 12px; }
  .nav { display: none; }
  .brand-name { font-size: calc(22px * max(var(--display-scale), .8)); }
  .theme-btn { padding: 0 10px; }
  #theme-btn-label { display: none; }
  .save-ind { padding: 0 8px; }
  main { padding: 24px 16px 132px; }
  body[data-route="composer"] main { padding-top: 0; }
  .footer { padding: 16px 16px 100px; }
  .footer-data { margin-left: 0; padding: 0; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; position: relative; cursor: pointer; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button svg circle { fill: currentColor; stroke: none; }
  .tabbar a[aria-current="page"], .tabbar button.is-current { color: var(--accent-text); }
  .tabbar a[aria-current="page"]::before, .tabbar button.is-current::before { content: ""; position: absolute; top: -5px; left: 28%; right: 28%; height: 4px; background: var(--primary); }
  .more-sheet { display: grid; position: fixed; left: 8px; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 41; padding: 6px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-s); }
  .more-sheet[hidden] { display: none !important; }
  .more-sheet a, .more-sheet button { display: flex; align-items: center; min-height: 52px; padding: 0 14px; border: 0; background: none; text-align: left; color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; border-radius: var(--radius-s); cursor: pointer; }
  .more-sheet a[aria-current="page"] { background: var(--sunk); box-shadow: inset 4px 0 0 var(--primary); }
  .theme-list { position: fixed; left: 8px; right: 8px; top: 60px; width: auto; max-height: 70vh; overflow: auto; }
  .toast-region { bottom: calc(80px + env(safe-area-inset-bottom)); }
  body[data-route="composer"] .toast-region { bottom: calc(144px + env(safe-area-inset-bottom)); }

  .home { gap: 36px; }
  .hh-board { padding: 24px 20px; gap: 14px; }
  .hh-parts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hh-parts div { padding-right: 8px; margin-right: 10px; }
  .hh-parts dt { font-size: 13px; }
  .hh-parts dd { font-size: calc(28px * var(--display-scale)); }
  .hh-carpet { padding: 20px; }
  .hh-lede { font-size: 17px; }
  .quick { grid-template-columns: 1fr; }
  .quick-a, .quick-a + .quick-a { padding: 16px 0; border-left: 0; }
  .quick-a + .quick-a { border-top: 1px solid var(--line); }
  .quick-a { grid-template-columns: 56px minmax(0, 1fr); }
  .quick-art { width: 56px; height: 56px; }
  .hist-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .hist-tools { grid-column: 2 / -1; justify-content: flex-end; }

  .analyse { gap: 32px; }
  .hero-lede { font-size: 17px; margin-bottom: 28px; }
  .step { grid-template-columns: 1fr; gap: 10px; }
  .step-n { font-size: calc(36px * var(--display-scale)); }
  .app-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tips { padding: 22px 18px; }

  .res-hero { padding: 22px 18px 24px; gap: 18px; }
  .rh-art { width: 220px; height: 280px; right: -40px; }
  .rh-score { grid-template-columns: 1fr; gap: 12px; }
  .rh-parts div { padding: 12px 10px 12px 0; }
  .rh-parts div:nth-child(even) { padding-left: 12px; }
  .rh-parts dd { font-size: calc(36px * var(--display-scale)); }
  .rh-acts { width: 100%; }
  .rh-acts .btn { flex: 1 1 auto; }
  .gains { padding: 22px 18px; margin: 16px 0 32px; }
  .gains-list li { grid-template-columns: 96px minmax(0, 1fr); }
  .gains-list li > :nth-child(3) { grid-column: 1 / -1; justify-self: start; }
  .g-v { font-size: calc(40px * var(--display-scale)); }
  .gains-list li.is-sample .g-v { font-size: calc(28px * var(--display-scale)); }
  .el-top { grid-template-columns: 44px 44px minmax(0, 1fr) auto; gap: 4px 10px; }
  .el-art { width: 44px; height: 44px; }
  .el-value { font-size: calc(32px * var(--display-scale)); }
  .coach, .choice { margin-left: 0; }
  .choice-opts { grid-template-columns: 1fr; }
  .fix-btn { margin-left: 0; }
  .tl-grid { grid-template-columns: 0 minmax(0, 1fr); }
  .tl-lane-label { visibility: hidden; }
  .tl-mark { width: 30px; height: 30px; }
  .tl-mark .glyph { width: 15px; height: 15px; }
  .tl-mark::before { inset: -7px; }
  .player .no-video { aspect-ratio: 16 / 6; }
  .review-card { grid-template-columns: 24px minmax(0, 1fr); }
  .review-card .btn-quiet { grid-column: 2; justify-self: start; }
  .unlock { padding: 22px; top: 24px; }
  .unlock h2 { font-size: calc(34px * var(--display-scale)); }

  /* composer on a phone: sticky scoreboard strip, the library is a sheet opened by "Add elements" */
  .cmp-head { margin: 16px 0 12px; gap: 10px; }
  .cmp-name { font-size: calc(36px * var(--display-scale)); }
  .cmp-bar { gap: 8px; }
  .cmp-bar > .seg:not(.seg-app) span { min-height: 36px; padding: 0 12px; }
  .cmp-bar .btn-sm { min-height: 44px; padding: 0 10px; font-size: 14px; }
  .seg-app { order: -1; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .seg-app span { justify-content: center; padding: 0 6px; flex-direction: column; gap: 0; min-height: 52px; font-size: 13px; }
  .cmp-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .board { grid-column: 1; grid-row: 1; top: 56px; margin: 0 -16px 8px; border-radius: 0; padding: 10px 16px; }
  .routine { grid-column: 1; grid-row: 2; }
  .board-d { font-size: calc(48px * var(--display-scale)); }
  .board-eq { display: none; }
  .board-toggle { gap: 8px; font-size: 13px; }
  .lib {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: min(84vh, 760px); z-index: 60; grid-row: auto;
    background: var(--bg); padding: 14px 16px 0; border-radius: 16px 16px 0 0; transform: translateY(105%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -20px 60px -20px var(--scrim); visibility: hidden;
  }
  .cmp.lib-open .lib { transform: none; visibility: visible; box-shadow: 0 0 0 100vmax var(--scrim); }
  .lib-mini { display: inline-block; margin-left: auto; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: 24px; color: var(--accent-text); }
  .lib-done { display: inline-flex; }
  .lib-hint { display: none; }
  .fab {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 35;
    min-height: 56px; padding: 0 22px; border: 0; border-radius: var(--radius-s); background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 16px;
    box-shadow: 0 12px 28px -10px var(--scrim); cursor: pointer;
  }
  .fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
  .rt-row { grid-template-columns: 28px 40px minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 0; }
  .rt-idx { display: none; }
  .grip { width: 28px; height: 40px; }
  .rt-art { width: 40px; height: 40px; padding: 4px; }
  .rt-v { font-size: calc(28px * var(--display-scale)); padding-top: 4px; }
  .rt-tools { grid-column: 3 / -1; justify-content: flex-end; margin-top: -6px; }
  .rt-empty { grid-template-columns: 1fr; }
  .rt-ctl { margin-left: -50px; }
  .crit { font-size: 12.5px; padding: 0 9px; min-height: 36px; }
  .rt-empty-art { max-width: 150px; }

  .train { gap: 32px; }
  .th-board { flex-wrap: wrap; }
  .th-stat { flex: 1 1 33%; min-width: 0; padding: 14px 14px; }
  .th-n { font-size: calc(44px * var(--display-scale)); }
  .drill { grid-template-columns: auto 64px minmax(0, 1fr); gap: 12px; }
  .drill:not(:has(.check-btn)) { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .drill-art { width: 64px; height: 64px; padding: 6px; }
  .drill .drill-del { position: absolute; right: -8px; top: 14px; }
  .drill-main { padding-right: 36px; }
  .drill:not(:has(.check-btn)) { grid-template-columns: 64px minmax(0, 1fr); }
  .drill-dose { font-size: calc(24px * var(--display-scale)); }
  .drill-name { font-size: 18px; }
  .train-empty { grid-template-columns: 1fr; }
  .wk-row { grid-template-columns: minmax(0, 1fr) repeat(7, 30px); gap: 3px; }
  .wk-cell { width: 30px; height: 30px; }
  .drill-row { grid-template-columns: 48px minmax(0, 1fr); }
  .drill-row .drill-art { width: 48px; height: 48px; }
  .drill-row .drill-btn { grid-column: 2; justify-self: start; }

  .verdict { grid-template-columns: 1fr; padding: 22px 18px; }
  .plans { display: none; }
  .plans-mobile { display: block; }
  .unlock-opt > span { grid-template-columns: 22px 1fr; }
  .unlock-opt .price { grid-column: 2; text-align: left; }
  .dlg-head, .dlg-body, .dlg-foot { padding-left: 16px; padding-right: 16px; }
  .data-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .data-sum dd { font-size: 32px; }
  .share-preview canvas { height: min(46vh, 420px); }
  .seg small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .floor-legend { grid-template-columns: 1fr; }
  .empty-art { grid-template-columns: 1fr; }
  .empty-pose { width: 120px; height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hh-carpet-play .ca-path, .rt-empty-art .ca-path { stroke-dashoffset: 0; }
  .hh-carpet-play .ca-mark { opacity: 1; }
}

/* ---------- video check (views/analyse.js, lib/videocheck.js) ---------- */
.vcheck { display: grid; gap: 16px; margin-top: 4px; padding: 22px 22px 18px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: var(--radius-s); }
.vcheck[data-status="pass"] { border-top-color: var(--ok); }
.vcheck[data-status="warn"] { border-top-color: var(--signal); }
.vcheck[data-status="fail"] { border-top-color: var(--bad); }
.vc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.vc-title { font-size: 17px; font-weight: 700; }
.vc-headline { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-size: calc(30px * var(--display-scale)); line-height: 1; margin-top: 6px; }
.vcheck[data-status="fail"] .vc-headline { color: var(--bad); }
.vc-score, .vc-progress { font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(34px * var(--display-scale)); line-height: 1; color: var(--accent-text); }
.vc-score small { font-size: .5em; color: var(--muted); }
.vc-sum { font-size: 15px; max-width: 64ch; }
.vc-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.vc-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.vc-mark { width: 26px; height: 26px; border-radius: var(--radius-s); display: grid; place-items: center; background: var(--sunk); color: var(--muted); }
.vc-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.vc-row[data-s="pass"] .vc-mark { background: var(--ok); color: #fff; }
.vc-row[data-s="warn"] .vc-mark { background: var(--signal); color: var(--on-signal); }
.vc-row[data-s="fail"] .vc-mark { background: var(--bad); color: #fff; }
.vc-row[data-s="todo"] .vc-mark { background: var(--primary); color: var(--on-primary); }
.vc-row[data-s="pending"] .vc-mark svg { stroke-dasharray: 20 12; animation: vc-spin 1s linear infinite; transform-origin: 12px 12px; }
@keyframes vc-spin { to { transform: rotate(360deg); } }
.vc-main { display: grid; gap: 6px; min-width: 0; }
.vc-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.vc-val { font-weight: 700; font-size: 15px; color: var(--ink); }
.vc-row[data-s="pending"] .vc-val, .vc-row[data-s="unknown"] .vc-val { color: var(--muted); font-weight: 500; }
.vc-text { font-size: 15px; color: var(--muted); max-width: 70ch; }
.vc-ct-btn { justify-self: start; margin-top: 4px; }
.vc-fix summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--accent-text); min-height: 32px; display: inline-flex; align-items: center; }
.vc-fix p { font-size: 14px; margin: 4px 0 6px; max-width: 70ch; }
.vc-fix a { font-size: 14px; font-weight: 600; }
.vc-sheet { display: grid; gap: 10px; }
.vc-sheet-t { font-size: 14px; color: var(--muted); }
.vc-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.vc-thumb { position: relative; margin: 0; }
.vc-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-s); background: #0d0f14; }
.vc-thumb i { position: absolute; border: 2px solid var(--signal); border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.vc-thumb.is-moved img { outline: 2px solid var(--bad); outline-offset: -2px; }
.vc-thumb figcaption { font-size: 12px; color: var(--muted); margin-top: 3px; }
.vc-foot { font-size: 13px; }
.vc-pill { display: inline-block; padding: 3px 10px; border-radius: var(--radius-s); font-size: 13px; font-weight: 700; background: var(--sunk); color: var(--ink); }
.vc-pill[data-s="pass"] { background: var(--ok); color: #fff; }
.vc-pill[data-s="warn"] { background: var(--signal); color: var(--on-signal); }
.vc-pill[data-s="fail"] { background: var(--bad); color: #fff; }

/* carpet corners tool */
.ct { display: grid; gap: 12px; padding-top: 4px; }
.ct-help { font-size: 15px; max-width: 72ch; }
.ct-svg { width: 100%; height: auto; display: block; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: var(--radius-s); }
.ct-bleed { fill: var(--sunk); }
.ct-frame { fill: none; stroke: var(--ink); stroke-dasharray: 8 6; }
.ct-poly { fill: rgba(255, 196, 0, .2); stroke: var(--signal); stroke-linejoin: round; }
.ct-h { cursor: grab; outline: none; }
.ct-h.is-drag { cursor: grabbing; }
.ct-hit { fill: transparent; }
.ct-dot { fill: var(--primary); stroke: #fff; }
.ct-h.is-out .ct-dot { fill: var(--bad); }
.ct-h:focus-visible .ct-dot { stroke: var(--signal); stroke-width: 6; }
.ct-h text { fill: #fff; text-anchor: middle; font-family: var(--font-body); font-weight: 700; pointer-events: none; }

/* Analyse aside link + Results note */
.tips-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--accent-on-deep); font-weight: 700; text-decoration: none; }
.tips-more:hover { text-decoration: underline; }
.tips-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.res-quality { margin: 20px 0 0; padding: 14px 18px; border-left: 4px solid var(--signal); background: var(--sunk); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: 15px; }
.res-quality[data-s="fail"] { border-left-color: var(--bad); }

/* ---------- filming guide (views/filming.js) ---------- */
.filming { display: grid; gap: 64px; }
.fg-head { margin-bottom: 0; }
.fg-plan { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; padding: 32px; background: var(--deep); color: var(--on-deep); border-radius: var(--radius); }
.fg-view { margin: 0; display: grid; gap: 10px; }
.fg-view svg { width: 100%; height: auto; }
.fg-view figcaption { color: var(--on-deep-muted); font-size: 15px; }
.fg-view figcaption b { color: var(--on-deep); }
.fg-carpet { fill: var(--carpet); }
.fg-line { fill: none; stroke: #fff; stroke-width: 1.5; }
.fg-dash { stroke-dasharray: 3 5; stroke-width: 1; opacity: .7; }
.fg-cone { fill: var(--accent-on-deep); opacity: .14; }
.fg-cone-line { fill: none; stroke: var(--accent-on-deep); stroke-width: 1.2; stroke-dasharray: 4 4; }
.fg-phone { fill: var(--accent-on-deep); }
.fg-judges { fill: var(--on-deep-muted); opacity: .45; }
.fg-dim { fill: none; stroke: var(--on-deep-muted); stroke-width: 1.2; }
.fg-ground { fill: none; stroke: var(--deep-line); stroke-width: 2; }
.fg-tripod { fill: none; stroke: var(--on-deep-muted); stroke-width: 2.4; stroke-linecap: round; }
.fg-view text { font-family: var(--font-body); }
.fg-small { font-size: 11px; fill: var(--on-deep-muted); }
.fg-num { font-size: 15px; font-weight: 700; fill: var(--on-deep); }
.fg-small.fg-on-carpet { fill: #fff; }

.fg-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.fg-rule { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.fg-rule:nth-child(-n+2) { border-top: 3px solid var(--ink); }
.fg-n { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: calc(56px * var(--display-scale)); line-height: .85; color: var(--accent-text); }
.fg-rt { font-size: 22px; font-weight: 700; line-height: 1.2; }
.fg-rr { font-size: 17px; margin-top: 8px; }
.fg-why { font-size: 15px; color: var(--muted); margin-top: 10px; }
.fg-why b { color: var(--ink); }

.fg-calc { display: grid; gap: 20px; scroll-margin-top: 96px; }
.fg-calc-head { display: grid; gap: 10px; max-width: 72ch; }
.fg-calc-head .h2 { font-size: calc(clamp(32px, 4vw, 48px) * var(--display-scale)); }
.fg-ctrls { display: flex; flex-wrap: wrap; gap: 12px; }
.fg-calc-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); gap: 24px 32px; align-items: start; }
.fg-frame { margin: 0; display: grid; gap: 10px; grid-row: span 2; }
.fg-frame svg { width: 100%; height: auto; border-radius: var(--radius-s); display: block; }
.fg-frame figcaption { font-size: 15px; }
.fg-f-bg { fill: var(--deep); }
.fg-f-wall { fill: rgba(255, 255, 255, .05); }
.fg-f-carpet { fill: var(--carpet); }
.fg-f-lines { stroke: rgba(255, 255, 255, .45); stroke-dasharray: 6 8; fill: none; }
.fg-fig circle { fill: var(--fig); }
.fg-fig path { stroke: var(--fig); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fg-fig text { fill: var(--fig); font-family: var(--font-body); font-weight: 700; }
.fg-fig[data-s="pass"] { --fig: var(--ok-on-deep); }
.fg-fig[data-s="warn"] { --fig: var(--accent-on-deep); }
.fg-fig[data-s="fail"] { --fig: var(--bad-on-deep); }
.fg-f-tag { fill: var(--on-deep-muted); font-family: var(--font-body); }
.fg-read { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.fg-read > div { padding: 12px 14px; background: var(--sunk); border-left: 4px solid var(--line); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.fg-read > div[data-s="pass"] { border-left-color: var(--ok); }
.fg-read > div[data-s="warn"] { border-left-color: var(--signal); }
.fg-read > div[data-s="fail"] { border-left-color: var(--bad); }
.fg-read dt { font-size: 13px; color: var(--muted); }
.fg-read dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(30px * var(--display-scale)); line-height: 1; }

.fg-settings, .fg-table-wrap { display: grid; gap: 16px; }
.fg-settings .h2, .fg-table-wrap .h2 { font-size: calc(clamp(32px, 4vw, 48px) * var(--display-scale)); }
.fg-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.fg-cols > div { display: grid; gap: 12px; align-content: start; padding-top: 18px; border-top: 3px solid var(--ink); }
.fg-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 16px; }
.fg-scroll { overflow-x: auto; }
.fg-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.fg-table th, .fg-table td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fg-table thead th { border-bottom: 3px solid var(--ink); }
.fg-table tbody th { font-weight: 700; white-space: nowrap; }

.fg-why-box { padding: 32px; background: var(--deep); color: var(--on-deep); border-radius: var(--radius); display: grid; gap: 22px; }
.fg-why-box ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.fg-why-box li { display: grid; gap: 8px; align-content: start; }
.fg-why-box li b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(44px * var(--display-scale)); line-height: .9; color: var(--accent-on-deep); }
.fg-why-box li span { color: var(--on-deep-muted); font-size: 15px; }

@media (max-width: 900px) {
  .fg-plan, .fg-rules, .fg-calc-body, .fg-cols, .fg-why-box ul { grid-template-columns: 1fr; }
  .fg-plan, .fg-why-box { padding: 22px 18px; }
  .fg-rule:nth-child(2) { border-top: 1px solid var(--line); }
  .vc-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .vcheck { padding: 18px 14px 14px; }
  .vc-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fg-rule { grid-template-columns: 44px minmax(0, 1fr); }
  .fg-n { font-size: calc(40px * var(--display-scale)); }
}

/* ---------- declared routines (views/routines.js, analyse step 2, composer modes, results check) ---------- */
.rtn-head { display: grid; gap: 12px; margin-bottom: 28px; max-width: 760px; }
.rtn-count { font-weight: 700; color: var(--muted); }
.rtn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.rtn-card { display: grid; gap: 14px; align-content: start; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rtn-card.is-filled { border-top-color: var(--ink); }
.rtn-top { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.rtn-art svg { width: 48px; height: 48px; fill: none; stroke: var(--ink); stroke-width: 2.6; }
.rtn-art svg .thin { stroke-width: 1.4; }
.rtn-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 26px; line-height: 1; text-transform: uppercase; }
.rtn-meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.rtn-d { display: grid; justify-items: end; }
.rtn-d .num { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 36px; line-height: 1; }
.rtn-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rtn-strip { display: flex; flex-wrap: wrap; gap: 3px; }
.rtn-strip i { display: grid; place-items: center; width: 24px; height: 24px; background: var(--sunk); border-radius: var(--radius-s); }
.rtn-strip i.k-DA { background: var(--ink); }
.rtn-strip i.k-DA svg { stroke: #fff; }
.rtn-strip i.k-R { background: var(--signal); }
.rtn-strip svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rtn-strip svg .fill { fill: currentColor; }
.rtn-sub { color: var(--muted); font-size: 14px; }
.rtn-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.rtn-ways { display: grid; gap: 8px; }
.rtn-way { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.rtn-way span { color: var(--muted); font-size: 14px; }
.rtn-way select { margin-top: 6px; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.rtn-way:hover { border-color: var(--ink); }
.rtn-way.is-main { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.rtn-way.is-main span { color: var(--on-primary); opacity: .85; }
.rtn-how { margin-top: 40px; padding-top: 20px; border-top: 3px solid var(--ink); max-width: 760px; display: grid; gap: 12px; }
.rtn-how ol { display: grid; gap: 10px; padding-left: 20px; }
.rtn-acts .is-bad { color: var(--bad); }

.decl-card { display: grid; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 0 var(--radius-s) var(--radius-s) 0; background: var(--surface); }
.decl-card.is-none, .decl-card.is-off { border-left-color: var(--signal); background: var(--sunk); }
.decl-use { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.decl-use input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.decl-use span { display: grid; gap: 2px; }
.decl-use small { color: var(--muted); font-size: 14px; }
.decl-changes { display: grid; gap: 4px; padding: 10px 12px; background: var(--sunk); border-radius: var(--radius-s); font-size: 14px; }
.decl-changes ul { padding-left: 18px; }
.decl-changes small { color: var(--muted); }

.mode-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; padding: 12px 16px; background: var(--deep); color: var(--on-deep); border-radius: var(--radius); }
.mode-bar > div { display: grid; gap: 2px; max-width: 720px; }
.mode-bar span { color: var(--on-deep-muted); font-size: 14px; }
.mode-bar.is-video { border-left: 6px solid var(--signal); }
.mode-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.mode-bar .btn-quiet, .mode-bar .btn-secondary { color: var(--on-deep); border-color: var(--deep-line); background: transparent; }

.decl { margin-top: 20px; padding: 20px 22px; border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: var(--radius); display: grid; gap: 14px; }
.decl-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: end; }
.decl-d { display: flex; gap: 22px; }
.decl-d div { display: grid; }
.decl-d dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.decl-d dd { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 30px; line-height: 1; }
.decl-d .is-down dd { color: var(--bad); }
.decl-demo { padding: 10px 14px; border-left: 4px solid var(--signal); background: var(--sunk); font-size: 14px; }
.decl-counts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.decl-counts li { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 12px; background: var(--sunk); border-radius: var(--radius-s); font-size: 14px; font-weight: 700; }
.decl-counts b { font-size: 20px; }
.decl-counts .is-different, .decl-counts .is-not_done { box-shadow: inset 0 -3px 0 var(--bad); }
.decl-list { list-style: none; padding: 0; display: grid; gap: 0; }
.decl-list li { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.decl-go { grid-column: 2; justify-self: start; font: inherit; font-weight: 700; color: var(--ink); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
button.decl-go:hover { text-decoration: underline; }
.decl-list .dchip { grid-row: span 2; align-self: start; }
.decl-what { grid-column: 2; color: var(--muted); font-size: 14px; }
.dchip { display: inline-flex; align-items: center; padding: 1px 8px; margin-left: 8px; border-radius: var(--radius-s); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: var(--sunk); color: var(--ink); white-space: nowrap; }
.decl-list .dchip { margin-left: 0; justify-self: start; }
.dchip.is-done { color: var(--ok); }
.dchip.is-different { background: var(--signal); color: var(--on-signal); }
.dchip.is-not_done { background: var(--bad); color: #fff; }
.dchip.is-unchecked { background: var(--line); }
.dchip.is-extra { background: var(--ink); color: #fff; }

@media (max-width: 820px) {
  .rtn-grid { grid-template-columns: 1fr; }
  .rtn-top { grid-template-columns: 40px minmax(0, 1fr); }
  .rtn-d { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; gap: 10px; align-items: baseline; }
  .decl-list li { grid-template-columns: 1fr; }
  .decl-list .dchip { grid-row: auto; }
  .decl-go, .decl-what { grid-column: 1; }
}

/* several routines per apparatus */
.rtn-app { margin-bottom: 36px; }
.rtn-app-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 3px solid var(--ink); }
.rtn-app-head .rtn-art svg { width: 36px; height: 36px; }
.rtn-app-t { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 32px; line-height: 1; text-transform: uppercase; }
.rtn-app-n { margin-left: auto; font-weight: 700; color: var(--muted); }
.rtn-app .rtn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rtn-app .rtn-top { grid-template-columns: minmax(0, 1fr) auto; }
.rtn-app .rtn-name { font-size: 22px; }
.rtn-card.is-main { border-top-color: var(--signal); border-top-width: 4px; }
.rtn-main { display: inline-block; padding: 0 6px; margin-right: 4px; background: var(--signal); color: var(--on-signal); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: var(--radius-s); }
.rtn-acts-2 { gap: 16px; font-size: 14px; }
.rtn-acts-2 .btn-link:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.rtn-acts-2 .is-bad { color: var(--bad); }
.rtn-add { border-style: dashed; border-top-style: dashed; }
.rtn-add-t { font-weight: 700; }
.rtn-add.is-full { background: var(--sunk); border-style: solid; }
.decl-pick { display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
.decl-pick select { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); max-width: 100%; }
@media (max-width: 1180px) { .rtn-app .rtn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .rtn-app .rtn-grid { grid-template-columns: 1fr; } .rtn-app .rtn-top { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Compare (views/compare.js): you vs a reference gymnast, element by element ---------- */
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.cmp-head h1 br { display: block; }
.cmp-example { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: baseline; padding: 14px 18px; margin-bottom: 24px; border: 2px dashed var(--ink); border-radius: var(--radius); font-size: 14px; }
.cmp-example b { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; background: var(--hi); color: var(--on-hi); padding: 2px 8px; border-radius: var(--radius-s); }
.cmp-who { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; position: relative; }
.cmp-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 6px; align-content: start; background: var(--surface); border-top: 6px solid var(--ink); }
.cmp-card.cmp-you { border-top-color: var(--primary); }
.cmp-side { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cmp-name { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-stretch: var(--display-stretch); font-size: calc(34px * var(--display-scale)); line-height: 1; }
.cmp-name small { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.cmp-card-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cmp-pick { display: block; margin-top: 10px; }
.cmp-pick select { width: 100%; font-size: 14px; }
.cmp-example.is-judge { border-style: solid; }
.cmp-example + .cmp-example { margin-top: -12px; }
.cmp-swap { grid-column: 1 / -1; justify-self: start; }

.cmp-board { background: var(--deep); color: var(--on-deep); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 40px; }
.cmp-board-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px 40px; }
.cmp-board-t { display: grid; gap: 10px; align-content: start; }
.cmp-board-t p { color: var(--on-deep-muted); }
.cmp-board-t .h2 { font-size: calc(40px * var(--display-scale)); }
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table th, .cmp-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--deep-line); font-size: 17px; }
.cmp-table thead th { font-size: 13px; color: var(--on-deep-muted); font-weight: 700; }
.cmp-table tbody th { text-align: left; font-weight: 700; }
.cmp-table tbody th small { display: block; font-weight: 400; font-size: 12px; color: var(--on-deep-muted); }
.cmp-table tr.is-total th, .cmp-table tr.is-total td { font-size: 24px; font-weight: 800; border-bottom: 0; border-top: 2px solid var(--on-deep); }
.cmp-board .cmp-gap { color: var(--accent-on-deep); }
.cmp-board .cmp-gap.is-you { color: var(--ok-on-deep); }
.cmp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; grid-column: 1 / -1; }
.cmp-facts div { border-top: 2px solid currentColor; padding-top: 8px; }
.cmp-facts dt { font-size: 13px; opacity: .8; }
.cmp-facts dd { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: calc(30px * var(--display-scale)); line-height: 1.05; }
.cmp-facts dd span, .cmp-facts dd small { font-family: var(--font-body); font-size: 13px; font-weight: 600; opacity: .75; }
.cmp-facts-lg { margin: 16px 0 24px; }

.cmp-gap { font-weight: 800; font-size: 14px; white-space: nowrap; color: var(--ink); }
.cmp-gap.is-you { color: var(--ok); }
.cmp-gap.is-even { color: var(--muted); }

.cmp-tl { margin-bottom: 24px; }
.cmp-tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 12px; }
.cmp-tl-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; position: relative; }
.cmp-lane-name { font-size: 13px; font-weight: 800; }
.cmp-lane-name span { font-weight: 500; color: var(--muted); }
.cmp-lane-name.is-you { color: var(--accent-text); }
.cmp-svg { width: 100%; height: auto; overflow: visible; margin: 4px 0; }
.cmp-axis { stroke: var(--line); stroke-width: 2; }
.cmp-tick { font-size: 13px; fill: var(--muted); text-anchor: middle; font-family: var(--font-body); }
.cmp-link { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .55; }
.cmp-link.t-3 { stroke: var(--ink); stroke-width: 2.5; opacity: .8; }
.cmp-link.t-2 { stroke: var(--ink); stroke-width: 1.5; }
.cmp-link.t-1 { stroke-dasharray: 5 5; }
.cmp-link.is-sel { stroke: var(--primary); stroke-width: 4; opacity: 1; stroke-dasharray: none; }
.cmp-m { cursor: pointer; outline: none; }
.cmp-m circle, .cmp-m path, .cmp-m rect { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.cmp-m.k-R path { fill: var(--hi); stroke: var(--on-hi); }
.cmp-m.k-DA rect { fill: var(--ink); }
.cmp-m.is-zero circle, .cmp-m.is-zero path, .cmp-m.is-zero rect { stroke: var(--bad); stroke-dasharray: 4 3; fill: var(--surface); }
.cmp-m:hover circle, .cmp-m:hover path, .cmp-m:hover rect, .cmp-m:focus-visible circle, .cmp-m:focus-visible path, .cmp-m:focus-visible rect { stroke: var(--primary); stroke-width: 4; }
.cmp-m.is-sel circle, .cmp-m.is-sel path, .cmp-m.is-sel rect { fill: var(--primary); stroke: var(--primary); }
.cmp-q { font-size: 15px; font-weight: 900; fill: var(--ink); paint-order: stroke; stroke: var(--hi); stroke-width: 5px; font-family: var(--font-body); }
.cmp-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); }
.cmp-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cmp-legend svg { width: 20px; height: 20px; }
.cmp-legend svg[viewBox^="0 0 28"] { width: 28px; }
.cmp-legend .lg-db { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.cmp-legend .lg-r { fill: var(--hi); stroke: var(--on-hi); stroke-width: 2; }
.cmp-legend .lg-da { fill: var(--ink); }
.cmp-legend .lg-zero { fill: none; stroke: var(--bad); stroke-width: 2.5; stroke-dasharray: 3 2; }
.cmp-legend .lg-t3 { stroke: var(--ink); stroke-width: 2.5; }
.cmp-legend .lg-t1 { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }

.cmp-watch { margin-bottom: 40px; scroll-margin-top: 80px; }
.cmp-vids { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp-vids figure { margin: 0; display: grid; gap: 6px; }
.cmp-vids figcaption { font-weight: 800; font-size: 14px; display: flex; gap: 8px; }
.cmp-vids figcaption .num { color: var(--muted); font-weight: 600; }
.cmp-vids video { width: 100%; aspect-ratio: 16 / 9; background: #0d0f14; border-radius: var(--radius); object-fit: contain; }
.cmp-novideo { aspect-ratio: 16 / 9; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 16px; background: var(--sunk); border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.cmp-sel { margin-top: 16px; border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 12px; }
.cmp-sel-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.cmp-sel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp-sel-el { display: grid; gap: 4px; align-content: start; position: relative; padding-right: 64px; }
.cmp-sel-el b { font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cmp-sel-el .cmp-v { position: absolute; right: 0; top: 0; }
.cmp-sel-el.is-none b { color: var(--muted); }
.cmp-sel-acts { margin-top: 4px; }
.cmp-diffs { margin: 0; padding: 0 0 0 18px; display: grid; gap: 2px; font-size: 15px; }
.cmp-code { color: var(--muted); }
.cmp-v { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: calc(32px * var(--display-scale)); line-height: 1; }
.cmp-v.zero { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.cmp-read { font-size: 13px; background: var(--sunk); border-radius: var(--radius-s); padding: 4px 8px; justify-self: start; }
.cmp-read small { color: var(--muted); }

.cmp-moves { margin: 0 0 40px; background: var(--hi); color: var(--on-hi); border-radius: var(--radius); padding: 32px 40px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 24px 48px; }
.cmp-moves .gains-list li { grid-template-columns: 150px minmax(0, 1fr) auto; }

.cmp-detail { margin-bottom: 32px; }
.cmp-detail .hint { margin: 14px 0 8px; }
.cmp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: 13px; font-weight: 800; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.cmp-cols span:last-child { color: var(--accent-text); }
.cmp-pairs { list-style: none; margin: 0; padding: 0; }
.cmp-pair { position: relative; padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.cmp-pair.is-sel { background: var(--sunk); box-shadow: -14px 0 0 var(--sunk), 14px 0 0 var(--sunk); }
.cmp-pair-btn { position: absolute; inset: 0; width: 100%; border: 0; background: none; cursor: pointer; padding: 0; }
.cmp-pair-btn:hover { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.cmp-pair-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; position: relative; pointer-events: none; }
.cmp-pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; position: relative; pointer-events: none; }
.cmp-pair .cmp-diffs { position: relative; pointer-events: none; color: var(--ink); }
.cmp-cell { display: grid; grid-template-columns: 40px 32px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; }
.cmp-cell.is-none { display: block; color: var(--muted); font-style: italic; padding-top: 6px; }
.cmp-time { font-weight: 700; font-size: 14px; padding-top: 3px; }
.cmp-art { width: 32px; height: 32px; display: grid; place-items: center; background: var(--sunk); border-radius: var(--radius-s); }
.cmp-art svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cmp-art svg .fill { fill: currentColor; }
.cmp-id { display: grid; gap: 2px; min-width: 0; }
.cmp-id b { font-size: 15px; line-height: 1.3; }
.cmp-id b .qm { display: inline-grid; vertical-align: middle; margin-left: 4px; }
.cmp-id small { color: var(--muted); font-size: 13px; }
.cmp-cell .cmp-v { font-size: calc(26px * var(--display-scale)); }
.cmp-da-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 40px; margin: 16px 0 24px; align-items: start; }
.cmp-da-top .cmp-facts { grid-template-columns: 1fr 1fr; }
.cmp-crit { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp-crit caption { text-align: left; color: var(--muted); padding-bottom: 6px; }
.cmp-crit th, .cmp-crit td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.cmp-crit thead th { font-size: 12px; color: var(--muted); }
.cmp-crit td { width: 30%; }
.cmp-crit td .num { font-weight: 700; margin-left: 6px; }
.crit-bar { display: inline-block; vertical-align: middle; height: 10px; width: calc(var(--w) * .8); min-width: 2px; background: var(--primary); border-radius: 2px; }
.crit-bar.is-ref { background: var(--ink); }
.cmp-foot { max-width: 80ch; }

@media (max-width: 900px) {
  .cmp-board-in, .cmp-moves, .cmp-da-top { grid-template-columns: 1fr; }
  .cmp-facts { grid-template-columns: 1fr 1fr; }
  .cmp-moves { padding: 24px 20px; }
}
@media (max-width: 640px) {
  .cmp-who, .cmp-vids, .cmp-sel-grid, .cmp-pair-grid, .cmp-cols { grid-template-columns: 1fr; }
  .cmp-cols { display: none; }
  .cmp-pair-grid > .cmp-cell:last-child { border-left: 4px solid var(--primary); padding-left: 10px; }
  .cmp-board { padding: 22px 18px; }
  .cmp-table th, .cmp-table td { padding: 6px 4px; font-size: 15px; }
  .cmp-moves .gains-list li { grid-template-columns: 1fr; gap: 2px; }
  .cmp-moves .g-v { font-size: calc(40px * var(--display-scale)); }
  .cmp-moves .g-go { justify-self: start; }
  .cmp-cell { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .cmp-cell .cmp-art { display: none; }
  .cmp-tl-box { overflow-x: auto; }
  .cmp-svg { min-width: 760px; }
}

/* ---------- account (public site) ---------- */
.acc-btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
.acc-btn.is-in { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.account { max-width: 560px; }
.acc-card { display: grid; gap: 16px; padding: 24px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.acc-form { display: grid; gap: 16px; }
.acc-form .btn { justify-content: center; }
.acc-google { justify-content: center; gap: 10px; }
.acc-google .g-logo { width: 20px; height: 20px; flex: none; }
.acc-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 0; color: var(--muted); font-size: 14px; }
.acc-or::before, .acc-or::after { content: ""; border-top: 1px solid var(--line); }
.acc-age { align-items: flex-start; min-height: 0; font-size: 15px; }
.acc-age input { margin-top: 3px; width: 20px; height: 20px; flex: none; }
.acc-err { margin: 0; color: var(--bad); font-weight: 600; }
.acc-sent { margin-bottom: 20px; padding: 16px 18px; border-left: 4px solid var(--primary); background: var(--sunk); border-radius: var(--radius-s); }
.acc-sent p { margin: 6px 0 0; }
.acc-switch, .acc-note { margin: 0; }
.acc-note { margin-top: 16px; }
.acc-acts { margin-top: 20px; }
.acc-del { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.acc-del summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.acc-del p { margin: 10px 0 12px; max-width: 52ch; }
.acc-del .acc-del-go { color: var(--bad); border-color: var(--bad); }
.acc-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acc-choose .btn { display: grid; justify-items: start; gap: 2px; min-height: 64px; padding: 10px 14px; text-align: left; }
.acc-choose small { color: var(--muted); font-weight: 500; }
button.link { padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.soon-card { display: grid; gap: 12px; justify-items: start; padding: 20px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.soon-card p { margin: 0; max-width: 52ch; }
.account .page-head h1 { font-size: calc(clamp(40px, 6vw, 72px) * var(--display-scale)); }
@media (max-width: 900px) {
  .top-tools .acc-btn { min-height: 36px; padding: 0 10px; font-size: 13px; }
  .top-tools:has(.acc-btn) #save-label { display: none; }
}

/* ---------- my competitions (views/competitions.js) and the profile tabs ---------- */
.sub-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.sub-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sub-tabs a:hover { color: var(--ink); }
.sub-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.cmpt { display: grid; gap: 32px; }
.cmpt > .btn { justify-self: start; }
.cmpt-empty { color: var(--muted); max-width: 60ch; }
.cmpt-sec { display: grid; gap: 16px; }
.cmpt-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cmpt-chart { margin: 0; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: var(--radius); display: grid; gap: 10px; }
.cmpt-chart figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.cmpt-app { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 24px; text-transform: uppercase; line-height: 1; }
.cmpt-app svg { width: 32px; height: 32px; fill: none; stroke: var(--ink); stroke-width: 2.6; }
.cmpt-app svg .thin { stroke-width: 1.4; }
.cmpt-app.sm { font-size: 16px; color: var(--muted); }
.cmpt-app.sm svg { width: 22px; height: 22px; stroke: var(--muted); }
.cmpt-last { justify-self: end; display: inline-flex; align-items: baseline; gap: 8px; }
.cmpt-last .num { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 36px; line-height: 1; }
.cmpt-chg { font-weight: 700; font-size: 15px; color: var(--muted); }
.cmpt-chg.up { color: var(--ok); }
.cmpt-chg.down { color: var(--bad); }
.cmpt-best { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.cmpt-plot { width: 100%; height: auto; display: block; overflow: visible; }
.cmpt-chart .grid { stroke: var(--line); stroke-width: 1; }
.cmpt-chart .tick { fill: var(--muted); font-size: 13px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.cmpt-chart .ln { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cmpt-chart .dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.cmpt-chart .hit { fill: transparent; }
.cmpt-chart .pt { cursor: default; outline: none; }
.cmpt-chart .pt:hover .dot, .cmpt-chart .pt:focus-visible .dot { r: 7; fill: var(--ink); }
.cmpt-chart .pt:focus-visible .hit { stroke: var(--primary); stroke-width: 2; }
.cmpt-tip { font-size: 14px; font-weight: 600; min-height: 1.4em; }
.cmpt-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.cmpt-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px 20px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cmpt-when { display: grid; gap: 6px; font-weight: 700; }
.cmpt-what { display: grid; gap: 6px; min-width: 0; }
.cmpt-sc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-variant-numeric: tabular-nums; }
.cmpt-warn { color: var(--bad); }
.cmpt-tot { display: grid; justify-items: end; gap: 4px; }
.cmpt-tot .num { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 40px; line-height: 1; }
.cmpt-acts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-left: -4px; }
.cmpt-form { display: grid; gap: 20px; padding: 24px; border: 1px solid var(--line); border-top: 3px solid var(--signal); border-radius: var(--radius); max-width: 880px; }
.cf-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.cf-row .field { min-width: 150px; }
.cf-grow { flex: 1 1 260px; }
.cf-scores { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.cf-scores legend { margin-bottom: 8px; }
.cf-num .input { text-align: right; font-variant-numeric: tabular-nums; padding: 0 10px; }
.cf-sum { grid-column: 1 / -1; }
.cf-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cf-photo img { max-width: 200px; max-height: 160px; border: 1px solid var(--line); border-radius: var(--radius-s); object-fit: contain; background: var(--sunk); }
.cf-errs:empty { display: none; }
.cf-errs { color: var(--bad); font-weight: 600; }
.cf-errs ul { margin: 0; padding-left: 20px; }
.cf-acts { display: flex; flex-wrap: wrap; gap: 12px; }
.cmpt-sheet { width: 100%; height: auto; display: block; }
@media (max-width: 760px) {
  .cmpt-charts { grid-template-columns: minmax(0, 1fr); }
  .cmpt-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cmpt-when { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
  .cmpt-acts { grid-column: 1 / -1; }
  .cf-scores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cmpt-form { padding: 18px; }
  .cf-row .field { flex: 1 1 140px; }
}

/* ---------- public site: the app is for signed-in people (app.js) ---------- */
body[data-auth="out"] .nav, body[data-auth="out"] .tabbar, body[data-auth="out"] .more-sheet,
body[data-auth="out"] .top-tools, body[data-auth="out"] .footer-data { display: none !important; }
/* until the session is known (accounts on: supabase metas), nothing of the app shows, not even for a moment */
html:has(meta[name="supabase-url"]) body:not([data-auth]) :is(.nav, .tabbar, .more-sheet, .top-tools, .footer-data) { display: none !important; }
@media (max-width: 820px) {
  body[data-auth="out"] main { padding-bottom: 48px; }
  body[data-auth="out"] .footer { padding-bottom: 24px; }
}
.acc-gate { margin: 0 0 20px; padding: 14px 18px; border-left: 4px solid var(--primary); background: var(--sunk); border-radius: var(--radius-s); font-weight: 600; }

/* ---------- My account ---------- */
.account.account-in { max-width: 1040px; }
.acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.acc-grid .acc-profile { grid-row: span 2; }
.acc-grid h2 { margin: 0; }
.acc-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.acc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-opt { font-weight: 400; }
.acc-roles { margin: 0; padding: 0; border: 0; min-width: 0; }
.acc-seg { flex-wrap: wrap; }
.acc-list button, .acc-list .acc-comp { padding: 12px 0; }
.acc-comp { width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.acc-comp:hover .cr-main b { text-decoration: underline; text-underline-offset: 4px; }
.acc-list .cr-art { width: 40px; height: 40px; }
.acc-list .cr-d { font-size: calc(28px * var(--display-scale)); }
.acc-stats, .acc-facts { margin: 0; display: grid; gap: 0; }
.acc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px solid var(--ink); }
.acc-stats div { padding: 10px 0 0; }
.acc-stats dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.acc-stats dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(36px * var(--display-scale)); line-height: 1; }
.acc-facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.acc-facts dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.acc-facts dd { margin: 0; overflow-wrap: anywhere; }
.acc-more summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.acc-more .acc-form { margin-top: 8px; }
.acc-card .row { display: flex; flex-wrap: wrap; gap: 10px; }
.acc-card > p { margin: 0; }
p.acc-del { padding-top: 16px; }
@media (max-width: 820px) {
  .acc-grid { grid-template-columns: minmax(0, 1fr); }
  .acc-grid .acc-profile { grid-row: auto; }
  .acc-card { padding: 18px; }
}
@media (max-width: 420px) { .acc-two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- subscription screen (public site, free accounts) ---------- */
.paywall { max-width: 1040px; display: grid; gap: 32px; }
.pw-plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px solid var(--ink); }
.pw-plan { display: grid; align-content: start; gap: 12px; padding: 22px 22px 26px 0; }
.pw-plan + .pw-plan { padding-left: 22px; border-left: 1px solid var(--line); }
.pw-plan h2 { margin: 0; }
.pw-plan.is-top { background: var(--deep); color: var(--on-deep); padding-left: 22px; }
.pw-plan.is-top ul { color: var(--on-deep-muted); }
.pw-price { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(48px * var(--display-scale)); line-height: .9; }
.pw-price small { display: block; margin-top: 6px; font-family: var(--font-body); font-size: 14px; font-weight: 500; }
.pw-plan ul { margin: 0; padding-left: 18px; color: var(--muted); }
.pw-plan .chip { justify-self: start; }
.pw-free h2 { margin: 0 0 12px; }
.pw-quick { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.pw-quick .quick-a { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 820px) {
  .pw-plans { grid-template-columns: minmax(0, 1fr); }
  .pw-plan, .pw-plan + .pw-plan { padding: 18px 0; border-left: 0; border-top: 1px solid var(--line); }
  .pw-plan.is-top { padding: 18px; }
  .pw-quick .quick-a + .quick-a { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

.cz-apps button:disabled { opacity: .4; cursor: not-allowed; }
.cmpt .hero-title { font-size: calc(clamp(44px, 8vw, 112px) * var(--display-scale)); }

/* ---------- section tabs: the pages of Routines and Scores, under the top bar (app.js) ---------- */
.section-tabs { background: var(--bg); border-bottom: 1px solid var(--line); }
.section-tabs[hidden] { display: none; }
.section-tabs-in { max-width: 1280px; margin: 0 auto; padding: 0 32px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.section-tabs-in::-webkit-scrollbar { display: none; }
.section-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; font-weight: 700; font-size: 15px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.section-tabs a:first-child { margin-left: -14px; }
.section-tabs a:hover { color: var(--ink); }
.section-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
body[data-auth="out"] .section-tabs { display: none; }
@media (max-width: 820px) {
  .section-tabs-in { padding: 0 16px; }
  .section-tabs a { min-height: 44px; padding: 0 12px; font-size: 14px; }
  .section-tabs a:first-child { margin-left: -12px; }
}

/* ---------- Video analyses (views/analyses.js) ---------- */
.hist-page { display: grid; gap: 40px; max-width: 980px; }
.hist-page .rtn-head .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hist-what { border-top: 3px solid var(--ink); padding-top: 16px; }
.hist-what ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; counter-reset: hw; }
.hist-what li { display: grid; gap: 4px; counter-increment: hw; }
.hist-what li b::before { content: counter(hw) "  "; color: var(--accent-text); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .hist-what ol { grid-template-columns: minmax(0, 1fr); } }
body[data-route="composer"] .section-tabs-in { max-width: 1480px; }

/* ---------- Plan & billing (#/billing) ---------- */
.billing { display: grid; gap: 32px; }
.billing .page-head { margin-bottom: 0; }
.bl-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: stretch; }
.bl-plan-now { background: var(--deep); color: var(--on-deep); border-radius: var(--radius); padding: 28px; display: grid; gap: 10px; align-content: start; }
.bl-plan-now .eyebrow { color: var(--accent-on-deep); margin: 0; }
.acc-plan { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
.acc-plan dd { font-size: calc(28px * var(--display-scale)); overflow-wrap: anywhere; }
.bl-name { margin: 0; white-space: nowrap; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(clamp(48px, 5.6vw, 80px) * var(--display-scale)); line-height: .9; text-transform: uppercase; }
.bl-price { margin: 0; font-weight: 700; font-size: 17px; }
.bl-price .num { font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(32px * var(--display-scale)); }
.bl-status { margin: 0 0 8px; opacity: .85; }
.bl-plan-now .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.bl-usage { align-content: start; }
.bl-meter { display: grid; gap: 8px; padding-top: 12px; border-top: 3px solid var(--ink); }
.bl-meter + .bl-meter { border-top-width: 1.5px; border-top-color: var(--line); }
.bl-m-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.bl-m-head b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(28px * var(--display-scale)); line-height: 1; }
.bl-m-note { margin: 0; color: var(--muted); font-size: 14px; }
.bl-locked .bl-m-head span:last-child { color: var(--muted); }
.bl-bar { display: block; height: 10px; background: var(--sunk); border-radius: 2px; overflow: hidden; }
.bl-bar > span { display: block; height: 100%; background: var(--ink); }
.bl-bar > span.is-full { background: var(--accent-text); }
.bl-bar-s { height: 6px; }
.bl-apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bl-apps li { display: grid; grid-template-columns: 64px minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: 14px; }
.bl-apps li .num { text-align: right; font-weight: 700; }
.bl-facts { margin: 0; display: grid; gap: 0; border-top: 1.5px solid var(--line); }
.bl-facts div, .bl-lines div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1.5px solid var(--line); }
.bl-facts dt, .bl-lines dt { font-size: 14px; color: var(--muted); font-weight: 600; }
.bl-facts dd, .bl-lines dd { margin: 0; font-weight: 700; }
.bl-change, .bl-pay { display: grid; gap: 14px; }
.bl-change h2, .bl-pay h2 { margin: 0; }
.bl-plans { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.bl-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 190px; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1.5px solid var(--line); }
.bl-row.is-current { background: var(--sunk); padding-left: 16px; padding-right: 16px; margin: 0 -16px; }
.bl-row-main { display: grid; gap: 2px; }
.bl-row-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(26px * var(--display-scale)); text-transform: uppercase; line-height: 1; }
.bl-row-sum { color: var(--muted); font-size: 14px; }
.bl-row-price { display: grid; }
.bl-row-price .num { font-weight: 800; font-size: 20px; }
.bl-row-price small { color: var(--muted); font-size: 13px; }
.bl-row-cta { justify-self: end; }
.bl-current { background: var(--ink); color: var(--surface); }
.bl-lines { margin: 0; border-top: 3px solid var(--ink); }
.bl-lines .btn-link { padding: 0; }
.bl-warn { margin: 0; padding: 12px 14px; border-left: 4px solid var(--accent-text); background: var(--sunk); }
.bl-dlg p { margin: 0; }
.bl-dlg .row { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) {
  .bl-top { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .bl-plan-now { padding: 22px 18px; }
  .bl-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bl-row-cta { grid-column: 1 / -1; justify-self: stretch; }
  .bl-row-cta .btn { width: 100%; }
  .bl-row.is-current { margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
  .bl-facts div, .bl-lines div { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ---------- an analysis linked to a competition result ---------- */
.res-links { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; }
.res-comp { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0 8px; font-weight: 700; color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: var(--line); }
.cmpt-an { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
/* a competition and its routines (up to 2 per apparatus: qualification and final) */
.cmpt-event { border-bottom: 2px solid var(--ink); padding: 18px 0 4px; }
.cmpt-ev-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.cmpt-ev-head > .num { font-weight: 700; }
.cmpt-ev-head .btn-link { margin-left: auto; }
.cmpt-routines { list-style: none; margin: 0; padding: 0; }
.cmpt-routines .cmpt-row:last-child { border-bottom: 0; }
.cmpt-round { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.cf-round { margin: 0; }
.cf-round .select { min-height: 44px; }

/* quick links: a long single-word title (Competitions, Music check) shrinks to its card instead of running into the
   next one; it breaks only if it still cannot fit */
.quick-a { container-type: inline-size; min-width: 0; }
.quick-a > span { min-width: 0; }
.quick-a b { font-size: min(calc(28px * var(--display-scale)), 15cqi); overflow-wrap: break-word; hyphens: manual; }
.quick-a .quick-art + span b { font-size: min(calc(28px * var(--display-scale)), 9cqi); }

/* ---------- sample analysis for a free account (views/demo.js) ---------- */
.demo-box { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 40px; align-items: end; margin: 0 0 32px; padding: 26px 0 30px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line); }
.demo-box .eyebrow { margin: 0 0 8px; }
.demo-t { margin: 0 0 10px; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-style: var(--display-style); font-size: calc(clamp(32px, 4vw, 48px) * var(--display-scale)); line-height: .95; text-wrap: balance; }
.demo-box p { margin: 0; max-width: 60ch; }
.demo-cta { display: grid; gap: 14px; padding: 20px 22px; background: var(--sunk); border-left: 4px solid var(--primary); border-radius: var(--radius-s); }
.demo-cta .row { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) {
  .demo-box { grid-template-columns: minmax(0, 1fr); padding: 20px 0 24px; }
  .demo-cta { padding: 16px 18px; }
}
