/* AI Training portal. Colors and shapes follow the client portal (client/assets/portal.css). */
:root {
    --ink: #172733; --ink-strong: #0a202a; --muted: #637581; --line: #dbe4e8; --line-strong: #c8d5da;
    --surface: #fff; --surface-soft: #f5f8f8; --canvas: #edf3f3;
    --teal-950: #062d34; --teal-900: #083b43; --teal-800: #0a5059; --teal-700: #0b6872; --teal-600: #0e7b84; --teal-100: #d9f0ef; --teal-50: #edf9f8;
    --blue: #2d64ba; --blue-soft: #e9f0fb; --amber: #a96110; --amber-soft: #fff2d9; --violet: #6655a8; --violet-soft: #efecfb;
    --red: #b23b45; --red-soft: #fcebec; --green: #25704c; --green-soft: #e4f4eb; --slate: #47606c; --slate-soft: #e8eef0;
    --shadow-sm: 0 1px 2px rgba(10,32,42,.05), 0 4px 16px rgba(10,32,42,.04);
    --shadow-md: 0 12px 35px rgba(6,45,52,.1); --shadow-lg: 0 30px 75px rgba(3,29,35,.24);
    --radius-sm: 8px; --radius: 14px; --radius-lg: 22px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--ink-strong); line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--teal-700); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #7fd0cc; outline-offset: 2px; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); } .small { font-size: 13.5px; } .center { text-align: center; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-700); margin: 0 0 8px; }
.eyebrow-light { color: #8fd8d3; }

/* tones for levels */
.tone-teal { --tone: var(--teal-700); --tone-soft: var(--teal-50); }
.tone-blue { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.tone-violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.tone-amber { --tone: var(--amber); --tone-soft: var(--amber-soft); }
.tone-green { --tone: var(--green); --tone-soft: var(--green-soft); }
.tone-slate { --tone: var(--slate); --tone-soft: var(--slate-soft); }

/* buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: linear-gradient(180deg, var(--teal-700), var(--teal-800)); color: #fff; box-shadow: 0 6px 16px rgba(11,104,114,.28); }
.button-secondary { background: #fff; color: var(--teal-800); border-color: var(--line-strong); }
.button-secondary:hover { border-color: var(--teal-600); }
.button-ghost { background: transparent; color: var(--teal-800); }
.button-ghost:hover { background: var(--teal-50); }
.button-light { background: #fff; color: var(--teal-900); }
.button-outline-light { color: #fff; border-color: rgba(255,255,255,.45); }
.button-danger { background: var(--red); color: #fff; }
.button-got { background: var(--green-soft); color: var(--green); border-color: #bfe0cd; }
.button-miss { background: var(--amber-soft); color: var(--amber); border-color: #f0d9a8; }
.button-wide { width: 100%; }
.button-small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form { margin: 0; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip-done { background: var(--green-soft); color: var(--green); border-color: #bfe0cd; }
.chip-lock { background: #f1f3f4; color: var(--muted); }
.chip-free { background: var(--teal-100); color: var(--teal-800); border-color: #b9e2df; }
.chip-amber { background: var(--amber-soft); color: var(--amber); border-color: #f0d9a8; }
.chip-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.3); }
.tone-chip { background: var(--tone-soft); color: var(--tone); border-color: transparent; }

/* progress */
.bar { display: block; height: 8px; border-radius: 999px; background: rgba(10,32,42,.1); overflow: hidden; flex: 1; min-width: 60px; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--tone, var(--teal-600)); transition: width .9s cubic-bezier(.2,.7,.2,1); }
.ring { position: relative; display: inline-grid; place-items: center; width: var(--size); height: var(--size); flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(10,32,42,.1); stroke-width: 6; }
.ring-fill { fill: none; stroke: var(--tone, var(--teal-600)); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.7,.2,1); }
.ring b { position: absolute; font-size: calc(var(--size) * .23); color: var(--ink-strong); }

