/* Warriors Box demos: shared tokens and pieces. Look-only mockups, not app code. */
:root {
  --display: "Montserrat", "Archivo", system-ui, sans-serif; --stretch: 100%; --stretch-btn: 100%; --track: -.02em;
  --text: "Archivo", system-ui, sans-serif;
  --num: "Chakra Petch", "Archivo", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #ECEFF3; --surface: #FFFFFF; --surface-2: #E3E7EE;
  --ink: #0B0E14; --ink-2: #454D5E; --line: #C7CEDA;
  --cobalt: #1438B8; --cobalt-2: #0E2A8C; --on-cobalt: #FFFFFF; --link: #1438B8;
  --flag: #8A4200; --flag-bg: #FFEDCC; --flag-line: #D9902B;
  --ghost: rgba(11, 14, 20, .10); --plate: #D9E9F8; --scrim: rgba(236, 239, 243, .78);
  --m-body: #DDE2EA; --m-rest: #BCC4D1; --m-pri: #1438B8; --m-sec: #D3DCF6; --m-sec-ink: #1438B8; --m-hover: #0B0E14; --m-glow: rgba(20, 56, 184, .5);
  --logo-filter: none; --logo-blend: multiply;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0D13; --surface: #141926; --surface-2: #1D2434;
  --ink: #F3F5F9; --ink-2: #AEB7C8; --line: #2D364A;
  --cobalt: #2450E6; --cobalt-2: #17389F; --on-cobalt: #FFFFFF; --link: #8CAAFF;
  --flag: #FFC164; --flag-bg: #2C200D; --flag-line: #8A5A12;
  --ghost: rgba(243, 245, 249, .12); --plate: #D9E9F8; --scrim: rgba(10, 13, 19, .78);
  --m-body: #262E40; --m-rest: #414B63; --m-pri: #5C86FF; --m-sec: #1B2233; --m-sec-ink: #9DB6FF; --m-hover: #FFFFFF; --m-glow: rgba(79, 123, 255, .7);
  --logo-filter: invert(1); --logo-blend: screen;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--text); background: var(--bg); color: var(--ink); scrollbar-color: var(--line) transparent; }
