:root {
  --ink: #12263F; --bg: #F3F8FA; --accent: #A31511; --gold: #C99A2E; --coral: #C0524A;
  --card: #FFFFFF; --muted: #5B6B7D; --line: #E1EAEE; --green: #2F7D4F; --amber: #B7791F;
  --shadow: 0 1px 2px rgba(18,38,63,.06), 0 6px 18px rgba(18,38,63,.07);
  --head: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--body); }
.wrap { max-width: 420px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); font-size: 14px; }
.note { color: var(--muted); font-size: 14px; margin-top: 12px; }
.note.ok { color: var(--green); } .note.err { color: var(--coral); }
.center { text-align: center; }
.label { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }

.top { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; flex: none; display: block; }
.brand h1 { font-size: 20px; }
.brand p { font-size: 12px; color: var(--muted); margin-top: -2px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; background: #E3EEF2; border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; color: var(--ink); font: 600 13px var(--body); padding: 6px 12px; border-radius: 999px; cursor: pointer; min-height: 32px; }
.lang button.active { background: var(--ink); color: #fff; }
.link { background: none; border: 0; color: var(--accent); font: 500 13px var(--body); cursor: pointer; padding: 6px 0; text-decoration: underline; }

.switcher { display: block; margin-bottom: 12px; }
select, input[type=email] {
  width: 100%; min-height: 48px; padding: 0 14px; font: 500 16px var(--body); color: var(--ink);
  background: #fff; border: 1px solid #C9D8DF; border-radius: 12px;
}
select:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid rgba(163,21,17,.35); outline-offset: 2px; }

.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.card h3 { margin-bottom: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.row-between h3 { margin-bottom: 12px; }

.student { display: flex; gap: 16px; align-items: center; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.initials { display: grid; place-items: center; color: #fff; font: 700 26px var(--head); }
.student-info { min-width: 0; }
.student-info h2 { overflow-wrap: anywhere; }
.student-info .muted { margin: 2px 0 8px; }
.badge { display: inline-block; color: #fff; font: 600 13px var(--head); padding: 4px 12px; border-radius: 999px; }

.bar { height: 12px; background: #E6EEF1; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stat { background: var(--bg); border-radius: 12px; padding: 12px; }
.stat strong { display: block; font: 700 24px var(--head); }
.stat span { font-size: 12px; color: var(--muted); }

.sessions { list-style: none; margin: 0; padding: 0; }
.session { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.session:first-child { border-top: 0; padding-top: 0; }
.thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.thumb.placeholder { background: #E6EEF1; color: #8AA0AE; display: grid; place-items: center; }
.thumb.placeholder svg { width: 24px; height: 24px; }
.session-body { min-width: 0; flex: 1; }
.session-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.session-top time { font-size: 13px; color: var(--muted); }
.session-body p { font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.stars { display: inline-flex; gap: 2px; }
.star { width: 16px; height: 16px; fill: none; stroke: #B9C6CE; stroke-width: 1.6; stroke-linejoin: round; }
.star.on { fill: var(--gold); stroke: var(--gold); }

.booklet .muted { margin-bottom: 4px; }
.lvchips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.lvchip { flex: none; min-width: 48px; min-height: 44px; border: 2px solid var(--c); border-radius: 12px; background: #fff; color: var(--c);
  font: 700 14px var(--head); cursor: pointer; padding: 0 10px; }
.lvchip.on { background: var(--c); color: #fff; } .lvchip.done:not(.on) { background: #F1F6F8; }
.lvhead { margin-bottom: 8px; }
.complete { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #E4F4EA; color: #1F5A38; font-weight: 600; font-size: 14px; }
.sklist { list-style: none; margin: 14px 0 0; padding: 0; }
.sk { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.sk:first-child { border-top: 0; }
.sk-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 14px; font-weight: 700; border: 2px solid #C9D5DB; color: #8AA0AE; }
.sk-text { flex: 1; min-width: 0; } .sk-text strong { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; } .sk-text small { color: var(--muted); font-size: 12px; }
.sk-tag { font-size: 12px; font-weight: 600; color: var(--muted); text-align: right; }
.sk.passed .sk-icon { background: var(--green); border-color: var(--green); color: #fff; } .sk.passed .sk-tag { color: var(--green); }
.sk.learning .sk-icon { border-color: var(--gold); color: var(--gold); } .sk.learning { background: #FFFAEC; margin: 0 -8px; padding: 10px 8px; border-radius: 10px; } .sk.learning .sk-tag { color: #8A6512; }
.sk.todo .sk-text strong { color: #4A5C6E; font-weight: 500; }

a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.cal-when { font-weight: 600; font-size: 14px; margin: 10px 0; }
.cal-btns { display: flex; flex-direction: column; gap: 8px; } .cal-btns .btn { margin-top: 0; }
.abs .link { margin-left: 8px; }
.cyc-window { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.cyc-ext { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #FFF8E4; border: 1px solid #E8D08A; color: #7A5410; font-size: 14px; font-weight: 600; }
.cyc-policy { margin: 12px 0 4px; }
#nt-body input[type=text] { width: 100%; min-height: 48px; padding: 0 14px; font: 500 16px var(--body); border: 1px solid #C9D8DF; border-radius: 12px; }
#nt-body .btn { margin-top: 14px; }
.note.ok { color: var(--green); }
.btn.ghost { background: #E3EEF2; color: var(--ink); }
.btn.slim { width: auto; min-height: 40px; padding: 0 16px; font-size: 14px; margin-top: 8px; }
.abslist, .opts { list-style: none; margin: 12px 0 0; padding: 0; }
.abs { padding: 12px 0; border-top: 1px solid var(--line); } .abs:first-child { border-top: 0; padding-top: 0; }
.abs-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .abs small { color: var(--muted); font-size: 12.5px; }
.abs-note { font-size: 14px; margin-top: 4px; }
.pill.pending { background: #FBEFC8; color: #7A5410; }
.modal.tall { max-height: 88vh; overflow-y: auto; }
.opts li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.opt-text { min-width: 0; } .opt-text strong { display: block; font-size: 14.5px; } .opt-text span { display: block; font-size: 14px; }
.opt-text small { color: var(--muted); font-size: 12.5px; } .opts .btn { margin-top: 0; flex: none; }

/* forms shared by trial.html / signup.html */
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 14px; margin: 12px 0; }
label.check input { margin-top: 3px; flex: none; }
label.check a { color: var(--accent); }
fieldset.newg { border: 1px dashed #C9D8DF; border-radius: 12px; padding: 4px 14px 14px; margin: 18px 0 0; }
legend { font-weight: 700; font-family: var(--head); padding: 0 6px; font-size: 15px; }
.seg { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.seg label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.seg input { width: auto; }
.seg input:disabled + span { color: var(--muted); }
.hp { position: absolute; left: -9999px; top: -9999px; }
.modal .btn.ghost { margin-top: 12px; }
.competition .disc { display: flex; gap: 8px; margin: 10px 0 12px; }
.competition .disc span { background: #E3EEF2; border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 600; }
.comp { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; margin-top: 8px; border: 1px solid var(--line); }
.comp.open { background: #FFF8E4; border-color: #E8D08A; }
.comp-icon { font-size: 22px; line-height: 1.2; flex: none; }
.comp-body { min-width: 0; } .comp-body strong { display: block; font-size: 15px; } .comp-body small { display: block; color: var(--muted); font-size: 12.5px; }
.comp-status { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.comp.open .comp-status { color: #7A5410; }

.pay-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.amount { font: 700 24px var(--head); }
.pill { font: 600 13px var(--body); padding: 4px 12px; border-radius: 999px; }
.pill.paid { background: #DDF1E4; color: #1F6B3F; }
.pill.pending { background: #FBEFC8; color: #7A5410; }
.pill.overdue { background: #F8DEDB; color: #9C3A33; }
.methods { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.method { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--ink);
  background: var(--bg); border-radius: 12px; padding: 10px 4px; font-size: 10.5px; line-height: 1.2; color: var(--muted); }
.method svg { width: 24px; height: 24px; color: var(--accent); }

.btn { width: 100%; min-height: 48px; border: 0; border-radius: 12px; font: 600 16px var(--body); cursor: pointer; margin-top: 12px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.gold { background: var(--gold); color: #12263F; margin-top: 0; }
.btn:disabled { opacity: .6; cursor: default; }
label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 6px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(18,38,63,.5); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; border-radius: 16px; padding: 22px; max-width: 360px; width: 100%; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 8px; } .modal p { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .bar-fill { transition: none; } }
