:root {
  --ink: #172033;
  --ink-2: #27334a;
  --muted: #69748a;
  --line: #dfe3ea;
  --line-dark: #303b51;
  --paper: #f5f6f8;
  --white: #ffffff;
  --navy: #0d1424;
  --navy-2: #111b2e;
  --navy-3: #17233a;
  --lime: #a9e34b;
  --lime-strong: #86ce2f;
  --amber: #f4b94f;
  --violet: #9b8cff;
  --cyan: #64d9e6;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(12, 20, 35, 0.11);
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
p { line-height: 1.7; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; background: var(--lime); color: var(--navy); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { height: 68px; padding: 0 clamp(20px, 4vw, 64px); background: var(--navy); color: #d9dfeb; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid #263147; position: relative; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 760; letter-spacing: -0.02em; color: white; justify-self: start; }
.brand-mark { display: inline-flex; width: 32px; height: 32px; border: 1px solid #526078; border-radius: 7px; align-items: center; justify-content: center; font: 700 13px var(--mono); color: var(--lime); background: #162036; }
.brand-mark span:last-child { color: #77839a; }
.main-nav { display: flex; align-items: center; height: 100%; gap: 28px; }
.main-nav a { position: relative; display: flex; align-items: center; height: 100%; color: #aeb8ca; font-size: 14px; font-weight: 650; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: white; }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--lime); }
.main-nav .nav-signout { display: flex; align-items: center; height: 100%; margin: 0; }
.main-nav .nav-signout button { border: 0; background: transparent; color: #aeb8ca; cursor: pointer; font: inherit; font-size: 14px; font-weight: 650; padding: 0; }
.main-nav .nav-signout button:hover, .main-nav .nav-signout button:focus-visible { color: white; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 14px; }
.text-button { color: #b9c2d3; font-size: 14px; font-weight: 700; }
.text-button:hover { color: white; }
.streak-chip { font-size: 12px; font-weight: 700; color: #c9d2df; border: 1px solid #364157; border-radius: 999px; padding: 7px 10px; }
.streak-chip span { color: var(--amber); }
.avatar-button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--lime); color: var(--navy); font-weight: 850; }
.nav-toggle { display: none; background: transparent; border: 1px solid #445068; color: white; border-radius: 7px; padding: 7px 10px; }

.button { border: 0; border-radius: 7px; background: var(--lime); color: #15200b; display: inline-flex; justify-content: center; align-items: center; gap: 28px; padding: 13px 20px; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 22px rgba(130, 199, 44, 0.16); transition: transform .18s ease, background .18s ease; }
.button:hover { background: #bbef68; transform: translateY(-1px); }
.button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(169, 227, 75, .45); outline-offset: 3px; }
.button-small { padding: 9px 14px; gap: 14px; font-size: 13px; }
.button-ghost { border: 1px solid #46536a; color: white; background: transparent; box-shadow: none; }
.button-ghost:hover { background: #1c273c; }
.button-light { background: white; color: var(--navy); }
.button-full { width: 100%; margin-top: 8px; }
.link-button { border: 0; background: none; padding: 0; color: #9aa7bb; cursor: pointer; }
.eyebrow { margin: 0 0 12px; color: #6b768a; font: 800 11px/1.4 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; margin-right: 7px; background: var(--lime); box-shadow: 0 0 0 4px rgba(169,227,75,.12); }
.section-shell, .app-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.message-stack { position: fixed; z-index: 50; top: 82px; right: 22px; width: min(390px, calc(100% - 44px)); }
.message { margin-bottom: 8px; padding: 13px 16px; border: 1px solid #b9d886; border-radius: 8px; background: #f4ffe3; box-shadow: var(--shadow); font-size: 14px; }

/* Landing page */
.home-page { background: var(--navy); }
.home-page .site-header { position: absolute; inset: 0 0 auto; background: transparent; }
.hero { min-height: 690px; padding-top: 145px; padding-bottom: 78px; display: grid; grid-template-columns: 1fr 1.08fr; gap: 70px; align-items: center; color: white; }
.hero-copy h1 { margin: 0; font-size: clamp(45px, 5vw, 72px); line-height: 1.04; letter-spacing: -.055em; font-weight: 780; }
.hero-copy h1 span { color: var(--lime); }
.hero-lede { max-width: 570px; margin: 24px 0 28px; color: #b5bfd0; font-size: 18px; line-height: 1.7; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 26px; color: #8794a9; font-size: 12px; }
.trust-row span::first-letter { color: var(--lime); }
.hero-editor { position: relative; min-height: 435px; border: 1px solid #354159; border-radius: 12px; background: #111a2b; box-shadow: 0 35px 70px rgba(0,0,0,.35); overflow: visible; font-family: var(--mono); }
.hero-editor::before { content: ""; position: absolute; inset: -50px -20px; z-index: -1; background: radial-gradient(circle, rgba(103,123,165,.16), transparent 65%); }
.editor-titlebar { height: 47px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 0 15px; border-bottom: 1px solid #303a4d; color: #7f8ba0; font-size: 10px; }
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #415069; }
.editor-titlebar > span:nth-child(2) { text-align: center; }
.editor-state { justify-self: end; color: #8cab76; }
.editor-tabs { height: 39px; display: flex; align-items: end; border-bottom: 1px solid #303a4d; color: #748095; font-size: 10px; }
.editor-tabs span { padding: 13px 18px 10px; }
.editor-tabs .active { color: #d7deea; border-right: 1px solid #303a4d; border-top: 2px solid var(--lime); background: #151f31; }
.editor-demo-code { padding: 25px 0; color: #d7deea; font-size: 14px; }
.editor-demo-code .line { display: grid; grid-template-columns: 49px 1fr; min-height: 29px; align-items: center; }
.editor-demo-code .line b { color: #4e5b70; text-align: right; padding-right: 17px; font-weight: 400; }
.editor-demo-code .line code { padding-left: 17px; border-left: 1px solid #222d40; }
.editor-demo-code .active-line { background: #172238; }
.editor-demo-code em { color: #5f7769; font-style: normal; }
.editor-demo-code span { color: #8bc2e9; }
.editor-demo-code strong { color: #d8b27a; font-weight: 400; }
.editor-demo-code mark { color: #c69df0; background: none; }
.editor-output { margin: 0 15px; min-height: 105px; padding: 13px 16px; border: 1px solid #2f3a4d; border-radius: 6px; background: #0b1220; }
.editor-output > div { display: flex; justify-content: space-between; color: #728096; font-size: 9px; letter-spacing: .1em; }
.editor-output small { color: #526078; letter-spacing: 0; }
.editor-output p { color: #d8e3ef; margin: 20px 0 0; font-size: 13px; }
.editor-output p i { color: var(--lime); font-style: normal; }
.editor-footer { height: 27px; margin-top: 13px; padding: 0 13px; border-top: 1px solid #2a3548; display: flex; justify-content: space-between; align-items: center; color: #66738a; font-size: 8px; }
.floating-success { position: absolute; right: -25px; bottom: -27px; min-width: 205px; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid #3a4960; border-radius: 9px; background: #172238; box-shadow: 0 18px 40px rgba(0,0,0,.35); font-family: var(--sans); }
.floating-success > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--navy); font-weight: 900; }
.floating-success b { display: block; color: white; font-size: 12px; }
.floating-success small { color: #8190a6; font-size: 10px; }
.process-section { width: 100%; padding: 90px max(20px, calc((100% - 1180px)/2)); background: #f5f6f8; }
.section-heading h2 { margin: 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.04em; }
.split-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 90px; align-items: end; }
.split-heading > p { color: var(--muted); margin: 0; }
.process-grid { margin-top: 46px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: white; }
.process-grid article { min-height: 310px; padding: 28px; border-right: 1px solid var(--line); position: relative; }
.process-grid article:last-child { border-right: 0; }
.step-number { position: absolute; right: 20px; top: 18px; color: #bcc3ce; font: 700 11px var(--mono); }
.step-icon { width: 46px; height: 46px; margin: 35px 0 45px; border: 1px solid #cfd5df; border-radius: 6px; display: grid; place-items: center; color: #59708b; font: 800 13px var(--mono); box-shadow: 6px 6px 0 #eef0f4; }
.process-grid h3 { margin: 0 0 12px; font-size: 20px; }
.process-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.roadmap-preview { width: 100%; padding: 95px max(20px, calc((100% - 1000px)/2)); background: white; }
.centered-heading { max-width: 700px; text-align: center; margin: 0 auto 50px; }
.centered-heading > p:last-child { color: var(--muted); }
.level-preview-list { list-style: none; padding: 0; margin: 0; position: relative; }
.level-preview-list::before { content: ""; position: absolute; left: 29px; top: 30px; bottom: 30px; width: 1px; background: var(--line); }
.level-preview-list li { min-height: 112px; display: grid; grid-template-columns: 60px 1fr auto; gap: 25px; align-items: center; border-bottom: 1px solid #ebedf1; position: relative; }
.level-node { z-index: 1; width: 60px; height: 60px; border: 1px solid #cfd4de; background: white; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--mono); color: #8a94a6; }
.level-preview-list .active .level-node { background: var(--navy); border-color: var(--navy); color: var(--lime); box-shadow: 0 0 0 7px #f0f3ea; }
.level-preview-list small { color: #9da5b2; text-transform: uppercase; letter-spacing: .12em; font: 700 9px var(--mono); }
.level-preview-list h3 { margin: 3px 0; font-size: 18px; }
.level-preview-list p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.level-status { color: #9ca4b0; border: 1px solid #e0e3e8; border-radius: 999px; padding: 6px 10px; font: 700 9px var(--mono); text-transform: uppercase; }
.active .level-status { color: #41610c; background: #eff8df; border-color: #d7e9b9; }
.home-cta { width: 100%; max-width: none; padding: 65px max(20px, calc((100% - 1100px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 35px; background: var(--lime); }
.home-cta .eyebrow { color: #4b681d; }
.home-cta h2 { font-size: 42px; margin: 0; letter-spacing: -.04em; }
.home-cta p:last-child { margin: 7px 0 0; color: #40551d; }

/* Shared application surfaces */
.app-page { background: #f3f4f6; }
.app-shell { padding: 55px 0 90px; }
.dashboard-welcome { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.dashboard-welcome h1, .page-intro h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.045em; }
.dashboard-welcome p:last-child, .page-intro > div > p:last-child { max-width: 620px; margin-bottom: 0; color: var(--muted); }
.dashboard-date { width: 92px; height: 92px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 14px; border: 1px solid var(--line); background: white; border-radius: 10px; box-shadow: 5px 5px 0 #e4e7eb; }
.dashboard-date span { color: var(--muted); font: 700 10px var(--mono); text-transform: uppercase; }
.dashboard-date strong { grid-row: span 2; font-size: 36px; justify-self: end; }
.dashboard-date small { font: 700 8px var(--mono); text-transform: uppercase; color: #8c96a6; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.metric-grid article { min-height: 130px; position: relative; display: grid; grid-template-columns: 43px 1fr; gap: 14px; align-content: center; padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.metric-icon { width: 43px; height: 43px; display: grid; place-items: center; background: #eef7dc; border-radius: 9px; color: #668f23; font-weight: 900; }
.metric-icon.amber { color: #a56d10; background: #fff4dc; }
.metric-icon.violet { color: #6f5ecc; background: #f0edff; }
.metric-grid span { display: block; color: #7b8596; font-size: 11px; }
.metric-grid strong { display: block; margin: 3px 0; font-size: 28px; letter-spacing: -.03em; }
.metric-grid strong em { font-size: 12px; font-style: normal; font-weight: 700; color: #697489; }
.metric-grid small { color: #9aa2af; font-size: 10px; }
.metric-bar { position: absolute; left: 22px; right: 22px; bottom: 0; height: 3px; background: #eff1f3; }
.metric-bar i { display: block; height: 100%; background: var(--lime-strong); }
.dashboard-grid { display: grid; grid-template-columns: 1.65fr .85fr; gap: 14px; margin-bottom: 14px; }
.panel { padding: 24px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.panel-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.panel-heading > a, .panel-heading > span { color: #778397; font-size: 11px; font-weight: 700; }
.continue-card { position: relative; overflow: hidden; min-height: 270px; padding: 28px; border-radius: 10px; background: var(--navy-2); color: white; }
.continue-meta { display: flex; gap: 9px; }
.continue-meta span { padding: 5px 8px; border: 1px solid #39465e; border-radius: 4px; color: #a6b1c4; font: 700 9px var(--mono); text-transform: uppercase; }
.continue-card h3 { margin: 22px 0 7px; font-size: 27px; letter-spacing: -.03em; }
.continue-card p { max-width: 530px; color: #9faabd; font-size: 13px; }
.continue-card.bridge-challenge-card { box-shadow: inset 4px 0 0 var(--lime); }
.continue-card.bridge-challenge-card .continue-meta span:first-child { border-color: #5c753e; color: #b8d693; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 23px; }
.skill-pills span { border: 1px solid #37445b; border-radius: 999px; padding: 5px 9px; color: #aeb8ca; font: 600 9px var(--mono); }
.continue-watermark { position: absolute; right: 20px; bottom: -18px; color: rgba(255,255,255,.025); font: 900 150px var(--mono); }
.level-badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--lime); font: 700 10px var(--mono); }
.mini-path { list-style: none; margin: 6px 0 0; padding: 0; }
.mini-path li { display: grid; grid-template-columns: 31px 1fr; gap: 11px; min-height: 54px; position: relative; }
.mini-path li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 1px; background: #dfe3e8; }
.path-state { z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #ced4de; border-radius: 50%; background: white; color: #8390a2; font: 700 10px var(--mono); }
.mini-path .completed .path-state { color: #385b0a; background: #eaf7d6; border-color: #c8e59b; }
.mini-path .locked { opacity: .48; }
.mini-path a { display: block; margin-top: 2px; font-size: 12px; font-weight: 760; }
.mini-path small { color: #929baa; font-size: 9px; }
.current-level-empty { min-height: 142px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 18px; border: 1px dashed #d4d9e1; border-radius: 7px; background: #f8f9fa; text-align: center; }
.current-level-empty > span { color: #587724; font: 800 17px var(--mono); }
.current-level-empty p { max-width: 260px; margin: 0; color: #737e90; font-size: 10px; }
.current-level-empty a { color: #3f630f; font-size: 10px; font-weight: 800; }
.bridge-note { display: flex; gap: 11px; margin-top: 12px; padding: 12px; background: #f4f6f8; border: 1px dashed #cdd3dc; border-radius: 7px; }
.bridge-note > span { color: #8590a1; }
.bridge-note small, .bridge-note b { display: block; font-size: 9px; }
.bridge-note small { color: #8a93a2; text-transform: uppercase; }
.bridge-note b { margin-top: 2px; }
.bridge-note.complete { align-items: center; background: #f1f9e5; border-color: #b9d986; }
.bridge-note.complete > span { color: #42690e; }
.bridge-note.complete small { color: #65843a; }
.bridge-note.complete a { margin-left: auto; color: #3f630f; font-size: 10px; font-weight: 800; }
.bridge-note.complete a:hover { color: #203904; }
.bridge-note.ready, .bridge-note.in-progress { align-items: center; background: #f7faef; border-color: #9fbd71; }
.bridge-note.ready > span, .bridge-note.in-progress > span { color: #527a1f; }
.bridge-note-actions { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px 10px; }
.bridge-note-actions a, .bridge-note.complete .bridge-note-actions a { margin-left: 0; color: #3f630f; font-size: 10px; font-weight: 800; }
.bridge-note-actions em { color: #8a93a2; font: 700 8px var(--mono); text-transform: uppercase; white-space: nowrap; }
.dashboard-bottom { min-height: 160px; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.recent-card { min-height: 74px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid #e2e5ea; border-radius: 8px; }
.recent-card:hover { border-color: #aeb8c8; }
.file-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; color: #536d87; background: #eaf0f4; font: 700 10px var(--mono); }
.recent-card h3 { font-size: 12px; margin: 0 0 3px; }
.recent-card p { font-size: 9px; color: #8993a3; margin: 0; }
.recent-card b { color: #9ba3b0; }
.empty-inline { grid-column: 1/-1; min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #8c95a3; font-size: 12px; }
.empty-inline > span { font: 800 15px var(--mono); color: #778398; }
.empty-state { min-height: 260px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state > span { width: 44px; height: 44px; display: grid; place-items: center; background: #eaf8d3; border-radius: 50%; }
.empty-state h3 { margin: 13px 0 0; }
.empty-state p { color: var(--muted); }
.empty-state .button { margin-top: 4px; }

/* Roadmap */
.page-intro { display: flex; justify-content: space-between; gap: 70px; align-items: end; margin-bottom: 60px; }
.page-intro h1 span { color: #8390a2; }
.roadmap-progress-card { min-width: 270px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.roadmap-progress-card > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.roadmap-progress-card span { color: #717d90; font: 700 10px var(--mono); text-transform: uppercase; }
.roadmap-progress-card strong { font-size: 24px; }
.roadmap-progress-card small { color: #8b94a2; font-size: 9px; }
.large-progress { height: 7px; margin: 12px 0; overflow: hidden; background: #e8ebef; border-radius: 99px; }
.large-progress i { display: block; height: 100%; background: var(--lime-strong); border-radius: inherit; }
.full-roadmap { list-style: none; padding: 0; margin: 0; }
.roadmap-level { display: grid; grid-template-columns: 75px 1fr; position: relative; padding-bottom: 45px; }
.roadmap-level:not(:last-child) .roadmap-spine::after { content: ""; position: absolute; left: 29px; top: 58px; bottom: 0; width: 1px; background: #d8dde5; }
.roadmap-spine { position: relative; }
.roadmap-spine > span { position: relative; z-index: 1; width: 59px; height: 59px; display: grid; place-items: center; border-radius: 50%; background: white; border: 1px solid #cbd1da; color: #8c96a5; font: 800 11px var(--mono); }
.roadmap-level.available .roadmap-spine > span,
.roadmap-level.unlocked-preview .roadmap-spine > span { background: var(--navy); border-color: var(--navy); color: var(--lime); box-shadow: 0 0 0 7px #e6eadf; }
.roadmap-level.completed .roadmap-spine > span { background: #eaf7d6; border-color: #b9db82; color: #3f650c; box-shadow: 0 0 0 7px #f1f6e9; }
.roadmap-level.locked .level-card { opacity: .55; }
.level-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.level-card > header { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; padding: 28px; border-bottom: 1px solid #e5e8ed; }
.level-card header p:first-child { margin: 0; color: #929aaa; font: 700 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.level-card h2 { margin: 5px 0 8px; font-size: 27px; letter-spacing: -.03em; }
.level-card header > p { margin: 0; color: var(--muted); font-size: 13px; }
.availability { font: 700 9px var(--mono); color: #6c7789; }
.availability i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; background: var(--lime-strong); border-radius: 50%; }
.level-skills { display: flex; flex-wrap: wrap; gap: 7px; padding: 16px 28px; border-bottom: 1px solid #e5e8ed; }
.level-skills span { padding: 5px 9px; border: 1px solid #d9dde4; background: #f8f9fa; border-radius: 999px; color: #697588; font: 650 9px var(--mono); }
.roadmap-lessons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #e4e7eb; }
.roadmap-lesson { min-height: 76px; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 14px 22px; background: white; }
.roadmap-lesson > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #d5dae1; color: #8893a4; font: 700 9px var(--mono); }
.roadmap-lesson.completed > span { background: #ebf7d8; border-color: #c9e59d; color: #466912; }
.roadmap-lesson small { color: #929ba8; font: 600 8px var(--mono); text-transform: uppercase; }
.roadmap-lesson h3 { margin: 3px 0 0; font-size: 12px; }
.roadmap-lesson > a { color: #8590a1; font-weight: 800; }
.roadmap-lesson > b { color: #a3a9b2; font-size: 9px; }
.roadmap-lesson.locked { opacity: .55; }
.bridge-strip { min-height: 100px; padding: 20px 28px; display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; color: #d8dfeb; background: var(--navy-2); }
.bridge-symbol { font-size: 28px; color: var(--lime); }
.bridge-strip small { color: #738097; text-transform: uppercase; font: 700 8px var(--mono); }
.bridge-strip h3 { margin: 3px 0; color: white; font-size: 14px; }
.bridge-strip p { margin: 0; color: #8f9bb0; font-size: 10px; line-height: 1.5; }
.bridge-strip.ready, .bridge-strip.in-progress { box-shadow: inset 4px 0 0 var(--lime); }
.bridge-strip.ready small, .bridge-strip.in-progress small { color: #a9d875; }
.bridge-strip.complete { background: #152415; box-shadow: inset 4px 0 0 var(--lime-strong); }
.bridge-strip.complete small { color: #9dc86c; }
.bridge-strip.complete p { color: #aebca6; }
.bridge-strip .bridge-destination { margin: 0 0 4px; color: #a9d875; font: 700 8px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.bridge-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.bridge-action { padding: 9px 13px; border: 1px solid #536d40; border-radius: 6px; color: var(--lime); font: 800 9px var(--mono); white-space: nowrap; }
.bridge-action:hover { border-color: var(--lime); background: rgba(169, 227, 75, .08); }
.bridge-review-action { border-color: #3d495f; color: #a9b4c5; }
.bridge-review-action:hover { border-color: #76849a; background: rgba(255, 255, 255, .04); }
.planned-pill { border: 1px solid #3d495f; border-radius: 999px; padding: 6px 9px; color: #7d899d; font: 700 8px var(--mono); text-transform: uppercase; }
.planned-placeholder { min-height: 90px; padding: 20px 28px; display: flex; align-items: center; gap: 18px; color: #9199a7; }
.planned-placeholder span { font: 800 20px var(--mono); color: #bdc3cc; }
.planned-placeholder p { margin: 0; font-size: 11px; }
.planned-placeholder.unlocked { color: #576578; background: #fbfcf8; }
.planned-placeholder.unlocked > span { color: #527a1f; }
.planned-placeholder.unlocked > div { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 20px; }
.planned-placeholder.unlocked a { flex: 0 0 auto; color: #3f630f; font: 800 10px var(--mono); }
.planned-placeholder.unlocked a:hover { color: #203904; }
.roadmap-outline-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 15px 28px; border-bottom: 1px solid #e5e8ed; background: #fbfcfd; }
.roadmap-outline-summary > div:first-child strong,
.roadmap-outline-summary > div:first-child span { display: block; }
.roadmap-outline-summary > div:first-child strong { color: #354157; font-size: 11px; }
.roadmap-outline-summary > div:first-child span { margin-top: 2px; color: #8b95a5; font-size: 9px; }
.roadmap-outline-summary > a { color: #4d6f20; font: 800 9px var(--mono); white-space: nowrap; }
.roadmap-module-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.roadmap-module-chips span { padding: 4px 7px; border: 1px solid #e0e4e9; border-radius: 5px; color: #7a8596; background: white; font: 650 8px var(--mono); }

/* Level gateway */
.level-overview-shell { max-width: 1080px; }
.level-overview-breadcrumb { display: flex; gap: 9px; align-items: center; margin-bottom: 22px; color: #8791a1; font-size: 10px; }
.level-overview-breadcrumb a { color: #526177; font-weight: 750; }
.level-overview-breadcrumb b { color: #354157; }
.level-overview-hero { min-height: 235px; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 38px 42px; border-radius: var(--radius); background: var(--navy-2); color: white; box-shadow: var(--shadow); }
.level-overview-number { width: 68px; height: 68px; display: grid; place-items: center; border: 1px solid #45516a; border-radius: 50%; color: var(--lime); font: 800 13px var(--mono); box-shadow: 0 0 0 8px rgba(169, 227, 75, .06); }
.level-overview-hero .eyebrow { color: #91ad6c; }
.level-overview-hero h1 { margin: 0 0 8px; font-size: clamp(34px, 5vw, 50px); letter-spacing: -.045em; }
.level-overview-hero p:last-child { max-width: 620px; margin: 0; color: #a5afc1; font-size: 13px; }
.level-overview-state { min-width: 178px; display: flex; gap: 11px; align-items: center; padding: 13px 15px; border: 1px solid #3a4a38; border-radius: 8px; background: #172519; }
.level-overview-state > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: #1f3109; font-weight: 900; }
.level-overview-state strong, .level-overview-state small { display: block; }
.level-overview-state strong { color: #eaf4de; font-size: 11px; }
.level-overview-state small { margin-top: 2px; color: #8ea47d; font-size: 8px; }
.level-overview-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; margin: 14px 0; }
.level-skills-panel, .overview-bridge-panel { min-height: 255px; }
.overview-skill-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.overview-skill-list > div { min-height: 58px; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid #e1e5ea; border-radius: 7px; background: #fafbfc; }
.overview-skill-list span { color: #8a95a6; font: 700 9px var(--mono); }
.overview-skill-list strong { font-size: 11px; }
.overview-bridge-panel { color: white; background: var(--navy-2); border-color: var(--navy-2); }
.overview-bridge-panel .eyebrow { color: #7f8da3; }
.overview-bridge-panel h2 { margin: 9px 0 7px; font-size: 19px; }
.overview-bridge-panel > p:last-child { margin: 0; color: #98a4b7; font-size: 11px; }
.overview-bridge-symbol { color: var(--lime); font-size: 26px; }
.level-course-panel { margin-top: 14px; }
.overview-lesson-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; border: 1px solid #e4e7eb; border-radius: 8px; background: #e4e7eb; }
.outline-count { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #dce2e8; border-radius: 999px; color: #687588; background: #f8fafb; font: 750 8px var(--mono); text-transform: uppercase; white-space: nowrap; }
.curriculum-outline-panel { margin-top: 14px; }
.outline-heading { align-items: flex-start; }
.outline-heading h2 { margin-bottom: 6px; }
.outline-heading p:last-child { max-width: 650px; margin: 0; color: #7d8797; font-size: 10px; line-height: 1.6; }
.curriculum-module-list { display: grid; gap: 9px; }
.curriculum-module { overflow: hidden; border: 1px solid #dfe4ea; border-radius: 8px; background: #fbfcfd; }
.curriculum-module > summary { min-height: 58px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 20px; gap: 12px; align-items: center; padding: 13px 16px; cursor: pointer; list-style: none; }
.curriculum-module > summary::-webkit-details-marker { display: none; }
.curriculum-module > summary::after { content: "+"; grid-column: 4; color: #7e899a; font: 800 15px var(--mono); }
.curriculum-module[open] > summary::after { content: "−"; }
.curriculum-module > summary > span { color: #597a2c; font: 800 9px var(--mono); }
.curriculum-module > summary > strong { font-size: 12px; }
.curriculum-module > summary > small { color: #8c96a5; font: 650 8px var(--mono); text-transform: uppercase; }
.curriculum-activity-list { border-top: 1px solid #e4e8ed; }
.curriculum-activity { min-height: 62px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid #ebedf1; background: white; }
.curriculum-activity:last-child { border-bottom: 0; }
.curriculum-activity.completed { background: #fbfdf7; }
.curriculum-activity-id { color: #8993a2; font: 750 8px var(--mono); }
.curriculum-activity small { color: #9099a8; font: 650 7px var(--mono); text-transform: uppercase; }
.curriculum-activity h3 { margin: 3px 0 0; font-size: 11px; }
.curriculum-activity > a { color: #4d6f20; font: 800 9px var(--mono); }
.outline-status { padding: 5px 8px; border: 1px solid #dfe3e8; border-radius: 999px; color: #929aa7; background: #f8f9fa; font: 700 7px var(--mono); text-transform: uppercase; }
.outline-status.locked { color: #7b8799; background: #f1f3f6; }
.unlocked-curriculum-notice { min-height: 175px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 30px 34px; border-radius: var(--radius); background: var(--navy-2); color: white; }
.unlocked-notice-mark { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid #40516a; border-radius: 8px; color: var(--lime); background: #17233a; font: 800 14px var(--mono); }
.unlocked-curriculum-notice .eyebrow { color: #91ad6c; }
.unlocked-curriculum-notice h2 { margin: 0 0 5px; font-size: 23px; }
.unlocked-curriculum-notice p:last-child { max-width: 660px; margin: 0; color: #9faabd; font-size: 11px; }

/* Lesson workspace */
.workspace-page { background: #e9ebef; }
.workspace-shell { width: min(1500px, 100%); margin: auto; overflow-x: clip; }
.workspace-shell * { min-width: 0; }
.workspace-topbar { height: 51px; padding: 0 26px; display: flex; justify-content: space-between; align-items: center; background: white; border-bottom: 1px solid #d9dde4; }
.lesson-breadcrumb { display: flex; gap: 9px; align-items: center; color: #9099a7; font-size: 10px; }
.lesson-breadcrumb a { color: #526177; font-weight: 750; }
.lesson-breadcrumb b { color: #354157; }
.workspace-progress { display: flex; align-items: center; gap: 9px; font: 700 9px var(--mono); color: #7a8494; }
.workspace-progress > div { width: 90px; height: 4px; border-radius: 99px; background: #e4e7eb; }
.workspace-progress i { display: block; height: 100%; background: var(--lime-strong); }
.workspace-progress strong { color: #455165; }
.workspace-view-controls { display: none; }
.workspace-grid { height: calc(100dvh - 119px); min-height: 0; display: grid; grid-template-columns: minmax(430px, .78fr) minmax(570px, 1.22fr); border-bottom: 1px solid #cdd2da; }
.lesson-reader, .code-workspace { min-height: 0; max-height: 100%; overflow-y: auto; overscroll-behavior-y: auto; scrollbar-gutter: stable; }
.lesson-reader { padding: 42px clamp(28px, 4vw, 65px); background: white; }
.lesson-heading { max-width: 680px; }
.bridge-context-banner { max-width: 680px; display: flex; justify-content: space-between; gap: 18px; margin-bottom: 22px; padding: 12px 14px; border: 1px solid #c9dfaa; border-radius: 7px; background: #f2f8e8; }
.bridge-context-banner span { color: #5c792f; font: 800 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.bridge-context-banner strong { color: #3f591c; font-size: 10px; text-align: right; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.lesson-meta span { padding: 4px 7px; background: #f1f3f5; border: 1px solid #e3e6ea; border-radius: 4px; color: #768194; font: 700 8px var(--mono); text-transform: uppercase; }
.lesson-heading h1 { margin: 18px 0 9px; font-size: 38px; letter-spacing: -.045em; }
.lesson-heading > p { margin: 0; color: var(--muted); font-size: 14px; }
.lesson-stage-controls { position: sticky; z-index: 5; top: -42px; margin: 27px 0 0; padding: 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; border: 1px solid #dce1e7; border-radius: 8px; background: rgba(255, 255, 255, .96); box-shadow: 0 6px 18px rgba(25, 35, 49, .07); }
.lesson-stage-controls button { min-height: 42px; padding: 7px 8px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 5px; color: #697589; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.lesson-stage-controls button span { width: 19px; height: 19px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #687487; background: #edf0f3; font: 800 7px var(--mono); }
.lesson-stage-controls button[aria-current="step"] { border-color: #b8c7a0; color: #3f561b; background: #f1f7e8; }
.lesson-stage-controls button[aria-current="step"] span { color: #26380d; background: var(--lime); }
.lesson-stage-controls button:focus-visible, .lesson-stage-navigation button:focus-visible, .workspace-view-controls button:focus-visible, .editor-display-toolbar button:focus-visible { outline: 3px solid #648e20; outline-offset: 2px; }
.lesson-stage-status { margin: 10px 0 0; color: #667185; font: 750 8px var(--mono); letter-spacing: .04em; text-align: right; text-transform: uppercase; }
.lesson-stage-stack { max-width: 680px; }
.lesson-stage-navigation { max-width: 680px; margin-top: 30px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #dfe3e8; }
.lesson-stage-navigation button { min-height: 38px; padding: 8px 13px; border: 1px solid #cbd2da; border-radius: 5px; color: #465369; background: white; font-size: 9px; font-weight: 800; cursor: pointer; }
.lesson-stage-navigation button:last-child { margin-left: auto; color: #2f4510; border-color: #a8bf83; background: #edf6df; }
.lesson-stage-navigation button:disabled { color: #9da5b0; border-color: #e0e4e8; background: #f6f7f8; cursor: default; }
.objective-box { margin: 26px 0; padding: 16px 20px; background: #f6f8f3; border-left: 3px solid var(--lime-strong); }
.objective-box > p { margin: 0 0 8px; color: #657083; font: 750 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.objective-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.objective-box li { color: #475369; font-size: 11px; }
.objective-box li span { color: #689b1b; margin-right: 7px; font-weight: 900; }
.teaching-block { margin: 28px 0; }
.teaching-block h2 { margin: 6px 0 10px; font-size: 19px; letter-spacing: -.02em; }
.teaching-block > p:not(.teaching-label):not(.transfer-note):not(.experiment-observation) { margin: 0; color: #5f6b7e; font-size: 13px; }
.teaching-label { margin: 0; color: #668527; font: 800 8px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.mental-model { padding: 18px 20px; border-left: 4px solid var(--lime-strong); background: #f7f9f3; }
.teaching-code, .example-output > pre, .prediction-check details pre { margin: 12px 0; padding: 14px 16px; overflow-x: auto; border: 1px solid #263248; border-radius: 6px; color: #e2eaf4; background: #111a2b; font: 11px/1.65 var(--mono); white-space: pre; }
.code-annotations { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.code-annotations li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: start; padding: 9px 11px; border: 1px solid #e0e4e9; border-radius: 5px; background: #fafbfc; }
.code-annotations span { color: #526b1d; font: 800 8px var(--mono); text-transform: uppercase; }
.code-annotations p, .transfer-note, .experiment-observation { margin: 0; color: #5f6b7e; font-size: 11px; }
.transfer-note { margin-top: 10px; padding: 10px 12px; border-radius: 5px; color: #58644b; background: #f3f7eb; }
.example-input { margin: -4px 0 12px; padding: 9px 11px; border: 1px solid #d9dfe7; border-radius: 5px; background: #f8fafc; }
.example-input small { color: #657083; font: 800 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.example-input pre { margin: 5px 0 0; color: #46556d; font: 10px/1.5 var(--mono); white-space: pre-wrap; }
.example-output > pre { color: #c8ed8d; }
.execution-trace > ol { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 1px; border: 1px solid #dfe3e8; border-radius: 6px; overflow: hidden; background: #dfe3e8; }
.execution-trace li { padding: 12px; display: grid; grid-template-columns: minmax(100px, .7fr) minmax(120px, 1fr); gap: 4px 14px; background: #fafbfc; }
.execution-trace li > div { display: flex; gap: 8px; align-items: center; }
.execution-trace li > div span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #456313; background: #e2f0c9; font: 800 8px var(--mono); }
.execution-trace li strong { color: #354157; font-size: 10px; }
.execution-trace li code { align-self: center; color: #4e617b; font: 9px var(--mono); }
.execution-trace li > p { grid-column: 1/-1; margin: 5px 0 0 28px; color: #6b7585; font-size: 10px; }
.teaching-comparison > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.teaching-comparison article { padding: 14px; border: 1px solid #dfe3e8; border-radius: 6px; background: #fafbfc; }
.teaching-comparison h3 { margin: 0 0 6px; color: #41506a; font-size: 11px; }
.teaching-comparison article p { margin: 0; color: #687386; font-size: 10px; }
.common-mistakes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.common-mistakes li { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; border: 1px solid #ecd9d3; border-radius: 6px; background: #fffaf8; }
.common-mistakes li p { margin: 0; color: #6d625e; font-size: 10px; }
.common-mistakes li strong { display: block; margin-bottom: 3px; color: #945b49; font: 800 8px var(--mono); text-transform: uppercase; }
.vocabulary-block dl { margin: 0; display: grid; gap: 1px; border: 1px solid #dfe3e8; border-radius: 6px; overflow: hidden; background: #dfe3e8; }
.vocabulary-block dl > div { padding: 11px 13px; display: grid; grid-template-columns: minmax(90px, .35fr) 1fr; gap: 12px; background: #fafbfc; }
.vocabulary-block dt { color: #3e4c63; font: 800 10px var(--mono); }
.vocabulary-block dd { margin: 0; color: #687386; font-size: 10px; }
.prediction-check { padding: 18px; border: 1px solid #d9e2c8; border-radius: 7px; background: #fbfdf8; }
.prediction-check details { margin-top: 12px; }
.prediction-check summary { padding: 10px 12px; border-radius: 5px; color: #466318; background: #e9f3d8; font-size: 10px; font-weight: 800; cursor: pointer; }
.prediction-check summary:focus-visible { outline: 2px solid #648e20; outline-offset: 2px; }
.prediction-check details div { padding: 5px 12px 0; }
.prediction-check details p { margin: 8px 0 0; color: #5f6b7e; font-size: 10px; }
.mini-experiment { padding: 18px; border: 1px solid #d6dfe9; border-radius: 7px; background: #f8fafc; }
.mini-experiment > ol { margin: 10px 0; padding-left: 22px; color: #546176; font-size: 11px; }
.mini-experiment > ol li + li { margin-top: 6px; }
.experiment-observation { padding-top: 10px; border-top: 1px solid #dfe5eb; }
.lesson-note { display: flex; gap: 12px; margin: 20px 0; padding: 14px; border: 1px solid #dbe2cb; background: #f7f9f3; border-radius: 6px; }
.lesson-note > span { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #527214; background: #dff0be; font: 800 11px serif; }
.lesson-note strong { display: block; margin-bottom: 3px; color: #40561d; font-size: 10px; }
.lesson-note p { margin: 0; color: #58644b; font-size: 11px; }
.task-box { margin-top: 32px; padding: 22px; border: 1px solid #cfd5de; border-radius: 8px; background: #fafbfc; box-shadow: 5px 5px 0 #eff1f4; }
.task-number { color: #5e781f; font: 800 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.task-box h2 { margin: 7px 0 5px; font-size: 18px; }
.task-box > p { margin: 0; color: #687386; font-size: 12px; }
.expected-output { margin-top: 14px; padding: 10px 12px; border-radius: 5px; background: #111a2b; color: white; }
.expected-output small { color: #748198; font: 700 8px var(--mono); text-transform: uppercase; }
.expected-output pre { margin: 8px 0 0; color: #d9e5ef; font: 12px/1.55 var(--mono); white-space: pre-wrap; }
.code-workspace { --editor-min-block-size: clamp(230px, 30dvh, 290px); --editor-max-block-size: clamp(360px, 52dvh, 570px); min-width: 0; display: flex; flex-direction: column; overflow-anchor: none; color: #d8dfeb; background: var(--navy-2); }
.code-toolbar { min-width: 0; min-height: 49px; flex: 0 0 49px; position: sticky; z-index: 8; top: 0; padding: 0 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #303c52; background: #141e31; }
.file-tabs { min-width: 0; height: 100%; display: flex; align-items: stretch; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.file-tab { height: 100%; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-left: 1px solid #303c52; border-right: 1px solid #303c52; border-top: 2px solid transparent; color: #9aa8bc; background: #111a2b; font: 600 10px var(--mono); cursor: pointer; }
.file-tab.active { border-top-color: var(--lime); color: #e3eaf2; background: #182338; }
.file-tab small { color: #718096; font: 700 7px var(--mono); text-transform: uppercase; }
.file-tab i { color: var(--amber); font-size: 7px; }
.python-file { width: 21px; height: 21px; display: grid; place-items: center; background: #375c80; border-radius: 4px; color: #ffe29b; font: 800 8px var(--sans); }
.data-file { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid #506078; border-radius: 4px; color: #9eb0c7; font: 800 9px var(--mono); }
.toolbar-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 15px; }
.runtime-status { color: #7c899f; font: 600 8px var(--mono); }
.runtime-status i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #69768c; }
.runtime-status.ready i { background: var(--lime); box-shadow: 0 0 0 3px rgba(169,227,75,.11); }
.runtime-status.error i { background: #e66e78; }
.reset-file-button { border: 1px solid #3c4960; border-radius: 5px; padding: 6px 9px; color: #aeb9ca; background: #172238; font-size: 9px; font-weight: 750; cursor: pointer; }
.reset-file-button:hover { color: white; border-color: #66758c; }
.reset-file-button:disabled { opacity: .45; cursor: default; }
.stop-button { border: 1px solid rgba(230,110,120,.55); border-radius: 5px; padding: 6px 9px; color: #ffd9dc; background: rgba(117,35,47,.62); font-size: 10px; font-weight: 800; cursor: pointer; }
.stop-button:hover { border-color: #e66e78; background: rgba(139,42,56,.78); }
.stop-button:focus-visible { outline: 2px solid #f39aa2; outline-offset: 2px; }
.stop-button:disabled { opacity: .55; cursor: default; }
.stop-button[hidden] { display: none; }
.run-button { border: 0; border-radius: 5px; padding: 7px 9px; color: #17210c; background: var(--lime); font-size: 10px; font-weight: 850; cursor: pointer; }
.run-button:disabled { opacity: .65; cursor: wait; }
.run-button kbd { margin-left: 9px; padding: 2px 4px; color: #4f681f; border: 1px solid rgba(46,72,18,.22); border-radius: 3px; background: rgba(255,255,255,.28); font: 700 7px var(--mono); }
.editor-display-toolbar { min-height: 38px; flex: 0 0 auto; position: sticky; z-index: 7; top: 49px; padding: 5px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #303c52; background: #172238; }
.editor-display-toolbar > span { color: #8997ab; font: 700 7px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.editor-display-toolbar > div { display: flex; align-items: center; gap: 5px; }
.editor-display-toolbar button { min-height: 27px; padding: 5px 8px; border: 1px solid #425069; border-radius: 4px; color: #b5c0cf; background: #111a2b; font-size: 8px; font-weight: 800; cursor: pointer; }
.editor-display-toolbar button:hover { color: white; border-color: #718099; }
.editor-display-toolbar button[aria-pressed="true"] { color: #dff5bb; border-color: #718f43; background: #22331d; }
.editor-container { block-size: clamp(var(--editor-min-block-size), var(--editor-content-block-size, 260px), var(--editor-max-block-size)); min-height: 0; flex: 0 0 clamp(var(--editor-min-block-size), var(--editor-content-block-size, 260px), var(--editor-max-block-size)); position: relative; background: #111a2b; overflow: hidden; }
.code-workspace.editor-size-compact .editor-container { block-size: var(--editor-min-block-size); flex-basis: var(--editor-min-block-size); }
.code-workspace.editor-size-expanded .editor-container { block-size: var(--editor-max-block-size); flex-basis: var(--editor-max-block-size); }
.code-editor { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.code-editor .cm-editor.cm-focused { outline: 2px solid rgba(169, 227, 75, .72); outline-offset: -2px; }
.code-editor .cm-content { padding-bottom: 44px; }
.code-editor.read-only .cm-editor { color: #afbac8; background: rgba(27, 39, 59, .55); }
.editor-keyboard-help { position: absolute; z-index: 4; right: 12px; bottom: 8px; margin: 0; padding: 5px 8px; border: 1px solid #35425a; border-radius: 4px; color: #7d8ba1; background: rgba(13, 21, 36, .92); font: 600 7px var(--mono); pointer-events: none; opacity: .72; transition: opacity .15s ease; }
.editor-keyboard-help kbd { color: #b4c0d1; font: inherit; }
.editor-container:has(.cm-focused) .editor-keyboard-help { color: #aeb9ca; opacity: 1; }
.editor-diagnostics { max-height: min(28dvh, 220px); flex: 0 0 auto; overflow: auto; padding: 8px 14px 9px; border-top: 1px solid #303c52; background: #131d30; }
.editor-diagnostics > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.editor-diagnostics > div > span { color: #93a0b4; font: 800 8px var(--mono); letter-spacing: .09em; }
.editor-diagnostics > div > small { color: #78869b; font: 650 8px var(--mono); }
.editor-diagnostics ol { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.editor-diagnostics li { color: #9ba9bc; font: 600 9px/1.45 var(--sans); }
.editor-diagnostics li.error { color: #f1a0a7; }
.editor-diagnostics li.warning { color: #e6c47e; }
.editor-diagnostics li button { width: 100%; padding: 3px 0; display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.editor-diagnostics li button:hover span:last-child { color: white; text-decoration: underline; text-underline-offset: 2px; }
.editor-diagnostics li button > span:first-child { padding-top: 1px; color: #8c9bb0; font: 750 8px var(--mono); white-space: nowrap; }
.editor-diagnostics > p { margin: 5px 0 0; color: #66758a; font: 600 7px var(--mono); }
.program-input-panel { border-top: 1px solid #303c52; border-bottom: 1px solid #29354a; background: #111b2c; }
.program-input-panel summary { min-height: 38px; padding: 0 15px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.program-input-panel summary::-webkit-details-marker { display: none; }
.program-input-panel summary span { color: #99a5b8; font: 800 8px var(--mono); letter-spacing: .1em; }
.program-input-panel summary span small { margin-left: 5px; color: #65738a; font: 650 7px var(--mono); letter-spacing: 0; text-transform: uppercase; }
.program-input-panel summary b { color: #65738a; font: 600 8px var(--mono); }
.program-input-panel summary i { color: #78869a; font-style: normal; }
.program-input-panel[open] summary i { transform: rotate(180deg); }
.program-input-panel > label { display: block; padding: 0 15px 5px; color: #68768b; font: 600 7px var(--mono); }
.program-input-panel textarea { width: calc(100% - 30px); margin: 0 15px 12px; resize: vertical; border: 1px solid #334058; border-radius: 4px; outline: 0; padding: 9px 10px; color: #dce5ef; background: #0d1524; font: 11px/1.5 var(--mono); }
.program-input-panel textarea:focus { border-color: #72884c; box-shadow: 0 0 0 2px rgba(169, 227, 75, .08); }
.output-panel { min-height: min-content; flex: 1 0 220px; display: grid; grid-template-rows: 37px minmax(110px, 1fr) auto; border-top: 1px solid #303c52; background: #0d1524; }
.output-heading { padding: 0 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #29354a; }
.output-heading > span { color: #99a5b8; font: 800 8px var(--mono); letter-spacing: .1em; }
.output-heading div { display: flex; align-items: center; gap: 12px; }
.output-heading small { color: #56647a; font: 600 8px var(--mono); }
.output-heading button { padding: 0; border: 0; color: #7e8a9e; background: none; font: 650 8px var(--mono); cursor: pointer; }
#code-output { min-height: 0; max-height: min(42dvh, 440px); overflow: auto; margin: 0; padding: 15px 18px; color: #d7e1ec; font: 12px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.output-placeholder { color: #56647a; }
.output-error { color: #f2a0a7; }
.result-banner { margin: 0 14px 12px; padding: 10px 12px; border: 1px solid #42516a; border-radius: 5px; background: #17243a; color: #b8c4d4; font-size: 10px; overflow-wrap: anywhere; }
.result-banner.success { color: #c9e7a1; border-color: #4c6536; background: #1b2b22; }
.result-banner strong { color: white; }
.output-difference-list { display: grid; gap: 8px; margin-top: 9px; }
.output-difference { padding-top: 9px; border-top: 1px solid #3b4a62; }
.output-difference > strong, .output-difference > small { display: block; }
.output-difference > strong { font: 750 9px/1.4 var(--mono); }
.output-difference > small { margin-top: 2px; color: #8fa0b7; font: 650 7px var(--mono); }
.output-difference-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; margin-top: 7px; }
.output-difference-grid > div { min-width: 0; padding: 7px 8px; border: 1px solid #36465f; border-radius: 4px; background: #101b2d; }
.output-difference-grid small { display: block; color: #8fa0b7; font: 750 7px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.output-difference-grid pre { overflow-x: auto; margin: 5px 0 0; color: #e4ebf3; font: 9px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.output-difference-grid em { display: block; margin-top: 4px; color: #8d9aab; font: 600 7px var(--mono); }
.assessment-feedback-list { display: grid; gap: 8px; margin-top: 9px; }
.assessment-feedback-item { padding-top: 9px; border-top: 1px solid #3b4a62; }
.assessment-feedback-item > small:first-child { display: block; margin-bottom: 4px; color: #8fa0b7; font: 750 7px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.assessment-feedback-title { display: block; margin-bottom: 4px; color: white; font: 750 10px/1.4 var(--mono); }
.assessment-feedback-item > p, .assessment-tip p { margin: 0; line-height: 1.55; }
.assessment-rationale { margin-top: 7px; padding: 7px 8px; border: 1px solid #36465f; border-radius: 4px; background: #101b2d; }
.assessment-rationale strong { display: block; margin-bottom: 3px; color: #aebbd0; font: 750 7px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.assessment-rationale p { margin: 0; line-height: 1.55; }
.assessment-tip { margin-top: 8px; padding: 8px 10px; border-left: 2px solid var(--lime); border-radius: 0 4px 4px 0; background: #1e2c3f; }
.assessment-tip strong { display: block; margin-bottom: 3px; color: var(--lime); font: 800 8px var(--mono); text-transform: uppercase; }
.assessment-tip-locked { display: block; margin-top: 7px; color: #8d9aab; }
.explain-assessment-button { margin-top: 8px; padding: 0; border: 0; color: #c8e5a1; background: transparent; cursor: pointer; font: 750 8px var(--mono); }
.explain-assessment-button:hover { color: white; }
.explain-assessment-button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 520px) {
  .output-difference-grid { grid-template-columns: 1fr; }
}
.editor-statusbar { min-height: 24px; flex: 0 0 24px; padding: 0 11px; display: flex; justify-content: space-between; align-items: center; color: #69768d; border-top: 1px solid #263147; background: #121c2e; font: 600 7px var(--mono); }
.attempt-history-panel { padding: 42px clamp(24px, 6vw, 90px); border-bottom: 1px solid #d5dae1; background: #f5f6f8; }
.attempt-history-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 22px; }
.attempt-history-heading h2 { margin: 0; font-size: 25px; }
.attempt-history-heading > div:first-child > p:last-child { margin: 5px 0 0; color: #778294; font-size: 10px; }
.curriculum-revision { min-width: 260px; padding: 11px 14px; border: 1px solid #d9dde3; border-radius: 7px; background: white; }
.curriculum-revision small, .curriculum-revision strong, .curriculum-revision span { display: block; }
.curriculum-revision small { color: #9099a7; font: 700 7px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.curriculum-revision strong { margin: 4px 0 2px; color: #4c586c; font: 800 10px var(--mono); }
.curriculum-revision span { color: #8a94a4; font: 600 8px var(--mono); }
.revision-notice { margin-bottom: 14px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; border: 1px solid #e3d6a5; border-radius: 6px; color: #6f602c; background: #fff9e8; }
.revision-notice > span { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 20px; border-radius: 50%; background: #efdfa3; font: 800 9px serif; }
.revision-notice p { margin: 0; font-size: 9px; line-height: 1.5; }
.attempt-history-meta { margin-bottom: 8px; color: #8a94a3; font: 650 8px var(--mono); text-transform: uppercase; }
.attempt-history-meta strong { color: #4f5b6e; }
.attempt-history-meta span { margin-left: 8px; padding-left: 8px; border-left: 1px solid #d0d5dc; }
.attempt-history-list { display: grid; gap: 7px; }
.attempt-record { border: 1px solid #dce0e6; border-radius: 7px; overflow: hidden; background: white; }
.attempt-record[open] { border-color: #c8ced7; box-shadow: 0 8px 24px rgba(26, 35, 50, .06); }
.attempt-record summary { min-height: 62px; padding: 10px 14px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.attempt-record summary::-webkit-details-marker { display: none; }
.attempt-state { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #8f6720; background: #fff1d5; font: 800 13px var(--mono); }
.attempt-record.passed .attempt-state { color: #4d6d1f; background: #e9f6d6; }
.attempt-summary strong, .attempt-summary small, .attempt-revision time, .attempt-revision span { display: block; }
.attempt-summary strong { color: #3f4b5e; font-size: 10px; }
.attempt-summary small { margin-top: 3px; color: #9099a7; font: 600 7px var(--mono); }
.attempt-revision { min-width: 205px; text-align: right; }
.attempt-revision time { color: #697589; font: 700 8px var(--mono); }
.attempt-revision span { margin-top: 4px; color: #5d792e; font: 700 7px var(--mono); text-transform: uppercase; }
.attempt-revision span.older { color: #a16b32; }
.attempt-snapshot { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid #e2e5ea; background: #f8f9fb; }
.attempt-snapshot > div { min-width: 0; }
.attempt-snapshot small { display: block; margin-bottom: 5px; color: #798597; font: 700 7px var(--mono); text-transform: uppercase; }
.attempt-snapshot pre { min-height: 74px; max-height: 220px; margin: 0; padding: 11px; overflow: auto; border: 1px solid #263248; border-radius: 5px; color: #d8e2ed; background: #111a2a; font: 10px/1.65 var(--mono); white-space: pre-wrap; }
.attempt-history-empty { min-height: 85px; display: grid; place-items: center; align-content: center; gap: 4px; border: 1px dashed #d1d6dd; border-radius: 7px; color: #929ba9; background: white; }
.attempt-history-empty[hidden] { display: none; }
.attempt-history-empty span { color: #748096; font: 800 14px var(--mono); }
.attempt-history-empty p { margin: 0; font-size: 9px; }
.support-drawer { padding: 48px clamp(24px, 6vw, 90px); background: white; display: grid; grid-template-columns: .75fr 1.25fr; gap: 60px; border-bottom: 1px solid #d5dae1; }
.support-intro h2 { margin: 0; font-size: 29px; letter-spacing: -.035em; }
.support-intro > p:last-child { color: var(--muted); font-size: 12px; }
.support-controls { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-self: end; }
.support-controls input { position: absolute; opacity: 0; }
.support-controls label > span { min-height: 65px; padding: 10px; display: grid; grid-template-columns: 26px 1fr; align-content: center; border: 1px solid #d9dde4; border-radius: 7px; cursor: pointer; }
.support-controls label b { grid-row: span 2; align-self: center; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #edf0f3; color: #7e899b; font: 700 8px var(--mono); }
.support-controls label strong { font-size: 11px; }
.support-controls label small { color: #8c95a3; font-size: 8px; }
.support-controls input:checked + span { border-color: #354157; box-shadow: inset 0 0 0 1px #354157; background: #f7f8fa; }
.support-controls input:checked + span b { color: #41630d; background: #e7f5d0; }
.support-panels { grid-column: 2; }
.support-panel { min-height: 145px; }
.hint-ladder { display: grid; gap: 7px; }
.hint-ladder details { border: 1px solid #dfe3e8; border-radius: 6px; background: #fafbfc; }
.hint-ladder summary { padding: 11px 13px; color: #465267; font-size: 10px; font-weight: 800; cursor: pointer; }
.hint-ladder summary span { float: right; color: #929aa7; font: 600 8px var(--mono); }
.hint-ladder details p { margin: 0; padding: 0 13px 13px; color: #687487; font-size: 11px; }
.resource-list { display: grid; gap: 7px; }
.resource-card { border: 1px solid #dfe3e8; border-radius: 6px; overflow: hidden; }
.resource-list a { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 11px; padding: 10px 12px; }
.resource-card:focus-within, .resource-card:hover { border-color: #9ca7b6; }
.resource-icon { width: 29px; height: 29px; display: grid; place-items: center; background: #edf1f5; border-radius: 5px; color: #65748b; }
.resource-list small, .resource-list strong { display: block; }
.resource-list small { color: #929baa; font: 600 8px var(--mono); }
.resource-list strong { margin-top: 2px; font-size: 10px; }
.resource-list b { color: #8490a1; font-size: 9px; }
.resource-details { padding: 0 12px 10px 55px; color: #566174; font-size: 10px; line-height: 1.55; }
.resource-details p { margin: 4px 0; }
.resource-details p > strong { display: inline; color: #323b49; font-size: inherit; }
.resource-details details { margin-top: 7px; }
.resource-details summary { cursor: pointer; color: #465469; font-weight: 700; }
.resource-details ul { margin: 7px 0; padding-left: 18px; }
.offline-note { margin: 10px 0 0; color: #8c95a3; font-size: 9px; }
.ai-panel-heading { display: grid; grid-template-columns: 35px 1fr auto; gap: 12px; align-items: start; }
.ai-panel-heading > span:first-child { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 6px; background: #eeeaff; color: #7160cb; }
.ai-panel-heading h3 { margin: 0; color: #344055; font-size: 13px; }
.ai-panel-heading p { margin: 3px 0; color: #7a8494; font-size: 10px; line-height: 1.5; }
.ai-status { padding: 5px 8px; border-radius: 99px; background: #f0f1f3; color: #9098a5; font: 700 7px var(--mono); text-transform: uppercase; white-space: nowrap; }
.ai-status i { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: #79a932; }
.ai-status.connected { color: #456713; background: #e8f5d4; }
.ai-help-form { margin-top: 15px; }
.ai-help-form > label { display: block; margin-bottom: 6px; color: #4c586c; font-size: 10px; font-weight: 800; }
.ai-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.ai-input-row textarea { width: 100%; min-height: 52px; max-height: 110px; resize: vertical; border: 1px solid #d2d7df; border-radius: 6px; padding: 10px 11px; color: #354157; background: #fbfcfd; font-size: 12px; line-height: 1.5; }
.ai-input-row textarea:focus { outline: 0; border-color: #7e72c4; box-shadow: 0 0 0 3px rgba(126, 114, 196, .12); background: white; }
.ai-input-row textarea::placeholder { color: #9aa3b1; }
.ai-input-row .button { height: 42px; min-width: 133px; padding: 0 13px; gap: 12px; box-shadow: none; }
.ai-input-row .button:disabled { opacity: .64; cursor: wait; transform: none; }
.ai-input-row .button b { font-size: 13px; }
.ai-form-help { margin: 6px 1px 0; display: flex; gap: 12px; color: #929baa; font-size: 8px; line-height: 1.4; }
.ai-form-help .answer-policy { margin-left: auto; color: #737f91; }
.ai-form-help kbd { padding: 1px 3px; border: 1px solid #d8dce3; border-bottom-width: 2px; border-radius: 3px; color: #687487; background: #f7f8fa; font: 650 7px var(--mono); }
.ai-conversation { overflow: hidden; margin-top: 14px; border: 1px solid #d9dee6; border-radius: 7px; background: white; }
.ai-conversation[hidden] { display: none; }
.ai-conversation-heading { min-height: 43px; padding: 8px 11px 8px 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e1e5ea; background: #f7f8fa; }
.ai-conversation-heading > div span, .ai-conversation-heading > div small { display: block; }
.ai-conversation-heading > div span { color: #4d596d; font: 800 9px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.ai-conversation-heading > div small { margin-top: 2px; color: #929baa; font-size: 8px; }
.ai-conversation-heading button { padding: 6px 9px; border: 1px solid #cad2c0; border-radius: 5px; color: #4d681c; background: #f4f9eb; font-size: 9px; font-weight: 800; cursor: pointer; }
.ai-conversation-heading button:hover { border-color: #aebd9a; background: #edf6df; }
.ai-conversation-heading button:disabled { opacity: .6; cursor: wait; }
.ai-conversation-heading button[hidden] { display: none; }
.ai-conversation-heading button span { margin-right: 3px; }
.ai-transcript { max-height: 390px; overflow-y: auto; }
.ai-transcript-message { padding: 13px 15px 14px; border-top: 1px solid #e8eaee; border-left: 3px solid transparent; background: white; }
.ai-transcript-message:first-child { border-top: 0; }
.ai-transcript-message.user { border-left-color: #75839a; background: #f8f9fb; }
.ai-transcript-message.assistant { border-left-color: #8173cf; }
.ai-transcript-message > .ai-message-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ai-transcript-message strong { color: #465267; font: 800 9px var(--mono); text-transform: uppercase; letter-spacing: .035em; }
.ai-transcript-message.assistant strong { color: #6658b5; }
.ai-transcript-message small { color: #a0a7b2; font: 600 8px var(--mono); }
.ai-transcript-message p { margin: 0; color: #515e73; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.ai-transcript-message .tutor-markdown { color: #515e73; font-size: 13px; line-height: 1.65; }
.ai-transcript-message .tutor-markdown p + p { margin-top: 9px; }
.ai-transcript-message .tutor-markdown code { padding: 1px 4px; border-radius: 3px; color: #4f438f; background: #f0eefb; font: 600 11px/1.5 var(--mono); }
.ai-transcript-message .tutor-markdown pre { margin: 9px 0 0; padding: 10px 12px; overflow-x: auto; border: 1px solid #dfe2e8; border-radius: 5px; background: #f7f8fa; }
.ai-transcript-message .tutor-markdown pre code { padding: 0; color: #344055; background: transparent; white-space: pre; }
.ai-transcript-message.loading p { color: #7c8798; font-style: italic; }
.ai-transcript-message.error { border-left-color: #c8646d; background: #fff9f9; }
.ai-transcript-message.error strong, .ai-transcript-message.error p { color: #9a4149; }
.ai-conversation-notice { margin: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; border: 1px solid #e5d9af; border-radius: 5px; color: #77632d; background: #fff9e8; }
.ai-conversation-notice > span { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border-radius: 50%; background: #f1df9f; font: 800 9px serif; }
.ai-conversation-notice p { margin: 0; font-size: 10px; line-height: 1.5; }
.ai-resolved-note { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #d6e4c2; border-radius: 5px; color: #566d30; background: #f5faed; font-size: 10px; }
.ai-resolved-note[hidden] { display: none; }
.worked-solution-recovery { grid-column: 1 / -1; margin-top: 8px; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 24px; border: 1px solid #d9cfae; border-radius: 9px; background: #fffbef; }
.worked-solution-intro h3 { margin: 3px 0 5px; color: #344055; font-size: 17px; }
.worked-solution-intro > p:last-child { max-width: 760px; margin: 0; color: #746b55; font-size: 11px; line-height: 1.6; }
.worked-solution-button { min-height: 42px; padding: 0 15px; border: 1px solid #8a7442; border-radius: 6px; color: white; background: #6e5a2e; font-size: 10px; font-weight: 800; cursor: pointer; }
.worked-solution-button:hover:not(:disabled) { background: #594722; }
.worked-solution-button:disabled { border-color: #ded7c5; color: #99917f; background: #f3efe4; cursor: not-allowed; }
.worked-solution-panel { grid-column: 1 / -1; overflow: hidden; border: 1px solid #c9b97f; border-radius: 7px; background: white; }
.worked-solution-panel[hidden] { display: none; }
.worked-solution-panel > header { padding: 11px 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e5dcc1; background: #f9f4e6; }
.worked-solution-panel > header small, .worked-solution-panel > header strong { display: block; }
.worked-solution-panel > header small, .worked-solution-grid small { color: #8a7b55; font: 700 7px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.worked-solution-panel > header strong { margin-top: 2px; color: #4e442d; font-size: 12px; }
.worked-solution-panel > header > span { padding: 5px 8px; border-radius: 99px; color: #725d28; background: #eee1b8; font: 750 7px var(--mono); text-transform: uppercase; }
.worked-solution-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); }
.worked-solution-grid > div { min-width: 0; padding: 14px; }
.worked-solution-grid > div + div { border-left: 1px solid #ece4cf; }
.worked-solution-grid pre { overflow: auto; max-height: 420px; margin: 7px 0 0; padding: 13px; border-radius: 5px; color: #d8e3f3; background: var(--navy); font: 10px/1.7 var(--mono); white-space: pre; }
.worked-solution-grid p { margin: 7px 0 0; color: #5d6674; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.worked-solution-note { margin: 0; padding: 10px 14px; border-top: 1px solid #ece4cf; color: #786f5c; background: #fffdf7; font-size: 9px; }
.worked-solution-dialog { width: min(520px, calc(100% - 32px)); padding: 22px; border: 1px solid #c9b97f; border-radius: 10px; box-shadow: 0 22px 70px rgba(11, 20, 36, .32); color: var(--text); background: white; }
.worked-solution-dialog::backdrop { background: rgba(9, 18, 33, .68); }
.worked-solution-dialog > div:first-child { display: flex; align-items: center; gap: 12px; }
.worked-solution-dialog > div:first-child > span { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 50%; color: #6f5927; background: #f3e6bd; font-weight: 900; }
.worked-solution-dialog h3 { margin: 2px 0 0; font-size: 19px; }
.worked-solution-dialog > p { color: #657084; font-size: 11px; line-height: 1.65; }
.worked-solution-dialog-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
.worked-solution-dialog-actions button { min-height: 38px; padding: 0 13px; border: 1px solid #d4d9e0; border-radius: 5px; color: #546074; background: white; font-size: 10px; font-weight: 800; cursor: pointer; }
.worked-solution-dialog-actions button:last-child { border-color: #6e5a2e; color: white; background: #6e5a2e; }
.lesson-nav { min-height: 105px; padding: 22px clamp(24px, 6vw, 90px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; background: #f5f6f8; }
.lesson-nav > a:not(.roadmap-link) { display: flex; flex-direction: column; }
.lesson-nav .next-link { align-items: end; text-align: right; }
.lesson-nav span { color: #8d96a4; font: 650 8px var(--mono); text-transform: uppercase; }
.lesson-nav strong { margin-top: 4px; font-size: 11px; }
.lesson-nav .disabled { opacity: .4; pointer-events: none; }
.roadmap-link { color: #758094; font-size: 10px; font-weight: 750; }

/* Challenges and profile */
.compact-intro { align-items: center; }
.challenge-stat { min-width: 150px; padding: 18px; border: 1px solid var(--line); background: white; border-radius: 9px; text-align: center; }
.challenge-stat span, .challenge-stat small { display: block; color: #8b95a4; font: 700 8px var(--mono); text-transform: uppercase; }
.challenge-stat strong { display: block; margin: 5px; font-size: 30px; }
.challenge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.challenge-card { position: relative; overflow: hidden; padding: 28px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.challenge-card.locked { opacity: .6; }
.challenge-card-top { display: flex; justify-content: space-between; color: #8d97a6; font: 700 8px var(--mono); text-transform: uppercase; }
.challenge-glyph { position: absolute; right: 22px; top: 52px; color: #edf0f3; font: 800 100px var(--mono); }
.challenge-card > .eyebrow { margin-top: 45px; }
.challenge-card h2 { position: relative; margin: 0; font-size: 27px; letter-spacing: -.035em; }
.challenge-card > p:not(.eyebrow) { position: relative; color: var(--muted); font-size: 12px; }
.challenge-card .skill-pills span { color: #758194; border-color: #d9dde4; background: #f8f9fa; }
.challenge-footer { display: flex; justify-content: space-between; align-items: center; margin: 25px -28px -28px; padding: 14px 28px; border-top: 1px solid #e3e6eb; background: #fafbfc; }
.challenge-footer > span { color: #8892a2; font: 600 8px var(--mono); }
.lock-label { text-transform: uppercase; }
.challenge-philosophy { margin-top: 18px; padding: 25px; display: flex; align-items: start; gap: 16px; border: 1px solid #d7dde4; border-radius: 10px; background: #eef1f4; }
.challenge-philosophy > span { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: var(--lime); font-family: serif; }
.challenge-philosophy h2 { margin: 0; font-size: 14px; }
.challenge-philosophy p { margin: 4px 0 0; color: #687487; font-size: 11px; }
.profile-hero { min-height: 160px; margin-bottom: 16px; padding: 28px 34px; display: flex; align-items: center; gap: 20px; border-radius: 12px; color: white; background: var(--navy-2); }
.large-avatar { width: 70px; height: 70px; flex: 0 0 70px; display: grid; place-items: center; border: 1px solid #526079; border-radius: 15px; color: var(--navy); background: var(--lime); font-size: 30px; font-weight: 850; }
.profile-hero .eyebrow { color: #8795aa; }
.profile-hero h1 { margin: 0; font-size: 30px; }
.profile-hero p:last-child { margin: 4px 0 0; color: #8f9caf; font-size: 10px; }
.profile-streak { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.profile-streak > span { color: var(--amber); font-size: 25px; }
.profile-streak strong, .profile-streak small { display: block; }
.profile-streak strong { font-size: 28px; line-height: 1; }
.profile-streak small { color: #8996a9; font: 700 8px var(--mono); text-transform: uppercase; }
.profile-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; margin-bottom: 16px; }
.progress-overview .panel-heading > strong { font-size: 28px; }
.profile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 18px; background: #e4e7eb; }
.profile-metrics div { padding: 15px; background: white; }
.profile-metrics strong, .profile-metrics span { display: block; }
.profile-metrics strong { font-size: 22px; }
.profile-metrics span { color: #8993a2; font-size: 9px; }
.activity-panel, .achievements-panel { margin-bottom: 16px; }
.activity-chart { min-height: 130px; display: flex; align-items: stretch; gap: 10px; padding: 12px 0 0; }
.activity-column { flex: 1; min-width: 30px; display: grid; grid-template-rows: 95px auto; text-align: center; }
.activity-bar { display: flex; align-items: end; justify-content: center; border-bottom: 1px solid #dfe3e8; }
.activity-bar i { width: 16px; min-height: 8px; height: min(90px, calc(var(--attempts) * 11px)); border-radius: 3px 3px 0 0; background: var(--lime-strong); }
.activity-column small { margin-top: 7px; color: #9099a7; font: 600 7px var(--mono); }
.achievement-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.achievement-grid article { min-height: 100px; padding: 16px; display: grid; grid-template-columns: 35px 1fr; gap: 12px; border: 1px solid #e0e4e9; border-radius: 8px; }
.achievement-grid article > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: #6d5ccd; background: #efecff; }
.achievement-grid h3 { margin: 0; font-size: 12px; }
.achievement-grid p { margin: 4px 0; color: #7b8595; font-size: 9px; line-height: 1.5; }
.achievement-grid small { color: #a0a7b2; font: 600 7px var(--mono); }

/* Staff administration */
.administration-shell { max-width: 1320px; }
.administration-hero, .learner-admin-hero { margin-bottom: 14px; padding: 28px 32px; display: flex; align-items: center; gap: 22px; border-radius: 12px; color: white; background: var(--navy-2); }
.administration-hero > div:first-child { max-width: 760px; }
.administration-hero h1, .learner-admin-hero h1 { margin: 0; font-size: clamp(29px, 4vw, 42px); letter-spacing: -.045em; }
.administration-hero p:last-child, .learner-admin-hero p:last-child { margin: 7px 0 0; color: #99a7ba; font-size: 12px; }
.administration-hero .eyebrow, .learner-admin-hero .eyebrow { color: #8795aa; }
.database-badge { margin-left: auto; padding: 12px 15px; display: flex; align-items: center; gap: 10px; border: 1px solid #3e4b61; border-radius: 8px; background: #162138; }
.database-badge > span { color: var(--lime); font-size: 10px; }
.database-badge strong, .database-badge small { display: block; }
.database-badge strong { font-size: 11px; }
.database-badge small { margin-top: 3px; color: #8491a5; font: 650 7px var(--mono); }
.administration-metrics { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.administration-metrics article { min-height: 112px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.administration-metrics span, .administration-metrics small, .administration-metrics strong { display: block; }
.administration-metrics span { color: #717d90; font-size: 10px; font-weight: 700; }
.administration-metrics strong { margin: 5px 0 3px; font-size: 28px; letter-spacing: -.035em; }
.administration-metrics small { color: #98a1ae; font-size: 9px; }
.administration-filters { margin-bottom: 18px; padding: 14px; display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(120px, .7fr)) auto auto; align-items: end; gap: 10px; border: 1px solid #e2e5ea; border-radius: 9px; background: #f8f9fa; }
.administration-filters label > span, .confirmation-form label > span { display: block; margin-bottom: 5px; color: #657084; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.administration-filters select { width: 100%; height: 42px; padding: 0 10px; border: 1px solid #cfd5de; border-radius: 6px; color: var(--ink); background: white; font-size: 11px; }
.text-reset { align-self: center; color: #667286; font-size: 10px; font-weight: 750; text-decoration: underline; }
.administration-learners { min-width: 0; overflow-x: hidden; }
.administration-table-wrap { width: 100%; max-width: 100%; min-width: 0; contain: layout inline-size paint; overflow-x: auto; }
.administration-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.administration-table th { padding: 9px 12px; color: #8490a2; border-bottom: 1px solid #dce1e7; text-align: left; font: 750 8px var(--mono); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.administration-table td { padding: 13px 12px; border-bottom: 1px solid #edf0f3; color: #536075; vertical-align: middle; }
.administration-table tbody tr:hover { background: #fafbfc; }
.learner-identity { min-width: 190px; display: flex; align-items: center; gap: 10px; }
.learner-identity > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 7px; color: #293719; background: #dff2bf; font-weight: 850; }
.learner-identity strong, .learner-identity small, .table-subtext { display: block; }
.learner-identity strong { color: #253047; font-size: 11px; }
.learner-identity small, .table-subtext { margin-top: 2px; color: #929ba9; font-size: 8px; }
.account-state, .attempt-state { display: inline-flex; padding: 5px 8px; border-radius: 99px; color: #4a6824; background: #edf7df; font: 750 8px var(--mono); text-transform: uppercase; }
.account-state.inactive { color: #8b4850; background: #f9e7e9; }
.attempt-state { color: #8a6532; background: #fff3dc; }
.attempt-state.passed { color: #4a6824; background: #edf7df; }
.table-progress { min-width: 120px; }
.table-progress > span { display: block; margin-bottom: 5px; color: #59667a; font-size: 9px; }
.table-progress > i, .level-admin-progress > i { height: 5px; display: block; overflow: hidden; border-radius: 99px; background: #e8ebef; }
.table-progress > i > b, .level-admin-progress > i > b { height: 100%; display: block; border-radius: inherit; background: var(--lime-strong); }
.row-action { color: #50691d; font-size: 9px; font-weight: 800; white-space: nowrap; }
.administration-pagination { padding-top: 16px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: #7b8698; font-size: 9px; }
.administration-pagination a:last-child { justify-self: end; }
.administration-pagination a { font-weight: 800; color: #50691d; }
.administration-audit { margin-top: 14px; }
.audit-list { margin: 0; padding: 0; list-style: none; }
.audit-list li { padding: 11px 0; display: flex; align-items: flex-start; gap: 11px; border-top: 1px solid #edf0f3; }
.audit-list li:first-child { border-top: 0; padding-top: 0; }
.audit-mark { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 6px; color: #4b5d2c; background: #edf4e1; font: 800 8px var(--mono); }
.audit-list strong { color: #344055; font-size: 10px; }
.audit-list p { margin: 2px 0; color: #687488; font-size: 9px; line-height: 1.5; }
.audit-list small { color: #9ba3af; font: 650 7px var(--mono); }
.administration-breadcrumb { margin-bottom: 13px; display: flex; gap: 8px; color: #798497; font-size: 10px; }
.administration-breadcrumb a { color: #4e661b; font-weight: 800; }
.learner-admin-hero .large-avatar { width: 62px; height: 62px; flex-basis: 62px; }
.learner-admin-state { margin-left: auto; text-align: right; }
.learner-admin-state small { display: block; margin-top: 7px; color: #8f9caf; font-size: 8px; }
.administration-metrics.compact article { min-height: 96px; }
.learner-administration-grid { margin-bottom: 14px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; }
.learner-level-progress ol { margin: 0; padding: 0; list-style: none; }
.learner-level-progress li { padding: 12px 0; display: grid; grid-template-columns: 1fr minmax(150px, .45fr); align-items: center; gap: 20px; border-top: 1px solid #edf0f3; }
.learner-level-progress li:first-child { border-top: 0; padding-top: 0; }
.learner-level-progress strong, .learner-level-progress small { display: block; }
.learner-level-progress strong { font-size: 11px; }
.learner-level-progress small { margin-top: 4px; color: #929ba9; font-size: 8px; }
.level-admin-progress > span { display: block; margin-bottom: 6px; color: #687489; text-align: right; font-size: 8px; }
.learner-management-panel h3 { margin: 0 0 5px; font-size: 13px; }
.management-note { margin: 7px 0 12px; color: #7d8797; font-size: 9px; line-height: 1.55; }
.account-management-divider { margin: 22px 0; border-top: 1px solid #e2e6eb; }
.confirmation-form { display: grid; gap: 9px; }
.button-danger { color: white; background: #a64a53; box-shadow: none; }
.button-danger:hover { background: #8f3d45; }
.learner-evidence-panel { margin-bottom: 14px; }
.compact-table td { white-space: nowrap; }
.compact-table td:first-child { min-width: 240px; white-space: normal; }
.learner-history-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.administration-unavailable { max-width: 720px; margin-inline: auto; text-align: center; }
.administration-unavailable h1 { margin: 0; font-size: 34px; }
.administration-unavailable > p:not(.eyebrow) { color: #667286; font-size: 12px; }
.database-contract { margin: 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #e0e4e9; border-radius: 8px; }
.database-contract div { padding: 13px; border-left: 1px solid #e0e4e9; }
.database-contract div:first-child { border-left: 0; }
.database-contract dt { color: #8c96a5; font: 750 7px var(--mono); text-transform: uppercase; }
.database-contract dd { margin: 5px 0 0; font-size: 10px; font-weight: 750; }
.visually-hidden { 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; }

/* Forms and footer */
.auth-page { background: #eef0f3; }
.auth-shell { width: min(980px, calc(100% - 40px)); min-height: calc(100vh - 140px); margin: 36px auto; display: grid; grid-template-columns: .9fr 1.1fr; border: 1px solid #d5dae2; border-radius: 14px; overflow: hidden; background: white; box-shadow: var(--shadow); }
.auth-panel { padding: clamp(34px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.auth-intro { color: white; background: var(--navy-2); }
.auth-intro .eyebrow { color: #8290a6; }
.auth-intro h1 { margin: 0; font-size: 39px; line-height: 1.08; letter-spacing: -.045em; }
.auth-intro > p:last-of-type { color: #9ca9ba; font-size: 13px; }
.mini-terminal { margin-top: 35px; border: 1px solid #354159; border-radius: 7px; overflow: hidden; background: #0d1524; }
.mini-terminal > span { height: 28px; display: flex; gap: 5px; align-items: center; padding: 0 10px; border-bottom: 1px solid #303b50; }
.mini-terminal i { width: 6px; height: 6px; border-radius: 50%; background: #45536a; }
.mini-terminal code { display: block; padding: 17px; color: var(--lime); font: 11px/1.7 var(--mono); }
.mini-terminal b { color: #cbd5e2; font-weight: 400; }
.feature-ticks { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; color: #aeb9c9; font-size: 12px; }
.feature-ticks li::before { content: "✓"; margin-right: 9px; color: var(--lime); }
.auth-form-panel h2 { margin: 0; font-size: 28px; }
.muted { color: #7b8596; font-size: 12px; }
.muted a { color: #4d690f; font-weight: 750; }
.stack-form { margin-top: 25px; display: flex; flex-direction: column; gap: 7px; }
.stack-form label { margin-top: 8px; color: #515d70; font-size: 10px; font-weight: 750; }
.form-control, .stack-form input[type="text"], .stack-form input[type="password"] { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #cfd5de; border-radius: 6px; color: var(--ink); background: #fafbfc; font-size: 12px; }
.form-control:focus { border-color: #7e8e6a; background: white; outline: 3px solid #edf5df; }
.errorlist { margin: 2px 0 0; padding: 0; list-style: none; color: #ac3d46; font-size: 9px; }
.field-help { color: #8b94a3; font-size: 8px; line-height: 1.4; }
.field-help ul { margin: 0; padding-left: 16px; }
.form-errors { padding: 10px; color: #8e3038; background: #fff0f1; border: 1px solid #efc9cd; border-radius: 6px; font-size: 10px; }
.form-footnote { margin: 17px 0 0; color: #8e97a5; text-align: center; font-size: 8px; }
.form-footnote span { color: var(--lime-strong); }
.compact-form { margin-top: 0; }
.compact-form p { margin: 0; }
.site-footer { min-height: 80px; padding: 20px clamp(20px, 4vw, 64px); display: flex; align-items: center; gap: 24px; color: #8d99ad; background: var(--navy); font-size: 10px; }
.site-footer p { margin-right: auto; }
.brand-muted { font-size: 13px; }
.brand-muted .brand-mark { width: 27px; height: 27px; font-size: 10px; }

/* Persistent Project Studio and staff manual review */
.project-shell { max-width: 1320px; }
.project-hero { margin-bottom: 14px; padding: 30px 34px; display: flex; align-items: center; gap: 28px; border-radius: 12px; color: white; background: linear-gradient(125deg, #142137, #25344c); }
.project-hero > div:first-child { max-width: 780px; }
.project-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.045em; }
.project-hero p:not(.eyebrow) { margin: 8px 0 0; color: #a8b4c6; font-size: 12px; }
.project-hero .eyebrow { color: #94a4ba; }
.project-hero.compact { padding-block: 24px; }
.project-contract { margin-left: auto; min-width: 215px; padding: 14px 16px; border: 1px solid #40506a; border-radius: 8px; background: #101b2d; }
.project-contract span, .project-contract strong, .project-contract small { display: block; }
.project-contract span { color: #8fa0b9; font: 700 8px var(--mono); text-transform: uppercase; }
.project-contract strong { margin: 4px 0; color: var(--lime); font-size: 16px; }
.project-contract small { color: #8595ad; font-size: 8px; }
.project-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project-card { padding: 20px; display: flex; min-height: 210px; flex-direction: column; gap: 14px; border: 1px solid #e0e4e9; border-radius: 9px; background: #fbfcfd; }
.project-card.locked { border-style: dashed; background: #f6f7f8; opacity: .78; }
.project-card h3 { margin: 8px 0 3px; font-size: 17px; }
.project-card p { margin: 0; color: #7c8798; font: 9px var(--mono); }
.project-card .button, .project-card form { margin-top: auto; align-self: flex-start; }
.project-card form { display: flex; }
.project-locked-note { margin-top: auto; color: #7d8796; font: 750 9px/1.5 var(--mono); }
.project-card-meta { display: flex; flex-wrap: wrap; gap: 7px; color: #667287; font-size: 9px; }
.project-card-meta span { padding: 5px 7px; border-radius: 4px; background: #edf0f3; }
.project-empty { grid-column: 1 / -1; min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 18px; color: #738095; text-align: left; }
.project-empty > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 9px; color: var(--lime-strong); background: #eef4e4; font: 700 14px var(--mono); }
.project-empty h3 { margin: 0; color: var(--ink); font-size: 18px; }
.project-empty p { max-width: 610px; margin: 5px 0 0; font-size: 11px; line-height: 1.6; }
.project-state { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; color: #536077; background: #e9edf2; font: 750 8px var(--mono); text-transform: uppercase; }
.project-state.passed, .project-state.completed, .project-state.accepted { color: #4d661b; background: #eef5df; }
.project-state.failed, .project-state.changes_requested { color: #93404a; background: #fff0f1; }
.project-state.in_review { color: #7a5b14; background: #fff5d9; }
.project-hero > .project-state { margin-left: auto; }
.project-guidance { margin-bottom: 14px; }
.project-guidance > details { margin: 18px 0; border: 1px solid #dfe4e9; border-radius: 8px; background: #fafbfc; }
.project-guidance > details > summary { padding: 14px 16px; cursor: pointer; color: #526074; font-size: 11px; font-weight: 800; }
.project-lesson-copy { max-width: 900px; margin: 0 auto; padding: 6px 22px 24px; }
.project-lesson-copy .teaching-block { margin-top: 16px; }
.project-support-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.project-support-grid > div { padding: 16px; border: 1px solid #e1e5e9; border-radius: 8px; background: #f8f9fa; }
.project-support-grid h3 { margin: 0 0 10px; font-size: 14px; }
.project-support-grid ol, .project-support-grid ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.project-support-grid li, .project-support-grid p { color: #697589; font-size: 10px; line-height: 1.55; }
.project-support-grid p { margin: 3px 0 0; }
.project-support-grid a { color: #50691d; font-weight: 800; }
.project-support-grid small { display: block; margin-top: 12px; color: #8a94a3; font-size: 8px; }
.project-workspace-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); gap: 14px; align-items: start; }
.project-editor-panel { position: sticky; top: 86px; }
.project-file-form { display: grid; gap: 14px; }
.project-file-form label > span, .project-review-form label > span { display: block; margin-bottom: 6px; color: #667185; font: 750 9px var(--mono); }
.project-file-form textarea { width: 100%; min-height: 230px; padding: 15px; resize: vertical; border: 1px solid #cfd5de; border-radius: 7px; color: #dce6f3; background: #101827; font: 11px/1.65 var(--mono); tab-size: 4; }
.project-file-form textarea:focus { border-color: #8aa24f; outline: 3px solid #edf5df; }
.project-file-form textarea[readonly] { color: #9eabbd; background: #1b2535; }
.project-file-form .button { justify-self: start; }
.capstone-profile-panel, .capstone-bridge-panel { margin-bottom: 14px; }
.capstone-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid #dfe4e9; border-radius: 7px; background: #dfe4e9; }
.capstone-facts > div { min-width: 0; padding: 12px; background: #fbfcfd; }
.capstone-facts dt { color: #667185; font: 750 9px var(--mono); text-transform: uppercase; }
.capstone-facts dd { margin: 5px 0 0; overflow-wrap: anywhere; color: #344157; font-size: 10px; }
.capstone-file-row { min-width: 0; margin: 0; padding: 12px; border: 1px solid #d6dce4; border-radius: 8px; }
.capstone-file-row legend { padding: 0 5px; color: #566278; font: 750 9px var(--mono); }
.capstone-file-row textarea { margin-top: 6px; }
.capstone-path { width: 100%; font-family: var(--mono); }
.capstone-delete { margin-top: 9px; color: #6e2e34; font-size: 10px; }
.capstone-delete input, .capstone-attestations input { margin-right: 7px; }
.capstone-new-file { border-style: dashed; background: #f8fafc; }
.assessment-mode { padding: 9px 11px; border-left: 3px solid #789733; background: #f4f8ec; color: #4f5f3c; font-size: 10px; }
.capstone-event-list { display: grid; gap: 10px; padding-left: 22px; }
.capstone-event-list p { margin: 3px 0; }
.capstone-attestations label { display: block; margin: 9px 0; color: #354157; font-size: 10px; }
.project-milestone-stack { display: grid; gap: 14px; }
.project-milestone.current { border-color: #a7ba76; box-shadow: 0 0 0 2px #eef5df; }
.milestone-heading { display: flex; gap: 12px; align-items: center; }
.milestone-heading > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #52691f; background: #edf4df; font: 800 11px var(--mono); }
.milestone-heading small { color: #8791a1; font: 700 8px var(--mono); text-transform: uppercase; }
.milestone-heading h2 { margin: 2px 0 0; font-size: 17px; }
.project-milestone > p { color: #687488; font-size: 10px; line-height: 1.6; }
.project-milestone details { margin: 13px 0; border-top: 1px solid #e5e8ec; border-bottom: 1px solid #e5e8ec; }
.project-milestone summary { padding: 11px 0; cursor: pointer; color: #596579; font-size: 9px; font-weight: 800; }
.project-milestone details ol, .rubric-score-list { margin: 0; padding: 0 0 10px; list-style: none; }
.project-milestone details li, .rubric-score-list li { padding: 9px 0; display: grid; grid-template-columns: 1fr auto; gap: 12px; border-top: 1px solid #edf0f2; }
.project-milestone details strong, .rubric-score-list strong { font-size: 10px; }
.project-milestone details p, .rubric-score-list p { margin: 3px 0 0; color: #7a8596; font-size: 9px; }
.project-milestone details li > span, .rubric-score-list li > span { color: #546b21; font: 800 9px var(--mono); }
.stack-form textarea { width: 100%; min-height: 84px; padding: 10px 12px; resize: vertical; border: 1px solid #cfd5de; border-radius: 6px; font: 11px/1.5 var(--sans); }
.submission-result { margin-top: 12px; padding: 12px; border-radius: 7px; background: #f5f7f8; }
.submission-result > strong { margin-right: 8px; font-size: 10px; }
.submission-result ul, .project-check-list { margin: 10px 0 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.submission-result li, .project-check-list li { display: flex; gap: 9px; align-items: flex-start; }
.submission-result li > span, .project-check-list li > span { width: 22px; height: 22px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #4f691a; background: #e8f1d7; font: 800 9px var(--mono); }
.submission-result li.failed > span, .project-check-list li.failed > span { color: #913d46; background: #fde5e8; }
.submission-result li strong, .project-check-list li strong { font-size: 9px; }
.submission-result li p, .project-check-list li p { margin: 2px 0 0; color: #798597; font-size: 8px; }
.review-summary, .review-note { margin-top: 12px; padding: 12px; border-left: 3px solid #879d50; border-radius: 4px; background: #f4f7ed; }
.review-summary strong, .review-note strong { font-size: 10px; }
.review-summary p, .review-note p { margin: 4px 0; color: #657184; font-size: 10px; line-height: 1.55; }
.review-summary small { color: #8791a0; font-size: 8px; }
.project-review-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(370px, .7fr); gap: 14px; align-items: start; }
.project-review-grid > aside { display: grid; gap: 14px; }
.review-file { margin-top: 9px; border: 1px solid #dfe4e9; border-radius: 7px; overflow: hidden; }
.review-file summary { padding: 11px 13px; cursor: pointer; color: #526074; background: #f7f8f9; font: 750 9px var(--mono); }
.review-file pre { max-height: 520px; margin: 0; padding: 15px; overflow: auto; color: #dbe6f4; background: #101827; font: 10px/1.6 var(--mono); white-space: pre-wrap; }
.project-review-form fieldset { margin: 8px 0; padding: 12px; border: 1px solid #dfe3e8; border-radius: 7px; }
.project-review-form legend { padding: 0 5px; color: #505d72; font-size: 10px; font-weight: 800; }
.project-review-form fieldset > p { color: #788397; font-size: 9px; }
.project-review-form input[type="number"] { max-width: 110px; }
.review-actions { margin-top: 12px; display: flex; gap: 9px; flex-wrap: wrap; }

/* Private Portfolio Studio */
.portfolio-shell { max-width: 1240px; }
.portfolio-hero { margin-bottom: 14px; padding: 30px 34px; display: flex; align-items: center; gap: 28px; border-radius: 12px; color: white; background: linear-gradient(125deg, #19253a, #34415a); }
.portfolio-hero > div:first-child { max-width: 790px; }
.portfolio-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.045em; }
.portfolio-hero p:not(.eyebrow) { margin: 8px 0 0; color: #b1bdce; font-size: 12px; line-height: 1.6; }
.portfolio-hero .eyebrow { color: #9aa9bf; }
.portfolio-hero.compact { padding-block: 24px; }
.portfolio-hero > .project-state { margin-left: auto; }
.portfolio-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.portfolio-card { min-width: 0; min-height: 190px; padding: 20px; display: flex; flex-direction: column; gap: 14px; border: 1px solid #e0e4e9; border-radius: 9px; background: #fbfcfd; }
.portfolio-card h3 { margin: 6px 0; font-size: 17px; }
.portfolio-card p { color: #748095; font-size: 10px; line-height: 1.55; }
.portfolio-card form, .portfolio-card .button { margin-top: auto; align-self: flex-start; }
.portfolio-privacy-note { margin-top: 14px; }
.portfolio-privacy-note > p, .portfolio-side-stack p, .portfolio-evidence-grid .panel > p, .warning-panel > p { color: #667286; font-size: 11px; line-height: 1.65; }
.portfolio-editor-grid { margin-bottom: 14px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 14px; align-items: start; }
.portfolio-side-stack { display: grid; gap: 14px; }
.portfolio-form { gap: 15px; }
.portfolio-form label > span, .portfolio-actions label > span, .warning-panel label > span { display: block; margin-bottom: 6px; color: #667185; font: 750 9px var(--mono); }
.portfolio-form label > small, .portfolio-form fieldset > small { display: block; margin-top: 6px; color: #8993a2; font-size: 9px; line-height: 1.5; }
.portfolio-form textarea.form-control { width: 100%; min-height: 130px; height: auto; padding: 11px 12px; resize: vertical; }
.portfolio-form select { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid #cfd5de; border-radius: 6px; background: #fafbfc; }
.portfolio-form fieldset { margin: 0; padding: 13px; border: 1px solid #dfe4e9; border-radius: 7px; }
.portfolio-form fieldset legend { padding: 0 5px; color: #526074; font-size: 10px; font-weight: 800; }
.portfolio-form fieldset ul { margin: 6px 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.portfolio-form .errorlist { margin: 5px 0 0; padding: 0; color: #963d47; font-size: 9px; list-style: none; }
.warning-panel { border-color: #e4c879; background: #fffaf0; }
.portfolio-history { margin-bottom: 14px; }
.portfolio-release-list { display: grid; gap: 9px; }
.portfolio-release-list article { min-width: 0; padding: 13px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #edf0f3; }
.portfolio-release-list article:first-child { border-top: 0; }
.portfolio-release-list h3 { margin: 7px 0 3px; font-size: 13px; }
.portfolio-release-list p { margin: 0; color: #7a8596; font-size: 9px; }
.portfolio-evidence-grid { margin-bottom: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.portfolio-facts { margin: 0; display: grid; }
.portfolio-facts div { min-width: 0; padding: 10px 0; display: grid; grid-template-columns: minmax(130px, .45fr) minmax(0, 1fr); gap: 12px; border-top: 1px solid #edf0f3; }
.portfolio-facts div:first-child { border-top: 0; }
.portfolio-facts dt { color: #7a8595; font-size: 9px; }
.portfolio-facts dd { min-width: 0; margin: 0; color: #39475c; font-size: 10px; font-weight: 750; overflow-wrap: anywhere; }
.portfolio-event-list { margin: 0; padding: 0; display: grid; list-style: none; }
.portfolio-event-list li { padding: 10px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #edf0f3; }
.portfolio-event-list li:first-child { border-top: 0; }
.portfolio-event-list strong { font-size: 10px; }
.portfolio-event-list span { color: #818c9d; font-size: 9px; }
.portfolio-actions { margin-bottom: 14px; display: flex; align-items: end; gap: 18px; }
.portfolio-actions > div { margin-right: auto; max-width: 620px; }
.portfolio-actions h2 { margin: 0; font-size: 18px; }
.portfolio-actions p { margin: 6px 0 0; color: #697589; font-size: 10px; line-height: 1.55; }
.portfolio-actions form { min-width: 190px; }
.portfolio-actions input { margin-bottom: 8px; }
.button-secondary { color: #334159; background: #edf1f4; box-shadow: none; }
.button-secondary:hover { background: #e1e6eb; }

.lesson-stage-controls[hidden], .lesson-stage-status[hidden], .lesson-stage-navigation[hidden], .workspace-view-controls[hidden], .editor-display-toolbar[hidden], .workspace-view-panel[hidden], .lesson-stage[hidden] { display: none !important; }
.lesson-editor-focus-active { overflow: hidden; }
.code-workspace.editor-focus-mode { position: fixed; z-index: 1000; inset: 0; width: 100%; height: 100dvh; max-height: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; box-shadow: 0 0 0 100vmax rgba(6, 13, 25, .82); }
.code-workspace.editor-focus-mode .code-toolbar { top: 0; }
.code-workspace.editor-focus-mode .editor-display-toolbar { top: 49px; }
.code-workspace.editor-focus-mode .editor-container { --editor-min-block-size: clamp(230px, 34dvh, 320px); --editor-max-block-size: clamp(410px, 62dvh, 680px); }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; padding-top: 125px; }
  .hero-copy { max-width: 700px; }
  .hero-editor { width: min(720px, 100%); }
  .workspace-view-controls { position: sticky; z-index: 15; top: 0; padding: 8px clamp(14px, 3vw, 24px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; border-bottom: 1px solid #cdd3dc; background: rgba(244, 246, 248, .97); }
  .workspace-view-controls button { min-height: 40px; border: 1px solid #cfd5dd; border-radius: 5px; color: #586579; background: white; font-size: 10px; font-weight: 800; cursor: pointer; }
  .workspace-view-controls button[aria-pressed="true"] { color: #2f4510; border-color: #8ead5d; background: #ebf5dc; box-shadow: inset 0 -3px 0 #6d922e; }
  .workspace-grid { height: auto; min-height: 0; display: block; }
  .lesson-reader, .code-workspace { max-height: none; overflow-y: visible; scrollbar-gutter: auto; }
  .lesson-reader { min-height: calc(100dvh - 170px); }
  .code-workspace { --editor-min-block-size: clamp(230px, 34dvh, 300px); --editor-max-block-size: clamp(390px, 58dvh, 600px); min-height: calc(100dvh - 170px); }
  .code-toolbar, .editor-display-toolbar { position: relative; top: auto; }
  .code-workspace.editor-focus-mode { max-height: none; overflow-y: auto; scrollbar-gutter: stable; }
  .code-workspace.editor-focus-mode .code-toolbar { position: sticky; top: 0; }
  .code-workspace.editor-focus-mode .editor-display-toolbar { position: sticky; top: 49px; }
  .support-drawer { grid-template-columns: 1fr; }
  .support-controls, .support-panels { grid-column: 1; }
  .administration-metrics { grid-template-columns: repeat(2, 1fr); }
  .administration-filters { grid-template-columns: repeat(2, 1fr); }
  .learner-administration-grid { grid-template-columns: 1fr; }
  .project-card-grid { grid-template-columns: repeat(2, 1fr); }
  .project-workspace-grid, .project-review-grid { grid-template-columns: 1fr; }
  .project-support-grid { grid-template-columns: 1fr; }
  .project-editor-panel { position: static; }
  .portfolio-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-editor-grid, .portfolio-evidence-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .site-header { grid-template-columns: 1fr auto auto; padding-inline: 18px; }
  .nav-toggle { display: block; margin-right: 10px; }
  .main-nav { display: none; position: absolute; top: 67px; left: 0; right: 0; height: auto; padding: 12px 20px 20px; flex-direction: column; align-items: stretch; gap: 0; background: var(--navy); border-bottom: 1px solid #303c52; }
  .main-nav.open { display: flex; }
  .main-nav a { height: auto; padding: 12px 0; }
  .main-nav .nav-signout { height: auto; }
  .main-nav .nav-signout button { width: 100%; padding: 12px 0; text-align: left; }
  .main-nav a[aria-current="page"]::after { display: none; }
  .streak-chip, .header-actions .text-button { display: none; }
  .hero { gap: 45px; }
  .floating-success { right: 8px; }
  .split-heading, .process-grid, .metric-grid, .dashboard-grid, .challenge-grid, .profile-grid, .auth-shell { grid-template-columns: 1fr; }
  .process-grid article { min-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
  .process-grid article:last-child { border-bottom: 0; }
  .home-cta, .dashboard-welcome, .page-intro { align-items: flex-start; flex-direction: column; }
  .dashboard-date { display: none; }
  .recent-grid, .achievement-grid { grid-template-columns: 1fr; }
  .roadmap-progress-card { width: 100%; }
  .roadmap-level { grid-template-columns: 52px 1fr; }
  .roadmap-spine > span { width: 42px; height: 42px; }
  .roadmap-level:not(:last-child) .roadmap-spine::after { left: 21px; top: 41px; }
  .level-card > header { grid-template-columns: 1fr; gap: 14px; }
  .roadmap-lessons { grid-template-columns: 1fr; }
  .roadmap-outline-summary { grid-template-columns: 1fr; }
  .roadmap-outline-summary > a { justify-self: start; }
  .bridge-strip { grid-template-columns: 30px 1fr; }
  .bridge-actions { grid-column: 2; justify-content: flex-start; }
  .level-overview-hero { grid-template-columns: 64px 1fr; }
  .level-overview-state { grid-column: 2; justify-self: start; }
  .level-overview-grid { grid-template-columns: 1fr; }
  .outline-heading { align-items: flex-start; flex-direction: column; }
  .unlocked-curriculum-notice { grid-template-columns: 52px 1fr; }
  .unlocked-curriculum-notice .button { grid-column: 2; justify-self: start; }
  .workspace-topbar { padding-inline: 14px; }
  .workspace-progress { display: none; }
  .lesson-stage-controls { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-stage-status { text-align: left; }
  .code-toolbar { min-height: 96px; flex-basis: auto; padding: 8px 12px; align-items: stretch; flex-direction: column; gap: 7px; }
  .file-tabs { min-height: 38px; flex: 0 0 38px; }
  .toolbar-actions { min-height: 34px; justify-content: flex-end; }
  .code-workspace.editor-focus-mode .editor-display-toolbar { top: 96px; }
  .support-controls { grid-template-columns: 1fr; }
  .support-controls label > span { min-height: 52px; }
  .attempt-history-heading { align-items: stretch; flex-direction: column; }
  .curriculum-revision { min-width: 0; }
  .attempt-record summary { grid-template-columns: 30px 1fr; }
  .attempt-revision { grid-column: 2; min-width: 0; text-align: left; }
  .attempt-snapshot { grid-template-columns: 1fr; }
  .ai-panel-heading { grid-template-columns: 36px 1fr; }
  .ai-status { grid-column: 2; justify-self: start; }
  .ai-input-row { grid-template-columns: 1fr; }
  .ai-input-row .button { width: 100%; }
  .ai-form-help { flex-wrap: wrap; }
  .ai-form-help .answer-policy { width: 100%; margin-left: 0; }
  .worked-solution-recovery { grid-template-columns: 1fr; }
  .worked-solution-button { justify-self: stretch; }
  .worked-solution-grid { grid-template-columns: 1fr; }
  .worked-solution-grid > div + div { border-top: 1px solid #ece4cf; border-left: 0; }
  .lesson-nav { grid-template-columns: 1fr 1fr; }
  .roadmap-link { display: none; }
  .auth-intro { min-height: 360px; }
  .project-card-grid { grid-template-columns: 1fr; }
  .project-hero { align-items: flex-start; flex-direction: column; }
  .project-contract, .project-hero > .project-state { width: 100%; margin-left: 0; }
  .portfolio-hero { align-items: flex-start; flex-direction: column; }
  .portfolio-hero .project-contract, .portfolio-hero > .project-state { width: 100%; margin-left: 0; }
  .portfolio-card-grid { grid-template-columns: 1fr; }
  .portfolio-actions { align-items: stretch; flex-direction: column; }
  .portfolio-actions form { width: 100%; }
}

@media (max-width: 520px) {
  .section-shell, .app-shell { width: min(100% - 24px, 1180px); }
  .hero { padding-top: 110px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-lede { font-size: 15px; }
  .hero-editor { min-height: 390px; }
  .hero-editor::before { inset-inline: 0; }
  .editor-titlebar { grid-template-columns: 1fr 1fr; }
  .editor-state { display: none; }
  .floating-success { bottom: -20px; }
  .process-section, .roadmap-preview { padding-block: 65px; }
  .level-preview-list li { grid-template-columns: 48px 1fr; padding: 13px 0; }
  .level-preview-list::before { left: 23px; }
  .level-node { width: 48px; height: 48px; }
  .level-status { grid-column: 2; justify-self: start; }
  .home-cta h2 { font-size: 34px; }
  .metric-grid article { min-height: 110px; }
  .workspace-grid { display: block; }
  .lesson-reader { padding: 30px 20px; }
  .lesson-heading h1 { font-size: 32px; }
  .teaching-comparison > div, .common-mistakes li { grid-template-columns: 1fr; }
  .execution-trace li { grid-template-columns: 1fr; }
  .execution-trace li > p { grid-column: 1; margin-left: 28px; }
  .vocabulary-block dl > div { grid-template-columns: 1fr; gap: 4px; }
  .workspace-view-controls { padding-inline: 8px; }
  .lesson-stage-controls button { justify-content: flex-start; }
  .editor-display-toolbar { align-items: flex-start; flex-direction: column; }
  .editor-display-toolbar > div { width: 100%; }
  .editor-display-toolbar button { flex: 1 1 0; }
  .code-workspace { --editor-min-block-size: clamp(220px, 34dvh, 280px); --editor-max-block-size: clamp(350px, 54dvh, 500px); }
  .code-workspace.editor-focus-mode .editor-display-toolbar { top: 96px; }
  .runtime-status, .run-button kbd { display: none; }
  .toolbar-actions { gap: 7px; }
  .reset-file-button { padding-inline: 7px; }
  .code-editor .cm-editor { font-size: 12px; }
  .editor-keyboard-help { right: 7px; max-width: calc(100% - 14px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .support-drawer { padding: 40px 20px; gap: 25px; }
  .attempt-history-panel { padding: 34px 20px; }
  .bridge-action { grid-column: 2; justify-self: start; white-space: normal; }
  .bridge-note { align-items: flex-start; flex-wrap: wrap; }
  .bridge-note-actions { width: 100%; margin-left: 23px; justify-content: flex-start; }
  .bridge-context-banner { align-items: flex-start; flex-direction: column; }
  .bridge-context-banner strong { text-align: left; }
  .planned-pill { display: none; }
  .planned-placeholder.unlocked > div { align-items: flex-start; flex-direction: column; gap: 10px; }
  .level-overview-hero { grid-template-columns: 1fr; padding: 30px 24px; }
  .level-overview-number, .level-overview-state { grid-column: 1; }
  .overview-skill-list, .overview-lesson-list { grid-template-columns: 1fr; }
  .unlocked-curriculum-notice { grid-template-columns: 1fr; padding: 28px 24px; }
  .unlocked-curriculum-notice .button { grid-column: 1; }
  .profile-hero { align-items: flex-start; flex-wrap: wrap; }
  .profile-streak { margin-left: 90px; }
  .activity-chart { overflow-x: auto; }
  .activity-column { flex: 0 0 36px; }
  .administration-hero, .learner-admin-hero { align-items: flex-start; flex-wrap: wrap; }
  .database-badge, .learner-admin-state { width: 100%; margin-left: 0; text-align: left; }
  .administration-metrics, .administration-filters, .learner-history-grid, .database-contract { grid-template-columns: 1fr; }
  .database-contract div { border-top: 1px solid #e0e4e9; border-left: 0; }
  .database-contract div:first-child { border-top: 0; }
  .learner-level-progress li { grid-template-columns: 1fr; }
  .project-hero { padding: 26px 22px; }
  .project-file-form textarea { min-height: 190px; }
  .capstone-facts { grid-template-columns: 1fr; }
  .capstone-file-row { padding: 9px; }
  .portfolio-hero { padding: 26px 22px; }
  .portfolio-release-list article { align-items: flex-start; flex-direction: column; }
  .portfolio-facts div { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
