:root {
  color-scheme: light;
  --plum-950: #050814;
  --plum-900: #0b1126;
  --plum-700: #1a3158;
  --violet-700: #6048d9;
  --teal-800: #087f7c;
  --teal-700: #0aa7a1;
  --mint-300: #6fffea;
  --mint-100: #e9fffb;
  --coral-700: #c83262;
  --amber-300: #ffd166;
  --cream: #eef1fb;
  --paper: #fbfcff;
  --ink: #12182c;
  --muted: #536078;
  --line: #93a3bf;
  --soft-line: #d4daea;
  --code-bg: #050814;
  --code-surface: #0b1329;
  --code-ink: #e8fff9;
  --focus: #087f7c;
  --danger: #b42351;
  --success: #08775b;
  --topbar-height: 61px;
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; overflow-y: auto; background-color: var(--plum-950); background-image: radial-gradient(circle at 72% -10%, #31567a99 0, transparent 34rem), linear-gradient(#6fffea0a 1px, transparent 1px), linear-gradient(90deg, #6fffea0a 1px, transparent 1px); background-size: auto, 34px 34px, 34px 34px; color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%);
  border: 3px solid var(--amber-300); border-radius: 8px; padding: 10px 16px;
  background: var(--paper); color: var(--ink); font-weight: 900; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, textarea):focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--plum-950);
}

.topbar {
  position: sticky; z-index: 30; top: 0; display: grid;
  grid-template-columns: auto auto minmax(260px, 1fr) auto;
  align-items: center; min-height: var(--topbar-height); padding: 7px 12px;
  overflow: hidden; background: color-mix(in srgb, var(--plum-950) 88%, transparent); color: white; border-bottom: 1px solid #6fffea66; box-shadow: 0 14px 42px #00071999, inset 0 -1px 0 #ffffff12; backdrop-filter: blur(18px);
}
.topbar::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: linear-gradient(90deg, transparent, var(--mint-300), var(--amber-300), transparent); animation: scanline 7s linear infinite; }

