/* ============================================================================
   move.css — MoveLab-only layer on top of styles.css + data.css
   1) the per-site accent
   2) the barbell hero and the movement-pattern line figures (pure SVG/CSS)
   3) exercise-page furniture: meta rows, steps, mistakes, progressions
   4) the filter bar on /exercise
   ========================================================================== */

/* ---------------------------------------------------------------- accent */
body[data-site="move"] { --accent: #0369a1; --accent-2: #075985; --accent-3: #38bdf8; --accent-soft: #eaf4fb; }
:root[data-theme="dark"] body[data-site="move"] { --accent: #38bdf8; --accent-2: #7dd3fc; --accent-3: #0ea5e9; --accent-soft: rgba(56, 189, 248, .13); }

body[data-site="move"] {
  --steel:   #cbd5e1;
  --steel-2: #94a3b8;
  --steel-3: #f1f5f9;
  --plate-1: #0f172a;
  --plate-2: #334155;
  --plate-3: #64748b;
  --fig-ink: #0f172a;
}
:root[data-theme="dark"] body[data-site="move"] {
  --steel:   #64748b;
  --steel-2: #334155;
  --steel-3: #94a3b8;
  --plate-1: #e2e8f0;
  --plate-2: #94a3b8;
  --plate-3: #64748b;
  --fig-ink: #e2e8f0;
}

/* ============================================================================
   THE MET LADDER — MoveLab's set piece (AAA+++ §5)
   The drawing hand is SQUARE TERMINALS and nothing else in the ring uses it:
   butt caps on the bars, square caps on the axis, a hard 10x10 stop block whose
   RIGHT EDGE lands exactly on the value, crisp edges everywhere, zero radii.
   Round caps belong to fuel, butt-nib to burn, 1.6px round to yoga, plate rules
   to fly, filled silhouettes to cook, pictograms to gym, katori units to thali,
   rectilinear bezels to sehat. This is a machinist's stop on a ruled field card.
   Fixed viewBox, so it reserves its own space: CLS 0.00.
   ========================================================================== */
.met-ladder-wrap { margin: 22px 0 6px; overflow-x: auto; overscroll-behavior-x: contain; }
.met-ladder {
  display: block; width: 100%; min-width: 460px; height: auto;
  font-family: var(--sans);
}
/* crisp only on the drawn geometry — never on the text, which needs its
   anti-aliasing back or the labels grit up at small sizes */
.met-ladder .ml-guide,
.met-ladder .ml-bar,
.met-ladder .ml-term,
.met-ladder .ml-rule,
.met-ladder .ml-tick,
.met-ladder .ml-band { shape-rendering: crispEdges; }

/* the shared axis — a hairline ruler, square-capped, read once at the top */
.met-ladder .ml-rule,
.met-ladder .ml-tick { stroke: var(--line-2); stroke-width: 1; stroke-linecap: square; }
.met-ladder .ml-axis text,
.met-ladder .ml-unit,
.met-ladder .ml-val {
  font-family: var(--mono); font-size: 11px; letter-spacing: .07em;
  fill: var(--muted); font-variant-numeric: tabular-nums lining-nums;
}
.met-ladder .ml-unit { fill: var(--faint); letter-spacing: .14em; }

/* every row sits on the same guide, which is the argument: position, not size */
.met-ladder .ml-guide { stroke: var(--line); stroke-width: 1; }
.met-ladder .ml-lab { font-size: 13.5px; fill: var(--ink-2); }
.met-ladder .ml-bar {
  stroke: var(--steel-2); stroke-width: 7; stroke-linecap: butt;
}
.met-ladder .ml-term {
  fill: var(--paper); stroke: var(--steel-2); stroke-width: 1.6;
}

/* the page's own movement: accent bar, filled stop, tinted band, bolder label */
.met-ladder .ml-band { fill: var(--accent-wash); }
.met-ladder .ml-row.on .ml-bar { stroke: var(--accent); }
.met-ladder .ml-row.on .ml-term { fill: var(--accent); stroke: var(--accent); }
.met-ladder .ml-row.on .ml-lab { fill: var(--ink); font-weight: 650; }
.met-ladder .ml-row.on .ml-val { fill: var(--accent-deep); font-weight: 600; }
:root[data-theme="dark"] .met-ladder .ml-term { fill: var(--paper); }
:root[data-theme="dark"] .met-ladder .ml-bar { stroke: var(--steel); }
:root[data-theme="dark"] .met-ladder .ml-row.on .ml-val { fill: var(--accent); }
@media print { .met-ladder-wrap { overflow: visible; } }

/* ---- the hero stack: kicker -> h1 -> answer, once, on load ---------------
   shell() owns the eyebrow and h1 markup, so the .reveal classes cannot be
   attached to them from the template; the answer block carries the real class
   and these two rules complete the same three-step stagger with the same
   keyframe, easing and gate. Reduced-motion readers get the finished page. */
@media (prefers-reduced-motion: no-preference) {
  body[data-site="move"] .hero .eyebrow { animation: aaa-rise var(--t-slow) var(--ease-out) both; }
  body[data-site="move"] .hero h1 { animation: aaa-rise var(--t-slow) var(--ease-out) both; animation-delay: 60ms; }
}

/* ---- the answer, unboxed (data.css 20.10 does the rest) ----------------- */
.answer.aaa .stat-display { color: var(--accent); margin: 0 0 14px; }
.answer.aaa .cue { max-width: var(--measure); }
.answer.aaa .srcline { max-width: var(--measure); }

/* ---- steps beside the pattern figure ------------------------------------ */
.how-row { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: start; }
.how-row .steps { margin-top: 0; }
.how-fig { text-align: center; }
.how-fig .fig { margin: 0 auto; }
.how-fig .spec { display: block; margin-top: 6px; color: var(--faint); }
@media (max-width: 700px) {
  .how-row { grid-template-columns: 1fr; gap: 10px; }
  .how-fig { max-width: 190px; }
}

/* -------------------------------------------------------------- hero scene */
.hero-scene {
  position: relative;
  width: min(440px, 86vw);
  margin: 26px auto 4px;
  filter: drop-shadow(0 26px 38px rgba(3, 26, 48, .22));
}
:root[data-theme="dark"] .hero-scene { filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .65)); }
.hero-scene svg { width: 100%; height: auto; overflow: visible; }
.hero-shadow { fill: rgba(11, 16, 32, .16); }
:root[data-theme="dark"] .hero-shadow { fill: rgba(0, 0, 0, .45); }
.hero-fig { max-width: 100%; }
.hero-fig .ghost { opacity: .22; }
.hero-fig .hero-bar line { stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.hero-fig .hero-bar circle { fill: var(--accent); }
.hero-cap { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 12px; }

.mv-float-a { animation: mvFloat 9s ease-in-out infinite; transform-origin: center; }
.mv-float-b { animation: mvFloat 11s ease-in-out infinite .7s; transform-origin: center; }
.mv-float-c { animation: mvFloat 11s ease-in-out infinite .7s; transform-origin: center; }
@keyframes mvFloat { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@media (prefers-reduced-motion: reduce) { .mv-float-a, .mv-float-b, .mv-float-c { animation: none; } }

/* --------------------------------------------------------- pattern figures */
.fig { width: 100%; max-width: 210px; height: auto; }
.fig .fig-spine, .fig .fig-limb {
  fill: none; stroke: var(--fig-ink); stroke-width: 6.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.fig .fig-limb.back { stroke: var(--muted); stroke-width: 5.5; opacity: .55; }
.fig .fig-head { fill: var(--fig-ink); }
.fig .fig-shadow { fill: rgba(11, 16, 32, .10); }
:root[data-theme="dark"] .fig .fig-shadow { fill: rgba(0, 0, 0, .35); }
.fig .fig-load line { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.fig .fig-load circle, .fig .fig-load rect { fill: var(--accent); }
.fig.sm { max-width: 132px; }

/* -------------------------------------------------------------- hero answer */
.answer .ans-fig { float: right; width: 168px; margin: -6px 0 10px 20px; }
.answer .ans-fig .fig { max-width: 168px; }
@media (max-width: 560px) {
  .answer .ans-fig { float: none; width: 140px; margin: 0 auto 8px; }
  .answer .ans-fig .fig { max-width: 140px; }
}
.answer .ans-txt { overflow: hidden; }
.cue {
  margin-top: 12px; padding: 11px 14px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .93rem; color: var(--ink-2);
}
.cue b { color: var(--ink); }
.aka { margin-top: 10px; font-size: .82rem; color: var(--muted); }

/* ------------------------------------------------------------------ meta row */
.meta-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; margin-top: 20px;
}
.meta {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 14px;
}
.meta .k { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.meta .v { display: block; margin-top: 4px; font-size: .92rem; font-weight: 600; color: var(--ink); }
.meta .v a { color: var(--accent); text-decoration: none; }
.meta .v a:hover { text-decoration: underline; }

/* --------------------------------------------------------------- level chip */
.lvl {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid currentColor;
}
.lvl.l1, .lvl.l2 { color: #15803d; }
.lvl.l3 { color: #b45309; }
.lvl.l4, .lvl.l5 { color: #b91c1c; }
:root[data-theme="dark"] .lvl.l1, :root[data-theme="dark"] .lvl.l2 { color: #4ade80; }
:root[data-theme="dark"] .lvl.l3 { color: #fbbf24; }
:root[data-theme="dark"] .lvl.l4, :root[data-theme="dark"] .lvl.l5 { color: #f87171; }

/* ------------------------------------------------------------------- steps */
.steps { counter-reset: st; list-style: none; padding: 0; margin: 18px 0 0; }
.steps li {
  position: relative; padding: 0 0 18px 52px; margin: 0;
  font-size: 1rem; color: var(--ink-2); line-height: 1.62;
}
.steps li::before {
  counter-increment: st; content: counter(st);
  position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  display: grid; place-items: center;
  font-weight: 800; font-size: .92rem; font-variant-numeric: tabular-nums;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 34px; bottom: 4px;
  width: 1px; background: var(--line);
}

/* ---------------------------------------------------------------- mistakes */
.mistakes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.mk {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid #dc2626;
  border-radius: var(--radius-sm); padding: 15px 17px;
  box-shadow: var(--shadow-xs);
}
:root[data-theme="dark"] .mk { border-left-color: #f87171; }
.mk h3 { font-size: .98rem; font-weight: 700; margin: 0 0 7px; color: var(--ink); letter-spacing: -.01em; }
.mk p { margin: 0; font-size: .89rem; color: var(--ink-2); line-height: 1.6; }

/* ------------------------------------------------------------ progressions */
.prog { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; margin-top: 12px; }
.prog-col h3 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 800; margin: 0 0 12px;
}

/* -------------------------------------------------------------- burn cards */
.burn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.burn-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 15px 16px; box-shadow: var(--shadow-xs);
}
.burn-card .b-v { font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.burn-card .b-k { font-size: .79rem; color: var(--muted); margin-top: 4px; }

/* --------------------------------------------------------- assumption note */
.assume {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: var(--radius-sm); padding: 13px 16px;
  font-size: .88rem; color: var(--ink-2); margin: 18px 0 0;
}
.assume svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--accent); margin-top: 2px; }
.assume b { color: var(--ink); }

/* ------------------------------------------------------------ pattern grid */
.pat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.pat-card {
  display: block; text-decoration: none; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 16px 16px;
  box-shadow: var(--shadow-xs); transition: border-color .15s, transform .15s;
}
.pat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pat-card .fig { margin: 0 auto 6px; display: block; }
.pat-card h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 5px; color: var(--ink); }
.pat-card p { font-size: .82rem; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.pat-card .go { font-size: .78rem; font-weight: 700; color: var(--accent); }

/* ------------------------------------------------------------- filter bar */
.filters {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
}
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 7px 0; }
.frow + .frow { border-top: 1px solid var(--line); }
.flabel {
  flex: 0 0 92px; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 800;
}
.filters button.chip {
  cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 5px 12px; line-height: 1.4;
}
.filters button.chip:hover { border-color: var(--accent); color: var(--accent); }
.filters button.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .filters button.chip.on { color: #04121d; }
.fcount { margin: 12px 0 0; font-size: .84rem; font-weight: 600; color: var(--accent); }
.chip-home b { color: #15803d; }
:root[data-theme="dark"] .chip-home b { color: #4ade80; }

/* -------------------------------------------------------------- misc bits */
table.data td.al, table.data th.al { text-align: left; }
table.data th small { display: block; font-weight: 400; font-size: .74rem; color: var(--muted); font-style: italic; }
table.data td.al a { color: var(--accent); text-decoration: none; }
table.data td.al a:hover { text-decoration: underline; }
