:root {
    color-scheme: dark;
    --background: #101827;
    --surface: #192338;
    --surface-light: #24334b;
    --ink: #f3f5fa;
    --muted: #a6b0c3;
    --purple: #8b7cff;
    --lime: #52e0c4;
    --line: rgb(186 205 235 / 12%);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    background:
        radial-gradient(ellipse at 12% 8%, rgb(82 224 196 / 8%), transparent 28rem),
        radial-gradient(ellipse at 88% 14%, rgb(139 124 255 / 11%), transparent 32rem),
        var(--background);
    background-attachment: fixed;
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20;
    height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--lime));
    transform: scaleX(var(--scroll-progress, 0));
    transform-origin: left center;
    pointer-events: none;
}

.code-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.14;
    mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent);
    pointer-events: none;
}

.code-backdrop-column {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24%;
    overflow: hidden;
}

.code-column-one {
    left: 2%;
}

.code-column-two {
    left: 27%;
}

.code-column-three {
    right: 25%;
}

.code-column-four {
    right: 1%;
}

.code-backdrop-track {
    display: flex;
    flex-direction: column;
    animation: code-drift var(--code-duration, 50s) linear var(--code-delay, 0s) infinite;
    will-change: transform;
}

.code-backdrop-block {
    display: grid;
    flex: 0 0 auto;
    gap: 18px;
    padding: 26px 0;
}

.code-backdrop-line {
    overflow: hidden;
    color: #b9adff;
    font: 0.72rem/1.4 'DM Mono', Consolas, monospace;
    text-overflow: clip;
    white-space: nowrap;
}

.code-tone-1 {
    color: #d3f36b;
}

.code-tone-2 {
    color: #8eacd9;
}

.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}

button,
input,
textarea {
    font: inherit;
}

.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1160px, calc(100% - 64px));
    margin: 0 auto;
}

.site-header {
    min-height: 82px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-mark {
    color: var(--lime);
    font-family: 'DM Mono', monospace;
    font-size: 1.05rem;
    letter-spacing: -3px;
}

.brand-accent {
    margin-left: -8px;
    color: var(--purple);
}

nav {
    display: flex;
    gap: 32px;
    color: var(--muted);
    font-size: 0.9rem;
}

nav a,
.site-footer > a:last-child {
    transition: color 160ms ease;
}

nav a:hover,
nav a:focus-visible,
.site-footer > a:last-child:hover {
    color: var(--lime);
}

.account-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
}

.account-dot,
.lab-status > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffbf69;
}

.account-button.is-connected .account-dot {
    background: var(--lime);
    box-shadow: 0 0 12px rgb(211 243 107 / 50%);
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
    width: min(1160px, calc(100% - 64px));
    min-height: 465px;
    margin: 0 auto;
    padding: 50px 0 48px;
}

.hero::before {
    position: absolute;
    top: 20px;
    left: -150px;
    z-index: -1;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgb(121 91 255 / 13%);
    content: '';
    filter: blur(90px);
}

.live-label,
.eyebrow {
    color: var(--lime);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.live-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
}

.live-label span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 12px rgb(211 243 107 / 60%);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: 'Manrope', sans-serif;
}

h1 {
    margin-bottom: 17px;
    font-size: clamp(3.2rem, 6.2vw, 5.6rem);
    font-weight: 800;
    letter-spacing: -5px;
    line-height: 0.99;
}

h1 span,
.lab-heading h2 span {
    color: var(--lime);
}

.hero-content > p {
    max-width: 480px;
    margin-bottom: 24px;
    color: #b5b2ca;
    font-size: 1.02rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgb(0 0 0 / 20%);
}

.button:active,
.account-button:active {
    transform: translateY(1px) scale(0.98);
}

.button:focus-visible,
.account-button:focus-visible,
.auth-toggle:focus-visible,
.dialog-close:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--purple);
    outline-offset: 3px;
}

.button-bright {
    background: var(--lime);
    color: #20221a;
}

.button-bright:hover {
    background: #e0ff8a;
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.78rem;
}

.hero-note span {
    color: var(--purple);
    font-size: 1rem;
}

.hero-visual {
    position: relative;
    display: grid;
    min-height: 350px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 30px;
    background:
        radial-gradient(ellipse at 50% 55%, rgb(155 134 255 / 23%), transparent 55%),
        linear-gradient(140deg, #272442, #1d2037);
    transition: border-color 220ms ease, box-shadow 220ms ease;
}

.hero-visual:hover {
    border-color: rgb(211 243 107 / 38%);
    box-shadow: 0 18px 45px rgb(0 0 0 / 18%), 0 0 36px rgb(155 134 255 / 10%);
}

.hero-visual img {
    position: relative;
    z-index: 2;
    width: min(66%, 285px);
    max-height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 18px 35px rgb(0 0 0 / 25%));
    animation: bob 4s ease-in-out infinite;
    translate: var(--move-x, 0px) var(--move-y, 0px);
    transition: translate 350ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.visual-orbit {
    position: absolute;
    z-index: 1;
    width: 300px;
    height: 300px;
    border: 1px solid rgb(211 243 107 / 12%);
    border-radius: 50%;
    translate: var(--move-x, 0px) var(--move-y, 0px);
    transition: translate 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
    animation: orbit-turn 32s linear infinite;
}

.visual-orbit::before {
    position: absolute;
    top: 14%;
    left: 17%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 14px rgb(211 243 107 / 70%);
    content: '';
}

.orbit-two {
    width: 225px;
    height: 225px;
    border-color: rgb(155 134 255 / 17%);
    animation-direction: reverse;
}

.orbit-two::before {
    top: auto;
    right: 14%;
    bottom: 20%;
    left: auto;
    width: 6px;
    height: 6px;
    background: var(--purple);
    box-shadow: 0 0 13px rgb(155 134 255 / 75%);
}

.visual-code {
    position: absolute;
    z-index: 3;
    padding: 10px 12px;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 8px;
    background: rgb(26 25 45 / 88%);
    color: #e1dfff;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
    translate: var(--move-x, 0px) var(--move-y, 0px);
    transition: translate 300ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.visual-code span {
    margin-right: 8px;
    color: var(--purple);
}

.code-top {
    top: 48px;
    left: 12px;
    transform: rotate(-4deg);
}

.code-bottom {
    right: 15px;
    bottom: 50px;
    transform: rotate(3deg);
}

.code-bottom b {
    padding-left: 8px;
    color: var(--lime);
}

.visual-spark {
    position: absolute;
    color: var(--lime);
    font-size: 1.3rem;
    translate: var(--move-x, 0px) var(--move-y, 0px);
    transition: translate 280ms ease-out;
    animation: spark-pulse 3s ease-in-out infinite;
}

.spark-one {
    top: 68px;
    right: 57px;
}

.spark-two {
    bottom: 72px;
    left: 45px;
    color: var(--purple);
    animation-delay: -1.5s;
}

.progress-strip {
    display: grid;
    grid-template-columns: 1.1fr minmax(120px, 1fr) 50px 115px;
    align-items: center;
    gap: 15px;
    width: min(1160px, calc(100% - 64px));
    min-height: 92px;
    margin: 0 auto;
    padding: 15px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #1d1c32;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.progress-strip.progress-complete {
    border-color: rgb(211 243 107 / 42%);
    box-shadow: 0 0 30px rgb(211 243 107 / 9%);
}

.progress-intro {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.progress-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    background: rgb(211 243 107 / 12%);
    color: var(--lime);
}

.progress-intro div {
    display: grid;
    gap: 1px;
}

.progress-intro strong {
    font-size: 0.87rem;
}

.progress-intro div > span {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #38364e;
}

.progress-track > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--purple), var(--lime));
    transition: width 350ms ease;
}