.wordmark {
  color: white; font-family: "Segoe UI Variable", Aptos, sans-serif; font-size: 1.38rem;
  font-weight: 650; letter-spacing: -.05em; text-decoration: none;
}
.wordmark span:first-child { color: var(--mint-300); font-family: ui-monospace, monospace; font-weight: 900; letter-spacing: -.08em; }
.wordmark span:last-child { margin-left: 5px; color: var(--amber-300); font-size: .8em; }
.wordmark b { margin-left: 6px; border-left: 1px solid #ffffff42; padding-left: 8px; color: #cbd6ee; font: 750 .54rem/1 "Cascadia Mono", monospace; letter-spacing: .14em; }
.global-search {
  justify-self: start; display: flex; align-items: center; gap: 8px; width: min(470px, 40vw);
  min-height: 44px; border: 2px solid #4f789b; border-radius: 12px; padding: 7px 12px;
  background: #08263f;
}
.global-search:focus-within { border-color: var(--mint-300); }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: white; }
.global-search input:focus-visible { box-shadow: none; }
.global-search input::placeholder { color: #bfd8e8; opacity: 1; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.icon-button, .nav-button, .sign-in-button {
  min-width: 44px; min-height: 44px; border: 2px solid white; border-radius: 10px;
  background: transparent; color: white; font-weight: 800;
}
.icon-button { font-size: 1.15rem; }
.nav-button { padding: 0 15px; }
.cohort-nav { display: inline-flex; align-items: center; text-decoration: none; }
.sign-in-button { border-color: var(--mint-300); padding: 0 18px; background: var(--mint-300); color: var(--ink); }
.nav-button:hover, .icon-button:hover { background: #18527f; }
.sign-in-button:hover { background: #a3f3e2; }
.account-menu { position: relative; }
.account-button {
  display: flex; align-items: center; gap: 8px; min-height: 44px; border: 2px solid var(--mint-300);
  border-radius: 10px; padding: 0 12px; background: transparent; color: white; font-weight: 800;
}
.account-button img, .account-button > span:first-of-type { width: 28px; height: 28px; border-radius: 50%; }
.account-button img { object-fit: cover; }
.account-button > span:first-of-type { display: grid; place-items: center; background: var(--amber-300); color: var(--ink); font-weight: 900; }
.sign-out-button {
  position: absolute; top: 50px; right: 0; z-index: 40; width: 140px; min-height: 44px;
  border: 2px solid var(--plum-900); border-radius: 9px; padding: 10px;
  background: white; color: var(--ink); box-shadow: 0 10px 34px rgba(23, 11, 36, .28); font-weight: 800;
}
.menu-button { display: inline-block; margin-right: 4px; }
.close-menu { display: block; border-color: var(--plum-900); color: var(--plum-900); }
.mobile-search { display: none; }

.platform-shell { display: grid; grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--topbar-height)); height: calc(100dvh - var(--topbar-height)); min-height: 560px; overflow: hidden; align-items: stretch; }
.curriculum {
  position: fixed; z-index: 25; inset: var(--topbar-height) auto 0 0; display: flex; flex-direction: column; min-width: 0;
  width: min(380px, 92vw); height: calc(100vh - var(--topbar-height)); height: calc(100dvh - var(--topbar-height)); overflow: hidden;
  transform: translateX(-101%); transition: transform .2s ease; border-right: 1px solid #6fffea55; background: #080e20f7; color: #edf7ff; box-shadow: 22px 0 70px #000716c7; backdrop-filter: blur(20px);
}
.curriculum.is-open { transform: translateX(0); }
.curriculum-head { display: flex; justify-content: space-between; padding: 22px 20px 17px; border-bottom: 1px solid #6fffea2e; background: radial-gradient(circle at 82% 10%, #6fffea20, transparent 13rem), #0c1630; }
.overline { margin: 0 0 8px; color: var(--coral-700); font-size: .73rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.curriculum h1 { margin: 0; color: white; font-size: 1.14rem; line-height: 1.35; text-wrap: balance; }
.track-switcher {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 11px 12px;
  border-bottom: 1px solid #6fffea24; background: #070d1c;
}
.track-button {
  min-height: 44px; border: 2px solid var(--plum-700); border-radius: 9px; padding: 0 5px;
  background: #101a33; color: #d3e2f1; font-size: .76rem; font-weight: 900;
}
.track-button:hover { border-color: var(--mint-300); background: #172747; color: white; }
.track-button.is-active { border-color: var(--mint-300); background: #123b44; color: white; box-shadow: inset 0 0 18px #6fffea1e, 0 0 20px #6fffea18; }
.track-button.is-active::before { content: "✓ "; color: var(--mint-300); }
.curriculum-filter-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; padding: 18px 20px 15px; }
.filter-field { display: grid; gap: 6px; font-size: .78rem; color: #adbbce; }
.filter-field span { font-weight: 800; color: #d9e5f2; }
.filter-field input,
.filter-field select { width: 100%; min-height: 44px; border: 1px solid #37516f; border-radius: 8px; padding: 0 12px; background: #0e1930; color: white; }
.progress-card { padding: 15px 20px 18px; border-bottom: 1px solid #6fffea24; background: linear-gradient(160deg, #111d37, #0a1227); }
.adventurer-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.rank-sigil { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--mint-300); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: #6fffea10; color: var(--mint-300); font-size: 1.25rem; box-shadow: inset 0 0 14px #6fffea20, 0 0 18px #6fffea16; }
.adventurer-card div { display: grid; gap: 2px; min-width: 0; }
.adventurer-card small { color: var(--amber-300); font: 800 .62rem/1 "Cascadia Mono", monospace; letter-spacing: .12em; }
.adventurer-card strong { overflow: hidden; color: white; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.player-xp { color: var(--mint-300); font: 800 .72rem/1 "Cascadia Mono", monospace; font-variant-numeric: tabular-nums; }
.xp-copy { margin-bottom: 6px; color: #9fb0c6; font: 650 .66rem/1.2 "Cascadia Mono", monospace; text-align: right; }
.xp-track { height: 7px; overflow: hidden; margin-bottom: 15px; border: 1px solid #6fffea47; background: #050a16; }
.xp-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #39d8cf, var(--amber-300)); box-shadow: 0 0 15px #6fffea88; transition: width .35s ease; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: .8rem; }
.progress-copy { color: #dce7f3; }
.progress-copy span { color: var(--amber-300); font-family: "Cascadia Mono", monospace; font-variant-numeric: tabular-nums; }
.progress-track { height: 10px; overflow: hidden; border: 1px solid #435a78; border-radius: 2px; background: #050a16; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--violet-700), var(--mint-300)); box-shadow: 0 0 15px #6fffea66; transition: width .25s ease; }
.progress-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
.progress-actions button { min-height: 38px; border: 1px solid #526987; border-radius: 6px; background: #111d36; color: #ecf5ff; font-size: .72rem; font-weight: 900; }
.progress-actions button:not(:disabled):hover { border-color: var(--mint-300); background: #173a43; }
.progress-actions button:disabled { border-color: #afc0cf; background: #edf3f8; color: #5b7185; opacity: 1; }
.badge-summary { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.progress-badge, .progress-streak { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #445c7b; border-radius: 3px; padding: 7px 9px; background: #101b32; color: #e4edf8; font-size: .7rem; font-weight: 700; }
.progress-badge { color: #becbff; }
.progress-streak { color: var(--amber-300); }
.challenge-list { flex: 1; overflow: auto; padding: 8px 0 20px; scroll-padding-block: 16px; }
.chapter-title { padding: 15px 20px 8px; color: #8da0ba; font-size: .68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.challenge-item {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px;
  width: 100%; min-height: 52px; border: 0; border-left: 6px solid transparent; padding: 8px 14px;
  background: transparent; color: #dbe6f2; text-align: left;
}
.challenge-item:hover { background: #14223e; }
.challenge-item.is-active { border-left-color: var(--mint-300); background: linear-gradient(90deg, #17383f, #101c34); color: white; font-weight: 900; }
.challenge-item.is-active .challenge-name::after { content: " — active quest"; color: var(--mint-300); font-size: .68rem; }
.challenge-number {
  display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #718ba1;
  border-radius: 4px; color: #aab8ca; font-size: .74rem; font-weight: 800;
}
.challenge-item.is-complete .challenge-number { border-color: var(--mint-300); background: #143f42; color: var(--mint-300); box-shadow: 0 0 14px #6fffea2e; }
.challenge-name { font-size: .84rem; line-height: 1.3; }
.challenge-time { color: #8fa4bd; font: .67rem/1 "Cascadia Mono", monospace; }
.challenge-item.is-complete .challenge-time { color: var(--amber-300); }
.curriculum-foot { display: flex; gap: 11px; padding: 15px 20px; border-top: 1px solid #6fffea24; background: #0d1730; }
.curriculum-foot span { color: var(--amber-300); font-weight: 900; }
.curriculum-foot p { margin: 0; color: #aebdd0; font-size: .74rem; line-height: 1.4; }

.workspace { display: grid; grid-template-columns: minmax(430px, 46%) minmax(0, 54%); min-width: 0; height: 100%; min-height: 0; overflow: hidden; align-items: stretch; transition: grid-template-columns .25s ease; }
.workspace.code-is-collapsed { grid-template-columns: minmax(0, 1fr); }
.lesson-panel, .code-panel { min-width: 0; min-height: 0; }
.lesson-panel { display: flex; flex-direction: column; height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-right: 1px solid #6fffea52; background-color: var(--paper); background-image: radial-gradient(circle at 12% 7%, #d9fff83d, transparent 24rem), linear-gradient(#1c315007 1px, transparent 1px), linear-gradient(90deg, #1c315007 1px, transparent 1px); background-size: auto, 28px 28px, 28px 28px; }
.panel-tabs { position: sticky; z-index: 3; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 62px; border-bottom: 1px solid #364766; padding: 8px 16px 8px 24px; background: #0b1329f2; box-shadow: 0 12px 30px #0b132921; backdrop-filter: blur(16px); }
.panel-tabs > div:first-child { display: grid; gap: 1px; }
.panel-kicker { color: var(--mint-300); font-size: .65rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.panel-tab-actions { display: flex; align-items: center; gap: 8px; }
.panel-title { color: white; }
.tab { min-height: 40px; border: 1px solid transparent; border-radius: 6px; padding: 0 12px; background: transparent; color: #c7d5e7; font-weight: 900; }
.tab:hover { border-color: var(--mint-300); color: white; }
.code-toggle { min-height: 42px; border: 1px solid var(--mint-300); border-radius: 6px; padding: 0 14px; background: #12333d; color: var(--mint-300); font-weight: 900; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.code-toggle:hover { background: var(--coral-700); border-color: var(--coral-700); transform: translateY(-1px); }
.code-toggle:active { transform: translateY(1px); }
.exercise-guide { margin: 18px clamp(24px, 4vw, 54px) 0; border: 2px solid #8fb8d8; border-radius: 14px; background: #eef8ff; color: var(--ink); }
.exercise-guide summary { min-height: 46px; padding: 12px 16px; color: var(--plum-900); font-weight: 900; cursor: pointer; }
.exercise-guide summary:hover { background: #dff4ff; }
.exercise-guide summary:focus-visible { outline: 3px solid var(--plum-900); outline-offset: 3px; }
.exercise-guide ol { margin: 0; padding: 3px 22px 5px 46px; }
.exercise-guide li, .exercise-guide p { font-size: .94rem; line-height: 1.62; }
.exercise-guide li { margin: 7px 0; padding-left: 3px; }
.exercise-guide p { margin: 8px 16px 16px; border-left: 4px solid var(--teal-700); padding: 9px 12px; background: white; }
.exercise-guide code { border-radius: 4px; padding: .08em .28em; background: #dcefff; color: #0d4f78; font-family: ui-monospace, monospace; }
.setup-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 14px 16px 18px; border: 1px solid #acd0e8; border-radius: 10px; padding: 13px; background: white; }
.setup-checklist legend { padding: 0 6px; color: var(--plum-900); font-weight: 900; }
.setup-checklist label { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.setup-checklist input { width: 18px; height: 18px; accent-color: var(--teal-700); }
.setup-checklist strong { grid-column: 1 / -1; color: var(--teal-700); font-size: .84rem; }
.lesson-content { flex: 1; overflow: visible; padding: 42px clamp(30px, 5vw, 72px) 58px; scroll-padding-block: 20px; }
.lesson-content h2 { margin: 0 0 11px; color: var(--plum-900); font-size: clamp(1.7rem, 2.35vw, 2.35rem); font-weight: 900; letter-spacing: -.025em; line-height: 1.1; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 25px; color: var(--muted); font-size: .78rem; }
.lesson-content p, .lesson-content li { font-size: 1.04rem; line-height: 1.72; text-wrap: pretty; }
.lesson-content > p { max-width: 68ch; }
.quest-banner { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; overflow: hidden; margin: -8px 0 30px; border: 1px solid #4d6b88; border-radius: 4px 22px 4px 22px; padding: 19px 20px; background: radial-gradient(circle at 8% 35%, #6fffea1f, transparent 15rem), linear-gradient(120deg, #0a1228, #14284a); color: #e9f2fc; box-shadow: 0 18px 40px #10182c24, inset 0 0 30px #6fffea0a; }
.quest-banner::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 42px, #6fffea0a 43px 44px); mask-image: linear-gradient(90deg, black, transparent); }
.quest-banner .overline { margin: 0 0 6px; color: var(--amber-300); }
.quest-banner p:last-child { max-width: 65ch; margin: 0; color: #c0cde0; font-size: .88rem; line-height: 1.55; }
.quest-sigil { position: relative; z-index: 1; display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--mint-300); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: #6fffea0d; color: var(--mint-300); font: 900 1.55rem/1 Georgia, serif; box-shadow: inset 0 0 18px #6fffea23, 0 0 25px #6fffea1c; }
.quest-reward { position: relative; z-index: 1; border: 1px solid #ffd1667a; border-radius: 3px; padding: 8px 10px; background: #ffd1660f; color: var(--amber-300); font: 900 .68rem/1 "Cascadia Mono", monospace; letter-spacing: .09em; white-space: nowrap; }
.quest-reward.is-earned { border-color: #6fffea7d; color: var(--mint-300); }
.lesson-content p, .lesson-content li, .callout, .challenge-name { overflow-wrap: anywhere; }
.lesson-content h3 { margin: 31px 0 11px; color: var(--plum-900); font-size: 1.12rem; line-height: 1.35; }
.lesson-content h4 { margin: 18px 0 7px; color: var(--plum-900); font-size: .96rem; }
.lesson-content ol { padding-left: 27px; }
.lesson-content li { margin: 9px 0; padding-left: 5px; }
.lesson-content code { border-radius: 4px; padding: .08em .28em; background: #e8f1ff; color: #164b76; font-family: ui-monospace, monospace; }
.terminal-card, .troubleshooting-card, .typing-guide { margin: 20px 0; border-radius: 14px; padding: 19px 21px; }
.terminal-card h3 { margin-top: 0; }
.terminal-card pre { overflow-x: auto; margin: 10px 0 0; border-radius: 9px; padding: 15px; background: #041724; color: #9bf5de; font: 14px/1.7 "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; }
.copy-command { margin-top: 12px; border: 1px solid var(--teal-700); border-radius: 7px; padding: 8px 11px; background: transparent; color: var(--teal-800); font-weight: 900; cursor: pointer; }
.live-lab-card { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin: 22px 0; border: 2px solid var(--teal-800); border-radius: 14px; padding: 18px 20px; background: linear-gradient(135deg, #e8f8f2, #fff7dc); }
.live-lab-card h3 { margin: 3px 0 7px; }
.live-lab-card p { margin: 0; }
.live-lab-card a { flex: 0 0 auto; border-radius: 8px; padding: 11px 14px; background: var(--plum-900); color: white; font-weight: 900; text-decoration: none; }
.live-lab-card a:hover { background: var(--plum-700); }
.live-lab-card a:focus-visible { outline: 3px solid var(--coral-700); outline-offset: 3px; }
.typing-guide { border: 2px solid var(--teal-700); background: linear-gradient(145deg, #e9fcf7, #f4fbff); }
.typing-guide h3, .troubleshooting-card h3 { margin-top: 0; }
.typing-guide pre, .troubleshooting-card pre { overflow-x: auto; border-radius: 10px; padding: 17px 18px; background: var(--code-bg); color: var(--code-ink); font: 14px/1.72 "Cascadia Mono", Consolas, monospace; white-space: pre; }
.typing-guide pre code, .troubleshooting-card pre code { padding: 0; background: transparent; color: inherit; }
.typing-guide .copy-command { border-color: var(--teal-700); color: var(--teal-800); }
.troubleshooting-card > p { max-width: 65ch; }
.troubleshooting-card details { border-top: 1px solid #c9dbea; padding: 12px 0; }
.troubleshooting-card details:last-child { padding-bottom: 0; }
.troubleshooting-card summary { cursor: pointer; color: var(--plum-900); font-weight: 900; }
.troubleshooting-card details .copy-command { margin: 0 8px 8px 0; border-color: var(--plum-900); color: var(--plum-900); }
.walkthrough-dialog { width: min(920px, calc(100% - 28px)); max-height: 92dvh; border: 0; border-radius: 18px; padding: 28px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px #160d1f66; }
.walkthrough-dialog::backdrop { background: #160d1fcc; }
.walkthrough-dialog h2 { margin: 4px 44px 8px 0; color: var(--plum-900); font-size: clamp(1.7rem, 4vw, 2.6rem); }
.walkthrough-lead { color: var(--muted); }
.walkthrough-dialog video { display: block; width: 100%; max-height: 56vh; border-radius: 12px; background: #111; }
.video-chapters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.video-chapters button { border: 1px solid #bda8c9; border-radius: 999px; padding: 8px 11px; background: white; color: var(--plum-900); font-weight: 800; cursor: pointer; }
.video-transcript { border-top: 1px solid var(--soft-line); padding-top: 12px; }
.video-transcript summary { cursor: pointer; font-weight: 900; }
.video-transcript li { margin: 8px 0; line-height: 1.5; }
.utility-dialog { width: min(650px, calc(100vw - 30px)); max-height: calc(100dvh - 30px); border: 3px solid var(--plum-900); border-radius: 18px; padding: 30px; color: var(--ink); background: var(--paper); }
.utility-dialog::backdrop { background: rgba(23, 11, 36, .78); }
.utility-dialog h2 { margin: 4px 40px 12px 0; color: var(--plum-900); }
.utility-dialog label { display: block; margin: 12px 0 6px; font-weight: 800; }
.utility-dialog textarea, .utility-dialog input[type="search"] { box-sizing: border-box; width: 100%; border: 2px solid #bda8c9; border-radius: 9px; padding: 11px; font: inherit; }
.dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.glossary-list { display: grid; gap: 11px; margin: 18px 0 0; }
.glossary-list div { border-left: 4px solid var(--teal-700); padding: 5px 12px; background: #f8f4fa; }
.glossary-list dt { color: var(--plum-900); font-weight: 900; }
.glossary-list dd { margin: 4px 0 0; line-height: 1.5; }
.callout { margin: 23px 0; border: 1px solid #c9dbea; border-left-width: 7px; border-radius: 0 12px 12px 0; padding: 16px 18px; background: white; }
.callout--info { border-left-color: var(--teal-700); background: #effcf8; }
.callout--action { border-left-color: #e7a900; background: #fff9df; }
.callout h3 { margin-top: 0; }
.callout > strong { display: block; margin-bottom: 5px; }
.callout--info > strong { color: var(--teal-800); }
.callout--action > strong { color: #755600; }
.setup-checklist.callout { margin: 14px 16px 18px; padding: 13px; }
.test-list { margin: 14px 0; padding: 0; list-style: none; }
.test-list li { position: relative; padding-left: 26px; }
.test-list li::before { content: "◇"; position: absolute; left: 0; color: var(--coral-700); font-weight: 900; }
.learning-steps li { margin-bottom: 14px; }
.syntax-lesson { margin: 24px 0; border: 2px solid #7ea8d0; border-radius: 13px; background: #edf5ff; }
.syntax-lesson summary { padding: 15px 18px; color: var(--plum-900); font-weight: 900; cursor: pointer; }
.syntax-lesson summary:hover { background: #dfeeff; }
.syntax-lesson > div { border-top: 1px solid #b9d2e8; padding: 2px 18px 17px; }
.syntax-lesson ul { padding-left: 22px; }
.syntax-lesson li { margin: 10px 0; line-height: 1.55; }
.syntax-lesson p { margin-bottom: 0; line-height: 1.55; }
.lesson-actions { position: sticky; z-index: 3; bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; min-height: 64px; border-top: 1px solid var(--soft-line); padding: 9px 16px; background: color-mix(in srgb, var(--cream) 96%, transparent); backdrop-filter: blur(8px); }
.text-button { min-height: 44px; border: 2px solid transparent; border-radius: 8px; padding: 0 11px; background: transparent; color: var(--teal-800); font-weight: 900; }
.text-button:hover { border-color: var(--teal-800); }
.square-button { width: 44px; height: 44px; margin-left: 7px; border: 2px solid var(--plum-900); border-radius: 9px; background: white; color: var(--plum-900); font-size: 1.4rem; }

.code-panel { display: grid; grid-template-columns: minmax(420px, 64%) minmax(250px, 36%); grid-template-rows: 54px minmax(0, 1fr) auto; grid-template-areas: "editor-head console" "editor console" "runner console"; height: 100%; min-height: 0; overflow: hidden; background-color: var(--code-bg); background-image: radial-gradient(circle at 80% 20%, #5948d822, transparent 30rem), linear-gradient(#6fffea08 1px, transparent 1px), linear-gradient(90deg, #6fffea08 1px, transparent 1px); background-size: auto, 30px 30px, 30px 30px; color: white; box-shadow: -18px 0 44px rgba(0, 6, 21, .42); }
.code-panel[hidden] { display: none; }
.editor-head { grid-area: editor-head; }
.editor-wrap { grid-area: editor; }
.runner-bar { grid-area: runner; }
.console { grid-area: console; border-left: 2px solid #2a6685; }
.editor-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #2a6685; background: var(--code-surface); }
.file-tab { align-self: stretch; display: flex; align-items: center; gap: 9px; border-top: 3px solid var(--mint-300); padding: 0 18px; background: var(--code-bg); font-family: ui-monospace, monospace; font-size: .82rem; box-shadow: 0 -7px 20px #6fffea38; }
.python-icon { display: grid; place-items: center; width: 28px; height: 24px; border-radius: 5px; background: var(--teal-800); color: white; font-size: .64rem; font-weight: 900; }
.unsaved-dot { color: var(--amber-300); }
.editor-status { padding-right: 16px; color: #c9e4f2; font-size: .72rem; }
.editor-wrap { display: grid; grid-template-columns: 50px minmax(0, 1fr); min-height: 0; overflow: hidden; }
.editor-area { position: relative; min-height: 0; overflow: hidden; }
.line-numbers { margin: 0; overflow: hidden; border-right: 1px solid #214d68; padding: 22px 10px; color: #83a9bf; font: 14px/1.78 "Cascadia Mono", Consolas, monospace; text-align: right; user-select: none; }
.code-editor { position: relative; width: 100%; height: 100%; resize: none; border: 0; outline: 0; padding: 22px 24px; background: transparent; color: var(--code-ink); caret-color: var(--amber-300); tab-size: 4; font: 15px/1.78 "Cascadia Code", "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; overflow-y: auto; }
.code-editor:focus-visible { outline: 3px solid var(--mint-300); outline-offset: -4px; box-shadow: inset 0 0 0 6px var(--amber-300); }
.runner-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 9px 12px; border-top: 1px solid #2a6685; border-bottom: 1px solid #2a6685; padding: 9px 13px; background: var(--code-surface); }
.runner-bar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.runner-actions { margin-left: auto; }
.action-menu { position: relative; }
.action-menu > summary { display: inline-flex; align-items: center; list-style: none; cursor: pointer; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu > summary::after { content: "▾"; margin-left: 8px; font-size: .72em; }
.action-menu[open] > summary::after { transform: rotate(180deg); }
.action-menu-popover { position: absolute; z-index: 8; right: 0; bottom: calc(100% + 10px); display: grid; gap: 6px; width: max-content; min-width: 190px; border: 1px solid #70cfe1; border-radius: 10px; padding: 8px; background: var(--code-surface); box-shadow: 0 16px 36px rgba(0, 0, 0, .38); }
.action-menu:not([open]) .action-menu-popover { display: none; }
.action-menu-popover .secondary-button { width: 100%; justify-content: flex-start; text-align: left; }
.secondary-button, .primary-button { min-height: 44px; border: 2px solid transparent; border-radius: 9px; padding: 0 16px; font-weight: 900; }
.secondary-button { border-color: #70cfe1; background: #164b76; color: white; }
.secondary-button:hover { background: #007f78; }
.primary-button { border-color: var(--amber-300); background: var(--amber-300); color: var(--ink); }
.primary-button:hover { background: #ffe08e; }
.shortcut { color: #b6d3e4; font-size: .7rem; }
.console { min-height: 0; overflow: hidden; background: #061928; }
.console-head { display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-bottom: 1px solid #24536f; padding: 0 14px; color: var(--mint-300); }
.clear-button { min-height: 36px; border: 2px solid transparent; border-radius: 7px; padding: 0 10px; background: transparent; color: #e8f7ff; font-weight: 800; }
.clear-button:hover { border-color: #e8f7ff; }
.console-output { height: calc(100% - 44px); overflow: auto; padding: 13px 17px; font: 13px/1.65 ui-monospace, monospace; }
.console-output p { margin: 5px 0; }
.console-muted { color: #b9d2e1; }
.console-pass { color: #7ff0bd; }
.console-fail { color: #ff9db2; }
.console-info { color: #8fe3e0; }

.visualizer-launch { border-color: var(--mint-300); color: #d9ffe4; }
.visualizer-launch:hover { background: #214f46; }

@keyframes scanline { from { transform: translateX(-55%); } to { transform: translateX(55%); } }
.execution-dialog {
  width: min(1460px, calc(100vw - 24px)); height: min(900px, calc(100dvh - 24px)); max-width: none; max-height: none;
  overflow: hidden; border: 3px solid var(--plum-950); border-radius: 16px; padding: 0; background: #f4eddf; color: var(--ink);
  box-shadow: 0 30px 110px rgba(22, 13, 9, .55);
}
.execution-dialog::backdrop { background: rgba(20, 12, 8, .82); backdrop-filter: blur(3px); }
.execution-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; height: 100%; min-height: 0; }
.execution-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; border-bottom: 1px solid #8f7e6d; padding: 17px 20px 15px; background: var(--plum-900); color: white; }
.execution-kicker { margin: 0 0 3px; color: var(--mint-300); font-size: .7rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.execution-header h2 { margin: 0; color: white; font-size: clamp(1.35rem, 2.3vw, 2rem); line-height: 1; }
.execution-header p:last-child { margin: 7px 0 0; color: #f0e7dc; font-size: .82rem; }
.execution-close { flex: 0 0 auto; width: 44px; height: 44px; border: 2px solid #f0e7dc; border-radius: 9px; background: transparent; color: white; font-size: 1.7rem; line-height: 1; }
.execution-close:hover { background: #5b3827; }
.execution-controls { display: flex; align-items: center; gap: 8px; min-height: 58px; border-bottom: 1px solid #aa9987; padding: 7px 14px; background: #e8ddca; }
.execution-controls button, .trace-speed select { min-height: 40px; border: 2px solid var(--plum-900); border-radius: 8px; padding: 0 13px; background: #fffdf7; color: var(--plum-900); font-weight: 900; }
.execution-controls button:hover:not(:disabled) { background: var(--mint-100); }
.execution-controls .trace-play { border-color: var(--teal-800); background: var(--teal-800); color: white; }
.trace-speed { display: flex; align-items: center; gap: 7px; margin-left: 5px; color: var(--muted); font-size: .76rem; font-weight: 900; }
.trace-speed select { min-height: 40px; padding-inline: 9px 28px; }
.trace-step-label { margin-left: auto; color: var(--plum-900); font: 800 .78rem/1 ui-monospace, monospace; }
.execution-workspace { display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 1.35fr) minmax(250px, .72fr); min-height: 0; overflow: hidden; }
.trace-code-panel, .memory-panel, .execution-detail { min-width: 0; min-height: 0; overflow: hidden; background: #fffdf7; }
.trace-code-panel, .memory-panel { border-right: 1px solid #aa9987; }
.trace-panel-heading { display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-bottom: 1px solid #b8aa98; padding: 0 13px; background: #ede4d5; }
.trace-panel-heading h3 { margin: 0; color: var(--plum-900); font-size: .84rem; letter-spacing: .02em; }
.trace-panel-heading span { color: var(--muted); font: 700 .7rem/1 ui-monospace, monospace; }
.trace-code { height: calc(100% - 44px); margin: 0; overflow: auto; padding: 10px 0; background: #201713; color: #fff8e8; counter-reset: trace-line; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; list-style: none; }
.trace-code li { display: grid; grid-template-columns: 42px minmax(0, 1fr); min-height: 26px; padding: 2px 13px 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.trace-code li::before { content: attr(data-line); padding-right: 10px; color: #a9959e; text-align: right; }
.trace-code li.is-active { background: #f4b9422e; box-shadow: inset 4px 0 0 var(--amber-300); }
.trace-code li.is-active::before { color: var(--amber-300); font-weight: 900; }
.trace-code li.is-past { color: #bdceb9; }
.memory-panel { display: grid; grid-template-rows: 44px minmax(0, 1fr); background: #f6f0e5; }
.memory-graph { position: relative; display: grid; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; min-height: 0; overflow: auto; padding: 26px; }
.memory-empty { grid-column: 1 / -1; align-self: center; margin: auto; max-width: 34ch; color: var(--muted); line-height: 1.55; text-align: center; }
.memory-frame { grid-column: 1 / -1; border: 3px solid var(--plum-900); border-radius: 12px; padding: 12px; background: #fff8d7; box-shadow: 5px 5px 0 #c9b89d; }
.memory-frame-title { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--plum-900); font: 900 .75rem/1.2 ui-monospace, monospace; }
.memory-bindings { display: flex; flex-wrap: wrap; gap: 8px; }
.memory-node { position: relative; border: 2px solid var(--teal-800); border-radius: 10px; padding: 10px 11px; background: #e0f3ea; color: var(--ink); font: 700 .75rem/1.35 ui-monospace, monospace; box-shadow: 4px 4px 0 #9cb9a9; animation: trace-node-in .2s ease-out both; }
.memory-node strong { display: block; margin-bottom: 4px; color: var(--teal-800); overflow-wrap: anywhere; }
.memory-node small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.memory-node::before { content: "binds to"; position: absolute; top: -17px; left: 10px; color: #6e5d50; font: 600 .62rem/1 ui-monospace, monospace; }
.memory-frame .memory-node::before { display: none; }
.memory-node.object-node { border-color: var(--coral-700); background: #fde3d4; box-shadow-color: #d7a68c; }
.memory-node.object-node strong { color: var(--coral-700); }
.memory-node.api-node { grid-column: 1 / -1; border-style: dashed; border-color: #8a3f22; background: #f6e2d9; box-shadow: none; }
.memory-node.api-node strong { color: #8a3f22; }
.memory-node.is-current { outline: 4px solid var(--amber-300); outline-offset: 2px; }
@keyframes trace-node-in { from { transform: translateY(5px); opacity: 0; } }
.execution-detail { overflow-y: auto; background: #fffdf7; }
.trace-action { min-height: 92px; margin: 0; border-bottom: 1px solid #d5c6b3; padding: 18px; color: var(--plum-900); font-size: 1rem; font-weight: 900; line-height: 1.5; }
.trace-facts { margin: 0; padding: 6px 18px; }
.trace-facts div { border-bottom: 1px solid #ded2c2; padding: 12px 0; }
.trace-facts dt { color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.trace-facts dd { margin: 5px 0 0; color: var(--ink); font: 700 .79rem/1.4 ui-monospace, monospace; overflow-wrap: anywhere; }
.trace-legend { display: grid; gap: 9px; margin: 12px 18px 18px; border: 1px solid #c7b8a6; border-radius: 9px; padding: 12px; color: var(--muted); font-size: .72rem; }
.trace-legend span { display: flex; align-items: center; gap: 8px; }
.trace-legend i { width: 19px; height: 12px; border: 2px solid var(--teal-800); border-radius: 3px; background: #e0f3ea; }
.trace-legend .legend-object { border-color: var(--coral-700); background: #fde3d4; }
.trace-legend .legend-api { border-style: dashed; border-color: #8a3f22; background: #f6e2d9; }
.trace-timeline-wrap { overflow-x: auto; border-top: 1px solid #aa9987; background: #e8ddca; }
.trace-timeline { display: flex; min-width: max-content; padding: 8px 12px; }
.trace-timeline button { width: 42px; height: 34px; margin-right: 5px; border: 2px solid #8b7a69; border-radius: 7px; background: #fffdf7; color: var(--muted); font: 800 .7rem/1 ui-monospace, monospace; }
.trace-timeline button.is-past { border-color: var(--teal-800); background: #dff2e9; color: var(--teal-800); }
.trace-timeline button.is-active { border-color: var(--plum-900); background: var(--amber-300); color: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--plum-900); }
.execution-disclaimer { margin: 0; border-top: 1px solid #aa9987; padding: 9px 15px; background: var(--plum-900); color: #f0e7dc; font-size: .72rem; line-height: 1.35; text-align: center; }

body.light-editor .visualizer-launch { color: var(--plum-900); }

.success-dialog, .auth-dialog, .solution-dialog { border: 3px solid var(--plum-900); border-radius: 18px; color: var(--ink); box-shadow: 0 24px 90px rgba(23, 11, 36, .48); }
.success-dialog::backdrop, .auth-dialog::backdrop, .solution-dialog::backdrop { background: rgba(23, 11, 36, .78); }
.success-dialog { width: min(480px, calc(100vw - 34px)); padding: 38px; text-align: center; }
.success-dialog h2, .auth-dialog h2 { margin: 7px 0 10px; color: var(--plum-900); font-size: 2rem; line-height: 1.15; }
.success-dialog p:not(.overline), .auth-dialog > p:not(.overline) { color: var(--muted); line-height: 1.55; }
.success-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--teal-800); color: white; font-size: 2rem; }
.success-dialog .primary-button { margin-top: 11px; }
.auth-dialog { width: min(440px, calc(100vw - 34px)); padding: 38px; }
.solution-dialog { width: min(820px, calc(100vw - 34px)); max-height: calc(100dvh - 34px); padding: 32px; }
.solution-dialog h2 { margin: 7px 0 10px; color: var(--plum-900); font-size: 1.8rem; }
.solution-code { max-height: min(52vh, 520px); overflow: auto; border: 2px solid #6f5a7d; border-radius: 10px; padding: 18px; background: var(--code-surface); color: var(--code-ink); font: 14px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.solution-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dialog-close { position: absolute; top: 9px; right: 11px; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.7rem; }
.oauth-buttons { display: grid; gap: 11px; margin: 26px 0 17px; }
.oauth-button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; border: 2px solid var(--plum-900); border-radius: 10px; background: white; color: var(--ink); font-weight: 900; }
.oauth-button span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mint-100); color: var(--plum-900); font-size: .73rem; }
.github-button { background: var(--plum-900); color: white; }
.auth-message { min-height: 24px; margin: 0; font-size: .78rem; text-align: center; }
.auth-message.is-error { color: var(--danger) !important; font-weight: 800; }
.sync-note { display: inline-flex; align-items: center; gap: 5px; color: var(--success); font-size: .74rem; font-weight: 800; }
.backdrop { position: fixed; inset: var(--topbar-height) 0 0; z-index: 18; background: rgba(23, 11, 36, .7); }

.confetti-container {
  position: fixed;
  inset: var(--topbar-height) 0 0 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: 0;
  border-radius: 99px;
  will-change: transform, opacity;
  animation-name: confetti-fall;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

@keyframes confetti-fall {
  to {
    transform: translate3d(0, 110vh, 0) rotate(720deg);
    opacity: 0;
  }
}
.token-comment { color: #8cc7c9; }
.token-string { color: #fff9b6; }
.token-keyword { color: #9d95ff; font-weight: 700; }
.token-todo { color: #ffcf56; font-weight: 700; }

body.light-editor .code-panel, body.light-editor .code-editor { background: #fffdf8; color: var(--ink); }
body.light-editor .line-numbers { background: #f1eaf4; color: #67566f; }
body.light-editor .console { background: var(--plum-900); }

.sales-area { border: 0; background: var(--paper); }
.sales-area > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 28px; border-block: 1px solid var(--soft-line); padding: 20px clamp(20px, 6vw, 90px); background: var(--paper); color: var(--plum-900); cursor: pointer; list-style: none; }
.sales-area > summary::-webkit-details-marker { display: none; }
.sales-area > summary::after { content: "+"; grid-column: 2; grid-row: 1 / span 2; color: var(--teal-800); font: 500 2rem/1 "Cascadia Mono", monospace; }
.sales-area[open] > summary::after { content: "−"; }
.sales-area > summary span { font-size: 1.05rem; font-weight: 900; }
.sales-area > summary small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.sales-area > summary:hover { background: var(--mint-100); }
.sales-area > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -4px; }
.cohort-section { padding: clamp(54px, 7vw, 96px) clamp(20px, 6vw, 90px); background: linear-gradient(150deg, #fff9f1 0%, #f5eaff 52%, #e5fff5 100%); border-top: 6px solid var(--plum-900); }
.cohort-section h2, .cohort-section h3 { color: var(--plum-900); }
.cohort-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: clamp(30px, 6vw, 80px); max-width: 1180px; margin: 0 auto 42px; align-items: center; }
.cohort-hero h2 { max-width: 760px; margin: 0; font-size: clamp(2.25rem, 5vw, 4.8rem); letter-spacing: -.055em; line-height: .98; }
.cohort-lead { max-width: 720px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.65; }
.cohort-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; padding: 0; list-style: none; }
.cohort-benefits li { position: relative; padding-left: 26px; line-height: 1.45; font-weight: 800; }
.cohort-benefits li::before { content: "✓"; position: absolute; left: 0; color: var(--teal-800); }
.founder-card { display: grid; gap: 10px; border: 3px solid var(--plum-900); border-radius: 22px; padding: 30px; background: var(--paper); box-shadow: 12px 12px 0 var(--mint-300); }
.python-career-section { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: clamp(26px, 5vw, 66px); max-width: 1180px; margin: 0 auto 48px; border: 3px solid var(--plum-900); border-radius: 22px; padding: clamp(26px, 4vw, 46px); background: var(--paper); box-shadow: 12px 12px 0 var(--mint-300); }
.python-career-copy h3 { max-width: 700px; margin: 4px 0 18px; color: var(--plum-900); font-size: clamp(2rem, 4vw, 3.9rem); line-height: .98; letter-spacing: -.045em; }
.python-career-copy > p:not(.overline) { max-width: 70ch; color: var(--muted); line-height: 1.65; }
.python-career-copy .python-scope-note { margin-top: 20px; border-left: 5px solid var(--teal-800); padding: 12px 15px; background: var(--mint-100); color: var(--ink); }
.python-skill-map { display: grid; align-content: start; gap: 12px; }
.python-skill-map article { display: grid; gap: 5px; border-left: 5px solid var(--coral-700); padding: 14px 16px; background: #f7f0e6; }
.python-skill-map strong { color: var(--plum-900); font-size: 1rem; }
.python-skill-map span { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.python-skill-map > p { margin: 5px 0 0; border-top: 1px solid var(--soft-line); padding-top: 16px; color: var(--teal-800); font-weight: 900; line-height: 1.5; }
.portfolio-code-card { max-width: 1180px; margin: 0 auto 48px; padding: clamp(24px, 4vw, 42px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(22px, 4vw, 46px); align-items: center; border: 3px solid var(--plum-900); border-radius: 22px; background: var(--amber-100); box-shadow: 12px 12px 0 var(--plum-900); }
.portfolio-code-number { width: clamp(88px, 10vw, 130px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--plum-900); color: var(--mint-300); font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 900; letter-spacing: -.08em; }
.portfolio-code-card h3 { margin: 4px 0 10px; font-size: clamp(2rem, 4vw, 3.6rem); line-height: .95; letter-spacing: -.045em; }
.portfolio-code-card p:not(.overline) { margin: 0; max-width: 720px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.portfolio-code-card ul { margin: 17px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.portfolio-code-card li { padding: 7px 10px; border: 1px solid var(--plum-900); border-radius: 999px; background: white; font-size: .76rem; font-weight: 900; }
.portfolio-code-link { min-width: 190px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 10px; background: var(--plum-900); color: white; font-size: .86rem; font-weight: 900; text-decoration: none; }
.price-kicker { color: var(--coral-700); font-size: .78rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.price { color: var(--plum-900); font-size: clamp(3.6rem, 8vw, 5.7rem); line-height: 1; }
.price-note { color: var(--muted); line-height: 1.45; }
.checkout-button, .email-form button { min-height: 52px; border: 2px solid var(--plum-900); border-radius: 10px; padding: 0 18px; background: var(--plum-900); color: white; font-weight: 900; }
.checkout-button { display: grid; place-items: center; text-align: center; text-decoration: none; }
.checkout-button:hover, .email-form button:hover { background: var(--violet-700); }
.checkout-status { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1180px; margin: 0 auto 48px; }
.pricing-card { display: flex; flex-direction: column; border: 2px solid #c8b8d2; border-radius: 18px; padding: 26px; background: rgba(255,255,255,.9); }
.pricing-card.featured { border: 4px solid var(--violet-700); transform: translateY(-8px); box-shadow: 0 14px 38px #33154d22; }
.plan-name { margin: 0; color: var(--coral-700); font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pricing-card h3 { margin: 7px 0; font-size: 1.45rem; }
.plan-price { margin: 0 0 12px; color: var(--plum-900); font-size: 2.4rem; font-weight: 900; }
.pricing-card ul { flex: 1; padding-left: 21px; line-height: 1.7; }
.plan-link { display: grid; place-items: center; min-height: 48px; border: 2px solid var(--plum-900); border-radius: 9px; padding: 8px 12px; background: white; color: var(--plum-900); text-align: center; text-decoration: none; font-weight: 900; }
button.plan-link { width: 100%; }
.featured .plan-link { background: var(--amber-300); }
.signup-and-faq { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; max-width: 1180px; margin: 0 auto; }
.signup-card, .faq-card { border: 2px solid var(--plum-900); border-radius: 18px; padding: clamp(24px, 4vw, 38px); background: var(--paper); }
.signup-card h3, .faq-card h3 { margin: 5px 0 12px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.signup-card > p:not(.overline) { color: var(--muted); line-height: 1.55; }
.email-form { display: grid; gap: 9px; margin-top: 22px; }
.email-form > label:first-child { font-weight: 900; }
.email-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.email-row input { min-height: 52px; min-width: 0; border: 2px solid #8f7ba0; border-radius: 10px; padding: 0 14px; color: var(--ink); }
.email-form .remove-interest { background: white; color: var(--plum-900); }
.consent-row { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.consent-row input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--teal-800); }
.contact-choices { display: grid; gap: 9px; margin: 5px 0; border: 1px solid var(--soft-line); border-radius: 10px; padding: 12px; }
.contact-choices legend { padding: 0 5px; color: var(--plum-900); font-size: .82rem; font-weight: 900; }
.form-help { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.honeypot { position: absolute; left: -10000px; }
.signup-status { min-height: 24px; margin: 0; color: var(--teal-800); font-weight: 800; }
.signup-status.is-error { color: var(--danger); }
.signup-status.is-paused { color: var(--muted); }
.email-form :disabled { cursor: not-allowed; opacity: .62; }
.faq-card details { border-top: 1px solid var(--soft-line); padding: 14px 2px; }
.faq-card summary { color: var(--plum-900); font-weight: 900; cursor: pointer; }
.faq-card details p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.legal-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 28px clamp(20px, 6vw, 90px); border-top: 2px solid var(--plum-900); background: var(--plum-950); color: white; }
.legal-footer p { max-width: 760px; margin: 0; line-height: 1.55; }
.legal-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }
.legal-footer a { color: var(--amber-100); font-weight: 800; }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: minmax(330px, 40%) minmax(0, 60%); }
  .code-panel { grid-template-columns: minmax(360px, 60%) minmax(220px, 40%); }
  .global-search { width: min(360px, 34vw); }
  .shortcut { display: none; }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  body.nav-open { overflow: hidden; }
  .topbar { grid-template-columns: auto 1fr auto; }
  .menu-button { display: inline-block; margin-right: 8px; }
  .global-search { display: none; }
  .wordmark { justify-self: center; }
  .nav-button { display: none; }
  .platform-shell { display: block; height: auto; min-height: calc(100dvh - var(--topbar-height)); overflow: visible; }
  .curriculum { position: fixed; z-index: 25; inset: var(--topbar-height) auto 0 0; width: min(360px, 92vw); max-height: calc(100dvh - var(--topbar-height)); transform: translateX(-101%); transition: transform .2s ease; box-shadow: 18px 0 45px rgba(23, 11, 36, .24); }
  .curriculum.is-open { transform: translateX(0); }
  .curriculum-head { display: flex; justify-content: space-between; }
  .close-menu { display: block; border-color: var(--plum-900); color: var(--plum-900); }
  .mobile-search { display: grid; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--soft-line); background: white; color: var(--muted); font-size: .76rem; font-weight: 800; }
  .mobile-search input { width: 100%; min-height: 44px; border: 2px solid var(--plum-700); border-radius: 9px; padding: 0 12px; background: white; color: var(--ink); }
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(680px, 76dvh); height: auto; overflow: visible; }
  .workspace.code-is-collapsed { grid-template-rows: auto; }
  .lesson-panel { height: auto; min-height: 500px; overflow: visible; }
  .panel-tabs { top: var(--topbar-height); flex-wrap: wrap; }
  .lesson-actions { position: static; backdrop-filter: none; }
  .code-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: 50px minmax(360px, 1fr) auto minmax(190px, 32%); grid-template-areas: "editor-head" "editor" "runner" "console"; height: min(900px, 88dvh); min-height: 680px; }
  .console { border-left: 0; border-top: 2px solid #6f5a7d; }
  .execution-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
  .execution-workspace { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(280px, 1fr) minmax(180px, .55fr); overflow: auto; }
  .trace-code-panel { border-right: 1px solid #aa9987; }
  .memory-panel { border-right: 0; }
  .execution-detail { grid-column: 1 / -1; border-top: 1px solid #aa9987; }
  .backdrop { top: var(--topbar-height); }
  .cohort-hero, .python-career-section, .signup-and-faq { grid-template-columns: 1fr; }
  .portfolio-code-card { grid-template-columns: auto 1fr; }
  .portfolio-code-link { grid-column: 1 / -1; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .legal-footer { grid-template-columns: 1fr; }
  .legal-footer nav { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .live-lab-card { align-items: flex-start; flex-direction: column; }
  .top-actions .icon-button { display: none; }
  .topbar { padding-inline: 7px; }
  .wordmark { font-size: 1.18rem; }
  .sign-in-button { padding: 0 11px; }
  .account-button #userName { display: none; }
  .lesson-content { padding: 28px 22px 38px; }
  .exercise-guide { margin-inline: 22px; }
  .setup-checklist { grid-template-columns: 1fr; }
  .lesson-content h2 { font-size: clamp(1.55rem, 8vw, 2rem); }
  .quest-banner { grid-template-columns: auto 1fr; align-items: start; gap: 14px; padding: 17px; }
  .quest-reward { grid-column: 2; justify-self: start; }
  .workspace { grid-template-rows: auto minmax(720px, 82dvh); }
  .runner-bar { align-items: stretch; flex-direction: column; }
  .runner-bar > div { justify-content: space-between; }
  .code-panel { grid-template-rows: 50px minmax(270px, 1fr) 112px minmax(180px, 34%); }
  .execution-header { padding: 14px; }
  .execution-header p:last-child { max-width: 46ch; }
  .execution-controls { flex-wrap: wrap; }
  .trace-speed { margin-left: 0; }
  .trace-step-label { width: 100%; margin: 2px 0 0; }
  .execution-workspace { display: block; overflow-y: auto; }
  .trace-code-panel, .memory-panel { height: 330px; border-right: 0; border-bottom: 1px solid #aa9987; }
  .execution-detail { min-height: 280px; }
  .memory-graph { padding: 21px 16px; }
  .editor-status { display: none; }
  .success-dialog, .auth-dialog { max-height: calc(100dvh - 24px); overflow: auto; }
  .cohort-section { padding-inline: 16px; }
  .portfolio-code-card { grid-template-columns: 1fr; box-shadow: 7px 7px 0 var(--plum-900); }
  .portfolio-code-number { width: 82px; }
  .cohort-benefits, .email-row { grid-template-columns: 1fr; }
  .email-form button { width: 100%; }
}

@media (max-width: 420px) {
  :root { --topbar-height: 60px; }
  .topbar { gap: 4px; padding-inline: 5px; }
  .wordmark { font-size: 1.05rem; }
  .wordmark span:last-child { display: none; }
  .wordmark b { display: none; }
  .top-actions { gap: 5px; }
  .sign-in-button { padding-inline: 9px; font-size: .82rem; }
  .curriculum { width: min(100vw, 360px); }
  .track-switcher { gap: 5px; padding-inline: 8px; }
  .track-button { font-size: .7rem; }
  .panel-tabs { align-items: flex-start; padding-inline: 12px; }
  .panel-tab-actions { width: 100%; justify-content: space-between; }
  .code-toggle { flex: 1; }
  .lesson-content { padding: 24px 17px 34px; }
  .exercise-guide { margin-inline: 17px; }
  .lesson-actions { padding-inline: 10px; }
  .editor-wrap { grid-template-columns: 42px minmax(0, 1fr); }
  .line-numbers { padding-inline: 7px; font-size: 13px; }
  .code-editor { padding: 16px 12px; font-size: 13px; }
  .runner-bar > div:last-child { display: grid; grid-template-columns: 1fr 1.45fr; }
  .runner-bar button { width: 100%; padding-inline: 8px; font-size: .78rem; }
  .success-dialog, .auth-dialog { width: calc(100vw - 20px); padding: 30px 22px; }
  .auth-dialog h2, .success-dialog h2 { padding-right: 24px; font-size: 1.65rem; }
}

@media (max-height: 560px) and (min-width: 901px) {
  .curriculum-head { padding-block: 13px; }
  .progress-card { padding-block: 10px; }
  .chapter-title { padding-top: 10px; }
  .challenge-item { min-height: 46px; }
  .lesson-content { padding-top: 24px; }
}

@supports (padding: max(0px)) {
  .topbar { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .curriculum { padding-bottom: env(safe-area-inset-bottom); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  :where(a, button, input, textarea):focus-visible { outline: 3px solid Highlight; box-shadow: none; }
  .track-button.is-active, .challenge-item.is-active, .challenge-item.is-complete .challenge-number { forced-color-adjust: none; }
}
