:root {
  --l1-bg: #f4f7fb;
  --l1-surface: #fff;
  --l1-ink: #101828;
  --l1-muted: #59677a;
  --l1-line: #d9e1ec;
  --l1-blue: #2563eb;
  --l1-blue-dark: #173fa7;
  --l1-cyan: #43d5ff;
  --l1-navy: #091525;
  --l1-green: #1e9b67;
  --l1-shadow: 0 20px 55px rgba(19, 42, 76, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--l1-bg); color: var(--l1-ink); font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.6; }
a { color: inherit; }
button, input { font: inherit; }
.lesson-shell { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 1000; padding: .7rem 1rem; background: #fff; color: #111; }
.skip-link:focus { top: 1rem; }
.lesson-header { position: sticky; top: 0; z-index: 80; border-bottom: 1px solid var(--l1-line); background: color-mix(in srgb, var(--l1-bg) 92%, transparent); backdrop-filter: blur(14px); }
.header-inner { min-height: 4.5rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.lesson-brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.lesson-brand span { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: .7rem; background: var(--l1-blue); color: #fff; font-weight: 900; }
.lesson-header nav { display: flex; gap: 1.5rem; }
.lesson-header nav a { color: var(--l1-muted); font-size: .9rem; font-weight: 750; text-decoration: none; }
.lesson-header nav a:hover { color: var(--l1-blue); }
.lesson-hero { overflow: hidden; padding-block: clamp(4rem, 9vw, 8rem); background: radial-gradient(circle at 88% 15%, rgba(67,213,255,.28), transparent 27%), linear-gradient(145deg, #07121f, #102a4d); color: #fff; }
.hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(2rem, 7vw, 6rem); }
.eyebrow { margin: 0 0 .85rem; color: var(--l1-blue); font-size: .76rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.lesson-hero .eyebrow, .workflow-section .eyebrow, .checklist-section .eyebrow { color: var(--l1-cyan); }
.lesson-hero h1 { max-width: 9ch; margin: 0; font-size: clamp(3rem, 6.8vw, 6rem); line-height: .94; letter-spacing: -.055em; }
.hero-copy { max-width: 39rem; color: #c7d5e8; font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.8rem 0; }
.button { min-height: 3rem; display: inline-flex; align-items: center; padding: .7rem 1.1rem; border: 1px solid #6e87a6; border-radius: .7rem; font-weight: 850; text-decoration: none; }
.button.primary { border-color: var(--l1-cyan); background: var(--l1-cyan); color: #07121f; }
.button.secondary { color: #fff; }
.hero-outcomes { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 0; padding: 0; color: #afbed1; font-size: .86rem; list-style: none; }
.hero-outcomes li::before { content: "✓"; margin-right: .45rem; color: var(--l1-cyan); }
.editor-window, .transfer-window { overflow: hidden; border: 1px solid #36506c; border-radius: 1rem; background: #111827; box-shadow: 0 32px 80px rgba(0,0,0,.34); }
.window-bar { min-height: 2.5rem; display: flex; align-items: center; gap: .45rem; padding: .6rem .8rem; background: #202b3b; color: #adbacb; font-size: .7rem; }
.window-bar span { width: .7rem; height: .7rem; border-radius: 50%; background: #ff5f57; }
.window-bar span:nth-child(2) { background: #febc2e; }
.window-bar span:nth-child(3) { background: #28c840; }
.window-bar strong { margin-left: .5rem; font-weight: 500; }
.editor-body { min-height: 25rem; display: grid; grid-template-columns: 10rem 1fr; }
.editor-body aside { display: flex; flex-direction: column; gap: .55rem; padding: .9rem; border-right: 1px solid #263346; background: #151f2e; color: #9aa9bc; font-size: .72rem; }
.editor-body aside b { margin-bottom: .4rem; color: #d3dbe7; font-size: .65rem; letter-spacing: .12em; }
.editor-body aside span { padding-left: .35rem; }
.editor-body aside .active { margin-inline: -.45rem; padding: .25rem .8rem; background: #263851; color: #fff; }
.code-panel { min-width: 0; color: #bcd0e8; }
.tabs { min-height: 2.4rem; padding: .6rem 1rem; border-bottom: 1px solid #253248; background: #111a27; font-size: .72rem; }
.code-panel pre { margin: 0; padding: 1.4rem 1rem; overflow-x: auto; font: .83rem/1.9 Consolas, monospace; }
.code-panel i { display: inline-block; width: 1.5rem; color: #536680; font-style: normal; user-select: none; }
.code-panel em { color: #7697bd; font-style: normal; }
.code-panel b { color: #59d4ff; font-weight: 500; }
.code-panel q { color: #d7e87c; }
.status-bar { display: flex; justify-content: space-between; padding: .25rem .7rem; background: #176ec2; color: #fff; font-size: .65rem; }
.lesson-section { padding-block: clamp(4rem, 8vw, 7rem); scroll-margin-top: 5rem; }
.section-heading { max-width: 46rem; margin-bottom: 2.5rem; }
.section-heading h2, .checklist-section h2 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1; letter-spacing: -.045em; }
.section-heading > p:last-child { color: var(--l1-muted); font-size: 1.05rem; }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.tool-card { display: grid; grid-template-columns: auto 1fr; align-content: start; gap: 1rem; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--l1-line); border-radius: 1.2rem; background: var(--l1-surface); box-shadow: 0 8px 25px rgba(19,42,76,.05); }
.tool-card > p, .tool-card > ul, .tool-card > a { grid-column: 1 / -1; }
.tool-icon { display: grid; width: 3.2rem; height: 3.2rem; place-items: center; border-radius: .8rem; background: #e7f0ff; color: var(--l1-blue); font-weight: 950; }
.tool-icon.cyberduck { background: #fff2bd; color: #9a6500; }
.tool-icon.github { background: #e8e9ed; color: #151922; }
.tool-icon.browser { background: #dcf8ee; color: #08764b; }
.tool-type { margin: 0; color: var(--l1-muted); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.tool-card h3 { margin: .1rem 0 0; font-size: 1.45rem; }
.tool-card > p { margin: .4rem 0 0; color: var(--l1-muted); }
.tool-card ul { margin: .2rem 0; padding-left: 1.25rem; }
.tool-card li { margin-block: .35rem; }
.tool-card > a { color: var(--l1-blue); font-weight: 850; text-decoration: none; }
.workflow-section { padding-block: clamp(4rem, 8vw, 7rem); background: var(--l1-navy); color: #fff; scroll-margin-top: 4rem; }
.section-heading.compact { margin-bottom: 3rem; }
.workflow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0 0 3rem; padding: 0; list-style: none; }
.workflow li { padding: 1.4rem; border-top: 2px solid #385373; }
.workflow li > span { color: var(--l1-cyan); font: 800 .75rem/1 Consolas, monospace; }
.workflow h3 { margin: .75rem 0 .2rem; }
.workflow p { margin: 0; color: #aebdd0; font-size: .9rem; }
.transfer-window { width: min(900px, 100%); margin-inline: auto; border-color: #c8d4e2; background: #eef3f8; color: #26364a; box-shadow: var(--l1-shadow); }
.window-bar.light { background: #dfe6ef; color: #44546a; }
.transfer-toolbar { display: flex; gap: 1.5rem; padding: 1rem; border-bottom: 1px solid #ccd6e3; background: #f9fbfd; font-size: .78rem; }
.transfer-path { margin: .8rem 1rem; padding: .55rem .8rem; border: 1px solid #cad5e1; border-radius: .35rem; background: #fff; color: #66758a; font: .72rem Consolas, monospace; }
.transfer-files { min-height: 12rem; padding-inline: 1rem; }
.file-row { display: grid; grid-template-columns: 1fr 6rem 7rem; gap: 1rem; padding: .6rem .75rem; border-bottom: 1px solid #dbe3ec; font-size: .78rem; }
.file-row.labels { color: #748399; font-size: .68rem; font-weight: 850; }
.file-row.selected { background: #cce7ff; }
.transfer-status { display: flex; justify-content: space-between; padding: .7rem 1rem; background: #f9fbfd; color: #66758a; font-size: .7rem; }
.transfer-status span:first-child { color: var(--l1-green); font-weight: 850; }
.setup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: setup; }
.setup-grid article { min-width: 0; padding: 1.5rem; border: 1px solid var(--l1-line); border-radius: 1rem; background: var(--l1-surface); }
.setup-grid article > span { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .5rem; background: var(--l1-blue); color: #fff; font-size: .8rem; font-weight: 900; }
.setup-grid h3 { margin: 1rem 0 .4rem; }
.setup-grid p { margin: 0; color: var(--l1-muted); }
.setup-grid pre { margin: 1rem 0 0; padding: 1rem; overflow-x: auto; border-radius: .7rem; background: #101827; color: #c8d9ed; font-size: .75rem; }
.safety-note { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.5rem; margin-top: 1rem; padding: 1.5rem; border: 1px solid #f1c26e; border-radius: 1rem; background: #fff4d8; color: #583b07; }
.safety-note strong { grid-row: 1 / 3; align-self: center; font-size: 1.1rem; }
.safety-note p { margin: 0; }
.checklist-section { padding-block: clamp(4rem, 8vw, 7rem); background: var(--l1-blue-dark); color: #fff; scroll-margin-top: 4rem; }
.checklist-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 8vw, 7rem); align-items: start; }
.checklist-grid > div > p:last-child { color: #c9d7ef; }
.readiness-checklist { overflow: hidden; border-radius: 1rem; background: #fff; color: var(--l1-ink); box-shadow: var(--l1-shadow); }
.readiness-checklist label { display: flex; gap: .8rem; align-items: start; padding: 1rem 1.2rem; border-bottom: 1px solid var(--l1-line); cursor: pointer; }
.readiness-checklist input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--l1-blue); }
.progress { position: relative; display: flex; justify-content: flex-end; padding: 1rem 1.2rem; background: #edf2f8; }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: #bdeed9; transition: width .25s ease; }
.progress strong { position: relative; z-index: 1; font-size: .82rem; }
.lesson-footer { padding-block: 2rem; background: #060d18; color: #a9b7c9; font-size: .82rem; }
.lesson-footer .lesson-shell { display: flex; justify-content: space-between; gap: 2rem; }
.lesson-footer a { color: #fff; }
html[data-coursework-theme="dark"] { --l1-bg:#0b1220; --l1-surface:#151f2e; --l1-ink:#f6f8fb; --l1-muted:#b1bfd0; --l1-line:#34445a; }
html[data-coursework-theme="dark"] .lesson-header { background:rgba(11,18,32,.93); }
html[data-coursework-theme="dark"] .tool-icon.github { color:#151922; }
html[data-coursework-theme="dark"] .safety-note { background:#3f2d0a; color:#ffe4a3; }
html[data-coursework-theme="dark"] .readiness-checklist { color:#101828; }
@media (max-width: 900px) {
  .hero-grid, .checklist-grid { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: repeat(2, 1fr); }
  .setup-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .lesson-header nav { display: none; }
  .editor-body { grid-template-columns: 7rem 1fr; min-height: 20rem; }
  .code-panel pre { font-size: .67rem; }
  .tool-grid, .workflow, .setup-grid { grid-template-columns: 1fr; }
  .transfer-toolbar { gap: .65rem; overflow-x: auto; }
  .file-row { grid-template-columns: 1fr 4rem; }
  .file-row span:last-child { display: none; }
  .safety-note { grid-template-columns: 1fr; }
  .safety-note strong { grid-row: auto; }
  .lesson-footer .lesson-shell { flex-direction: column; gap: .5rem; }
}