.progress-percent {
    color: var(--lime);
    font-size: 0.92rem;
    text-align: right;
}

.progress-count {
    color: var(--muted);
    font-size: 0.73rem;
    text-align: right;
}

.daily-quiz-section {
    width: min(1160px, calc(100% - 64px));
    margin: 0 auto;
    padding-top: 72px;
}

.daily-quiz-heading {
    align-items: center;
}

.daily-quiz-heading > div:first-child > p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.daily-quiz-stats {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

.daily-stat {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    column-gap: 8px;
    min-width: 112px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.daily-stat > span:first-child {
    grid-row: span 2;
    color: var(--lime);
    font-size: 1.15rem;
}

.daily-stat:last-child > span:first-child {
    color: #ffbf69;
}

.daily-stat strong {
    font-size: 1rem;
    line-height: 1.2;
}

.daily-stat > span:last-child {
    color: var(--muted);
    font-size: 0.66rem;
    line-height: 1.3;
}

.daily-quiz-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 245px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.daily-quiz-main {
    min-width: 0;
    padding: 28px 30px;
}

.daily-quiz-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--muted);
    font-size: 0.72rem;
}

.daily-quiz-progress > span:first-child {
    color: var(--lime);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.daily-quiz-main h3 {
    margin: 16px 0 20px;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    line-height: 1.4;
}

.daily-quiz-options {
    display: grid;
    gap: 9px;
}

.daily-answer {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgb(255 255 255 / 3%);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.daily-answer:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: rgb(155 134 255 / 65%);
    background: rgb(155 134 255 / 10%);
}

.daily-answer:focus-visible,
.daily-next-button:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 3px;
}

.daily-answer.is-correct {
    border-color: rgb(211 243 107 / 55%);
    background: rgb(211 243 107 / 10%);
    color: var(--lime);
}

.daily-answer.is-incorrect {
    border-color: rgb(255 125 125 / 55%);
    background: rgb(255 125 125 / 8%);
    color: #ffadad;
}

.daily-answer:disabled {
    cursor: default;
}

.daily-quiz-feedback {
    min-height: 25px;
    margin: 13px 0 3px;
    color: var(--lime);
    font-size: 0.82rem;
}

.daily-quiz-feedback.is-error {
    color: #ffadad;
}

.daily-next-button {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.8rem;
}

.daily-quiz-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    border-left: 1px solid var(--line);
    background: rgb(155 134 255 / 6%);
}

.daily-flame {
    margin-bottom: 12px;
    font-size: 1.6rem;
}

.daily-quiz-aside strong {
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
}

.daily-quiz-aside p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.6;
}

.daily-quiz-aside .daily-storage-note {
    padding-top: 10px;
    border-top: 1px solid var(--line);
    font-size: 0.68rem;
}

.learning-section {
    width: min(1160px, calc(100% - 64px));
    margin: 0 auto;
    padding: 85px 0 90px;
}

.section-heading,
.lab-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 28px;
}

.eyebrow {
    margin-bottom: 9px;
}

.section-heading h2,
.lab-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    letter-spacing: -1.3px;
    line-height: 1.2;
}

.level-pill {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid rgb(155 134 255 / 30%);
    border-radius: 999px;
    color: #c3b6ff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.level-control {
    display: grid;
    gap: 6px;
    width: min(590px, 100%);
}

.difficulty-guide {
    margin: 0;
    color: var(--muted);
    font-size: 0.68rem;
    text-align: right;
}

.level-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.level-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 14px;
    background: linear-gradient(145deg, rgb(36 34 60 / 90%), rgb(26 25 45 / 94%));
    color: var(--muted);
    text-align: left;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.level-option:hover {
    transform: translateY(-2px);
    border-color: rgb(155 134 255 / 45%);
    color: var(--ink);
}

.level-option[aria-pressed="true"] {
    border-color: rgb(211 243 107 / 55%);
    background: linear-gradient(140deg, rgb(211 243 107 / 12%), rgb(155 134 255 / 13%));
    color: var(--ink);
    box-shadow: 0 8px 24px rgb(7 6 20 / 22%), 0 0 22px rgb(155 134 255 / 9%);
}

.level-option:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 3px;
}

.level-option-mark {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: rgb(155 134 255 / 13%);
    color: #c3b6ff;
    font: 500 0.65rem 'DM Mono', Consolas, monospace;
}

.level-option[aria-pressed="true"] .level-option-mark {
    background: rgb(211 243 107 / 15%);
    color: var(--lime);
}

.level-option-copy {
    display: grid;
    min-width: 0;
    line-height: 1.35;
}

.level-option-copy strong {
    overflow: hidden;
    color: inherit;
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.level-option-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.62rem;
}

.level-storage-note {
    margin: 0;
    color: #ffcf85;
    font-size: 0.72rem;
}

.lesson-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 20px;
}

.lesson-list {
    display: grid;
    align-content: start;
    gap: 10px;
    max-height: min(650px, 75vh);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-color: #514b72 transparent;
    scrollbar-width: thin;
}

.lesson-card {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #1d1c32;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.lesson-card:hover,
.lesson-card[aria-current="step"] {
    border-color: rgb(155 134 255 / 70%);
    background: #24213d;
}

.lesson-card:hover {
    transform: translateX(3px);
    box-shadow: 0 6px 18px rgb(0 0 0 / 12%);
}

.lesson-card:active {
    transform: scale(0.99);
}

.lesson-number {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 10px;
    background: #2c2947;
    color: #c5b8ff;
    font-family: 'DM Mono', monospace;
    font-size: 0.78rem;
}

.lesson-card.is-complete .lesson-number {
    background: rgb(211 243 107 / 14%);
    color: var(--lime);
}

.lesson-card.is-in-progress .lesson-number {
    background: rgb(155 134 255 / 15%);
    color: #d3caff;
}

.lesson-card-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.lesson-card-copy strong {
    font-size: 0.85rem;
}

.lesson-card-copy span {
    color: var(--muted);
    font-size: 0.72rem;
}

.lesson-card-copy .lesson-difficulty {
    color: var(--lime);
    font-size: 0.66rem;
    font-weight: 700;
}

.lesson-card.difficulty-3 .lesson-difficulty {
    color: #c3b6ff;
}

.lesson-card.difficulty-4 .lesson-difficulty,
.lesson-card.difficulty-5 .lesson-difficulty {
    color: #ffcf85;
}

.lesson-card-progress {
    display: block;
    width: 100%;
    height: 4px;
    margin-top: 3px;
    overflow: hidden;
    border-radius: 99px;
    background: rgb(255 255 255 / 9%);
}

.lesson-card-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--purple), var(--lime));
    transition: width 260ms ease;
}

.lesson-card.is-complete .lesson-card-progress-fill {
    background: var(--lime);
}

.lesson-card-state {
    font-size: 0.63rem !important;
    font-weight: 700;
}

.lesson-card.is-in-progress .lesson-card-state {
    color: #c3b6ff;
}

.lesson-card.is-complete .lesson-card-state {
    color: var(--lime);
}

.lesson-check {
    color: var(--muted);
    font-size: 0.85rem;
}

.lesson-card.is-in-progress .lesson-check {
    color: #c3b6ff;
}

.lesson-card.is-complete .lesson-check {
    color: var(--lime);
}

.lesson-panel {
    position: relative;
    min-height: 385px;
    overflow: hidden;
    padding: 27px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 100% 0%, rgb(155 134 255 / 14%), transparent 45%),
        #1e1d34;
    transform-origin: center;
}

.lesson-panel-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
}

