/*
 * TFA TrainerQuest UI
 * Author: Vinay R. Shankar <vinay@tfaworld.org>
 * TFA Fitness Education & Research LLP — 2026
 */

:root {
  --ink: #0b0b0d;
  --ink-2: #2f3035;
  --paper: #f5f3ed;
  --surface: #ffffff;
  --surface-2: #ece9e0;
  --line: #d6d1c5;
  --muted: #66676d;
  --lime: #d6ff36;
  --lime-dark: #8aa800;
  --teal: #20d9b4;
  --purple: #7865ff;
  --amber: #ffb547;
  --red: #ff5f64;
  --blue: #56a8ff;
  --good: #1f9d68;
  --danger: #c83941;
  --shadow: 8px 8px 0 var(--ink);
  --shadow-soft: 0 18px 50px rgba(11, 11, 13, 0.12);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --max: 1420px;
  --header-h: 76px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -0.035em; line-height: 1.04; }
h1 { font-size: clamp(2.25rem, 5vw, 5.4rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
small { color: var(--muted); }
code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 0.5rem;
  transform: translateY(-150%);
  z-index: 10000;
  background: var(--lime);
  border: 2px solid var(--ink);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 900;
}
.skip-link:focus { transform: none; }

.eyebrow,
.section-kicker {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 4px;
  margin-right: 0.55rem;
  vertical-align: 0.15em;
  background: var(--lime);
  border: 1px solid var(--ink);
}

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.button:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.button:active:not(:disabled) { transform: translate(0, 0); box-shadow: none; }
.button:focus-visible,
.icon-button:focus-visible,
.option-button:focus-visible,
.module-node:focus-visible,
.hotspot:focus-visible,
.exercise-card:focus-visible,
.back-link:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button--primary { background: var(--lime); }
.button--dark { background: var(--ink); color: #fff; }
.button--danger { background: #fff0f0; border-color: var(--danger); color: var(--danger); }
.button--ghost { background: transparent; }
.button--large { min-height: 58px; padding: 1rem 1.4rem; font-size: 1.05rem; }
.button--small { min-height: 36px; padding: 0.45rem 0.75rem; font-size: 0.84rem; }
.button--full { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.field { display: grid; gap: 0.38rem; font-weight: 750; }
.field > span { font-size: 0.86rem; }
.field em { font-style: normal; color: var(--muted); font-weight: 550; }
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  padding: 0.82rem 0.9rem;
  color: var(--ink);
  outline: 0;
}
.field textarea { min-height: 220px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.85rem; }
.field input:focus,
.field textarea:focus,
.field select:focus { box-shadow: 0 0 0 4px rgba(86, 168, 255, 0.35); }
.field small { font-weight: 500; }
.field--full { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 1.25rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.check-row { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.9rem; }
.check-row input { width: 20px; height: 20px; margin-top: 0.1rem; accent-color: var(--ink); }

.alert {
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: var(--surface);
}
.alert ul { margin-bottom: 0; }
.alert--danger { background: #fff0f0; border-color: var(--danger); }
.alert--success { background: #effff8; border-color: var(--good); }

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: inherit;
  text-decoration: none;
}
.brand-lockup > span:last-child { display: grid; line-height: 1; }
.brand-lockup strong { font-size: 0.92rem; letter-spacing: 0.12em; }
.brand-lockup small { margin-top: 0.3rem; color: inherit; font-size: 0.57rem; letter-spacing: 0.16em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 9px;
  font-weight: 950;
  letter-spacing: -0.08em;
}
.brand-image { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; }
.brand-lockup--dark .brand-mark { background: #fff; color: var(--ink); }

/* Setup */
.setup-page {
  min-height: 100vh;
  background:
    linear-gradient(115deg, transparent 0 72%, rgba(214, 255, 54, 0.85) 72% 80%, transparent 80%),
    var(--ink);
}
.setup-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.setup-card {
  width: min(900px, 100%);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 26px;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  box-shadow: 14px 14px 0 var(--lime);
}
.setup-card h1 { max-width: 12ch; margin: 2rem 0 1rem; font-size: clamp(2.4rem, 6vw, 4.5rem); }
.setup-card .lead { max-width: 65ch; font-size: 1.05rem; color: var(--ink-2); }
.setup-note { margin-top: 1.3rem; padding: 1rem; border-left: 5px solid var(--ink); background: #fff; }

/* App shell */
.app-body { min-height: 100vh; }
.app-header {
  position: sticky;
  top: 0;
  z-index: 300;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 3.5rem);
  background: rgba(11, 11, 13, 0.96);
  color: #fff;
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(12px);
}
.app-header .brand-mark { background: #fff; color: var(--ink); border-color: #fff; }
.header-status { display: flex; align-items: center; gap: 0.7rem; }
.save-indicator { display: flex; align-items: center; gap: 0.4rem; font-size: 0.76rem; color: #d8d8da; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(32, 217, 180, 0.16); }
.save-indicator.is-saving .status-dot { background: var(--amber); }
.save-indicator.is-error .status-dot { background: var(--red); }
.xp-pill { display: flex; align-items: center; gap: 0.32rem; border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; padding: 0.42rem 0.7rem; font-size: 0.82rem; }
.icon-button {
  appearance: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}
.icon-button:hover { background: rgba(255,255,255,0.1); }
.app-main { min-height: calc(100vh - var(--header-h)); }
.screen { display: none; min-height: calc(100vh - var(--header-h)); padding: clamp(1rem, 3vw, 3rem); }
.screen--active { display: block; animation: screenIn 260ms ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  border-top: 2px solid var(--ink);
  background: #fff;
  font-size: 0.78rem;
}
.app-footer p { margin: 0; }
.app-footer a { font-weight: 850; }

/* Loading */
#screen-loading { display: none; place-items: center; }
#screen-loading.screen--active { display: grid; }
.loading-card { text-align: center; }
.loading-card h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.loader { width: 74px; height: 74px; margin: 0 auto 1.3rem; border: 10px solid var(--surface-2); border-top-color: var(--ink); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Welcome */
#screen-welcome {
  background:
    radial-gradient(circle at 8% 15%, rgba(214,255,54,0.45), transparent 25%),
    linear-gradient(90deg, transparent 49.8%, rgba(11,11,13,0.08) 50%, transparent 50.2%);
}
.hero-grid {
  width: min(var(--max), 100%);
  min-height: calc(100vh - var(--header-h) - 6rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 8rem);
}
.hero-copy h1 { max-width: 9.5ch; margin-bottom: 1rem; }
.hero-lead { max-width: 54ch; font-size: clamp(1.08rem, 2vw, 1.35rem); color: var(--ink-2); }
.hero-promise { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.4rem 0 1.8rem; }
.hero-promise span,
.case-tags span,
.privacy-chip {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: #fff;
  font-size: 0.74rem;
  font-weight: 800;
}
.learner-card,
.resume-panel {
  max-width: 650px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: rgba(255,255,255,0.86);
  box-shadow: 7px 7px 0 var(--ink);
}
.learner-card .check-row,
.learner-card .button { grid-column: 1 / -1; }
.resume-panel { display: block; }
.resume-panel p { margin-bottom: 1rem; }
.client-preview {
  position: relative;
  isolation: isolate;
  min-height: 570px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: visible;
  border: 3px solid var(--ink);
  border-radius: 34px;
  padding: clamp(1.4rem, 3vw, 2.5rem);
  background:
    linear-gradient(145deg, transparent 0 57%, rgba(214,255,54,0.9) 57% 72%, transparent 72%),
    #fff;
  box-shadow: 14px 14px 0 var(--ink);
}
.client-card-glow { position: absolute; inset: 10% 10% auto auto; width: 240px; height: 240px; border-radius: 50%; background: var(--purple); opacity: 0.12; filter: blur(4px); z-index: -1; }
.client-avatar {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  margin: 0 auto auto;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 50% 30%, #dba786 0 26%, transparent 27%),
    radial-gradient(circle at 50% 45%, #2e2423 0 39%, transparent 40%),
    linear-gradient(160deg, var(--purple), #bfb6ff);
  box-shadow: 8px 8px 0 var(--ink);
}
.client-avatar span { display: grid; place-items: center; width: 68px; height: 68px; margin-top: 55px; border-radius: 50%; background: rgba(255,255,255,0.94); border: 2px solid var(--ink); font-weight: 950; font-size: 1.3rem; }
.client-avatar--small { width: 64px; height: 64px; margin: 0; box-shadow: 4px 4px 0 var(--ink); background: linear-gradient(160deg, var(--purple), #bfb6ff); }
.client-avatar--small span { width: 36px; height: 36px; margin: 0; font-size: 0.8rem; }
.client-status { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 0.7rem; padding: 0.35rem 0.6rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.72rem; font-weight: 850; }
.client-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.client-preview h2 { margin-bottom: 0.25rem; font-size: clamp(2rem, 4vw, 3rem); }
.client-preview > p { color: var(--muted); }
.client-preview blockquote { margin: 0 0 1rem; border-left: 5px solid var(--ink); padding-left: 1rem; font-size: 1.1rem; font-weight: 730; }
.case-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mentor-float {
  position: absolute;
  right: -2.4rem;
  top: 36%;
  width: min(310px, 80%);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 0.85rem;
  background: var(--lime);
  box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(2deg);
}
.mentor-float div:last-child { display: grid; }
.mentor-float span { font-size: 0.78rem; }
.mentor-avatar { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--ink); color: #fff; font-weight: 950; }

/* Map */
#screen-map { background: linear-gradient(rgba(255,255,255,0.25), rgba(255,255,255,0.25)), var(--paper); }
.map-topbar,
.dashboard-grid,
.map-lower-grid { width: min(var(--max), 100%); margin-inline: auto; }
.map-topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 1.5rem; }
.map-topbar h1 { max-width: 14ch; margin-bottom: 0.4rem; font-size: clamp(2.2rem, 5vw, 4.4rem); }
.map-topbar p { color: var(--muted); }
.level-card { min-width: 270px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.8rem; border: 2px solid var(--ink); border-radius: var(--radius); padding: 1rem; background: var(--ink); color: #fff; box-shadow: 6px 6px 0 var(--lime); }
.level-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--lime); color: var(--ink); }
.level-card div:nth-child(2) { display: grid; }
.level-card small { color: #bbbcc1; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.6rem; }
.mini-progress { grid-column: 2; height: 7px; overflow: hidden; border-radius: 999px; background: #38383e; }
.mini-progress span { display: block; width: 0; height: 100%; background: var(--lime); transition: width 300ms ease; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.75fr); gap: 1.25rem; }
.journey-card,
.scorecard,
.client-file-card,
.badge-shelf-card { border: 2px solid var(--ink); border-radius: var(--radius-lg); background: #fff; padding: clamp(1.1rem, 2.5vw, 2rem); box-shadow: 6px 6px 0 var(--ink); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.75rem); }
.section-heading > span { font-size: 0.78rem; font-weight: 850; color: var(--muted); }
.module-map { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.15rem; }
.module-map::before { content: ""; position: absolute; left: 8%; right: 8%; top: 48%; height: 3px; background: repeating-linear-gradient(90deg, var(--line) 0 12px, transparent 12px 22px); z-index: 0; }
.module-node {
  appearance: none;
  position: relative;
  z-index: 1;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 1rem;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.module-node:hover:not(:disabled) { transform: translateY(-5px) rotate(-0.5deg); box-shadow: 6px 6px 0 var(--ink); }
.module-node:disabled { cursor: not-allowed; filter: grayscale(1); opacity: 0.48; }
.module-node.is-complete { background: #f4ffe2; }
.module-node.is-current { background: var(--lime); box-shadow: 5px 5px 0 var(--ink); }
.module-node-icon { width: 50px; height: 50px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-size: 1.55rem; }
.module-node small { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.58rem; font-weight: 850; }
.module-node strong { font-size: 1rem; line-height: 1.1; }
.module-node-status { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.7rem; font-weight: 800; }
.node-check { width: 26px; height: 26px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: #fff; }
.competency-meters { display: grid; gap: 1rem; }
.competency-row { display: grid; gap: 0.4rem; }
.competency-row > div:first-child { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.82rem; font-weight: 800; }
.meter-track { height: 12px; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--surface-2); }
.meter-track span { display: block; height: 100%; width: 50%; background: var(--ink); transition: width 350ms ease; }
.scorecard-note { display: flex; gap: 0.7rem; margin-top: 1.5rem; padding: 0.9rem; border: 1.5px dashed var(--ink); border-radius: 12px; background: #fffceb; font-size: 0.78rem; }
.scorecard-note p { margin: 0; }
.map-lower-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); gap: 1.25rem; margin-top: 1.25rem; }
.client-file-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.client-file-head h2 { margin: 0; font-size: 1.4rem; }
.client-file-head .privacy-chip { margin-left: auto; background: #effff8; }
.client-file-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.client-file-grid > div { display: grid; gap: 0.2rem; padding: 0.85rem; border: 1px solid var(--line); border-radius: 12px; background: #faf9f6; }
.client-file-grid small { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; }
.client-file-grid strong { font-size: 0.86rem; }
.badge-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; }
.badge-token { min-height: 80px; display: grid; place-items: center; align-content: center; gap: 0.2rem; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--surface-2); text-align: center; filter: grayscale(1); opacity: 0.5; }
.badge-token.is-earned { filter: none; opacity: 1; background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }
.badge-token span { font-size: 1.35rem; }
.badge-token small { font-size: 0.58rem; line-height: 1.05; color: var(--ink); font-weight: 850; }

/* Module */
#screen-module { padding: 0; }
.module-shell { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: minmax(270px, 350px) 1fr; }
.module-rail { position: sticky; top: var(--header-h); align-self: start; min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; padding: clamp(1.25rem, 3vw, 2.25rem); background: var(--ink); color: #fff; }
.back-link { appearance: none; align-self: flex-start; border: 0; background: transparent; color: #fff; padding: 0; cursor: pointer; font-weight: 800; }
.module-identity { margin: 3rem 0 2rem; }
.module-big-icon { display: grid; place-items: center; width: 74px; height: 74px; margin-bottom: 1.2rem; border: 2px solid #fff; border-radius: 20px; background: var(--lime); color: var(--ink); font-size: 2rem; transform: rotate(-3deg); }
.module-identity .section-kicker { color: var(--lime); }
.module-identity h1 { margin: 0 0 0.8rem; font-size: clamp(2rem, 4vw, 3.5rem); }
.module-identity p { color: #c3c3c8; }
.module-progress-wrap { margin-bottom: 1.3rem; }
.module-progress-wrap > div:first-child { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.45rem; font-size: 0.75rem; }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: #35353a; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--lime); transition: width 320ms ease; }
.mentor-card { display: flex; gap: 0.75rem; margin-top: auto; margin-bottom: 1rem; border: 1px solid #3d3d42; border-radius: 14px; padding: 0.9rem; background: #17171a; }
.mentor-card strong { font-size: 0.78rem; color: var(--lime); }
.mentor-card p { margin: 0.15rem 0 0; color: #c3c3c8; font-size: 0.75rem; }
.module-rail .button--ghost { border-color: #57575e; color: #fff; }
.module-stage { min-width: 0; padding: clamp(1.2rem, 5vw, 5rem); background: var(--paper); }
.module-intro { max-width: 980px; margin: 0 auto 1.5rem; }
.module-intro-card { position: relative; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--radius-lg); padding: clamp(1.3rem, 3vw, 2.3rem); background: #fff; box-shadow: 7px 7px 0 var(--ink); }
.module-intro-card::after { content: ""; position: absolute; right: -45px; top: -45px; width: 145px; height: 145px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); }
.module-intro-card h2 { max-width: 18ch; position: relative; z-index: 1; }
.objective-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.objective-list li { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.65rem; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; font-size: 0.82rem; }
.objective-list li::before { content: "✓"; flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.65rem; }
.question-stage { max-width: 980px; margin: 0 auto; }
.question-card { border: 2px solid var(--ink); border-radius: var(--radius-lg); background: #fff; box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.question-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 2px solid var(--ink); background: #faf9f6; }
.question-counter { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.question-points { border: 1px solid var(--ink); border-radius: 999px; padding: 0.25rem 0.55rem; background: var(--lime); font-size: 0.7rem; font-weight: 900; }
.question-body { padding: clamp(1.2rem, 3vw, 2.25rem); }
.question-body h2 { max-width: 28ch; margin-bottom: 1.2rem; font-size: clamp(1.45rem, 3vw, 2.2rem); }
.client-line,
.question-context { display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 1.2rem; border: 1.5px solid var(--ink); border-radius: 16px; padding: 1rem; background: #f6f2ff; }
.client-line::before { content: "MP"; flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 50%; background: var(--purple); color: #fff; font-weight: 900; font-size: 0.75rem; }
.client-line p,
.question-context p { margin: 0; font-weight: 700; }
.question-context { background: #f4ffe2; }
.question-context::before { content: "i"; flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 50%; font-weight: 950; }
.options-grid { display: grid; gap: 0.75rem; }
.option-button {
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 64px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease;
}
.option-button:hover:not(:disabled) { transform: translateX(4px); box-shadow: -4px 4px 0 var(--ink); }
.option-letter { width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 9px; background: var(--surface-2); font-weight: 950; }
.option-button.is-selected { background: #f0ecff; }
.option-button.is-correct { background: #e7fff2; border-color: var(--good); }
.option-button.is-incorrect { background: #fff0f0; border-color: var(--danger); }
.option-button:disabled { cursor: default; }
.option-mark { font-size: 1.2rem; font-weight: 950; }
.multi-option { display: flex; align-items: flex-start; gap: 0.75rem; border: 2px solid var(--ink); border-radius: 13px; padding: 0.85rem 1rem; background: #fff; cursor: pointer; }
.multi-option:hover { background: #faf9f6; }
.multi-option input { width: 21px; height: 21px; margin-top: 0.1rem; accent-color: var(--ink); }
.question-actions { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; margin-top: 1.2rem; }
.feedback-panel { margin-top: 1.2rem; border: 2px solid var(--ink); border-radius: 14px; padding: 1rem; background: #fffceb; animation: feedbackIn 200ms ease both; }
.feedback-panel.is-correct { background: #eafff3; }
.feedback-panel.is-critical { background: #fff0f0; border-color: var(--danger); }
.feedback-title { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.35rem; font-weight: 950; }
.feedback-panel p { margin-bottom: 0.8rem; }
.feedback-deltas { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.feedback-deltas span { border: 1px solid var(--ink); border-radius: 999px; padding: 0.25rem 0.5rem; background: #fff; font-size: 0.65rem; font-weight: 850; }
@keyframes feedbackIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Sequence */
.sequence-builder { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: stretch; }
.sequence-bank,
.sequence-answer { min-height: 250px; border: 2px dashed var(--ink); border-radius: 16px; padding: 0.8rem; background: #faf9f6; }
.sequence-bank h3,
.sequence-answer h3 { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.sequence-items { display: grid; gap: 0.6rem; }
.sequence-item { appearance: none; display: flex; align-items: center; gap: 0.6rem; width: 100%; border: 1.5px solid var(--ink); border-radius: 10px; padding: 0.7rem; background: #fff; text-align: left; cursor: pointer; font-size: 0.82rem; font-weight: 700; }
.sequence-item:hover { background: var(--lime); }
.sequence-item-number { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.7rem; }
.sequence-arrow { align-self: center; font-size: 1.7rem; font-weight: 900; }

/* Hotspot */
.hotspot-layout { display: grid; grid-template-columns: minmax(260px, 0.75fr) minmax(260px, 1.25fr); gap: 1.3rem; align-items: center; }
.figure-board { position: relative; min-height: 430px; overflow: hidden; border: 2px solid var(--ink); border-radius: 22px; background: linear-gradient(#e9e5dc 1px, transparent 1px), linear-gradient(90deg, #e9e5dc 1px, transparent 1px), #faf9f6; background-size: 28px 28px; }
.squat-figure { position: absolute; left: 50%; top: 50%; width: 185px; height: 360px; transform: translate(-50%, -50%); }
.squat-figure .head { position: absolute; left: 75px; top: 6px; width: 54px; height: 54px; border: 5px solid var(--ink); border-radius: 50%; background: #d9a482; }
.squat-figure .torso { position: absolute; left: 69px; top: 58px; width: 68px; height: 120px; border: 5px solid var(--ink); border-radius: 38% 38% 25% 25%; background: var(--purple); transform: rotate(11deg); }
.squat-figure .limb { position: absolute; height: 12px; border: 4px solid var(--ink); border-radius: 999px; background: #d9a482; transform-origin: left center; }
.squat-figure .arm-l { left: 72px; top: 86px; width: 92px; transform: rotate(10deg); }
.squat-figure .arm-r { left: 80px; top: 105px; width: 90px; transform: rotate(-4deg); }
.squat-figure .thigh-l { left: 82px; top: 173px; width: 92px; transform: rotate(48deg); }
.squat-figure .shin-l { left: 142px; top: 235px; width: 94px; transform: rotate(103deg); }
.squat-figure .thigh-r { left: 62px; top: 175px; width: 95px; transform: rotate(140deg); }
.squat-figure .shin-r { left: -6px; top: 234px; width: 98px; transform: rotate(77deg); }
.squat-figure .foot-l { left: 111px; top: 326px; width: 78px; transform: rotate(9deg); background: var(--ink); }
.squat-figure .foot-r { left: 20px; top: 325px; width: 78px; transform: rotate(-10deg); background: var(--ink); }
.hotspot {
  appearance: none;
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  min-width: 34px;
  min-height: 34px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: rgba(214,255,54,0.88);
  cursor: pointer;
  font-size: 0;
  box-shadow: 0 0 0 7px rgba(214,255,54,0.2);
}
.hotspot::after { content: "+"; font-size: 1rem; font-weight: 950; }
.hotspot:hover { transform: translate(-50%, -50%) scale(1.16); }
.hotspot.is-selected { background: var(--purple); color: #fff; }
.hotspot-key { display: grid; gap: 0.6rem; }
.hotspot-key button { appearance: none; display: flex; align-items: center; gap: 0.65rem; border: 1.5px solid var(--ink); border-radius: 10px; padding: 0.7rem; background: #fff; cursor: pointer; text-align: left; font-weight: 750; }
.hotspot-key button::before { content: "+"; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); border: 1.5px solid var(--ink); }
.hotspot-key button.is-selected { background: #f0ecff; }

/* Bar loading */
.barload-wrap { display: grid; gap: 1.1rem; }
.barload-summary { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.barload-summary span { border: 1.5px solid var(--ink); border-radius: 999px; padding: 0.45rem 0.7rem; background: #fff; font-weight: 850; font-size: 0.78rem; }
.barbell-board { overflow-x: auto; border: 2px solid var(--ink); border-radius: 18px; padding: 2rem 1rem; background: #f5f5f5; }
.barbell { min-width: 650px; display: grid; grid-template-columns: 1fr 190px 1fr; align-items: center; }
.bar-side { display: flex; align-items: center; min-height: 118px; }
.bar-side--left { justify-content: flex-end; flex-direction: row; }
.bar-side--right { justify-content: flex-start; flex-direction: row; }
.bar-shaft { height: 22px; border: 3px solid var(--ink); background: linear-gradient(#aaa,#eee,#999); position: relative; }
.bar-shaft::before,
.bar-shaft::after { content: ""; position: absolute; top: 50%; width: 22px; height: 62px; transform: translateY(-50%); border: 3px solid var(--ink); background: #bbb; }
.bar-shaft::before { left: -24px; }
.bar-shaft::after { right: -24px; }
.loaded-plate { min-width: 22px; height: var(--plate-h, 80px); display: grid; place-items: center; margin: 0 1px; border: 3px solid var(--ink); border-radius: 8px; background: var(--purple); color: #fff; font-size: 0.65rem; font-weight: 950; writing-mode: vertical-rl; cursor: pointer; }
.loaded-plate:hover { filter: brightness(1.15); }
.plate-rack { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.plate-button { appearance: none; min-width: 62px; height: 62px; border: 3px solid var(--ink); border-radius: 50%; background: var(--lime); cursor: pointer; font-weight: 950; }
.plate-button:hover { transform: rotate(-5deg) scale(1.06); }
.side-selector { display: flex; gap: 0.5rem; }
.side-selector button { appearance: none; flex: 1; border: 2px solid var(--ink); border-radius: 10px; padding: 0.65rem; background: #fff; cursor: pointer; font-weight: 850; }
.side-selector button.is-selected { background: var(--ink); color: #fff; }

/* Program builder */
.program-brief { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.program-brief > div { border: 1.5px solid var(--ink); border-radius: 12px; padding: 0.8rem; background: #f4ffe2; }
.program-brief small { display: block; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.58rem; }
.program-brief strong { font-size: 0.82rem; }
.program-builder { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr); gap: 1rem; }
.exercise-palette { max-height: 650px; overflow: auto; border: 2px solid var(--ink); border-radius: 16px; padding: 0.8rem; background: #faf9f6; }
.exercise-palette h3 { position: sticky; top: -0.8rem; z-index: 2; margin: -0.8rem -0.8rem 0.8rem; padding: 0.9rem; background: var(--ink); color: #fff; font-size: 0.9rem; }
.exercise-list { display: grid; gap: 0.65rem; }
.exercise-card { border: 1.5px solid var(--ink); border-radius: 12px; padding: 0.75rem; background: #fff; cursor: grab; }
.exercise-card.is-poor-fit { border-style: dashed; }
.exercise-card.is-used { opacity: 0.45; }
.exercise-card-head { display: flex; align-items: center; gap: 0.55rem; }
.exercise-card-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); }
.exercise-card strong { flex: 1; font-size: 0.82rem; line-height: 1.15; }
.exercise-card small { display: block; margin-top: 0.4rem; font-size: 0.68rem; }
.exercise-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-top: 0.55rem; }
.exercise-card-actions button { appearance: none; border: 1px solid var(--ink); border-radius: 8px; padding: 0.35rem; background: #fff; cursor: pointer; font-size: 0.65rem; font-weight: 850; }
.exercise-card-actions button:hover { background: var(--lime); }
.session-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.session-column { min-height: 520px; display: flex; flex-direction: column; border: 2px solid var(--ink); border-radius: 16px; padding: 0.8rem; background: #fff; }
.session-column.is-dragover { background: #f4ffe2; box-shadow: inset 0 0 0 4px var(--lime); }
.session-header { display: flex; justify-content: space-between; gap: 0.7rem; align-items: center; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); }
.session-header h3 { margin: 0; font-size: 1rem; }
.time-chip { border: 1px solid var(--ink); border-radius: 999px; padding: 0.25rem 0.5rem; font-size: 0.65rem; font-weight: 850; }
.session-list { flex: 1; display: grid; align-content: start; gap: 0.55rem; padding-top: 0.7rem; }
.session-empty { min-height: 150px; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 12px; padding: 1rem; color: var(--muted); text-align: center; font-size: 0.78rem; }
.session-exercise { display: grid; grid-template-columns: auto 1fr auto; gap: 0.55rem; align-items: center; border: 1.5px solid var(--ink); border-radius: 10px; padding: 0.6rem; background: #faf9f6; }
.session-exercise span:first-child { font-size: 1.2rem; }
.session-exercise strong { display: block; font-size: 0.75rem; }
.session-exercise small { font-size: 0.62rem; }
.session-exercise button { appearance: none; width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: 50%; background: #fff; cursor: pointer; }
.pattern-checks { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.65rem; }
.pattern-chip { border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.4rem; font-size: 0.55rem; text-transform: uppercase; font-weight: 850; }
.pattern-chip.is-met { border-color: var(--good); background: #e7fff2; }
.program-evaluation { display: grid; gap: 0.55rem; margin-top: 1rem; border: 2px solid var(--ink); border-radius: 14px; padding: 0.9rem; background: #fffceb; }
.program-evaluation-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.75rem; }
.program-evaluation-row strong.good { color: var(--good); }
.program-evaluation-row strong.warn { color: var(--danger); }

/* Module complete */
.module-complete { position: relative; overflow: hidden; text-align: center; border: 3px solid var(--ink); border-radius: 30px; padding: clamp(2rem, 6vw, 5rem); background: #fff; box-shadow: 10px 10px 0 var(--lime); }
.module-complete::before,
.module-complete::after { content: ""; position: absolute; width: 150px; height: 150px; border: 3px solid var(--ink); transform: rotate(30deg); background: var(--purple); opacity: 0.12; }
.module-complete::before { left: -85px; top: -75px; }
.module-complete::after { right: -80px; bottom: -80px; background: var(--lime); opacity: 0.6; }
.complete-badge { position: relative; z-index: 1; width: 120px; height: 120px; display: grid; place-items: center; margin: 0 auto 1.2rem; border: 3px solid var(--ink); border-radius: 50%; background: var(--lime); box-shadow: 7px 7px 0 var(--ink); font-size: 3rem; }
.module-complete h2 { font-size: clamp(2rem, 5vw, 4rem); }
.module-complete p { max-width: 58ch; margin-inline: auto; }
.complete-stats { max-width: 620px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin: 1.5rem auto; }
.complete-stats div { border: 1.5px solid var(--ink); border-radius: 12px; padding: 0.8rem; background: #faf9f6; }
.complete-stats strong { display: block; font-size: 1.25rem; }
.complete-stats small { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.58rem; }
.module-complete .button-row { justify-content: center; }

/* Report */
#screen-report { background: #ece9e0; }
.report-shell { width: min(1180px, 100%); margin: 0 auto; }
.report-hero { position: relative; overflow: hidden; border: 3px solid var(--ink); border-radius: 30px; padding: clamp(1.5rem, 5vw, 4rem); background: var(--ink); color: #fff; box-shadow: 12px 12px 0 var(--lime); }
.report-hero::after { content: ""; position: absolute; right: -70px; top: -90px; width: 330px; height: 330px; border-radius: 50%; background: var(--lime); }
.report-hero > * { position: relative; z-index: 1; }
.report-hero .eyebrow { color: #fff; }
.report-hero h1 { max-width: 12ch; font-size: clamp(2.7rem, 7vw, 6rem); }
.report-hero p { max-width: 60ch; color: #d4d4d7; }
.report-level { display: inline-flex; align-items: center; gap: 0.7rem; margin-top: 1rem; border: 1px solid #666; border-radius: 999px; padding: 0.55rem 0.8rem; }
.report-level span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--ink); }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); gap: 1rem; margin-top: 1.3rem; }
.report-card { border: 2px solid var(--ink); border-radius: 20px; padding: 1.3rem; background: #fff; box-shadow: 5px 5px 0 var(--ink); }
.report-card h2 { font-size: 1.45rem; }
.report-meters { display: grid; gap: 0.9rem; }
.report-meter { display: grid; grid-template-columns: minmax(120px, 0.6fr) minmax(160px, 1fr) auto; align-items: center; gap: 0.7rem; }
.report-meter strong { font-size: 0.8rem; }
.report-meter .meter-track { height: 15px; }
.report-meter > span:last-child { width: 42px; text-align: right; font-weight: 900; }
.readiness-callout { border-left: 7px solid var(--lime); padding: 1rem; background: #f4ffe2; }
.readiness-callout h3 { margin-bottom: 0.35rem; }
.readiness-callout p { margin: 0; }
.report-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.report-badge { display: grid; place-items: center; min-height: 115px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--lime); text-align: center; padding: 0.6rem; }
.report-badge span { font-size: 1.7rem; }
.report-badge strong { font-size: 0.68rem; line-height: 1.1; }
.case-summary { display: grid; gap: 0.65rem; }
.case-summary div { border-bottom: 1px solid var(--line); padding-bottom: 0.65rem; }
.case-summary small { display: block; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.58rem; }
.report-program { grid-column: 1 / -1; }
.report-program-days { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.report-day { border: 1.5px solid var(--ink); border-radius: 14px; overflow: hidden; }
.report-day h3 { margin: 0; padding: 0.75rem; background: var(--ink); color: #fff; font-size: 0.95rem; }
.report-day ol { margin: 0; padding: 0.8rem 0.8rem 0.8rem 2rem; }
.report-day li { margin-bottom: 0.35rem; font-size: 0.8rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.3rem; }
.report-disclaimer { margin-top: 1rem; font-size: 0.72rem; color: var(--muted); }

/* Modal and toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; background: rgba(11,11,13,0.78); }
.modal { position: relative; width: min(650px, 100%); max-height: 88vh; overflow: auto; border: 3px solid var(--ink); border-radius: 22px; padding: 1.5rem; background: #fff; box-shadow: 10px 10px 0 var(--lime); }
.modal-close { appearance: none; position: absolute; right: 0.8rem; top: 0.8rem; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; cursor: pointer; font-size: 1.3rem; }
.modal h2 { padding-right: 3rem; }
.toast-region { position: fixed; z-index: 1200; right: 1rem; bottom: 1rem; display: grid; gap: 0.6rem; width: min(360px, calc(100% - 2rem)); }
.toast { border: 2px solid var(--ink); border-radius: 12px; padding: 0.85rem; background: #fff; box-shadow: 5px 5px 0 var(--ink); animation: toastIn 220ms ease both; }
.toast.is-good { background: #eafff3; }
.toast.is-badge { background: var(--lime); }
.toast strong { display: block; }
.toast p { margin: 0.15rem 0 0; font-size: 0.75rem; }
@keyframes toastIn { from { opacity: 0; transform: translateX(15px); } to { opacity: 1; transform: none; } }

/* Admin */
.admin-body { background: #ece9e0; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 2rem; background: var(--ink); color: #fff; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.admin-nav a { border: 1px solid #52525a; border-radius: 9px; padding: 0.45rem 0.65rem; color: #fff; text-decoration: none; font-size: 0.75rem; font-weight: 800; }
.admin-nav a:hover,
.admin-nav a.is-active { background: var(--lime); color: var(--ink); border-color: var(--ink); }
.admin-main { width: min(1300px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; }
.admin-titlebar { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.2rem; }
.admin-titlebar h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-bottom: 1rem; }
.admin-stat { border: 2px solid var(--ink); border-radius: 14px; padding: 1rem; background: #fff; box-shadow: 4px 4px 0 var(--ink); }
.admin-stat small { display: block; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.6rem; }
.admin-stat strong { font-size: 1.8rem; }
.admin-card { border: 2px solid var(--ink); border-radius: 18px; padding: 1rem; background: #fff; box-shadow: 5px 5px 0 var(--ink); }
.admin-card + .admin-card { margin-top: 1rem; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.admin-table th,
.admin-table td { padding: 0.7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { background: #faf9f6; text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.58rem; }
.admin-table tr:hover td { background: #fbfff0; }
.admin-actions { display: flex; gap: 0.35rem; }
.status-badge { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; padding: 0.2rem 0.45rem; font-size: 0.6rem; font-weight: 900; }
.status-badge.is-complete { background: #e7fff2; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--ink); }
.login-card { width: min(470px, 100%); border: 3px solid var(--ink); border-radius: 22px; padding: 2rem; background: var(--paper); box-shadow: 10px 10px 0 var(--lime); }
.login-card h1 { font-size: 2.3rem; }
.logo-preview { min-height: 150px; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 14px; background: #faf9f6; }
.logo-preview img { max-width: 240px; max-height: 120px; }
.json-editor { min-height: 65vh !important; white-space: pre; }

/* Responsive */
@media (max-width: 1120px) {
  .module-map { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .module-map::before { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .scorecard { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .scorecard .section-heading { grid-column: 1 / -1; }
  .map-lower-grid { grid-template-columns: 1fr; }
  .badge-shelf { grid-template-columns: repeat(7, 1fr); }
  .program-builder { grid-template-columns: 1fr; }
  .exercise-palette { max-height: none; }
  .exercise-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .app-header { padding-inline: 1rem; }
  .save-indicator { display: none; }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; padding-block: 1rem 2rem; }
  .client-preview { min-height: 500px; order: -1; }
  .mentor-float { right: 0.8rem; top: 30%; }
  .map-topbar { align-items: stretch; flex-direction: column; }
  .level-card { min-width: 0; width: 100%; }
  .module-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-shell { grid-template-columns: 1fr; }
  .module-rail { position: relative; top: 0; min-height: auto; }
  .module-identity { margin: 1.5rem 0; }
  .mentor-card { margin-top: 1rem; }
  .hotspot-layout { grid-template-columns: 1fr; }
  .figure-board { min-height: 380px; }
  .report-grid { grid-template-columns: 1fr; }
  .report-program { grid-column: auto; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .app-header .brand-lockup small { display: none; }
  .app-header .brand-lockup strong { font-size: 0.75rem; }
  .brand-mark { width: 39px; height: 39px; }
  .xp-pill { padding: 0.35rem 0.5rem; }
  .header-status { gap: 0.4rem; }
  .header-status .icon-button { width: 34px; height: 34px; }
  .screen { padding: 1rem; }
  .hero-copy h1 { font-size: 3.1rem; }
  .learner-card { grid-template-columns: 1fr; box-shadow: 5px 5px 0 var(--ink); }
  .learner-card .check-row,
  .learner-card .button { grid-column: auto; }
  .client-preview { min-height: 465px; padding: 1.2rem; box-shadow: 8px 8px 0 var(--ink); }
  .client-avatar { width: 165px; height: 165px; }
  .client-avatar span { margin-top: 40px; }
  .mentor-float { width: 88%; top: 24%; transform: none; }
  .module-map { grid-template-columns: 1fr; }
  .module-node { min-height: 132px; }
  .scorecard { display: block; }
  .scorecard-note { margin-top: 1rem; }
  .client-file-grid { grid-template-columns: 1fr; }
  .badge-shelf { grid-template-columns: repeat(4, 1fr); }
  .module-stage { padding: 1rem; }
  .objective-list { grid-template-columns: 1fr; }
  .question-body { padding: 1rem; }
  .sequence-builder { grid-template-columns: 1fr; }
  .sequence-arrow { transform: rotate(90deg); justify-self: center; }
  .program-brief { grid-template-columns: 1fr; }
  .session-columns { grid-template-columns: 1fr; }
  .exercise-list { grid-template-columns: 1fr; }
  .complete-stats { grid-template-columns: 1fr; }
  .report-meters .report-meter { grid-template-columns: 1fr auto; }
  .report-meter .meter-track { grid-column: 1 / -1; order: 3; }
  .report-badges { grid-template-columns: repeat(2, 1fr); }
  .report-program-days { grid-template-columns: 1fr; }
  .form-grid,
  .admin-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .admin-header { align-items: flex-start; flex-direction: column; padding: 1rem; }
  .admin-titlebar { align-items: flex-start; flex-direction: column; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .app-footer { flex-direction: column; }
}

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

@media print {
  .app-header,
  .app-footer,
  .report-actions,
  .toast-region,
  .modal-backdrop { display: none !important; }
  body { background: #fff; }
  .screen { display: none !important; padding: 0; }
  #screen-report { display: block !important; }
  .report-hero,
  .report-card { box-shadow: none; break-inside: avoid; }
  .report-hero { color: #000; background: #fff; }
  .report-hero p { color: #333; }
  .report-hero::after { display: none; }
  .report-grid { display: block; }
  .report-card { margin-top: 0.7rem; }
}