::selection { background: var(--cobalt); color: #fff; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The poster voice: wide, heavy, leaning forward. Whole headlines lean, never single words. */
[data-font="archivo-wide"] { --display: "Archivo", system-ui, sans-serif; --stretch: 125%; --stretch-btn: 112%; --track: -.012em; }
[data-font="archivo"] { --display: "Archivo", system-ui, sans-serif; --stretch: 100%; --stretch-btn: 100%; --track: -.01em; }
.display { font-family: var(--display); font-stretch: var(--stretch); font-weight: 900; font-style: italic; text-transform: uppercase; line-height: .98; letter-spacing: var(--track); text-wrap: balance; }
.num { font-family: var(--num); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cond { font-family: var(--display); font-stretch: 78%; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* Ghost type: the outlined giant letters from the posters, always decorative. */
.ghost { position: absolute; font-family: var(--display); font-stretch: var(--stretch); font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--ghost); pointer-events: none; user-select: none; white-space: nowrap; }

/* Slanted buttons: the lean of the type, cut into the control. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; border: 0; cursor: pointer; padding: .95em 1.6em; background: var(--ink); color: var(--bg); font: italic 800 1rem/1 var(--display); font-stretch: var(--stretch-btn); text-transform: uppercase; letter-spacing: .02em; clip-path: polygon(.75em 0, 100% 0, calc(100% - .75em) 100%, 0 100%); transition: transform .16s var(--ease), background-color .16s, filter .16s; }
.btn:hover { transform: translateX(3px); }
.btn:active { transform: translateX(1px) scale(.985); }
.btn:focus-visible { outline-offset: -6px; outline-color: currentColor; }
.btn.pri { background: var(--cobalt); color: var(--on-cobalt); }
.btn.pri:hover { background: var(--cobalt-2); }
.btn.sub { background: var(--surface-2); color: var(--ink); }
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
.ico { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* Grain for cobalt fields, so the flat colour reads as printed, not as a web gradient. */
.grain { position: relative; isolation: isolate; }
.grain::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; mix-blend-mode: soft-light; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Body map: one renderer, three path sets (wb.js). */
.body-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.b-out, .b-inert { fill: var(--m-body); }
.b-m { fill: var(--m-rest); stroke: var(--m-body); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .18s var(--ease); transform-box: fill-box; transform-origin: center; }
.b-m[data-s="secondary"] { fill: var(--hatch, var(--m-sec)); }
.b-m[data-s="primary"] { fill: var(--m-pri); filter: drop-shadow(0 0 var(--g, 5px) var(--m-glow)); }
.is-pick .b-m { cursor: pointer; }
.is-pick .b-m.hov, .is-pick .b-m:focus-visible { stroke: var(--m-hover); stroke-width: 2.5; outline: none; }
.is-pick .b-m.hov:not([data-s="primary"]):not([data-s="secondary"]) { fill: color-mix(in srgb, var(--m-pri) 35%, var(--m-rest)); }
.b-m.just { animation: mpop .42s var(--ease); }
@keyframes mpop { 0% { transform: scale(1.14); filter: drop-shadow(0 0 calc(var(--g, 5px) * 2.6) var(--m-glow)) brightness(1.5); } 100% { transform: scale(1); } }

/* Demo chrome: clearly not part of the product. */
.demo-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 10px 20px; background: #05070B; color: #E9EDF5; font: 500 13px/1.3 var(--text); }
.demo-bar b { font-weight: 700; }
.demo-bar a { color: #9DB6FF; }
.demo-bar .seg { display: inline-flex; border: 1px solid #39435A; }
.demo-bar .seg button { background: transparent; border: 0; padding: 6px 12px; cursor: pointer; color: #C9D2E3; }
.demo-bar .seg button[aria-pressed="true"] { background: #E9EDF5; color: #05070B; font-weight: 700; }
.demo-bar .grow { flex: 1; }

/* ================= v2: the pieces every screen shares ================= */
@view-transition { navigation: auto; }
[data-theme="light"] { --bad: #B3261E; }
[data-theme="dark"] { --bad: #FF8A80; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); }
input, select, textarea { font: inherit; color: inherit; caret-color: var(--cobalt); }
a { color: inherit; }

/* The sidebar: closed by default. A thin rail on the left edge opens it when the pointer gets near, or when pressed. */
.wbrail { position: fixed; left: 0; top: 0; bottom: 0; z-index: 45; width: 20px; border: 0; padding: 0; background: none; cursor: pointer; }
.wbrail::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--ink); transform-origin: left; transition: transform .2s var(--ease), background-color .2s; }
.wbrail i { position: absolute; left: 0; top: 50%; display: grid; place-items: center; width: 20px; height: 76px; margin-top: -38px; background: var(--ink); clip-path: polygon(0 0, 100% 12px, 100% calc(100% - 12px), 0 100%); transition: background-color .2s; }
.wbrail svg { width: 11px; height: 11px; fill: var(--bg); }
.wbrail:hover::before, .wbrail:focus-visible::before, .wbrail:hover i, .wbrail:focus-visible i { background: var(--cobalt); }
.wbrail:hover::before { transform: scaleX(1.6); }
.wbrail:focus-visible { outline-offset: -3px; }
.wbside { position: fixed; left: 0; top: 0; bottom: 0; z-index: 46; width: 288px; max-width: 86vw; display: flex; flex-direction: column; padding: 0; background: var(--surface); border-right: 2px solid var(--ink); transform: translateX(-103%); visibility: hidden; transition: transform .34s var(--ease), visibility 0s .34s; }
.wbside.open { transform: none; visibility: visible; transition: transform .34s var(--ease); box-shadow: 40px 0 70px -40px rgba(5, 7, 11, .55); }
.wbside-list { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 20px 0 14px; }
.wbside-list > * { flex: none; }
.wbside-brand { display: flex; align-items: center; gap: 8px; padding: 0 20px 12px; font-size: 14px; text-decoration: none; }
.wbside-brand img { width: 34px; height: 34px; object-fit: cover; object-position: 50% 36%; filter: var(--logo-filter); mix-blend-mode: var(--logo-blend); }
.wbside a { text-decoration: none; }
.wbside li a { display: block; padding: 7px 20px; transition: background-color .12s; }
.wbside li a:hover, .wbside li a:focus-visible { background: var(--surface-2); outline-offset: -3px; }
.wbside li b { font-weight: 600; }
.wbside li small { display: block; font-size: 12.5px; color: var(--ink-2); }
.wbside-nav b { font: italic 900 19px/1.25 var(--display) !important; text-transform: uppercase; letter-spacing: -.01em; }
.wbside-nav a[aria-current] { box-shadow: inset 5px 0 0 var(--cobalt); color: var(--link); }
.wbside-list > .btn { margin: 10px 20px 6px; align-self: flex-start; }
.wbside h2 { margin: 16px 20px 2px; padding-bottom: 5px; border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.wbside-me { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 14px; border-top: 1px solid var(--line); background: var(--surface); font-size: 13.5px; }
.wbside-me button { border: 0; background: none; padding: 4px 0 2px; margin-left: 12px; cursor: pointer; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; }
.wbside-me button[aria-pressed="true"] { color: var(--ink); border-bottom-color: currentColor; }
.wbside-me > span:first-child { display: grid; justify-items: start; min-width: 0; }
.wbside-me [data-out] { margin: 0; padding: 0; font-size: 12.5px; font-weight: 500; }

/* Actions lean, all of them, at one height. The outline is a second slanted layer. */
.tb { --sl: 8px; position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; white-space: nowrap; padding: 0 16px; border: 0; background: var(--line); color: var(--ink); cursor: pointer; font-weight: 600; font-size: 13.5px; text-decoration: none; clip-path: polygon(var(--sl) 0, 100% 0, calc(100% - var(--sl)) 100%, 0 100%); transition: background-color .15s, color .15s, transform .16s var(--ease); }
.tb::before { content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--surface); clip-path: polygon(var(--sl) 0, 100% 0, calc(100% - var(--sl)) 100%, 0 100%); transition: background-color .15s; }
.tb:hover { background: var(--ink); transform: translateX(2px); }
.tb:hover::before { background: var(--surface-2); }
.tb:focus-visible { outline-offset: -5px; }
.tb svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.tb.danger:hover { background: var(--bad); color: var(--bad); }
.tb.lg { height: 52px; padding: 0 26px; font-size: 15px; --sl: 11px; }
a.btn { text-decoration: none; }
.btn.lg { height: 52px; padding: 0 30px; font-size: 15px; }
.btn.sm { height: 36px; padding: 0 20px; font-size: 12.5px; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.btn[disabled] { background: var(--line); color: var(--ink-2); cursor: default; transform: none; }
.txt { border: 0; background: none; padding: 4px 2px; cursor: pointer; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: color .15s, text-decoration-color .15s; }
.txt:hover { color: var(--ink); text-decoration-color: currentColor; }

/* The assistant's line: one black slanted band, with its action as a light piece set inside. */
.cmd { --lean: 18px; position: relative; display: flex; align-items: stretch; height: 64px; padding: 0 var(--lean) 0 calc(var(--lean) + 10px); background: var(--ink); color: var(--bg); clip-path: polygon(var(--lean) 0, 100% 0, calc(100% - var(--lean)) 100%, 0 100%); }
.cmd > svg { width: 20px; height: 20px; fill: currentColor; align-self: center; flex: none; }
.cmd input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--bg); font: 500 18px/1 var(--text); padding: 0 14px; caret-color: var(--bg); }
.cmd input::placeholder { color: color-mix(in srgb, var(--bg) 64%, transparent); font-style: italic; }
.cmd button { position: relative; isolation: isolate; flex: none; border: 0; background: none; cursor: pointer; padding: 0 28px; color: var(--ink); font: italic 800 15px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 8px; }
.cmd button::before { content: ""; position: absolute; inset: 9px 0; z-index: -1; background: var(--surface); transform: skewX(-15.7deg); transition: background-color .15s; }
.cmd button:hover::before { background: var(--cobalt); }
.cmd button:hover { color: var(--on-cobalt); }
.cmd button svg { width: 13px; height: 13px; fill: currentColor; }
.cmd button:focus-visible { outline: none; color: var(--on-cobalt); text-decoration: underline; text-underline-offset: 4px; }
.cmd button:focus-visible::before { background: var(--cobalt); }
.cmd::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--m-pri); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.cmd:focus-within::after { transform: scaleX(1); }

/* Tags and fields are square. */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--surface-2); color: var(--ink); font: 700 12px/1.4 var(--text); font-stretch: 82%; text-transform: uppercase; letter-spacing: .05em; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.chip.pri { background: var(--cobalt); color: var(--on-cobalt); }
.chip.off { background: transparent; color: var(--ink-2); border-color: var(--line); }
.chip.off:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.field { width: 100%; border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .15s; }
.field:focus { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--cobalt); }
.field::placeholder { color: var(--ink-2); }

/* A day's focus: the share of its exercises that goes to each muscle. */
.wb { display: flex; gap: 2px; height: 22px; }
.wb span { background: var(--cobalt); color: var(--on-cobalt); font: 700 11.5px/22px var(--text); font-stretch: 85%; padding: 0 6px; white-space: nowrap; overflow: hidden; min-width: 0; }
.wb.thin { height: 6px; }
.wb.thin span { padding: 0; }
.wkbar { display: inline-flex; gap: 2px; vertical-align: middle; }
.wkbar i { width: 9px; height: 13px; background: var(--line); clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }
.wkbar i.on { background: var(--m-pri); }
.ini { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; background: var(--ink); color: var(--bg); font: italic 800 12.5px/1 var(--display); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.ini.g { background: var(--cobalt); color: var(--on-cobalt); font: 700 12.5px/1 var(--num); }

/* Dialogs */
.modal { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: none; place-items: center; padding: 24px; }
.modal.open { display: grid; }
.dlg { width: 560px; max-width: 100%; max-height: 100%; overflow: auto; background: var(--surface); border: 2px solid var(--ink); padding: 24px; box-shadow: 0 30px 60px -24px rgba(5, 7, 11, .6); animation: rise .28s var(--ease); }
.dlg h2 { font-size: 21px; margin-bottom: 8px; }
.dlg > p { color: var(--ink-2); margin-bottom: 16px; }
.dlg footer { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 16px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.credit { font-size: 12px; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================= v3: the field, the wall and the assistant's button ================= */
[data-theme="light"] { --h1: #D6DEF6; --h2: #A9BAEF; --h3: #6F88E2; --h4: #3B5CD3; --h5: #0F2C9E; }
[data-theme="dark"] { --h1: #26345F; --h2: #314A96; --h3: #4163D2; --h4: #6B8FFF; --h5: #C2D1FF; }
.b-m[data-s="h1"] { fill: var(--h1); } .b-m[data-s="h2"] { fill: var(--h2); } .b-m[data-s="h3"] { fill: var(--h3); } .b-m[data-s="h4"] { fill: var(--h4); } .b-m[data-s="h5"] { fill: var(--h5); }
.heat-key { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.heat-key i { display: flex; }
.heat-key i b { width: 22px; height: 10px; }
.heat-key i b:nth-child(1) { background: var(--h1); } .heat-key i b:nth-child(2) { background: var(--h2); } .heat-key i b:nth-child(3) { background: var(--h3); } .heat-key i b:nth-child(4) { background: var(--h4); } .heat-key i b:nth-child(5) { background: var(--h5); }
[data-theme="light"] { --wall-blend: multiply; --wall-fill: #fff; --wall-ink: #C3CAD8; --wall-on: #D3DCF7; --wall-on-ink: #8499DD; --spot: rgba(255, 255, 255, .17);
  --slab: linear-gradient(168deg, #2349D2 0%, #1438B8 46%, #0A2180 100%); --slab-line: #0C2587; }
[data-theme="dark"] { --wall-blend: screen; --wall-fill: #000; --wall-ink: #2A3246; --wall-on: #17265C; --wall-on-ink: #5074EA; --spot: rgba(140, 170, 255, .2);
  --slab: linear-gradient(168deg, #2A55EC 0%, #1A3FC0 46%, #0D2478 100%); --slab-line: #0F2A8E; }

/* The field: pale where the trainer reads, and a cobalt slab cut on the lean of the type (12 degrees), running off
   the top, the right and the bottom. A stripe rides the cut. */
:root { --cut-w: 58vw; --lean-x: 21.26vh; }
@media (max-width: 1100px) { :root { --cut-w: 41vw; } }
.backdrop { position: fixed; inset: 0; z-index: 0; isolation: isolate; overflow: hidden; pointer-events: none; background: var(--bg); }
.cut { position: fixed; top: 0; right: 0; bottom: 0; width: var(--cut-w); clip-path: polygon(var(--lean-x) 0, 100% 0, 100% 100%, 0 100%); }
.slab-bg { background: radial-gradient(60vh 70vh at 58% 50%, var(--spot), transparent 70%), var(--slab); }
.stripe { position: absolute; top: 0; bottom: 0; right: calc(var(--cut-w) - var(--lean-x) + 8px); width: calc(var(--lean-x) + 9px); background: var(--ink); clip-path: polygon(var(--lean-x) 0, calc(var(--lean-x) + 9px) 0, 9px 100%, 0 100%); }

/* The wall: lanes of giant type across the whole screen. wb.js moves them: a steady drift, and one shared beat. */
.wall { --edge: calc((100vw - var(--cut-w)) * .978 + 20.8vh); --wall-mask: linear-gradient(102deg, rgba(0, 0, 0, .15) calc(var(--edge) - 12px), rgba(0, 0, 0, .7) calc(var(--edge) + 2px));
  position: absolute; inset: 0; mix-blend-mode: var(--wall-blend); -webkit-mask-image: var(--wall-mask); mask-image: var(--wall-mask); }
.wall-tilt { position: absolute; left: 50%; top: 50%; width: calc(100vw + 18vh); height: calc(100vh + 16vw); display: flex; flex-direction: column; transform: translate(-50%, -50%) rotate(-8deg); }
.lane { position: relative; flex: 1 1 0; min-height: 0; container-type: size; }
.lane.thin { flex-grow: .24; }
.lane-track { position: absolute; top: 0; left: 0; height: 100%; display: flex; will-change: transform; backface-visibility: hidden; }
@keyframes drift { to { transform: translate3d(-50%, 0, 0); } }
.lane-copy { flex: none; display: flex; align-items: center; height: 100%; font-size: 82cqh; color: var(--wall-ink); }
.lane.thin .lane-copy { font-size: 50cqh; }
.lane .w { flex: none; padding: 0 .16em; font: italic 900 1em/1 var(--display); text-transform: uppercase; letter-spacing: -.02em; white-space: nowrap; text-rendering: geometricPrecision; color: var(--wall-fill); -webkit-text-stroke: 2px var(--wall-ink); paint-order: stroke fill; transition: color .7s var(--ease), -webkit-text-stroke-color .7s var(--ease); }
.lane .w.on { color: var(--wall-on); -webkit-text-stroke-color: var(--wall-on-ink); }
.lane .n { flex: none; font: 700 1em/1 var(--num); white-space: nowrap; padding: 0 2.4em; }
.lane .g { flex: none; width: .42em; height: .42em; margin: 0 .2em; fill: currentColor; }
.lane.thin .g { width: .9em; height: .9em; margin: 0 2.4em; }
.lane .hatch { width: 1.1em; background: repeating-linear-gradient(-62deg, currentColor 0 .05em, transparent .05em .15em); clip-path: polygon(.16em 0, 100% 0, calc(100% - .16em) 100%, 0 100%); }
.lane.thin .hatch { width: 2.6em; }

/* The assistant's button. The AI is always a named action; its text line opens only after this is pressed. */
.gen { position: relative; display: inline-flex; align-items: center; gap: clamp(12px, 1.4vw, 20px); height: clamp(84px, 12.5vh, 108px); padding: 0 clamp(30px, 3.4vw, 56px) 0 clamp(26px, 3vw, 48px); border: 0; cursor: pointer; text-align: left; text-decoration: none; background: var(--cobalt); color: var(--on-cobalt); clip-path: polygon(28px 0, 100% 0, calc(100% - 28px) 100%, 0 100%); transition: background-color .18s, transform .22s var(--ease); }
.gen:hover { background: var(--cobalt-2); transform: translateX(5px); }
.gen:active { transform: translateX(2px) scale(.99); }
.gen:focus-visible { outline: 3px solid var(--on-cobalt); outline-offset: -8px; }
.gen > svg { flex: none; width: 34px; height: 34px; fill: currentColor; }
.gen > svg:last-child { width: 22px; height: 22px; margin-left: 18px; transition: transform .25s var(--ease); }
.gen:hover > svg:last-child { transform: translateX(5px); }
.gen b { display: block; font: italic 900 clamp(26px, 2.5vw, 38px)/1.05 var(--display); text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; }
.gen small { display: block; margin-top: 7px; font-size: 15.5px; line-height: 1.2; color: color-mix(in srgb, var(--on-cobalt) 82%, transparent); white-space: nowrap; }
/* What the assistant picked up from the text, as it is typed. */
.heard { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; }
.heard { min-height: 30px; align-items: center; }
.heard li { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.heard li svg { width: 12px; height: 12px; fill: currentColor; }
.heard li.ok { padding: 5px 11px; background: var(--ink); color: var(--bg); font-weight: 600; animation: rise .3s var(--ease); }
.heard li.miss { margin-left: 4px; }
/* The body. One figure, taller than the screen, standing whole on the cobalt side: it never crosses the cut.
   wb.js turns it around and moves it up and down. */
.stage, .half { position: fixed; inset: 0; pointer-events: none; }
.stage { z-index: 1; transition: opacity .25s; }
/* One body for the cobalt side, wherever it stands: the big one of the start screen and the two of "Generar
   rutina" share these colours. */
.on-slab { clip-path: polygon(calc(100vw - var(--cut-w) + var(--lean-x)) 0, 100% 0, 100% 100%, calc(100vw - var(--cut-w)) 100%); }
.on-slab, .pair {
  --m-body: var(--fig-body); --m-rest: var(--fig-rest); --m-pri: #fff; --m-sec: var(--fig-rest); --m-sec-ink: rgba(255, 255, 255, .88); }
[data-theme="light"] .stage { --fig-body: #5374EC; --fig-rest: #7694FA; }
[data-theme="dark"] .stage { --fig-body: #4A6FF2; --fig-rest: #6F92FF; }
.on-slab, .pair { --h1: color-mix(in srgb, #fff 18%, var(--fig-rest)); --h2: color-mix(in srgb, #fff 38%, var(--fig-rest)); --h3: color-mix(in srgb, #fff 58%, var(--fig-rest)); --h4: color-mix(in srgb, #fff 80%, var(--fig-rest)); --h5: #fff; }
/* It stands a little left of the middle of the cobalt side, clear of the cut. When the wheel moves it up, it also
   slides right at the lean of the cut (.2126 = --lean-x over the screen's height), so the gap to the cut never
   changes. Its size leaves room for that slide on the right. */
.rig { --H: min(165vh, 92vw, (var(--cut-w) - var(--lean-x) * .55 - 10vw) * 2.075); position: absolute; left: calc(100vw - var(--cut-w) / 2 + var(--lean-x) / 4 - 3vw); top: max(0px, (100vh - var(--H)) / 2); height: var(--H); aspect-ratio: 680 / 1411; transform: translate(calc(-50% - var(--y, 0px) * .2126), var(--y, 0px)); will-change: transform; }
.fig { position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--ease); }
.fig.on { opacity: 1; }
.flip { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px 0 16px; border: 0; cursor: pointer; pointer-events: auto; background: #fff; color: #0B1F7A; font: italic 800 13px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); transition: background-color .15s; }
.flip:hover { background: #DCE5FF; }
.flip:focus-visible { outline: 3px solid #0B1F7A; outline-offset: -6px; }
.flip svg { width: 15px; height: 15px; fill: currentColor; }
.stage .b-m { stroke-width: 1.2; transition: fill .4s var(--ease); }
.on-slab .b-m, .pair .b-m { stroke: var(--slab-line); }
.on-slab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36vh; background: linear-gradient(transparent, rgba(7, 22, 96, .9)); }
/* Where the body is a hero or a preview, a lit muscle pops without the glow. */
@keyframes mflat { 0% { transform: scale(1.12); } }
.stage .b-m.just, .focus .b-m.just { animation-name: mflat; }
.stage .b-m[data-s="primary"], .focus .b-m[data-s="primary"] { filter: none; }

/* ================= v4: pieces added in round 8 ================= */
/* A soft halo of the page colour behind a block of content: the moving type fades out before it reaches it. */
.halo { position: relative; isolation: isolate; }
.halo::before { content: ""; position: absolute; inset: -44px -70px; z-index: -1; background: var(--bg); filter: blur(42px); opacity: .82; pointer-events: none; }
/* The way back is always in the same place: top left. */
.back { position: fixed; top: 20px; left: 40px; z-index: 6; }
.back svg { transform: scaleX(-1); }
/* Waiting for the assistant. */
.loader { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: var(--bg); animation: show .2s both; }
@keyframes show { from { opacity: 0; } }
.loader-wall { position: absolute; inset: 0; -webkit-mask-image: none !important; mask-image: none !important; opacity: .55; }
.loader-box { position: relative; display: grid; justify-items: center; gap: 18px; width: min(420px, 80vw); }
.loader-box::before { content: ""; position: absolute; inset: -60px -90px; z-index: -1; background: var(--bg); filter: blur(40px); }
.loader-box img { width: 132px; height: 132px; object-fit: cover; object-position: 50% 36%; filter: var(--logo-filter) contrast(1.4); mix-blend-mode: var(--logo-blend); }
.loader-box b { font-size: clamp(20px, 2.2vw, 28px); text-align: center; }
.loader-bar { width: 100%; height: 12px; background: var(--line); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.loader-bar i { display: block; height: 100%; background: var(--cobalt); transform-origin: left; animation: fillbar linear both; }
[data-theme="dark"] .loader-bar i { background: var(--m-pri); }
@keyframes fillbar { from { transform: scaleX(0); } }
/* Marking muscles: one pair of bodies and a switch. */
.wbmk { display: grid; grid-template-columns: auto minmax(0, 440px); justify-content: center; align-items: center; gap: clamp(20px, 4vw, 52px); text-align: left; }
.wbmk-see { text-align: center; }
.wbmk .duo { display: flex; justify-content: center; gap: clamp(8px, 1.4vw, 20px); height: clamp(240px, 46vh, 460px); }
.wbmk .duo > span { height: 100%; aspect-ratio: 680 / 1411; }
.wbmk .b-m[data-s="primary"] { filter: none; }
.wbmk .b-m.up { stroke: var(--ink); stroke-width: 2.6; }
.wbmk .b-m.down { stroke: var(--ink-2); stroke-width: 1.6; stroke-dasharray: 4 3; }
.wbmk .b-m.just { animation-name: mflat; }
.key3 { margin-top: 10px; }
.key3 i b { width: 16px; }
.key3 i:nth-of-type(1) b { background: var(--h2) !important; } .key3 i:nth-of-type(2) b { background: var(--h5) !important; } .key3 i:nth-of-type(3) b { background: var(--h1) !important; outline: 1px dashed var(--ink-2); }
.wbmk-sw { display: inline-flex; gap: 2px; }
.wbmk-sw button { min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; font-size: 15px; text-align: left; transition: border-color .15s, background-color .15s, color .15s; }
.wbmk-sw button small { display: block; font-weight: 400; font-size: 12.5px; opacity: .8; }
.wbmk-sw button:hover { border-color: var(--ink); }
.wbmk-sw button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.wbmk-said { min-height: 4.6em; margin-top: 16px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.wbmk-said b { color: var(--ink); }
.wbmk-rank { min-height: 3.1em; margin: 8px 0 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 760px) { .wbmk { grid-template-columns: minmax(0, 1fr); } .wbmk .duo { height: 240px; } }

/* ================= v5: pieces added in round 9 ================= */
/* A dialog over everything else (wb.js pop). */
.wbtop { z-index: 90; }
.wbwide { width: 920px; }
.wbwide > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.wbwide > header p { color: var(--ink-2); }
/* "Rutina nueva": the two ways, as on the start screen, and the small third one. */
.wbnew { width: 520px; }
.wbnew .gen { display: flex; width: 100%; height: 84px; margin-top: 6px; padding: 0 26px; clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%); }
.wbnew .gen b { font-size: 22px; }
.wbnew .gen small { font-size: 14px; white-space: normal; }
.wbnew .gen > svg { width: 24px; height: 24px; }
.wbnew .gen > svg:last-child { width: 16px; height: 16px; margin-left: auto; }
.gen.ink { background: var(--ink); color: var(--bg); }
.gen.ink:hover { background: color-mix(in srgb, var(--ink) 80%, var(--cobalt)); }
.gen.ink small { color: color-mix(in srgb, var(--bg) 82%, transparent); }
[data-theme="dark"] .gen.ink { background: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .gen.ink:hover { background: var(--line); }
[data-theme="dark"] .gen.ink small { color: var(--ink-2); }
.wbnew footer { justify-content: space-between; }
/* The rows of "Generar rutina" (wb.js genForm). The label and its control sit on one centre line. */
.gopt { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 12px; align-items: center; padding: clamp(6px, 1.15vh, 10px) 0; border-top: 1px solid var(--line); }
.gopt > b { font: italic 900 14px/1.3 var(--display); text-transform: uppercase; }
.gopt > b small { display: block; margin-top: 1px; font: 400 12.5px/1.3 var(--text); text-transform: none; color: var(--ink-2); }
.gopt > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.pill { min-height: 36px; padding: 6px 13px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14.5px; transition: border-color .15s, background-color .15s, color .15s; }
.pill:hover, .pill:focus-visible { border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pill.n { min-width: 44px; font: 700 17px/1 var(--num); }
.gopt .field { min-height: 36px; min-width: 0; padding: 6px 12px; font-size: 14.5px; }
.gopt .gnote { margin-left: 6px; font-size: 13px; color: var(--ink-2); }
.gopt .gsaid { font-size: 14px; color: var(--ink-2); }
.gopt .gsaid b { color: var(--ink); }
.wk-o { width: 74px !important; text-align: center; font: 700 16px/1 var(--num) !important; }
.wk-o::placeholder { font: 500 14px/1 var(--text); }
.favs button { display: block; width: 100%; padding: 12px 6px; border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; text-align: left; transition: color .15s, transform .3s var(--ease); }
.favs button:hover, .favs button:focus-visible { color: var(--link); transform: translateX(8px); }
.favs b { display: block; font: italic 900 18px/1.3 var(--display); text-transform: uppercase; }
.favs small { color: var(--ink-2); font-size: 13.5px; }
/* An exercise as a moving picture: start and end, one at a time, never one over the other (wb.js frames). */
.frames { position: relative; display: block; }
.frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.frames img + img { visibility: hidden; }
.frames.play img, .alt:hover .frames img { animation: frame-a 1.5s steps(1) infinite; }
.frames.play img + img, .alt:hover .frames img + img { animation-name: frame-b; }
@keyframes frame-a { 0%, 100% { visibility: visible; } 50% { visibility: hidden; } }
@keyframes frame-b { 0%, 100% { visibility: hidden; } 50% { visibility: visible; } }
@media (max-width: 860px) { .gopt { grid-template-columns: 1fr; gap: 4px; } }
/* Sharing a routine (wb.js share). The card is a picture on its own backing, so a screenshot of it is clean;
   the link and the buttons are outside it. The card is white in both themes: it is made to be sent. */
.wbshare { width: 420px; text-align: center; }
.wbshare-card { padding: 18px; background: var(--surface-2); }
.wbshare-card canvas { display: block; width: min(300px, 100%); height: auto; margin: 0 auto; background: #fff; }
.wbshare-do { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.wbshare-said { min-height: 2.9em; margin: 10px 0 0 !important; font-size: 13.5px; text-wrap: balance; }
.wbshare-link { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.wbshare-link code { flex: 1; min-width: 0; padding: 9px 10px; background: var(--surface-2); font: 500 13px/1.2 var(--text); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: all; }
.wbshare footer { justify-content: flex-end; }
.wbshare footer small { margin-right: auto; max-width: 15ch; font-size: 12.5px; line-height: 1.3; color: var(--ink-2); text-align: left; }