.lesson-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    color: var(--lime);
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.7px;
}

.lesson-meta span:last-child {
    color: var(--muted);
}

.lesson-panel h3 {
    margin-bottom: 8px;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    letter-spacing: -0.8px;
}

.lesson-panel-content > p {
    max-width: 590px;
    margin-bottom: 17px;
    color: #b0adc4;
    font-size: 0.9rem;
}

.lesson-concept {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-left: 3px solid var(--purple);
    border-radius: 0 8px 8px 0;
    background: rgb(155 134 255 / 9%);
    color: #dbd7ed;
    font-size: 0.83rem;
}

.lesson-concept code {
    color: var(--lime);
    font-family: 'DM Mono', monospace;
}

.practice-challenge {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid rgb(211 243 107 / 15%);
    border-radius: 10px;
    background: rgb(211 243 107 / 5%);
    transition: border-color 180ms ease, background-color 180ms ease;
}

.practice-challenge:hover {
    border-color: rgb(211 243 107 / 32%);
    background: rgb(211 243 107 / 8%);
}

.challenge-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    color: var(--lime);
    font-size: 0.82rem;
}

.practice-challenge > p {
    margin: 0;
    color: #dbd7ed;
    font-size: 0.82rem;
}

.challenge-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.hint-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #c3b6ff;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.hint-button:hover {
    color: var(--lime);
    text-shadow: 0 0 14px rgb(211 243 107 / 35%);
}

.practice-hint {
    margin-top: 10px !important;
    color: var(--muted) !important;
}

.hint-button:focus-visible,
.lesson-card:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 3px;
}

.quiz-box {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.quiz-box > strong {
    margin-bottom: 2px;
    font-size: 0.83rem;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: fit-content;
    color: #ccc9dc;
    font-size: 0.8rem;
    cursor: pointer;
}

.quiz-option input {
    margin-top: 5px;
    accent-color: var(--lime);
}

.quiz-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 3px;
}

.quiz-actions .button {
    min-height: 36px;
    padding: 0 13px;
    font-size: 0.78rem;
}

.quiz-feedback,
.lesson-status {
    margin: 0;
    color: var(--lime);
    font-size: 0.78rem;
}

.quiz-feedback.is-error {
    color: #ff9c9c;
}

.lesson-complete {
    min-height: 40px;
    margin-top: 12px;
    padding: 0 13px;
    font-size: 0.78rem;
}

.lesson-complete:disabled,
.quiz-actions .button:disabled {
    background: #35334a;
    color: var(--lime);
    cursor: default;
    transform: none;
}

.lesson-mascot {
    position: absolute;
    right: 18px;
    bottom: -33px;
    color: rgb(155 134 255 / 11%);
    font-size: 12rem;
    line-height: 1;
    transform: rotate(-15deg);
}

.lab-section {
    padding: 76px max(32px, calc((100% - 1160px) / 2)) 70px;
    background:
        radial-gradient(ellipse at 90% 0%, rgb(114 89 214 / 12%), transparent 38%),
        #1c1b31;
}

.project-section {
    width: min(1160px, calc(100% - 64px));
    margin: 0 auto;
    padding: 82px 0 88px;
}

.project-section .lab-heading {
    align-items: center;
}

.project-progress-pill {
    color: var(--lime);
}

.project-workbench {
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #1d1c32;
}

.project-steps {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px 17px;
    border-right: 1px solid var(--line);
    background: rgb(255 255 255 / 2%);
}

.project-steps-label,
.project-stage-label {
    margin: 0;
    color: var(--lime);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.project-steps-label {
    margin: 2px 8px 14px;
}

.project-step-list {
    display: grid;
    gap: 8px;
}

.project-step {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.project-step[aria-current="step"] {
    border-color: rgb(155 134 255 / 35%);
    background: rgb(155 134 255 / 9%);
}

.project-step:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.project-step:not(:disabled):hover {
    background: rgb(155 134 255 / 9%);
}

.project-step:focus-visible,
.project-editor:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

.project-step-number {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: #292741;
    color: #c6bcff;
    font-family: 'DM Mono', Consolas, monospace;
    font-size: 0.76rem;
}

.project-step[aria-current="step"] .project-step-number {
    background: rgb(155 134 255 / 18%);
    color: var(--lime);
}

.project-step-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.project-step-copy strong {
    font-size: 0.77rem;
}

.project-step-copy > span {
    color: var(--muted);
    font-size: 0.67rem;
}

.project-guide {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: auto;
    padding: 12px 10px 0;
    color: var(--muted);
}

.project-guide > span {
    flex: 0 0 auto;
}

.project-guide p {
    margin: 0;
    font-size: 0.73rem;
    line-height: 1.6;
}

.project-editor-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 23px;
}

.project-stage-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-stage-heading h3 {
    margin: 5px 0 0;
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
}

.project-stage-status {
    max-width: 57%;
    color: var(--lime);
    font-size: 0.72rem;
    text-align: right;
}

.project-stage-description {
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 0.8rem;
}

.project-checklist {
    display: grid;
    gap: 5px;
    margin: 0 0 17px;
    padding-left: 19px;
    color: #ccc9dc;
    font-size: 0.75rem;
}

.project-checklist li::marker {
    color: var(--purple);
}

.project-editor-label {
    margin-bottom: 7px;
    font-size: 0.75rem;
    font-weight: 700;
}

.project-editor {
    display: block;
    width: 100%;
    min-height: 310px;
    padding: 14px;
    border: 1px solid #35324e;
    border-radius: 9px;
    background: #131221;
    color: #e9e5ff;
    font: 0.78rem/1.7 'DM Mono', Consolas, monospace;
    resize: vertical;
    tab-size: 2;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 11px 0 14px;
}

.project-actions .button {
    min-height: 38px;
    padding: 0 13px;
    font-size: 0.78rem;
}

.project-preview {
    display: block;
    width: 100%;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    transform-origin: center;
}

.project-workbench.feedback-correct {
    animation: feedback-correct 420ms ease both;
}

.project-preview.project-preview-run {
    animation: preview-run 350ms ease both;
}

.glossary-section {
    width: min(1160px, calc(100% - 64px));
    margin: 0 auto;
    padding: 76px 0 82px;
}

.glossary-heading {
    align-items: center;
}

.glossary-heading > div > p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.87rem;
}

.glossary-tools {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}

.glossary-search {
    display: grid;
    gap: 7px;
}

.glossary-search > label {
    color: #dedbef;
    font-size: 0.75rem;
    font-weight: 700;
}

.glossary-search-input {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
}

.glossary-search-input:focus-within {
    border-color: rgb(155 134 255 / 60%);
    box-shadow: 0 0 0 3px rgb(155 134 255 / 8%);
}

.glossary-search-input > span {
    font-size: 1.2rem;
    line-height: 1;
}

.glossary-search-input input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 0.82rem;
}

.glossary-search-input input::placeholder {
    color: #8e8aa6;
}

.glossary-search-input input::-webkit-search-cancel-button {
    display: none;
}

.glossary-search-input > button {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-light);
    color: var(--ink);
    font-size: 1.1rem;
    cursor: pointer;
}

.glossary-search-input > button[hidden] {
    display: none;
}

.glossary-search-input > button:focus-visible,
.glossary-filter:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

