:root {
  color-scheme: dark;
  --bg: #080f1d;
  --header: #091321;
  --panel: #101d30;
  --panel-alt: #14243a;
  --line: #293a52;
  --text: #f2f6ff;
  --muted: #a8b8cf;
  --accent: #5de0fd;
  --accent-hi: #a2eeff;
  --green: #83f0c6;
  --red: #ffb3bf;
  --radius: 18px;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body { margin: 0; min-width: 280px; line-height: 1.55; }
a { color: var(--accent-hi); text-underline-offset: .18em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.036em; }
.shell { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 3; padding: 10px 16px; background: var(--panel); }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--header); }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 81px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { width: 124px; height: auto; display: block; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
.nav nav > a:not(.button) { color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav nav > a:hover:not(.button) { color: var(--accent); }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 48px; padding: 11px 19px; border: 1px solid transparent; border-radius: 10px;
  background: var(--accent); color: #061322; text-decoration: none; font-weight: 750; text-align: center;
}
.button:not(:disabled):hover { background: var(--accent-hi); }
.button-small { min-height: 40px; padding: 7px 15px; font-size: .9rem; }
.button-outline { background: transparent; border-color: #476179; color: var(--text); }
.button-outline:not(:disabled):hover { background: #1c3047; }
.button:disabled { cursor: wait; opacity: .65; }
.eyebrow { letter-spacing: .14em; font-size: .82rem; font-weight: 800; color: var(--accent); }
.meta { color: var(--muted); font-size: .9rem; }
.hero {
  overflow: hidden;
  padding-block: clamp(68px, 9vw, 128px) clamp(68px, 8vw, 108px);
  background: radial-gradient(ellipse at 81% 42%, #15345a 0%, transparent 55%), var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.28fr 1fr; align-items: center; gap: clamp(32px, 6vw, 90px); }
.hero-copy h1 { margin: 15px 0 19px; font-size: clamp(2.65rem, 5.8vw, 5.2rem); letter-spacing: -.074em; }
.hero-copy h1 span { color: var(--accent); }
.hero-lede { max-width: 40ch; color: #c5d4e8; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 30px 15px; }
.preview { min-width: 0; }
.preview-app { background: #0b1525; border: 1px solid #385472; border-radius: 20px; overflow: hidden; box-shadow: 0 28px 64px #0007; }
.preview-top { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #293a52; padding: 13px 20px; color: #c4d2e7; font-size: .9rem; }
.preview-mark { color: var(--accent); font-weight: 900; font-style: italic; }
.preview-label { margin-left: auto; border-radius: 20px; border: 1px solid #385472; padding: 2px 10px; font-size: .8rem; }
.preview-body { padding: clamp(18px, 3vw, 30px); }
.preview-title { margin-top: 4px; font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-weight: 750; line-height: 1.25; }
.preview-title span { color: var(--muted); }
.preview-list { list-style: none; padding: 0; display: grid; gap: 8px; margin: 20px 0 16px; }
.preview-list li { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--panel); border: 1px solid #253851; border-radius: 10px; }
.preview-list li div { display: grid; flex: 1; gap: 2px; line-height: 1.35; }
.preview-list li div span, .preview-list small { color: var(--muted); font-size: .82rem; }
.preview-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; background: #14344c; color: #8ce9ff; font-size: .75rem; }
.preview-check { color: var(--green); background: #102a2c; border: 1px solid #245754; border-radius: 8px; padding: 8px 12px; font-size: .91rem; }
.preview-check span { margin-right: 6px; }
.preview figcaption { margin-top: 10px; font-size: .82rem; color: var(--muted); }
.workflow { background: #0d1727; padding-block: 64px 78px; }
.workflow h2 { margin-block: 10px 28px; font-size: clamp(1.9rem, 4.5vw, 3.25rem); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps article { padding: 22px; background: var(--panel); border-top: 2px solid #4eb9d8; border-radius: 0 0 12px 12px; }
.steps h3 { margin-bottom: 8px; font-size: 1.27rem; }
.steps p, .site-footer { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); }
.site-footer .shell { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-block: 23px; }
.footer-credit { display: grid; gap: 2px; }
.footer-credit strong { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; column-gap: 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.application { background: radial-gradient(ellipse at top right, #172d4c 0%, transparent 50%), var(--bg); min-height: 100vh; }
.app-main { padding-block: clamp(32px, 6vw, 70px); }
.app-main h1 { font-size: clamp(2.25rem, 5.5vw, 4.1rem); margin-block: 6px 12px; }
.app-main h2 { font-size: 1.52rem; }
.app-main > .notice:not([hidden]) { margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(17px, 3.3vw, 28px); }
.auth-card { max-width: 480px; margin: 0 auto; }
.auth-card h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.auth-card form { margin-top: 20px; }
.auth-card form > .button { width: 100%; }
.auth-card .form-foot { margin-top: 14px; color: var(--muted); }
.form-grid { display: grid; gap: 13px; }
.field { display: grid; gap: 5px; min-width: 0; color: var(--text); font-weight: 630; }
.field small { color: var(--muted); font-weight: 400; font-size: .85rem; }
input, select {
  width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #49617e;
  border-radius: 8px; background: #0a1526; color: var(--text);
}
.notice { padding: 12px 14px; border: 1px solid #355773; background: #10283d; border-radius: 9px; }
#dues-reminder, #congratulations-message { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #0a1526; color: var(--text); font: inherit; font-weight: 400; resize: vertical; }
.notice.error { background: #351b29; border-color: #65354a; color: var(--red); }
.notice.success { background: #102a2c; border-color: #245754; color: var(--green); }
.page-head { margin-bottom: 26px; }
.page-head .meta { font-size: 1rem; }
.section-stack { display: grid; gap: 17px; }
.setup-list { list-style: none; display: grid; gap: 8px; padding: 0 14px 12px; margin: 0; }
.setup-list li { display: flex; gap: 10px; align-items: center; }
.setup-action { padding: 0; border: 0; background: transparent; color: var(--accent-hi); text-align: left; text-decoration: underline; text-underline-offset: .18em; }
.status-icon { border: 1px solid #49617e; border-radius: 50%; width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; color: var(--muted); font-size: .83rem; }
.status-icon.done { color: var(--green); border-color: #458f81; }
.row-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.row-form .notice { grid-column: 1 / -1; }
.row-form .button { min-height: 44px; }
.student-row, .exercise-list li { padding: 14px; background: #0c1829; border: 1px solid var(--line); border-radius: 10px; }
.student-row { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.student-name { font-size: 1.13rem; overflow-wrap: anywhere; }
.radar-status { margin-top: 4px; font-weight: 650; }
.radar-status[data-group="attention"] { color: #ffcd82; }
.radar-status[data-group="current"] { color: var(--green); }
.student-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.exercise-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.exercise-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.exercise-list .workout-item { display: grid; gap: 12px; }
.workout-cover { display: grid; gap: 7px; margin: 0; }
.workout-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.exercise-prescription > details { flex-basis: 100%; min-width: 0; }
.workout-video-frame { position: relative; width: min(100%, 510px); min-height: 200px; aspect-ratio: 16 / 9; margin-inline: auto; }
.workout-video-short { width: min(100%, 282px); aspect-ratio: 9 / 16; }
.workout-video-frame iframe, .workout-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; background: #101f33; }
.exercise-prescription canvas { display: block; width: min(100%, 360px); height: auto; margin-inline: auto; background: #101f33; border-radius: 8px; }
.exercise-prescription input[type="range"] { padding: 0; accent-color: var(--accent); }
.exercise-prescription .exercise-picker > :only-child { grid-column: 1 / -1; }
.motion-actions { align-items: end; }
.workout-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.model-preview { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.model-preview-items { display: grid; gap: 8px; padding-left: 23px; margin: 0; }
.workout-item-fields { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr); gap: 8px; }
.exercise-picker { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; }
.exercise-match { border: 1px solid #49617e; border-radius: 10px; background: #0a1526; }
.exercise-match summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 11px 14px; cursor: pointer; }
.exercise-match summary::-webkit-details-marker { display: none; }
.exercise-match summary::before { content: "+"; color: var(--accent); }
.exercise-match[open] summary::before { content: "−"; }
.exercise-match summary .meta { margin-left: auto; }
.exercise-match-body { display: grid; gap: 10px; padding: 0 12px 12px; }
.exercise-options { max-height: 18rem; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 8px; }
.exercise-options > .meta { padding: 12px; }
.exercise-option { display: flex; gap: 11px; align-items: center; min-height: 49px; padding: 8px 11px; cursor: pointer; }
.exercise-option + .exercise-option { border-top: 1px solid var(--line); }
.exercise-option:hover, .exercise-option:focus-within { background: var(--panel-alt); }
.exercise-option input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; flex: 0 0 18px; accent-color: var(--accent); }
.exercise-option span { display: grid; line-height: 1.35; overflow-wrap: anywhere; }
.exercise-option small { color: var(--muted); }
.exercise-match button:disabled, #add-exercise:disabled { cursor: default; }
.share-box { display: grid; gap: 11px; }
.share-box input { font-size: .875rem; }
.student-page { max-width: 780px; }
.student-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.student-tabs a { padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); text-decoration: none; }
.student-tabs a[aria-current="page"] { color: var(--text); border-color: var(--accent); background: #11283c; }
.finance-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(152px, 100%), 1fr)); gap: 12px; margin: 0; }
.finance-totals .card { padding: 14px 17px; }
.finance-totals dt { color: var(--muted); font-size: .92rem; }
.finance-totals dd { margin: 5px 0 0; font-size: 1.6rem; font-weight: 700; }
.finance-totals dd[data-total="overdue"] { color: #ffcd82; }
.assessment-sharing { border: 1px solid var(--line); border-radius: 8px; }
.weekly-progress { display: grid; gap: 6px; }
.weekly-progress progress { width: 100%; height: 12px; accent-color: var(--accent); }
.medal-earned { color: #ffcd82; font-weight: 650; }
.checkins { margin-block: 0; padding-left: 23px; color: #d7e1f2; }
.checkins li + li { margin-top: 5px; }
.table-scroll { overflow-x: auto; }
.evolution-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.evolution-table th, .evolution-table td { padding: 9px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.evolution-table thead th { color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 15px; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 32px; }
  .preview { max-width: 560px; width: 100%; }
  .hero-copy h1 { max-width: 13ch; }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 34px); }
  .nav { min-height: 68px; gap: 12px; }
  .brand img { width: 100px; }
  .nav nav { gap: 12px; }
  .nav .nav-detail { display: none; }
  .hero { padding-block: 49px; }
  .hero-actions .button { width: 100%; }
  .steps, .exercise-picker { grid-template-columns: 1fr; }
  .workflow { padding-block: 44px; }
}
@media (max-width: 410px) {
  .row-form { grid-template-columns: 1fr; }
  .workout-item-fields { grid-template-columns: 1fr; }
}