/* app shell */
.topbar { background: var(--teal-950); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 700; }
.brand img { height: 46px; width: auto; display: block; }
.brand span { border-left: 1px solid rgba(255,255,255,.3); padding-left: 12px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #bfe9e6; }
.nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav > a:not(.button), .nav-link { color: #d5ecea; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.nav > a:not(.button):hover, .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav > a[aria-current] { background: rgba(255,255,255,.14); color: #fff; }
.nav-spacer { flex: 1; }
.nav-user { display: inline-flex; align-items: center; gap: 8px; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-600); color: #fff; font-size: 13px; font-weight: 700; }
.nav-toggle { display: none; margin-left: auto; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; }
.demo-strip { background: var(--amber-soft); color: #6d4208; text-align: center; padding: 8px 16px; font-size: 14.5px; border-bottom: 1px solid #f0d9a8; }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }
.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 36px 16px 44px; background: #fff; border-top: 1px solid var(--line); }
.foot p { margin: 0 0 6px; } .foot-name { font-size: 16px; font-weight: 650; color: var(--ink-strong); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 12px 0 14px !important; } .foot-links span { color: var(--line-strong); }
.foot a { color: var(--muted); text-decoration: none; } .foot a:hover { text-decoration: underline; } .foot a.foot-strong { color: var(--teal-700); }
.privacy-modal__content { line-height: 1.6; } .privacy-modal__close { cursor: pointer; font-family: inherit; }
.privacy-modal__content h1 { font-size: 26px; margin-top: 16px; } .privacy-modal__content h2 { font-size: 19px; margin-top: 24px; } .privacy-modal__content h3 { font-size: 16px; margin-top: 16px; }
html.privacy-modal-open { overflow: hidden; }
.page-title { font-size: clamp(26px, 4vw, 36px); font-weight: 800; }
.section-title { font-size: 20px; margin: 38px 0 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: 14.5px; margin-bottom: 14px; }
.flash { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 18px; font-weight: 550; }
.flash-ok { background: var(--green-soft); color: #1a5237; border: 1px solid #bfe0cd; }
.flash-error { background: var(--red-soft); color: #8a2731; border: 1px solid #f1c5c9; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 18px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: start; }

/* dashboard */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: radial-gradient(120% 140% at 0% 0%, var(--teal-800), var(--teal-950)); color: #d9efed;
    border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-md); }
.welcome h1 { color: #fff; font-size: clamp(28px, 4.5vw, 42px); font-weight: 800; }
.welcome .ring-track { stroke: rgba(255,255,255,.16); } .welcome .ring-fill { stroke: #6fd6cf; } .welcome .ring b { color: #fff; }
.notice { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--teal-600); border-radius: var(--radius); padding: 14px 18px; margin-top: 18px; }
.path-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.path-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--tone); border-radius: var(--radius-lg); padding: 22px; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.path-card h3 { font-size: 22px; margin: 0; } .path-card p { color: var(--muted); margin: 0; flex: 1; }
.path-head { display: flex; justify-content: space-between; align-items: center; min-height: 26px; }
.level-num { font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--tone); }
.path-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.path-quiz { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 6px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.quick { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; transition: border-color .15s; }
a.quick:hover { border-color: var(--teal-600); }
.quick > .icon { width: 26px; height: 26px; color: var(--teal-700); }
.quick b { display: block; color: var(--ink-strong); } .quick span { color: var(--muted); font-size: 14px; }
.quick-locked { opacity: .7; }

/* level page */
.level-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; background: linear-gradient(135deg, var(--tone-soft), #fff 70%); border: 1px solid var(--line); border-left: 6px solid var(--tone); border-radius: var(--radius-lg); padding: clamp(20px, 3.5vw, 34px); }
.level-hero h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.level-hero p { max-width: 62ch; margin-bottom: .4em; } .who { color: var(--muted); font-size: 14.5px; }
.level-hero-side { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.session-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.session { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.session:hover { border-color: var(--teal-600); transform: translateX(3px); }
.session-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none; font-weight: 750; font-size: 14px; background: var(--teal-50); color: var(--teal-800); border: 2px solid var(--teal-100); }
.session-done .session-mark { background: var(--green); color: #fff; border-color: var(--green); }
.session-locked .session-mark { background: #f1f3f4; color: var(--muted); border-color: var(--line); }
.session-locked .session-body { opacity: .72; }
.session-body { flex: 1; min-width: 0; } .session-body b { display: block; color: var(--ink-strong); font-size: 17px; } .session-body span { color: var(--muted); font-size: 14.5px; }
.session-meta { display: flex; gap: 8px; align-items: center; flex: none; } .mins { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); font-size: 13.5px; white-space: nowrap; }

/* lesson */
.lesson-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.lesson-side { position: sticky; top: 78px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; max-height: calc(100vh - 100px); overflow: auto; }
.lesson-side ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.side-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.side-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 14.5px; line-height: 1.35; }
.side-item:hover { background: var(--surface-soft); }
.side-item.is-current { background: var(--teal-50); color: var(--teal-900); font-weight: 650; }
.side-mark { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; margin-top: 1px; font-size: 11px; }
.side-done .side-mark { background: var(--green); border-color: var(--green); color: #fff; }
.side-locked { color: var(--muted); } .side-locked .side-mark { border: 0; }
.side-quiz { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 10px; border-top: 1px solid var(--line); text-decoration: none; font-weight: 650; font-size: 14.5px; }
.lesson-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(16px, 3vw, 30px); box-shadow: var(--shadow-sm); min-width: 0; }
.lesson-head { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.lesson-title { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin-top: 10px; } .lesson-lead { font-size: 18px; color: var(--muted); }
.content-frame { width: 100%; border: 0; display: block; min-height: 60vh; }
.content-frame-guide { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); margin-top: 16px; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 10px; position: sticky; bottom: 0; background: #fff; padding-bottom: 14px; }
.celebrate { background: var(--green-soft); border: 1px solid #bfe0cd; color: #1a5237; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; border-radius: 2px; z-index: 60; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .7; } }
.locked-panel { text-align: center; background: var(--surface-soft); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: clamp(24px, 5vw, 48px); margin-top: 22px; }
.locked-panel .button-row { justify-content: center; } .locked-panel p { max-width: 56ch; margin-inline: auto; color: var(--muted); }
.locked-badge { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--teal-700); margin-bottom: 12px; font-size: 20px; }

/* quiz */
.quiz-group { margin-top: 28px; } .quiz-group h2 { font-size: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .quiz-group h2 a { color: inherit; text-decoration: none; }
.qcard { position: relative; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--line-strong); border-radius: var(--radius); padding: 18px 20px; margin-top: 10px; transition: border-color .2s; }
.qcard.is-got { border-left-color: var(--green); } .qcard.is-miss { border-left-color: var(--amber); }
.qtext { font-weight: 650; font-size: 17px; color: var(--ink-strong); margin: 0 90px 10px 0; }
.qcard textarea { width: 100%; font: inherit; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; resize: vertical; background: var(--surface-soft); }
.qanswer { background: var(--teal-50); border-radius: 10px; padding: 14px 16px; margin-top: 4px; animation: pop .35s ease; } .qanswer p { margin-bottom: 10px; }
.qstatus { position: absolute; top: 18px; right: 18px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.is-got .qstatus { color: var(--green); } .is-miss .qstatus { color: var(--amber); }

/* resources */
.glossary-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: radial-gradient(120% 140% at 0% 0%, var(--teal-800), var(--teal-950)); color: #d9efed; border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 34px); text-decoration: none; margin-top: 8px; }
.glossary-card h2 { color: #fff; font-size: 26px; margin-top: 10px; } .glossary-card p { margin: 0; max-width: 56ch; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.guide-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.guide-card:hover { transform: translateY(-3px); border-color: var(--teal-600); }
.guide-card h3 { font-size: 18px; margin: 10px 0 2px; } .guide-card p { color: var(--muted); margin: 0 0 8px; font-size: 14.5px; }
.guide-card.is-locked { opacity: .75; }
.guide-top { display: flex; justify-content: space-between; align-items: center; }
.guide-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--teal-900); color: #fff; font-weight: 700; font-size: 14px; }
.guide-levels { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.guide-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dl-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.dl-group summary { cursor: pointer; padding: 14px 18px; font-weight: 700; }
.dl-list { list-style: none; margin: 0; padding: 0 18px 14px; columns: 2 320px; column-gap: 28px; }
.dl-list li { padding: 5px 0; break-inside: avoid; } .dl-list a { text-decoration: none; display: inline-flex; gap: 8px; } .dl-list a:hover { text-decoration: underline; }
.dl-list .is-locked { color: var(--muted); display: flex; gap: 8px; }

/* forms, tables, admin */
.field { display: block; margin-bottom: 14px; } .field span { display: block; font-weight: 650; font-size: 14.5px; margin-bottom: 5px; color: var(--ink-strong); }
.field input, .field select, .access-form select, .access-form input, .linkbox input { width: 100%; min-height: 44px; font: inherit; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); }
.field small { display: block; color: var(--muted); margin-top: 4px; }
.field-link { text-align: right; margin: -6px 0 14px; font-size: 14px; }
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 22px; } .stat b { display: block; font-size: 28px; color: var(--ink-strong); } .stat span { color: var(--muted); font-size: 14px; }
.linkbox { background: var(--amber-soft); border: 1px solid #f0d9a8; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; } .linkbox input { margin-top: 8px; font-size: 14px; }
.add-user { margin-bottom: 18px; } .add-user summary { cursor: pointer; font-weight: 700; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; } .inline-form .field { margin: 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; } .table th { text-align: left; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; } .table tr:last-child td { border-bottom: 0; } .table .bar { margin-bottom: 4px; min-width: 120px; }
.access-form { display: flex; gap: 6px; align-items: center; } .access-form select, .access-form input { width: auto; min-height: 36px; padding: 5px 8px; font-size: 14px; }
.row-actions { white-space: nowrap; } .row-actions form, .row-actions details { display: inline-block; vertical-align: top; }
.confirm summary { list-style: none; } .confirm summary::-webkit-details-marker { display: none; } .confirm[open] summary { display: none; }

/* sign-in pages */
.auth-body { background: var(--canvas); }
.auth-shell { display: grid; grid-template-columns: minmax(320px, 42%) 1fr; min-height: 100vh; }
.auth-showcase { display: flex; flex-direction: column; justify-content: space-between; gap: 30px; padding: clamp(28px, 4vw, 56px); color: #cfe6e4; background: radial-gradient(130% 100% at 0% 0%, #0d4f58 0%, var(--teal-950) 62%); }
.auth-showcase h2 { color: #fff; font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; }
.auth-logo { width: min(300px, 80%); height: auto; }
.auth-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; } .auth-points li { display: flex; gap: 10px; align-items: center; } .auth-points .icon { color: #6fd6cf; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; padding: 3px; width: 24px; height: 24px; }
.auth-foot { font-size: 13px; color: #8fb5b4; margin: 0; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(20px, 4vw, 48px); }
.auth-card { width: min(480px, 100%); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(24px, 4vw, 40px); }
.auth-card h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; } .auth-sub { color: var(--muted); }
.auth-card form + form, .auth-card .button + form, .auth-card form + .button { margin-top: 10px; display: block; } .auth-card a.button { display: flex; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0 12px; } .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card .small { margin: 12px 0 0; } .auth-links { color: var(--muted); font-size: 13.5px; margin-top: 18px; } .auth-links a { color: inherit; }
.message-card { max-width: 520px; margin: 12vh auto; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 40px; text-align: center; }

/* landing */
.landing { background: #fff; }
.hero { background: radial-gradient(120% 90% at 10% 0%, #0d4f58 0%, var(--teal-950) 60%); color: #cfe6e4; }
.hero-inner, .band-inner { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.hero-inner { padding-top: 20px; padding-bottom: 34px; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; } .hero-top .brand img { height: 54px; }
.hero-links { display: flex; gap: 16px; align-items: center; } .hero-link { color: #fff; font-weight: 600; text-decoration: none; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: clamp(36px, 7vw, 84px) 0 clamp(30px, 5vw, 60px); }
.hero h1 { color: #fff; font-size: clamp(36px, 5.6vw, 62px); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; }
.hero-lead { font-size: clamp(17px, 2vw, 20px); max-width: 54ch; margin: 18px 0 26px; } .hero-note { font-size: 14px; color: #8fb5b4; margin-top: 12px; }
.hero-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-lg); padding: 26px; backdrop-filter: blur(6px); box-shadow: var(--shadow-lg); }
.hero-card-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8fd8d3; }
.hero-card-title { color: #fff; font-size: 21px; margin: 4px 0 18px; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 12px; }
.steps::before { display: none; content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: linear-gradient(#6fd6cf, #8db4f5, #b3a6ee, #f2c069); opacity: .55; }
.step { position: relative; display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px 14px 12px 0; margin-left: calc((var(--i) - 1) * 14px); transition: transform .15s, background .15s; }
.step:nth-child(1) { --i: 1; } .step:nth-child(2) { --i: 2; } .step:nth-child(3) { --i: 3; } .step:nth-child(4) { --i: 4; }
.step:hover { transform: translateX(4px); background: rgba(255,255,255,.13); }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none; font-weight: 800; font-size: 18px; color: var(--teal-950); background: var(--c); margin-left: -1px; box-shadow: 0 0 0 4px var(--teal-950); }
.step-teal { --c: #6fd6cf; } .step-blue { --c: #8db4f5; } .step-violet { --c: #b3a6ee; } .step-amber { --c: #f2c069; }
.step-body { flex: 1; min-width: 0; } .step-body b { display: block; color: #fff; font-size: 17px; line-height: 1.25; } .step-body span { font-size: 14px; color: #cfe6e4; line-height: 1.35; display: block; }
.step-count { flex: none; font-size: 12px; font-weight: 700; color: var(--c); white-space: nowrap; }
.hero-card-foot { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); font-size: 14px; color: #cfe6e4; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; border-top: 1px solid rgba(255,255,255,.14); padding-top: 26px; }
.stats dt { font-size: 34px; font-weight: 800; color: #fff; } .stats dd { margin: 0; font-size: 14.5px; }
.band { padding: clamp(48px, 8vw, 88px) 0; } .band-soft { background: var(--canvas); }
.band h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; } .band-lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 28px; }
.level-card { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--tone); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 4px; }
.level-card h3 { font-size: 22px; margin: 4px 0; } .level-card p { margin: 0 0 8px; } .level-card .who { flex: 1; } .level-card .chip { align-self: flex-start; background: var(--tone-soft); color: var(--tone); border-color: transparent; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.feature { background: #fff; border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--line); } .feature .icon { width: 30px; height: 30px; color: var(--teal-700); margin-bottom: 10px; } .feature h3 { font-size: 18px; } .feature p { margin: 0; color: var(--muted); }
.price-wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-md); }
.price { font-size: 30px; font-weight: 800; color: var(--ink-strong); margin: 0 0 14px; }
.ticks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; } .ticks li { padding-left: 28px; position: relative; } .ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; } .auth-showcase { min-height: 0; } .auth-showcase > div, .auth-foot { display: none; } .auth-showcase { padding: 20px 24px; } .auth-logo { width: 190px; }
    .hero-grid, .price-wrap { grid-template-columns: 1fr; } .step { margin-left: 0; } .step-count { display: none; } .stats { grid-template-columns: repeat(2, 1fr); }
    .lesson-layout { grid-template-columns: 1fr; } .lesson-side { position: static; max-height: 260px; order: 2; }
    .nav-toggle { display: block; } .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--teal-950); flex-direction: column; align-items: stretch; padding: 10px 16px 18px; }
    .nav.is-open { display: flex; } .nav-spacer { display: none; } .topbar-inner { position: relative; }
    .welcome, .level-hero { flex-direction: column; align-items: flex-start; }
    .session { flex-wrap: wrap; } .session-meta { width: 100%; padding-left: 62px; }
    .brand span { display: none; } .hide-small { display: none; } .hero-link { white-space: nowrap; }
    .lesson-actions { position: static; } .lesson-actions .nav-spacer { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* open items stand out, locked ones step back */
.session-open, .session-done { border-left: 5px solid var(--teal-600); box-shadow: var(--shadow-sm); }
.session-done { border-left-color: var(--green); }
.session-locked { background: transparent; border-style: dashed; box-shadow: none; }
.session-locked .session-body b { color: var(--muted); font-weight: 600; }
.side-open { font-weight: 600; color: var(--ink-strong); } .side-open .side-mark { border-color: var(--teal-600); background: var(--teal-50); }
.side-locked { opacity: .7; }
.path-card.is-dim { background: var(--surface-soft); box-shadow: none; border-top-color: var(--line-strong); } .path-card.is-dim h3 { color: var(--muted); } .path-card.is-dim .level-num { color: var(--muted); }
.guide-card.is-open { border: 2px solid var(--teal-600); box-shadow: var(--shadow-sm); background: linear-gradient(160deg, var(--teal-50), #fff 55%); }
.guide-card.is-locked { opacity: 1; background: transparent; border-style: dashed; } .guide-card.is-locked h3, .guide-card.is-locked p { color: var(--muted); } .guide-card.is-locked .guide-num { background: var(--line-strong); }
.guide-top .chip + .chip { margin-left: 4px; } .guide-top { gap: 4px; } .guide-top .guide-num { margin-right: auto; }
.dl-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl-list .is-open a { font-weight: 650; color: var(--teal-800); } .dl-list .is-nudge a { color: var(--ink); }
.dl-list .is-locked { opacity: .65; }
.button.is-locked { opacity: .6; cursor: default; } .button.is-locked:hover { transform: none; } .button.is-nudge .chip { margin-left: 2px; }
.notice-soft { border-left-color: var(--amber); background: #fffaf0; margin: 0 0 14px; }
.demo-strip a { color: inherit; font-weight: 700; }
.tiers { list-style: none; padding: 0; margin: 18px 0 14px; display: grid; gap: 10px; }
.tiers li { display: grid; grid-template-columns: 130px 1fr; gap: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tiers li:last-child { border-color: var(--teal-600); background: var(--teal-50); } .tiers b { color: var(--ink-strong); } .tiers span { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
a.stat { text-decoration: none; color: inherit; } a.stat:hover, .stat.is-on { border-color: var(--teal-600); } .stat.is-on { background: var(--teal-50); }
.admin-tools { display: grid; gap: 12px; margin-bottom: 18px; } .search { display: flex; gap: 8px; } .search input[type=search] { flex: 1; max-width: 360px; min-height: 40px; font: inherit; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; }
.add-user { margin: 0; } .pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 16px; }
.rules { margin-top: 22px; } .rules ul { margin: 0; padding-left: 20px; color: var(--muted); } .rules li { margin-bottom: 6px; }
@media (max-width: 600px) { .tiers li { grid-template-columns: 1fr; gap: 2px; } }

/* dashboard: the lesson you are on */
.welcome-main { flex: 1; min-width: 0; }
.resume { display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; align-items: center; max-width: 640px; margin-top: 6px; padding: 16px 18px; border-radius: var(--radius); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff; text-decoration: none; transition: background .15s, transform .15s; }
.resume:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.resume-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8fd8d3; }
.resume-title { font-size: 20px; font-weight: 750; line-height: 1.25; grid-column: 1; }
.resume-meta { font-size: 14px; color: #cfe6e4; grid-column: 1; }
.resume .button { grid-column: 2; grid-row: 1 / span 3; }
.resume-done { display: flex; gap: 8px; align-items: center; color: #fff; font-weight: 600; }
.field em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.field textarea { width: 100%; font: inherit; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 10px; resize: vertical; }
.goal { font-size: 13.5px; color: var(--muted); max-width: 320px; } .goal summary { cursor: pointer; color: var(--teal-700); }
@media (max-width: 600px) { .resume { grid-template-columns: 1fr; } .resume .button { grid-column: 1; grid-row: auto; margin-top: 10px; } }
.tools { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 2px; margin: 0 0 14px; } .tools legend { font-weight: 650; font-size: 14.5px; color: var(--ink-strong); padding: 0 6px; } .tools legend em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.flash.celebrate { font-weight: 550; }

/* admin overview */
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tabs a { padding: 7px 18px; border-radius: 999px; text-decoration: none; font-weight: 650; color: var(--muted); } .tabs a[aria-current] { background: var(--teal-800); color: #fff; }
.stat small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; } .dash-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-map { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .dash-stack { display: grid; gap: 18px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 42%) 1fr auto; gap: 10px; align-items: center; font-size: 14.5px; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); } .hbars b { min-width: 2ch; text-align: right; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.hb-track { height: 14px; background: var(--surface-soft); border-radius: 4px; overflow: hidden; } .hb-track i { display: block; height: 100%; background: var(--teal-600); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbars li:hover .hb-track i, .vbar:hover i { background: var(--teal-800); }
.vbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px 6px; height: 190px; align-items: end; border-bottom: 1px solid var(--line-strong); margin-bottom: 24px; }
.vbar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.vbar i { display: block; width: 100%; max-width: 34px; background: var(--teal-600); border-radius: 4px 4px 0 0; min-height: 0; } .vbar b { font-size: 12px; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.vbar span { position: absolute; top: calc(100% + 5px); font-size: 11px; color: var(--muted); white-space: nowrap; }
.table-compact td, .table-compact th { padding: 9px 10px; }
.tilemap { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; max-width: 560px; }
.tile { aspect-ratio: 1; display: grid; place-items: center; align-content: center; border-radius: 6px; font-size: 11px; font-weight: 650; line-height: 1.1; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); cursor: default; }
.tile b { font-size: 12px; font-weight: 800; color: inherit; }
.heat-1 { background: #cdeae8; border-color: #cdeae8; color: var(--teal-950); } .heat-2 { background: #7cc6c4; border-color: #7cc6c4; color: var(--teal-950); }
.heat-3 { background: #1e8e96; border-color: #1e8e96; color: #fff; } .heat-4 { background: #083b43; border-color: #083b43; color: #fff; }
.tile:hover { outline: 2px solid var(--ink-strong); outline-offset: 1px; }
.heat-key { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); margin: 14px 0 0; } .heat-key i { width: 26px; height: 12px; border-radius: 3px; border: 0; } .heat-key span { margin: 0 4px; }
.big-number { font-size: 46px; font-weight: 800; color: var(--ink-strong); margin: 0; line-height: 1.1; }
@media (max-width: 900px) { .dash-grid, .dash-3, .dash-map { grid-template-columns: 1fr; } }