.glossary-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.glossary-filter {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.glossary-filter:hover {
    border-color: rgb(155 134 255 / 50%);
    color: var(--ink);
}

.glossary-filter[aria-pressed="true"] {
    border-color: rgb(211 243 107 / 40%);
    background: rgb(211 243 107 / 9%);
    color: var(--lime);
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.glossary-grid[hidden] {
    display: none;
}

.glossary-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    min-height: 192px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #1d1c32;
    transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.glossary-card:hover {
    transform: translateY(-2px);
    border-color: rgb(155 134 255 / 35%);
    background: #22213a;
}

.glossary-category {
    padding: 4px 8px;
    border: 1px solid rgb(155 134 255 / 25%);
    border-radius: 999px;
    color: #c3b6ff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.glossary-card h3 {
    margin: 12px 0 5px;
    font-family: 'Manrope', sans-serif;
    font-size: 1.02rem;
    line-height: 1.35;
}

.glossary-card p {
    margin: 0 0 15px;
    color: var(--muted);
    font-size: 0.77rem;
    line-height: 1.6;
}

.glossary-card code {
    width: 100%;
    margin-top: auto;
    padding: 8px 10px;
    overflow-wrap: anywhere;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #141321;
    color: var(--lime);
    font: 0.69rem/1.55 'DM Mono', Consolas, monospace;
}

.glossary-empty {
    margin: 0;
    padding: 32px 18px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

.lab-heading {
    width: min(1160px, 100%);
    margin: 0 auto 25px;
}

.lab-heading h2 {
    margin-bottom: 7px;
}

.lab-heading > div > p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.lab-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #c8c5d8;
    font-size: 0.65rem;
    letter-spacing: 0.7px;
}

.lab-status > span {
    background: var(--lime);
}

.playground {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 14px;
    width: min(1160px, 100%);
    margin: 0 auto;
}

.editor-panel,
.preview-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #19182c;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.editor-panel:focus-within,
.preview-panel:focus-within {
    border-color: rgb(155 134 255 / 50%);
    box-shadow: 0 0 0 3px rgb(155 134 255 / 8%);
}

.panel-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 28px;
    margin-bottom: 12px;
}

.panel-topline label,
.panel-topline h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
}

.file-icon {
    color: var(--purple);
}

.language-badge,
.preview-caption {
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
}

#code-editor {
    display: block;
    width: 100%;
    min-height: 315px;
    padding: 16px;
    border: 1px solid #35324e;
    border-radius: 9px;
    background: #131221;
    color: #e9e5ff;
    font: 0.81rem/1.7 'DM Mono', Consolas, monospace;
    resize: vertical;
    tab-size: 2;
}

.editor-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 12px;
}

.editor-actions .button {
    min-height: 38px;
    padding: 0 13px;
    font-size: 0.78rem;
}

.button-quiet {
    background: var(--surface-light);
    color: #dedbef;
}

.button-quiet:hover {
    background: #35314e;
}

.editor-message {
    color: var(--lime);
    font-size: 0.75rem;
}

.preview-panel {
    display: flex;
    flex-direction: column;
}

.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 8px rgb(211 243 107 / 45%);
}

.preview-panel iframe {
    display: block;
    width: 100%;
    min-height: 315px;
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    transform-origin: center;
}

.lab-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(1160px, 100%);
    margin: 15px auto 0;
    padding: 10px 13px;
    border: 1px solid rgb(211 243 107 / 12%);
    border-radius: 8px;
    background: rgb(211 243 107 / 5%);
}

.lab-tip p {
    margin: 0;
    color: #b7b4c8;
    font-size: 0.77rem;
}

.lab-tip strong {
    color: var(--lime);
}

.site-footer {
    min-height: 88px;
    color: var(--muted);
}

.site-footer .brand {
    color: var(--ink);
    font-size: 1.05rem;
}

.site-footer p,
.site-footer > a:last-child {
    margin: 0;
    font-size: 0.78rem;
}

.site-footer p span {
    color: #ff8297;
}

.auth-dialog {
    width: min(440px, calc(100% - 32px));
    max-width: none;
    padding: 0;
    overflow: visible;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 19px;
    background: #201f37;
    color: var(--ink);
    box-shadow: 0 24px 100px rgb(0 0 0 / 55%);
}

.cyber-chat-dialog {
    width: min(410px, calc(100% - 24px));
    max-width: none;
    max-height: min(620px, calc(100dvh - 32px));
    margin: 16px 20px 16px auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgb(155 134 255 / 35%);
    border-radius: 19px;
    background: #201f37;
    color: var(--ink);
    box-shadow: 0 24px 100px rgb(0 0 0 / 55%), 0 0 30px rgb(155 134 255 / 10%);
}

.level-quiz-dialog {
    width: min(560px, calc(100% - 24px));
    max-width: none;
    max-height: min(90vh, 820px);
    padding: 0;
    overflow: auto;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 19px;
    background: #201f37;
    color: var(--ink);
    box-shadow: 0 24px 100px rgb(0 0 0 / 55%);
}

.auth-dialog::backdrop,
.cyber-chat-dialog::backdrop,
.level-quiz-dialog::backdrop {
    background: rgb(9 8 19 / 78%);
    backdrop-filter: blur(6px);
}

.auth-dialog[open],
.cyber-chat-dialog[open],
.level-quiz-dialog[open] {
    animation: dialog-enter 220ms ease-out both;
}

.auth-dialog[open]::backdrop,
.cyber-chat-dialog[open]::backdrop,
.level-quiz-dialog[open]::backdrop {
    animation: backdrop-enter 220ms ease-out both;
}

.auth-form {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 30px;
}

.dialog-close {
    position: absolute;
    top: 14px;
    right: 16px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-light);
    color: var(--ink);
    font-size: 1.35rem;
    cursor: pointer;
}

.dialog-mark {
    display: grid;
    width: 43px;
    height: 43px;
    margin-bottom: 10px;
    place-items: center;
    border-radius: 12px;
    background: rgb(211 243 107 / 13%);
    color: var(--lime);
    font-family: 'DM Mono', monospace;
    font-weight: 500;
}

.auth-form .eyebrow {
    margin-bottom: -5px;
}

.auth-form h2 {
    margin-bottom: -4px;
    font-size: 1.8rem;
    letter-spacing: -1px;
}

.auth-description {
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 0.87rem;
}

.auth-form > label {
    margin-top: 4px;
    font-size: 0.81rem;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    min-height: 43px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #17162b;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgb(155 134 255 / 11%);
}

.auth-form input::placeholder {
    color: #77758e;
}

.auth-submit {
    width: 100%;
    margin-top: 10px;
}

.auth-toggle {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.8rem;
    cursor: pointer;
}

.auth-toggle strong {
    color: var(--lime);
}

.auth-message {
    min-height: 1.5em;
    margin: 0;
    color: var(--lime);
    font-size: 0.78rem;
}

.auth-message.is-error {
    color: #ff9c9c;
}

.cyber-chat-dialog[open] {
    display: grid;
    grid-template-rows: auto minmax(120px, 1fr) auto auto auto;
}

.cyber-chat-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 52px 15px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(130deg, rgb(155 134 255 / 12%), rgb(211 243 107 / 4%));
}

.cyber-chat-avatar {
    flex-basis: 42px;
    width: 42px;
    height: 38px;
    transform: scale(0.88);
    animation: cyber-float 3s ease-in-out infinite;
}

.cyber-chat-header .cyber-chat-clear {
    margin-left: auto;
    padding: 7px 9px;
    border: 1px solid rgb(155 134 255 / 25%);
    border-radius: 8px;
    background: rgb(155 134 255 / 7%);
    color: #d3caff;
    font-size: 0.68rem;
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.cyber-chat-header .cyber-chat-clear:hover:not(:disabled) {
    border-color: rgb(211 243 107 / 45%);
    background: rgb(211 243 107 / 8%);
    color: var(--lime);
}

.cyber-chat-header .cyber-chat-clear:disabled {
    cursor: wait;
    opacity: 0.55;
}

.cyber-chat-header .cyber-chat-clear:focus-visible,
.cyber-message-action:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 3px;
}

