:root {
  --ink: #202c29;
  --muted: #737d78;
  --paper: #f6f7f3;
  --green: #c9ef74;
  --line: #e4e9e1;
  --mono: "DM Mono", Consolas, monospace;
  --sans: "DM Sans", "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); }
body.terminal-fullscreen-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
.topbar { height: 76px; padding: 0 7.5%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9ece5; background: rgba(246,247,243,.92); }
.brand { display: inline-flex; gap: 9px; align-items: center; font-size: 19px; font-weight: 800; letter-spacing: -.8px; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 29px; border-radius: 8px; background: var(--green); color: #233020; font: 500 14px var(--mono); letter-spacing: -2px; padding-right: 2px; }
.brand-accent { color: #769a35; }
.main-nav { display: flex; align-items: center; gap: 38px; height: 100%; }
.nav-link { height: 100%; display: inline-flex; align-items: center; gap: 8px; color: #6a736e; font-size: 13px; font-weight: 600; position: relative; }
.nav-link.active, .nav-link:hover { color: var(--ink); }
.nav-link.active:after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: #89a949; }
.live-dot, .shell-safe i { display: inline-block; height: 7px; width: 7px; border-radius: 50%; background: #8fbd51; }
.top-cta { padding: 11px 16px; border: 1px solid #dfe5da; border-radius: 8px; font-size: 12px; font-weight: 700; }
.top-cta span { padding-left: 9px; color: #789a3d; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; max-width: 1190px; margin: auto; min-height: 490px; padding: 62px 6% 68px; gap: 45px; }
.eyebrow { display: flex; gap: 10px; align-items: center; color: #83916f; font: 500 10px var(--mono); letter-spacing: 1.5px; }
.eyebrow-line { display: inline-block; width: 22px; height: 1px; background: #9eb66e; }
h1 { margin: 23px 0 16px; font-size: clamp(42px, 5vw, 65px); line-height: 1.05; letter-spacing: -3.4px; font-weight: 700; }
h1 span { color: #7d9e45; }
.hero-copy > p { max-width: 450px; color: #727d77; font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 27px; }
.button { display: inline-flex; gap: 18px; align-items: center; border-radius: 7px; padding: 14px 18px; font-size: 12px; font-weight: 700; }
.button-dark { color: white; background: #26332e; }
.button-dark:hover { background: #3a4b41; }
.text-link { font-size: 11px; font-weight: 700; }
.play-icon { margin-right: 7px; color: #789a3d; font-size: 10px; }
.hero-note { margin-top: 38px; color: #8b948e; font-size: 11px; }
.sparkle { margin-right: 7px; color: #8ca852; }
.hero-art { min-height: 335px; position: relative; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid #e1e8d9; border-radius: 50%; }
.orbit-one { width: 335px; height: 335px; }
.orbit-two { width: 275px; height: 275px; }
.terminal-illustration { position: relative; z-index: 1; width: min(390px, 100%); background: #293630; border-radius: 11px; box-shadow: 0 23px 50px #26332e26; overflow: hidden; transform: rotate(-2deg); }
.window-bar { height: 36px; display: flex; align-items: center; gap: 5px; padding: 0 13px; background: #35423c; }
.window-bar > span, .shell-dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #e88973; }
.window-bar > span:nth-child(2), .shell-dots i:nth-child(2) { background: #e7c56e; }
.window-bar > span:nth-child(3), .shell-dots i:nth-child(3) { background: #9fc775; }
.window-label { margin: auto; padding-right: 25px; color: #a3afa7; font: 10px var(--mono); }
.window-body { padding: 25px 24px 29px; color: #e8eee8; font: 12px/1.9 var(--mono); }
.prompt { color: #bbdf76; }
.command { color: #f0d890; }
.output { padding-left: 16px; color: #98a79e; font-size: 11px; }
.output.success { color: #b6d990; }
.terminal-gap { margin-top: 12px; }
.cursor { display: inline-block; width: 7px; height: 14px; vertical-align: middle; background: #b9df75; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.art-spark { position: absolute; z-index: 2; color: #92ae5e; }
.spark-one { top: 31px; left: 12%; font-size: 29px; }
.spark-two { right: 5%; bottom: 53px; color: #dfb759; font-size: 24px; }
.art-sticker { position: absolute; z-index: 2; right: 3%; top: 28px; display: grid; place-content: center; width: 77px; height: 77px; border-radius: 50%; color: #33412a; background: #d7ed9f; text-align: center; font-size: 10px; line-height: 1.4; transform: rotate(9deg); }
.art-sticker span { font-size: 17px; font-weight: 800; }
.section-wrap { max-width: 1100px; margin: auto; padding-left: 35px; padding-right: 35px; }
.lesson-section { padding-top: 49px; padding-bottom: 85px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 30px; }
.section-heading h2, .terminal-intro h2 { margin: 13px 0 0; font-size: 31px; line-height: 1.2; letter-spacing: -1.3px; }
.section-heading > p { color: #69756e; font-size: 12px; line-height: 1.7; }
.section-heading > p span { color: #98a098; }
.lesson-layout { display: grid; grid-template-columns: 275px 1fr; gap: 19px; }
.lesson-list { display: flex; flex-direction: column; gap: 7px; }
.lesson-button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; font-family: var(--sans); }
.lesson-button:hover { background: #eff2e9; }
.lesson-button.active { border-color: #e4e9d8; background: white; box-shadow: 0 3px 12px #33412a08; }
.lesson-number { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; color: #68755e; background: #eaf0df; font: 11px var(--mono); }
.lesson-button.active .lesson-number { color: #354522; background: #d9e9b5; }
.lesson-button strong { display: block; font-size: 12px; }
.lesson-button small { display: block; margin-top: 4px; color: #87918a; font-size: 10px; }
.lesson-card { min-height: 333px; padding: 28px 31px; border: 1px solid #e5e9e1; border-radius: 11px; background: white; }
.lesson-card-top { display: flex; justify-content: space-between; color: #8d9b7a; font: 10px var(--mono); letter-spacing: .5px; }
.lesson-card h3 { margin: 17px 0 9px; font-size: 23px; letter-spacing: -.7px; }
.lesson-card > p { max-width: 590px; margin: 0; color: #707b75; font-size: 12px; line-height: 1.8; }
.lesson-example { margin-top: 20px; padding: 13px 16px; border-radius: 7px; background: #f3f5ef; font: 11px/1.9 var(--mono); }
.lesson-example code { color: #567d2e; }
.lesson-example span { display: block; color: #829087; }
.lesson-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 17px; color: #87918a; font-size: 10px; }
.lesson-card-foot button { border: 0; padding: 8px 11px; border-radius: 6px; background: #edf3df; color: #506b30; font: 600 10px var(--sans); cursor: pointer; }
.cheatsheet-section { padding: 70px 0 75px; background: #eff2e9; }
.cheatsheet-section .section-heading { margin-bottom: 28px; }
.cheatsheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cheat-card { display: flex; gap: 13px; min-height: 146px; padding: 17px; border: 1px solid #e4e9dc; border-radius: 9px; background: #fbfcf9; }
.cheat-icon { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border-radius: 8px; font-size: 16px; }
.icon-blue { background: #e4edf7; color: #587d9e; }.icon-yellow { background: #f8edc9; color: #aa8540; }.icon-pink { background: #f6e1d9; color: #b66f55; }.icon-green { background: #e2eed5; color: #668f47; }.icon-lilac { background: #ece5f6; color: #8270a4; }
.cheat-card h3 { margin: 1px 0 11px; font-size: 12px; }
.cheat-card code, .lesson-example code { color: #598036; font: 10px var(--mono); }
.cheat-card > div:last-child > code { display: inline-block; margin: 4px 0; padding: 4px 6px; border-radius: 4px; background: #f0f3eb; }
.cheat-card p { margin: 2px 0 5px; color: #828b84; font-size: 10px; line-height: 1.5; }
kbd { padding: 2px 4px; border: 1px solid #dfe4da; border-radius: 4px; background: white; font: 9px var(--mono); }
.vim-cheat { grid-column: span 2; }
.leaderboard-section { padding-top: 72px; padding-bottom: 78px; }
.leaderboard-card { max-width: 700px; margin: auto; padding: 20px 24px; border: 1px solid #e4e9e1; border-radius: 10px; background: white; }
#leaderboard-status { margin: 0 0 14px; color: #7a857c; font-size: 11px; line-height: 1.6; }
#leaderboard-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#leaderboard-list li { display: grid; grid-template-columns: 35px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 7px; background: #f5f7f1; }
.leaderboard-rank { color: #7a8d62; font: 11px var(--mono); }
.leaderboard-name { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 600; text-overflow: ellipsis; }
#leaderboard-list li > strong { color: #587a38; font: 11px var(--mono); }
.terminal-section { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: 52px; padding-top: 94px; padding-bottom: 95px; }
.terminal-intro h2 { margin-top: 14px; font-size: 34px; }
.terminal-intro > p { color: #727d77; font-size: 12px; line-height: 1.8; }
.terminal-tip { display: flex; gap: 12px; align-items: flex-start; margin: 23px 0; padding: 13px; border-radius: 7px; background: #edf2e4; }
.terminal-tip > span { color: #83a74b; }
.terminal-tip p { margin: 0; color: #64705e; font-size: 10px; line-height: 1.8; }
.terminal-tip code { font: 10px var(--mono); }
.score-panel { margin: 20px 0 15px; padding: 15px; border: 1px solid #e3e8dd; border-radius: 8px; background: white; }
.score-heading { display: flex; align-items: center; justify-content: space-between; }
.score-heading h3 { margin: 0; font-size: 13px; }
.score-heading > strong { color: #577638; font: 600 11px var(--mono); }
#player-status { margin: 8px 0 12px; color: #778177; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
#player-status code { color: #567d2e; font: 9px var(--mono); }
#task-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#task-list li { display: grid; grid-template-columns: 14px 1fr auto; gap: 6px; align-items: start; color: #788277; font-size: 9px; line-height: 1.5; }
#task-list li > span:first-child { color: #a4ad9e; }
#task-list li > strong { white-space: nowrap; color: #788277; font: 9px var(--mono); }
#task-list li.task-progress, #task-list li.task-progress > span:first-child { color: #a27a2f; }
#task-list li.task-complete, #task-list li.task-complete > span:first-child, #task-list li.task-complete > strong { color: #648842; }
.reset-button { padding: 0; border: 0; background: none; color: #71806d; font: 600 10px var(--sans); cursor: pointer; }
.reset-button:hover { color: #425931; }
.terminal-shell { overflow: hidden; border: 1px solid #435149; border-radius: 10px; background: #222e28; box-shadow: 0 17px 40px #26332e1b; }
.shell-top { height: 41px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid #3c4941; color: #b1bdb5; font: 9px var(--mono); }
.shell-dots { display: flex; gap: 4px; }
.shell-dots i { width: 6px; height: 6px; }
.shell-safe { margin-left: auto; display: flex; align-items: center; gap: 6px; color: #b5c8a4; font-size: 8px; letter-spacing: .6px; }
.shell-safe i { width: 5px; height: 5px; }
.shell-screen { height: 290px; overflow-y: auto; padding: 15px 17px; color: #d7e1d8; font: 10px/1.7 var(--mono); }
.terminal-line { margin-bottom: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal-line .line-prompt { color: #b8dd79; }
.terminal-line .line-command { color: #f1d991; }
.terminal-line.output-line { padding-left: 14px; color: #a5b4aa; }
.terminal-line.error-line { color: #ef9c88; }
.vim-editor { margin: 8px 0; padding: 9px; border: 1px solid #4d5b50; border-radius: 5px; }
.vim-editor-top { display: flex; justify-content: space-between; margin-bottom: 7px; color: #bed991; }
.vim-editor textarea { width: 100%; min-height: 95px; resize: vertical; border: 0; outline: 0; background: #202b25; color: #e1eadf; font: 10px/1.7 var(--mono); }
.vim-controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 7px; }
.vim-controls button { border: 1px solid #536255; border-radius: 4px; padding: 4px 7px; background: #344239; color: #d9e5d7; font: 9px var(--mono); cursor: pointer; }
.vim-controls button:hover, .vim-controls button.selected { border-color: #a7c77b; color: #d8f6a8; }
.vim-status { color: #9bad9d; font-size: 9px; }
.vim-command { display: flex; gap: 5px; align-items: center; margin-top: 7px; color: #cde59a; }
.vim-command input { width: 100%; border: 0; outline: 0; background: transparent; color: white; font: 10px var(--mono); }
.shell-input-row { display: flex; align-items: center; gap: 9px; padding: 12px 17px; border-top: 1px solid #3c4941; font: 10px var(--mono); }
.shell-input-row label { white-space: nowrap; }
.shell-prompt { color: #9db28e; }
.prompt-symbol { color: #c2e987; }
.shell-input-row input { min-width: 0; flex: 1; border: 0; outline: 0; color: #f0d990; background: transparent; font: 10px var(--mono); }
.shell-input-row input::placeholder { color: #718078; }
.shell-footer { display: flex; justify-content: space-between; padding: 9px 16px; border-top: 1px solid #354239; color: #78877d; font: 8px var(--mono); }
.shell-footer code { color: #b8d78a; }
.final-note { padding: 50px 20px 57px; background: #eaf0df; text-align: center; }
.final-symbol { color: #83a44c; font-size: 25px; }
.final-note h2 { margin: 9px 0; font-size: 27px; letter-spacing: -1px; }
.final-note p { max-width: 460px; margin: auto; color: #737e71; font-size: 11px; line-height: 1.8; }
.final-note a { display: inline-block; margin-top: 18px; color: #5e783c; font-size: 10px; font-weight: 700; }
footer { display: flex; justify-content: space-between; align-items: center; padding: 21px 7.5%; color: #89918c; font-size: 9px; }
.footer-brand { color: var(--ink); font-size: 15px; }
.footer-brand .brand-mark { width: 27px; height: 25px; font-size: 12px; }

@media (max-width: 760px) {
  .topbar { height: 65px; padding: 0 5%; }
  .main-nav { gap: 15px; }
  .nav-link { font-size: 11px; }
  .top-cta { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 54px; gap: 6px; }
  .hero-art { min-height: 300px; }
  .section-wrap { padding-left: 22px; padding-right: 22px; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .lesson-card { min-height: auto; }
  .cheatsheet-grid { grid-template-columns: repeat(2, 1fr); }
  .vim-cheat { grid-column: span 2; }
  .terminal-section { grid-template-columns: 1fr; gap: 28px; padding-top: 65px; padding-bottom: 65px; }
}
@media (max-width: 460px) {
  .main-nav { gap: 6px; }
  .nav-link { font-size: 9px; }
  .brand { gap: 6px; font-size: 16px; }
  .brand-mark { width: 27px; height: 26px; font-size: 12px; }
  .hero { padding-left: 7%; padding-right: 7%; }
  h1 { font-size: 44px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 14px; }
  .hero-art { min-height: 270px; }
  .orbit-one { width: 280px; height: 280px; }
  .orbit-two { width: 230px; height: 230px; }
  .art-sticker { right: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-heading h2 { font-size: 27px; }
  .lesson-list { grid-template-columns: 1fr; }
  .lesson-card { padding: 22px 19px; }
  .cheatsheet-grid { grid-template-columns: 1fr; }
  .vim-cheat { grid-column: auto; }
  .shell-screen { height: 250px; }
  .leaderboard-card { padding: 15px 12px; }
  #leaderboard-list li { grid-template-columns: 25px 1fr auto; gap: 7px; padding: 9px; }
  .shell-footer span:last-child { display: none; }
  footer { padding: 18px 5%; }
}

.shell-top .shell-title { color: #b1bdb5; }
.shell-control { border: 1px solid #536255; border-radius: 5px; padding: 5px 8px; background: #344239; color: #d9e5d7; font: 9px var(--mono); cursor: pointer; }
.shell-control:hover, .shell-control:focus-visible { border-color: #a7c77b; color: #d8f6a8; outline: none; }
.shell-control span { margin-left: 4px; }
.terminal-shell.is-fullscreen { position: fixed; z-index: 1000; inset: 0; display: flex; width: 100vw; height: 100vh; height: 100dvh; flex-direction: column; border: 0; border-radius: 0; }
.terminal-shell.is-fullscreen .shell-top { flex: 0 0 48px; padding: 0 20px; }
.terminal-shell.is-fullscreen .shell-screen { height: auto; min-height: 0; flex: 1; padding: 24px clamp(18px, 5vw, 72px); font-size: 13px; line-height: 1.8; }
.terminal-shell.is-fullscreen .shell-input-row { flex: 0 0 auto; padding: 16px clamp(18px, 5vw, 72px); font-size: 13px; }
.terminal-shell.is-fullscreen .shell-input-row input { font-size: 13px; }
.terminal-shell.is-fullscreen .shell-footer { flex: 0 0 auto; padding: 11px 20px; }
.terminal-shell.is-fullscreen .shell-footer span:last-child { display: inline; }
.shell-input-row:focus-within { background: #26332c; }
.shell-input-row input:focus-visible { outline: none; }

@media (max-width: 600px) {
  .shell-top { gap: 7px; padding: 0 9px; }
  .shell-top .shell-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shell-control { padding: 5px 6px; }
  .shell-control span { display: none; }
  .terminal-shell.is-fullscreen .shell-top { padding: 0 9px; }
  .terminal-shell.is-fullscreen .shell-footer { gap: 8px; font-size: 7px; }
  .terminal-shell.is-fullscreen .shell-footer span:nth-child(2) { display: none; }
}