.cyber-chat-header h2 {
    margin: 0;
    font-size: 0.98rem;
}

.cyber-chat-header p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.7rem;
}

.cyber-chat-header .dialog-close {
    top: 14px;
    right: 14px;
}

.cyber-chat-messages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #514b72 transparent;
    scrollbar-width: thin;
}

.cyber-message {
    max-width: 88%;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgb(255 255 255 / 7%);
    border-radius: 13px 13px 13px 4px;
    background: #292741;
    color: var(--ink);
    font-size: 0.79rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    animation: cyber-message-arrive 220ms ease-out both;
}

.cyber-message-bot {
    display: grid;
    gap: 8px;
}

.cyber-message-user {
    align-self: flex-end;
    border-color: rgb(211 243 107 / 17%);
    border-radius: 13px 13px 4px 13px;
    background: rgb(211 243 107 / 9%);
}

.cyber-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cyber-message-action {
    padding: 0;
    border: 0;
    background: transparent;
    color: #c3b6ff;
    font-size: 0.66rem;
    cursor: pointer;
}

.cyber-message-action:hover {
    color: var(--lime);
}

.cyber-chat-suggestions {
    display: flex;
    gap: 7px;
    padding: 0 15px 12px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.cyber-chat-suggestions::-webkit-scrollbar {
    display: none;
}

.cyber-chat-suggestions {
    scrollbar-width: none;
}

.cyber-chat-suggestions button {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgb(155 134 255 / 25%);
    border-radius: 999px;
    background: rgb(155 134 255 / 7%);
    color: #d3caff;
    font-size: 0.68rem;
    cursor: pointer;
}

.cyber-chat-suggestions button:hover {
    border-color: rgb(211 243 107 / 45%);
    color: var(--lime);
}

.cyber-chat-suggestions button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.cyber-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px 15px;
    border-top: 1px solid var(--line);
}

.cyber-chat-form input,
.cyber-chat-form textarea {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #17162b;
    color: var(--ink);
    font: inherit;
    font-size: 0.78rem;
    resize: vertical;
}

.cyber-chat-form input:focus-visible,
.cyber-chat-form textarea:focus-visible {
    border-color: var(--purple);
    outline: 2px solid rgb(155 134 255 / 45%);
    outline-offset: 2px;
}

.cyber-chat-form .button {
    min-height: 42px;
    padding: 0 13px;
    font-size: 0.76rem;
}

.cyber-chat-note {
    margin: 0;
    padding: 0 15px 12px;
    color: var(--muted);
    font-size: 0.62rem;
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
    border: 0;
}

.level-quiz-content {
    position: relative;
    display: grid;
    gap: 13px;
    padding: 30px;
}

.level-quiz-content > .eyebrow {
    margin: 0;
}

.level-quiz-content h2 {
    margin: -7px 40px -5px 0;
    font-size: 1.8rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

.level-quiz-intro,
.level-quiz-result > p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

#level-quiz-form {
    display: grid;
    gap: 12px;
}

.level-quiz-question {
    display: grid;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgb(255 255 255 / 2%);
}

.level-quiz-question legend {
    max-width: 100%;
    padding: 0 4px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
}

.level-quiz-question label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
    cursor: pointer;
}

.level-quiz-question input {
    flex: 0 0 auto;
    margin: 2px 0 0;
    accent-color: var(--lime);
}

.level-quiz-submit {
    width: 100%;
    margin-top: 2px;
}

.level-quiz-result {
    display: grid;
    justify-items: start;
    gap: 10px;
    padding: 17px;
    border: 1px solid rgb(211 243 107 / 28%);
    border-radius: 13px;
    background: linear-gradient(140deg, rgb(211 243 107 / 8%), rgb(155 134 255 / 9%));
}

.level-quiz-result .eyebrow {
    margin: 0;
}

.level-quiz-result h3 {
    margin: -5px 0 0;
    font-size: 1.35rem;
}

.level-quiz-retry {
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.78rem;
    cursor: pointer;
}

.level-quiz-retry:hover {
    color: var(--lime);
}

.welcome-robot {
    position: fixed;
    right: max(20px, calc((100vw - 1160px) / 2));
    bottom: 20px;
    z-index: 21;
    display: flex;
    align-items: center;
    gap: 13px;
    width: min(370px, calc(100vw - 32px));
    padding: 14px 42px 14px 14px;
    border: 1px solid rgb(155 134 255 / 30%);
    border-radius: 17px;
    background: linear-gradient(145deg, rgb(36 34 60 / 97%), rgb(26 25 45 / 98%));
    box-shadow: 0 18px 48px rgb(0 0 0 / 36%), 0 0 28px rgb(155 134 255 / 9%);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.98);
    transition: opacity 250ms ease, transform 250ms ease;
}

.welcome-robot.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    animation: robot-enter 380ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.welcome-robot[hidden],
.cyber-launcher[hidden],
#level-quiz-form[hidden],
.level-quiz-result[hidden] {
    display: none;
}

.cyber-launcher {
    position: fixed;
    right: max(20px, calc((100vw - 1160px) / 2));
    bottom: 20px;
    z-index: 21;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgb(211 243 107 / 55%);
    border-radius: 18px;
    background: linear-gradient(145deg, #383459, #25233d);
    box-shadow: 0 12px 34px rgb(0 0 0 / 35%), 0 0 22px rgb(211 243 107 / 12%);
    cursor: pointer;
    animation: robot-enter 280ms ease-out both;
}

.cyber-launcher:hover {
    transform: translateY(-3px);
}

.cyber-launcher span {
    font-size: 1.55rem;
}

.cyber-launcher:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 4px;
}

.welcome-robot-avatar {
    position: relative;
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 43px;
    place-items: center;
    border: 2px solid rgb(211 243 107 / 75%);
    border-radius: 14px 14px 12px 12px;
    background: linear-gradient(145deg, #383459, #25233d);
    box-shadow: inset 0 -4px 0 rgb(155 134 255 / 15%), 0 0 18px rgb(211 243 107 / 10%);
}

.robot-open-button {
    padding: 0;
    cursor: pointer;
}

.robot-open-button:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 4px;
}

.robot-antenna {
    position: absolute;
    top: -9px;
    left: 21px;
    width: 3px;
    height: 8px;
    border-radius: 3px;
    background: var(--purple);
}

.robot-antenna::before {
    position: absolute;
    top: -4px;
    left: -2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 8px rgb(211 243 107 / 70%);
    content: "";
    animation: cyber-antenna-glow 1.8s ease-in-out infinite;
}

.robot-eye {
    position: absolute;
    top: 15px;
    width: 5px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 7px rgb(211 243 107 / 65%);
}

.robot-eye-left {
    left: 12px;
}

.robot-eye-right {
    right: 12px;
}

.welcome-robot-avatar .robot-eye {
    animation: cyber-blink 5s ease-in-out infinite;
}

.welcome-robot-avatar .robot-eye-right {
    animation-delay: 180ms;
}

.welcome-robot.is-visible .robot-open-button {
    animation: cyber-float 3.2s ease-in-out infinite;
}

.robot-mouth {
    position: absolute;
    bottom: 8px;
    left: 17px;
    width: 11px;
    height: 4px;
    border-bottom: 2px solid #c3b6ff;
    border-radius: 50%;
}

.robot-wave {
    position: absolute;
    top: -9px;
    right: -10px;
    color: var(--lime);
    font-size: 0.86rem;
    animation: spark-pulse 1.8s ease-in-out infinite;
}

.welcome-robot-copy {
    min-width: 0;
}

.welcome-robot-copy p {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 0.79rem;
    line-height: 1.4;
}

.welcome-robot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 12px;
}

.welcome-robot-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--lime);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.welcome-robot-action:hover {
    color: #e0ff8a;
}

.welcome-robot-close {
    position: absolute;
    top: 7px;
    right: 8px;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 5%);
    color: var(--muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.welcome-robot-close:hover {
    background: rgb(255 255 255 / 10%);
    color: var(--ink);
}

.welcome-robot-action:focus-visible,
.welcome-robot-close:focus-visible,
.level-quiz-retry:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 3px;
}

@keyframes cyber-float {
    0%,
    100% {
        transform: translateY(0) scale(0.88);
    }

    50% {
        transform: translateY(-4px) scale(0.88);
    }
}

@keyframes cyber-antenna-glow {
    0%,
    100% {
        opacity: 0.65;
        box-shadow: 0 0 5px rgb(211 243 107 / 45%);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 11px rgb(211 243 107 / 95%);
    }
}

@keyframes cyber-blink {
    0%,
    44%,
    48%,
    100% {
        transform: scaleY(1);
    }

    46% {
        transform: scaleY(0.12);
    }
}

@keyframes cyber-message-arrive {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bob {
    0%,
    100% {
        transform: translateY(0);
    }

    @keyframes robot-enter {
        from {
            opacity: 0;
            transform: translateY(12px) scale(0.98);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    50% {
        transform: translateY(-9px);
    }
}

@keyframes orbit-turn {
    to {
        rotate: 360deg;
    }
}

@keyframes spark-pulse {
    0%,
    100% {
        opacity: 0.55;
    }

    50% {
        opacity: 1;
        filter: drop-shadow(0 0 7px currentColor);
    }
}

@keyframes code-drift {
    to {
        transform: translateY(-50%);
    }
}

@keyframes backdrop-aurora {
    0% {
        transform: translate3d(-3%, -2%, 0) scale(0.96);
        opacity: 0.65;
    }

    50% {
        transform: translate3d(2%, 3%, 0) scale(1.04);
        opacity: 1;
    }

    100% {
        transform: translate3d(4%, -2%, 0) scale(1);
        opacity: 0.75;
    }
}

@keyframes lesson-swap {
    from {
        opacity: 0.45;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes feedback-correct {
    0%,
    100% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.012);
        box-shadow: 0 0 32px rgb(211 243 107 / 15%);
    }
}

@keyframes feedback-wrong {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes preview-run {
    0% {
        opacity: 0.45;
        transform: scale(0.99);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes hint-reveal {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progress-bump {
    0%,
    100% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.015);
    }
}

@keyframes dialog-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes backdrop-enter {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 450ms ease, transform 450ms ease;
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.lesson-panel.lesson-change {
    animation: lesson-swap 260ms ease both;
}

.lesson-panel.feedback-correct {
    animation: feedback-correct 420ms ease both;
}

.lesson-panel.feedback-wrong {
    animation: feedback-wrong 280ms ease both;
}

.preview-panel iframe.preview-run {
    animation: preview-run 350ms ease both;
}

.practice-hint.hint-reveal {
    animation: hint-reveal 220ms ease both;
}

.progress-strip.progress-bump {
    animation: progress-bump 380ms ease both;
}

body {
    background:
        radial-gradient(ellipse at 8% 5%, rgb(101 76 195 / 14%), transparent 30%),
        radial-gradient(ellipse at 94% 34%, rgb(42 135 147 / 8%), transparent 27%),
        var(--background);
    background-attachment: fixed;
}

.code-backdrop {
    opacity: 0.13;
}

.code-backdrop::before {
    position: absolute;
    inset: -20%;
    z-index: 0;
    background:
        radial-gradient(ellipse at 18% 25%, rgb(126 94 255 / 26%), transparent 31%),
        radial-gradient(ellipse at 78% 38%, rgb(45 193 190 / 17%), transparent 28%),
        radial-gradient(ellipse at 52% 82%, rgb(211 243 107 / 12%), transparent 30%);
    content: "";
    filter: blur(42px);
    animation: backdrop-aurora 24s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

.code-backdrop-column {
    z-index: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 19;
    width: 100%;
    min-height: 78px;
    padding-inline: max(32px, calc((100% - 1160px) / 2));
    border-bottom-color: rgb(255 255 255 / 8%);
    background: rgb(21 20 40 / 84%);
    backdrop-filter: blur(18px);
}

.brand-mark {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border: 1px solid rgb(211 243 107 / 19%);
    border-radius: 11px;
    background: linear-gradient(145deg, rgb(211 243 107 / 15%), rgb(155 134 255 / 13%));
    letter-spacing: -3px;
}

nav {
    align-items: center;
    gap: 5px;
    padding: 5px;
    border: 1px solid rgb(255 255 255 / 7%);
    border-radius: 999px;
    background: rgb(255 255 255 / 3%);
}

nav a {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    transition: background 160ms ease, color 160ms ease;
}

nav a:hover,
nav a:focus-visible {
    background: rgb(255 255 255 / 7%);
    color: var(--lime);
}

.account-button {
    border-color: rgb(155 134 255 / 25%);
    background: linear-gradient(145deg, rgb(155 134 255 / 11%), rgb(32 31 55 / 95%));
    box-shadow: inset 0 1px rgb(255 255 255 / 4%);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.account-button:hover {
    transform: translateY(-1px);
    border-color: rgb(155 134 255 / 48%);
    box-shadow: 0 7px 22px rgb(0 0 0 / 18%);
}

.hero {
    padding-top: 62px;
}

h1 {
    letter-spacing: -0.052em;
}

h1 span {
    color: var(--lime);
    text-shadow: 0 0 34px rgb(211 243 107 / 19%);
}

.live-label {
    padding: 7px 11px;
    border: 1px solid rgb(211 243 107 / 16%);
    border-radius: 999px;
    background: rgb(211 243 107 / 5%);
    font-size: 0.64rem;
}

.hero-content > p {
    color: #c1bed2;
    line-height: 1.75;
}

.hero-note {
    width: fit-content;
    padding: 7px 11px;
    border: 1px solid rgb(255 255 255 / 7%);
    border-radius: 999px;
    background: rgb(255 255 255 / 3%);
    font-size: 0.7rem;
}

.hero-visual {
    border-color: rgb(186 174 255 / 16%);
    background:
        radial-gradient(ellipse at 50% 55%, rgb(155 134 255 / 30%), transparent 55%),
        radial-gradient(ellipse at 80% 15%, rgb(211 243 107 / 8%), transparent 45%),
        linear-gradient(140deg, #292646, #1a2038);
    box-shadow: 0 26px 70px rgb(5 4 17 / 22%), inset 0 1px rgb(255 255 255 / 5%);
}

.visual-code {
    border-color: rgb(186 174 255 / 17%);
    background: rgb(22 21 39 / 92%);
    box-shadow: 0 10px 28px rgb(0 0 0 / 25%);
}

.progress-strip,
.daily-quiz-card,
.lesson-card,
.lesson-panel,
.project-workbench,
.glossary-card,
.editor-panel,
.preview-panel {
    box-shadow: 0 16px 45px rgb(5 4 17 / 13%), inset 0 1px rgb(255 255 255 / 3%);
}

.progress-strip {
    border-color: rgb(186 174 255 / 14%);
    background: linear-gradient(115deg, rgb(39 36 69 / 97%), rgb(27 27 48 / 98%));
}

.progress-icon {
    border: 1px solid rgb(211 243 107 / 16%);
    box-shadow: 0 0 24px rgb(211 243 107 / 7%);
}

.progress-track {
    height: 9px;
    background: #3a3652;
}

.progress-track > span {
    background: linear-gradient(90deg, #9178ff, #b59cff 52%, var(--lime));
    box-shadow: 0 0 13px rgb(155 134 255 / 38%);
}

.daily-quiz-card {
    border-color: rgb(186 174 255 / 16%);
    background: linear-gradient(125deg, rgb(36 34 62 / 98%), rgb(27 27 48 / 98%));
}

.daily-quiz-aside {
    background:
        radial-gradient(ellipse at 85% 15%, rgb(211 243 107 / 9%), transparent 58%),
        linear-gradient(155deg, rgb(155 134 255 / 10%), rgb(155 134 255 / 4%));
}

.lesson-card {
    border-color: rgb(255 255 255 / 8%);
    background: linear-gradient(140deg, rgb(36 34 60 / 96%), rgb(27 27 48 / 98%));
}

.lesson-card:hover,
.lesson-card[aria-current="step"] {
    border-color: rgb(155 134 255 / 66%);
    background: linear-gradient(140deg, rgb(54 46 88 / 96%), rgb(33 31 57 / 98%));
    box-shadow: 0 8px 24px rgb(5 4 17 / 24%), 0 0 22px rgb(155 134 255 / 7%);
}

.lesson-panel {
    border-color: rgb(186 174 255 / 15%);
    background:
        radial-gradient(ellipse at 100% 0%, rgb(155 134 255 / 18%), transparent 45%),
        linear-gradient(135deg, #22213b, #1b1a30);
}

.practice-challenge {
    border-color: rgb(211 243 107 / 22%);
    background: linear-gradient(120deg, rgb(211 243 107 / 7%), rgb(211 243 107 / 3%));
}

.project-workbench {
    border-color: rgb(186 174 255 / 16%);
    background: linear-gradient(125deg, rgb(36 34 62 / 98%), rgb(25 25 44 / 98%));
}

.project-steps {
    background:
        radial-gradient(ellipse at 10% 0%, rgb(155 134 255 / 9%), transparent 60%),
        rgb(255 255 255 / 2%);
}

.project-editor,
#code-editor {
    border-color: rgb(186 174 255 / 20%);
    background: linear-gradient(145deg, #171628, #12111f);
    box-shadow: inset 0 2px 12px rgb(0 0 0 / 18%);
}

.project-preview,
.preview-panel iframe {
    border-color: rgb(186 174 255 / 20%);
    box-shadow: 0 8px 22px rgb(0 0 0 / 12%);
}

.glossary-card {
    border-color: rgb(255 255 255 / 9%);
    background: linear-gradient(145deg, rgb(36 34 60 / 96%), rgb(26 25 45 / 98%));
}

.glossary-card:hover {
    border-color: rgb(155 134 255 / 43%);
    background: linear-gradient(145deg, rgb(47 42 77 / 98%), rgb(29 28 51 / 98%));
    box-shadow: 0 14px 32px rgb(5 4 17 / 23%), 0 0 25px rgb(155 134 255 / 7%);
}

.glossary-card code {
    border-color: rgb(186 174 255 / 12%);
    background: linear-gradient(135deg, #181729, #131321);
}

.site-footer {
    border-top: 1px solid rgb(255 255 255 / 8%);
}

@media (max-width: 850px) {
    .hero,
    .progress-strip,
    .daily-quiz-section,
    .project-section,
    .glossary-section,
    .learning-section,
    .site-footer {
        width: calc(100% - 40px);
    }

    .site-header {
        width: 100%;
        padding-inline: 20px;
    }

    nav {
        gap: 2px;
    }

    nav a {
        padding: 7px 8px;
        font-size: 0.72rem;
    }

    .hero {
        gap: 25px;
    }

    h1 {
        font-size: clamp(3rem, 7vw, 4.7rem);
    }

    .progress-strip {
        grid-template-columns: 1fr 1fr 45px;
    }

    .progress-count {
        display: none;
    }

    .daily-quiz-card {
        grid-template-columns: minmax(0, 1fr) 205px;
    }

    .daily-quiz-main {
        padding: 24px;
    }

    .daily-quiz-aside {
        padding: 20px;
    }

    .project-workbench {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .project-editor-panel {
        padding: 18px;
    }

    .glossary-tools {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .glossary-filters {
        justify-content: flex-start;
    }

    .glossary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lesson-layout {
        grid-template-columns: 235px minmax(0, 1fr);
        gap: 12px;
    }

    .lesson-card {
        grid-template-columns: 36px 1fr auto;
        gap: 8px;
        padding: 12px;
    }

    .lesson-number {
        width: 35px;
        height: 35px;
    }

    .lab-section {
        padding-right: 20px;
        padding-left: 20px;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 112px;
    }

    .site-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: 52px auto;
        gap: 4px 10px;
        min-height: 0;
        padding: 8px 16px 9px;
    }

    .welcome-robot {
        right: 12px;
        bottom: 12px;
    }

    .cyber-launcher {
        right: 12px;
        bottom: 12px;
    }

    .cyber-chat-dialog {
        width: calc(100% - 16px);
        max-height: calc(100dvh - 16px);
        margin: auto 8px 8px;
    }

    .level-quiz-dialog {
        max-height: 92vh;
    }

    .level-quiz-content {
        gap: 11px;
        padding: 24px 20px;
    }

    .hero,
    .progress-strip,
    .daily-quiz-section,
    .project-section,
    .glossary-section,
    .learning-section,
    .site-footer {
        width: calc(100% - 32px);
    }

    nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        gap: 4px;
        scrollbar-width: none;
        white-space: nowrap;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav a {
        flex: 0 0 auto;
        padding: 6px 9px;
        font-size: 0.7rem;
    }

    .brand {
        min-width: 0;
        grid-column: 1;
        grid-row: 1;
    }

    .account-button {
        max-width: 150px;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .account-button {
        gap: 6px;
        padding: 8px 10px;
        font-size: 0.72rem;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 38px 0 30px;
    }

    h1 {
        font-size: clamp(2.8rem, 11.5vw, 4rem);
        letter-spacing: -0.055em;
        line-height: 1.02;
    }

    .live-label {
        max-width: 100%;
        flex-wrap: wrap;
        line-height: 1.45;
    }

    .hero-visual {
        min-height: 280px;
        border-radius: 25px;
    }

    .hero-visual img {
        max-height: 210px;
    }

    .visual-orbit {
        width: 240px;
        height: 240px;
    }

    .orbit-two {
        width: 185px;
        height: 185px;
    }

    .progress-strip {
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 14px;
    }

    .progress-intro {
        grid-column: 1 / -1;
    }

    .progress-track {
        grid-column: 1;
    }

    .progress-percent {
        grid-column: 2;
    }

    .daily-quiz-section {
        padding-top: 58px;
    }

    .daily-quiz-heading {
        gap: 17px;
    }

    .daily-quiz-stats {
        width: 100%;
    }

    .daily-stat {
        flex: 1;
    }

    .daily-quiz-card {
        grid-template-columns: 1fr;
    }

    .daily-quiz-main {
        padding: 21px;
    }

    .daily-quiz-aside {
        padding: 18px 21px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .project-section {
        padding: 60px 0;
    }

    .glossary-section {
        padding: 60px 0;
    }

    .glossary-grid {
        grid-template-columns: 1fr;
    }

    .glossary-card {
        min-height: 0;
    }

    .glossary-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 2px 2px 7px;
        scrollbar-width: thin;
    }

    .glossary-filter {
        flex: 0 0 auto;
    }

    .project-workbench {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-steps {
        padding: 15px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .project-step-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-step {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 7px;
        padding: 8px 5px;
    }

    .project-step-number {
        width: 28px;
        height: 28px;
    }

    .project-step-copy strong {
        font-size: 0.68rem;
    }

    .project-guide {
        margin-top: 12px;
        padding: 9px 5px 0;
    }

    .project-editor-panel {
        padding: 17px;
    }

    .project-stage-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .project-stage-status {
        max-width: none;
        text-align: left;
    }

    .project-editor,
    .project-preview {
        min-height: 260px;
    }

    .daily-flame {
        margin-bottom: 5px;
    }

    .learning-section {
        padding: 65px 0;
    }

    .section-heading,
    .lab-heading {
        align-items: flex-start;
    }

    .section-heading {
        flex-direction: column;
        gap: 13px;
    }

    .level-control {
        width: 100%;
    }

    .section-heading h2,
    .lab-heading h2 {
        font-size: 1.8rem;
    }

    .lesson-layout {
        grid-template-columns: 1fr;
    }

    .lesson-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .lesson-card {
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 10px;
    }

    .lesson-number {
        grid-column: 1 / -1;
    }

    .lesson-card-copy strong {
        font-size: 0.73rem;
    }

    .lesson-card-copy span {
        font-size: 0.65rem;
    }

    .lesson-panel {
        padding: 20px;
    }

    .lesson-mascot {
        right: -3px;
        bottom: -20px;
        font-size: 8rem;
    }

    .lab-section {
        padding: 60px 16px;
    }

    .lab-heading {
        flex-direction: column;
        gap: 14px;
    }

    .playground {
        grid-template-columns: 1fr;
    }

    #code-editor,
    .preview-panel iframe {
        min-height: 260px;
    }

    .site-footer {
        flex-wrap: wrap;
        gap: 12px;
        padding: 20px 0;
    }

    .site-footer p {
        order: 1;
        width: 100%;
    }
}

@media (max-width: 390px) {
    .hero,
    .progress-strip,
    .daily-quiz-section,
    .project-section,
    .glossary-section,
    .learning-section,
    .site-footer {
        width: calc(100% - 24px);
    }

    .brand {
        gap: 5px;
        font-size: 1.05rem;
    }

    .brand-accent {
        margin-left: -5px;
    }

    .site-header {
        width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }

    .welcome-robot {
        gap: 10px;
        padding: 12px 38px 12px 12px;
    }

    .level-quiz-dialog {
        width: calc(100% - 16px);
    }

    .level-quiz-content {
        padding: 23px 15px 17px;
    }

    .level-quiz-question {
        padding: 10px;
    }

    .level-quiz-question legend {
        font-size: 0.76rem;
    }

    .level-selector {
        gap: 5px;
    }

    .level-option {
        justify-content: center;
        padding: 9px 5px;
    }

    .level-option-mark,
    .level-option-copy small {
        display: none;
    }

    .level-option-copy {
        text-align: center;
    }

    .level-option-copy strong {
        font-size: 0.64rem;
    }

    nav {
        width: 100%;
    }

    .account-button {
        min-width: 0;
        max-width: 108px;
        padding: 7px;
        font-size: 0.68rem;
    }

    #account-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .account-button > span:last-child {
        display: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .button-bright {
        box-shadow: 0 8px 24px rgb(211 243 107 / 15%);
    }

    .hero-visual img {
        animation-duration: 5s;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }

    .code-backdrop {
        display: none;
    }
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    max-width: 570px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.hero-highlights li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: 13px;
    background: linear-gradient(145deg, rgb(255 255 255 / 4%), rgb(255 255 255 / 1%));
    box-shadow: inset 0 1px rgb(255 255 255 / 3%);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.hero-highlights li:hover {
    transform: translateY(-3px);
    border-color: rgb(155 134 255 / 32%);
    background: linear-gradient(145deg, rgb(155 134 255 / 9%), rgb(255 255 255 / 2%));
}

.hero-highlight-icon {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgb(211 243 107 / 17%);
    border-radius: 10px;
    background: rgb(211 243 107 / 7%);
    color: var(--lime);
    font: 0.76rem 'DM Mono', monospace;
}

.hero-highlights li > span:last-child {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.hero-highlights strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-highlights small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body {
    background-color: var(--background);
}

.code-backdrop-line {
    color: #b7d4e8;
}

.code-tone-1 {
    color: var(--lime);
}

.code-tone-2 {
    color: #a99dff;
}

.site-header {
    border-color: rgb(186 205 235 / 11%);
}

.hero-visual {
    border-color: rgb(139 124 255 / 22%);
    background:
        radial-gradient(ellipse at 50% 55%, rgb(139 124 255 / 30%), transparent 55%),
        radial-gradient(ellipse at 80% 15%, rgb(82 224 196 / 12%), transparent 45%),
        linear-gradient(140deg, #1c2b43, #132033);
    box-shadow: 0 26px 70px rgb(4 10 23 / 38%), inset 0 1px rgb(255 255 255 / 6%);
}

.visual-code {
    border-color: rgb(139 124 255 / 24%);
    background: rgb(14 24 39 / 94%);
}

.progress-strip {
    border-color: rgb(82 224 196 / 18%);
    background: linear-gradient(115deg, rgb(25 42 59 / 98%), rgb(23 34 53 / 98%));
}

.daily-quiz-card,
.lesson-panel,
.project-workbench {
    border-color: rgb(139 124 255 / 20%);
    background: linear-gradient(135deg, rgb(27 40 61 / 98%), rgb(22 34 52 / 98%));
}

.daily-quiz-aside {
    background:
        radial-gradient(ellipse at 85% 15%, rgb(82 224 196 / 10%), transparent 58%),
        linear-gradient(155deg, rgb(139 124 255 / 12%), rgb(139 124 255 / 4%));
}

.lesson-card,
.glossary-card {
    border-color: rgb(186 205 235 / 11%);
    background: linear-gradient(140deg, rgb(29 44 66 / 97%), rgb(23 36 55 / 98%));
}

.lesson-card:hover,
.lesson-card[aria-current="step"],
.glossary-card:hover {
    border-color: rgb(139 124 255 / 68%);
    background: linear-gradient(140deg, rgb(45 52 86 / 98%), rgb(27 43 63 / 98%));
    box-shadow: 0 8px 24px rgb(4 10 23 / 30%), 0 0 24px rgb(139 124 255 / 10%);
}

.lesson-number {
    background: #263752;
    color: #c4d8ee;
}

.practice-challenge {
    border-color: rgb(82 224 196 / 25%);
    background: linear-gradient(120deg, rgb(82 224 196 / 9%), rgb(82 224 196 / 3%));
}

.project-editor,
#code-editor {
    border-color: rgb(139 124 255 / 22%);
    background: linear-gradient(145deg, #111d30, #0e192a);
}

.hero-highlight-icon,
.progress-icon {
    box-shadow: 0 0 22px rgb(82 224 196 / 10%);
}

.site-footer {
    border-color: rgb(186 205 235 / 11%);
}

@media (max-width: 640px) {
    .hero-highlights {
        gap: 7px;
        margin-top: 20px;
    }

    .hero-highlights li {
        gap: 6px;
        padding: 8px 7px;
    }

    .hero-highlight-icon {
        flex-basis: 27px;
        width: 27px;
        height: 27px;
    }

    .hero-highlights strong {
        font-size: 0.63rem;
    }

    .hero-highlights small {
        display: none;
    }
}

@media (max-width: 360px) {
    .hero-highlights {
        grid-template-columns: 1fr;
    }

    .hero-highlights li {
        flex-direction: row;
        align-items: center;
    }
}
