html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: auto;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    min-width: 0;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
}

.site-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 30;
}

.site-nav {
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) auto minmax(8rem, 1fr);
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    padding: 1.2rem clamp(1.25rem, 3vw, 3rem);
}

.site-logo {
    justify-self: start;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1.25rem, 2vw, 2.2rem);
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.desktop-nav a {
    position: relative;
    color: inherit;
    padding: 0.45rem 0;
    transition: color 160ms ease;
}

.desktop-nav a::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    content: "";
    background: #35d7e8;
    opacity: 0;
    transform: scaleX(0.5);
    transform-origin: center;
    transition: opacity 160ms ease, transform 160ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: #ffffff;
}

.desktop-nav a:hover::after,
.desktop-nav a.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.desktop-sign-in {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.desktop-sign-in-form {
    justify-self: end;
    margin: 0;
}

.desktop-sign-in-form .desktop-sign-in,
.mobile-menu form .mobile-sign-in {
    font-family: inherit;
    cursor: pointer;
}

.desktop-sign-in:hover {
    color: #35d7e8;
    background: rgba(0, 0, 0, 0.48);
    border-color: rgba(53, 215, 232, 0.62);
}

.menu-button {
    display: none;
    justify-self: end;
    width: 2.75rem;
    height: 2.75rem;
    color: white;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.menu-lines {
    display: grid;
    gap: 0.35rem;
    width: 1.25rem;
}

.menu-lines span {
    display: block;
    height: 2px;
    background: currentColor;
}

.mobile-menu {
    margin: 0 clamp(1.25rem, 4vw, 2rem);
    padding: 1rem;
    background: rgba(3, 8, 11, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.mobile-menu nav {
    display: grid;
    gap: 0.85rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mobile-menu a {
    color: rgba(255, 255, 255, 0.82);
}

.mobile-menu a:hover,
.mobile-menu a.is-active {
    color: #35d7e8;
}

.mobile-sign-in {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    margin-top: 0.35rem;
    color: #071015 !important;
    background: #35d7e8;
}

.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background-color: #071015;
    background-repeat: no-repeat;
    background-position: center right;
    background-size: cover;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: center right;
    background-size: cover;
    opacity: 0.55;
    filter: blur(24px);
    transform: scale(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(3, 7, 10, 0.98) 0%, rgba(3, 7, 10, 0.92) 24%, rgba(3, 7, 10, 0.58) 52%, rgba(3, 7, 10, 0.28) 75%, rgba(3, 7, 10, 0.66) 100%),
        radial-gradient(circle at 75% 36%, rgba(184, 111, 37, 0.2), transparent 32%);
}

.hero-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(circle at 70% 50%, transparent 0, rgba(0, 0, 0, 0.18) 38%, rgba(0, 0, 0, 0.78) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent 28%);
}

.hero-inner {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: clamp(7rem, 13vh, 10rem) clamp(1.25rem, 5vw, 6rem) 2rem;
}

.hero-content {
    display: flex;
    flex: 1;
    align-items: center;
}

.hero-copy {
    flex: 0 1 50rem;
    width: min(100%, 50rem);
}

.hero-label {
    margin: 0 0 1.15rem;
    color: #35d7e8;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(53, 215, 232, 0.28);
}

.hero h1 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(4.5rem, 7vw, 8.2rem);
    line-height: 0.9;
    text-transform: uppercase;
    text-shadow: 0 5px 34px rgba(0, 0, 0, 0.65);
}

.hero-subtitle {
    margin: 1.1rem 0 0;
    color: rgba(255, 255, 255, 0.94);
    font-family: Georgia, Cambria, serif;
    font-size: clamp(2rem, 3vw, 3.45rem);
    line-height: 1.05;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.62);
}

.hero-description {
    max-width: 43rem;
    margin: 1.8rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.7;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.78);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 11rem;
    min-height: 3rem;
    padding: 0 1.35rem;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 160ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #061016;
    background: #35d7e8;
    box-shadow: 0 0 24px rgba(53, 215, 232, 0.23), 0 16px 34px rgba(0, 0, 0, 0.34);
}

.button-primary:hover {
    background: #ffffff;
    box-shadow: 0 0 34px rgba(53, 215, 232, 0.38), 0 18px 36px rgba(0, 0, 0, 0.42);
}

.button-secondary {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(8px);
}

.button-secondary:hover {
    color: #35d7e8;
    border-color: rgba(53, 215, 232, 0.72);
    background: rgba(0, 0, 0, 0.38);
}

.hero-notes {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.forgetting-curve-card {
    position: relative;
    width: 100%;
    padding: 0;
    opacity: 0.72;
    pointer-events: none;
    transition: opacity 180ms ease, filter 180ms ease;
}

.learning-feature-card:hover .forgetting-curve-card {
    opacity: 0.96;
    filter: saturate(1.16) brightness(1.08);
}

.forgetting-curve-graph {
    display: block;
    width: 100%;
    overflow: hidden;
}

.forgetting-curve-grid line {
    stroke: rgba(53, 215, 232, 0.26);
    stroke-width: 1;
    transition: stroke 180ms ease, stroke-width 180ms ease;
}

.forgetting-curve-grid .axis-line {
    stroke: rgba(53, 215, 232, 0.72);
    stroke-width: 4;
}

.forgetting-curve-heading {
    fill: rgba(255, 255, 255, 0.7);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-anchor: middle;
    text-transform: uppercase;
    transition: fill 180ms ease;
}

.forgetting-curve-labels text,
.revision-marker text {
    fill: rgba(255, 255, 255, 0.62);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 19px;
    font-weight: 700;
    transition: fill 180ms ease;
}

.forgetting-curve-labels .day-label {
    text-anchor: middle;
}

.forgetting-curve-labels .retention-label {
    text-anchor: middle;
}

.forgetting-curve {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.forgetting-curve-original {
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 3;
    stroke-dasharray: 8 9;
    transition: stroke 180ms ease;
}

.forgetting-curve-trace {
    filter: url(#curveGlow);
    stroke: #9be51a;
    stroke-width: 5.5;
    stroke-dasharray: 360;
    stroke-dashoffset: 360;
    animation: drawRevisionCurve 7s ease-in-out infinite;
}

.forgetting-curve-trace-two {
    animation-delay: 0.5s;
}

.forgetting-curve-trace-three {
    animation-delay: 1s;
}

.forgetting-curve-trace-four {
    animation-delay: 1.5s;
}

.revision-marker line {
    stroke: rgba(155, 229, 26, 0.58);
    stroke-width: 2.5;
    stroke-dasharray: 10 8;
    transition: stroke 180ms ease, stroke-width 180ms ease;
}

.revision-marker circle {
    fill: rgba(53, 215, 232, 0.9);
    stroke: rgba(255, 255, 255, 0.62);
    stroke-width: 2;
    animation: revisionPulse 2.6s ease-in-out infinite;
    transition: fill 180ms ease, stroke 180ms ease;
}

.learning-feature-card:hover .forgetting-curve-grid line {
    stroke: rgba(53, 215, 232, 0.42);
}

.learning-feature-card:hover .forgetting-curve-grid .axis-line {
    stroke: rgba(53, 215, 232, 0.95);
    stroke-width: 4.5;
}

.learning-feature-card:hover .forgetting-curve-heading,
.learning-feature-card:hover .forgetting-curve-labels text,
.learning-feature-card:hover .revision-marker text {
    fill: rgba(255, 255, 255, 0.96);
}

.learning-feature-card:hover .forgetting-curve-original {
    stroke: rgba(255, 255, 255, 0.36);
}

.learning-feature-card:hover .revision-marker line {
    stroke: rgba(155, 229, 26, 0.92);
    stroke-width: 3.25;
}

.learning-feature-card:hover .revision-marker circle {
    fill: #35d7e8;
    stroke: rgba(255, 255, 255, 0.96);
}

.revision-marker-one circle {
    animation-delay: 1.2s;
}

.revision-marker-two circle {
    animation-delay: 2.7s;
}

.revision-marker-three circle {
    animation-delay: 4.1s;
}

@keyframes drawRevisionCurve {
    0% {
        stroke-dashoffset: 360;
        opacity: 0.18;
    }

    18%,
    78% {
        stroke-dashoffset: 0;
        opacity: 0.96;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0.32;
    }
}

@keyframes revisionPulse {
    0%,
    100% {
        r: 7;
        opacity: 0.65;
    }

    50% {
        r: 12;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .forgetting-curve-revision,
    .forgetting-curve-trace,
    .revision-marker circle {
        animation: none;
    }

    .forgetting-curve-revision,
    .forgetting-curve-trace {
        stroke-dashoffset: 0;
    }
}

.learning-design-section {
    position: relative;
    padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.25rem, 5vw, 6rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(53, 215, 232, 0.1), transparent 28%),
        radial-gradient(circle at 86% 22%, rgba(216, 138, 45, 0.13), transparent 34%),
        linear-gradient(180deg, #050b0e 0%, #071015 48%, #05090c 100%);
    border-top: 1px solid rgba(53, 215, 232, 0.18);
}

.learning-design-inner {
    width: min(100%, 92rem);
    margin: 0 auto;
}

.section-heading {
    max-width: 58rem;
    margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.section-heading .eyebrow,
.feature-number {
    margin: 0 0 0.65rem;
    color: #35d7e8;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(2.5rem, 5vw, 5.6rem);
    line-height: 0.95;
}

.section-heading p:not(.eyebrow) {
    max-width: 48rem;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(1rem, 1.2vw, 1.18rem);
    line-height: 1.65;
}

.learning-feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(16rem, 0.8fr));
    gap: 1rem;
    align-items: stretch;
}

.learning-feature-card {
    position: relative;
    min-height: 19rem;
    padding: clamp(1.1rem, 2vw, 1.6rem);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(5, 17, 22, 0.94), rgba(5, 9, 12, 0.98)),
        radial-gradient(circle at 88% 10%, rgba(216, 138, 45, 0.14), transparent 34%);
    border: 1px solid rgba(53, 215, 232, 0.22);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.learning-feature-card:hover {
    border-color: rgba(53, 215, 232, 0.42);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34), 0 0 28px rgba(53, 215, 232, 0.08);
    transform: translateY(-2px);
}

.learning-feature-card-wide {
    display: grid;
    grid-template-columns: minmax(13rem, 0.75fr) minmax(18rem, 1.25fr);
    gap: clamp(1rem, 2.4vw, 2rem);
    align-items: center;
}

.learning-feature-card h3 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.65rem, 2.6vw, 2.6rem);
    line-height: 1;
}

.learning-feature-card p:not(.feature-number) {
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    line-height: 1.6;
}

.learning-feature-card:not(.learning-feature-card-wide)::after {
    content: "";
    position: absolute;
    right: -3rem;
    bottom: -3rem;
    width: 9rem;
    height: 9rem;
    border: 1px solid rgba(216, 138, 45, 0.22);
    border-radius: 50%;
    box-shadow: inset 0 0 36px rgba(216, 138, 45, 0.08);
}

.learning-feature-card .forgetting-curve-card {
    align-self: center;
}

.learning-feature-card .forgetting-curve-graph {
    max-height: 19rem;
}

.learning-feature-card .forgetting-curve-heading {
    font-size: 22px;
}

.learning-feature-card .forgetting-curve-labels text,
.learning-feature-card .revision-marker text {
    font-size: 17px;
}

.site-footer {
    padding: 1.05rem clamp(1.25rem, 3vw, 3rem);
    background: linear-gradient(90deg, rgba(5, 10, 13, 0.94), rgba(7, 16, 21, 0.88), rgba(5, 10, 13, 0.94));
    border-top: 1px solid rgba(53, 215, 232, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    color: rgba(255, 255, 255, 0.62);
}

.site-footer-title {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 1rem;
    line-height: 1.1;
}

.site-footer-copy {
    max-width: 38rem;
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.88rem;
    line-height: 1.35;
}

.site-footer-beta {
    width: fit-content;
    max-width: 38rem;
    margin: 0.45rem 0 0;
    padding: 0.35rem 0.55rem;
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.08);
    border: 1px solid rgba(216, 138, 45, 0.24);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.site-footer-disclaimer {
    max-width: none;
    width: 100%;
    margin-top: 0.85rem;
}

.site-footer-disclaimer a {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

.site-footer-disclaimer a:hover {
    color: #35d7e8;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    justify-content: flex-end;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer-links a {
    color: rgba(255, 255, 255, 0.58);
}

.site-footer-links a:hover {
    color: #35d7e8;
}

.message-stack {
    position: fixed;
    top: 5.5rem;
    right: clamp(1.25rem, 3vw, 3rem);
    z-index: 50;
    display: grid;
    gap: 0.75rem;
    width: min(22rem, calc(100vw - 2.5rem));
    max-width: calc(100vw - 2.5rem);
}

.site-message {
    padding: 0.85rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(4, 12, 16, 0.92);
    border: 1px solid rgba(53, 215, 232, 0.28);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
    font-size: 0.9rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms ease, transform 500ms ease;
}

.site-message.is-fading-out,
.cq-message.is-fading-out {
    opacity: 0;
    transform: translateY(-0.35rem);
    pointer-events: none;
}

.account-page,
.dashboard-page {
    min-height: 100vh;
    padding: 7.5rem clamp(1.25rem, 4vw, 4rem) 3rem;
    background:
        linear-gradient(90deg, rgba(3, 7, 10, 0.98), rgba(3, 7, 10, 0.9)),
        radial-gradient(circle at 72% 20%, rgba(184, 111, 37, 0.22), transparent 28%),
        #071015;
}

.dashboard-page {
    position: relative;
    background:
        radial-gradient(circle at 18% 16%, rgba(53, 215, 232, 0.14), transparent 26%),
        radial-gradient(circle at 84% 12%, rgba(184, 111, 37, 0.18), transparent 30%),
        radial-gradient(circle at 50% 92%, rgba(53, 215, 232, 0.06), transparent 28%),
        linear-gradient(135deg, #04090c, #071015 48%, #030709);
}

.dashboard-page::before {
    position: absolute;
    inset: 5.75rem clamp(1.25rem, 4vw, 4rem) 2rem;
    pointer-events: none;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 0 90px rgba(53, 215, 232, 0.035);
}

.account-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 0.75fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    max-width: 72rem;
    min-height: 70vh;
    margin: 0 auto;
}

.account-panel-narrow {
    max-width: 58rem;
}

.account-copy {
    max-width: 38rem;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: #35d7e8;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-copy h1,
.dashboard-hero-card h1 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(2.8rem, 5vw, 5.5rem);
    line-height: 0.95;
}

.account-copy p,
.dashboard-hero-card p,
.dashboard-card p {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.65;
}

.account-form,
.dashboard-card,
.stat-card,
.dashboard-hero-card {
    background: linear-gradient(145deg, rgba(7, 17, 22, 0.88), rgba(3, 8, 11, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(14px);
}

.account-form {
    display: grid;
    gap: 1rem;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.account-form label {
    display: grid;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-form input {
    width: 100%;
    min-height: 2.9rem;
    padding: 0 0.9rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.16);
    outline: none;
}

.account-form input:focus {
    border-color: rgba(53, 215, 232, 0.7);
    box-shadow: 0 0 0 3px rgba(53, 215, 232, 0.12);
}

.account-form small,
.errorlist {
    margin: 0;
    padding: 0;
    color: #ffb4a8;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    list-style: none;
    text-transform: none;
}

.form-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.9rem;
}

.form-note a {
    color: #35d7e8;
    font-weight: 800;
}

.login-page {
    position: relative;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 18% 28%, rgba(53, 215, 232, 0.12), transparent 26%),
        radial-gradient(circle at 78% 32%, rgba(184, 111, 37, 0.2), transparent 30%),
        linear-gradient(115deg, rgba(3, 7, 10, 0.98), rgba(3, 9, 12, 0.94) 54%, rgba(4, 11, 14, 0.98)),
        #071015;
}

.login-page::before {
    position: absolute;
    inset: 5.5rem clamp(1.25rem, 4vw, 4rem) 2rem;
    pointer-events: none;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 80px rgba(53, 215, 232, 0.035);
}

.login-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 68rem);
    grid-template-columns: minmax(0, 1fr) minmax(25rem, 27rem);
    gap: clamp(2.25rem, 7vw, 6rem);
}

.login-panel .account-copy {
    max-width: 34rem;
}

.login-panel .account-copy h1 {
    font-size: clamp(3.3rem, 6vw, 6.25rem);
}

.login-panel .account-copy p:not(.eyebrow) {
    max-width: 31rem;
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
}

.login-form {
    width: min(100%, 27rem);
    justify-self: end;
    gap: 1.15rem;
    padding: clamp(1.75rem, 3vw, 2.35rem);
    background:
        linear-gradient(145deg, rgba(8, 20, 26, 0.92), rgba(3, 8, 11, 0.84)),
        rgba(3, 8, 11, 0.86);
    border-color: rgba(53, 215, 232, 0.24);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.025) inset,
        0 0 34px rgba(53, 215, 232, 0.08),
        0 28px 78px rgba(0, 0, 0, 0.48);
}

.login-form .button {
    width: 100%;
    margin-top: 0.35rem;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.forgot-link {
    color: rgba(53, 215, 232, 0.78);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.forgot-link:hover {
    color: #ffffff;
}

.login-form input {
    min-height: 3.15rem;
    color: rgba(255, 255, 255, 0.94);
    background: rgba(2, 6, 9, 0.68);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.login-form input:focus {
    border-color: rgba(53, 215, 232, 0.78);
    box-shadow:
        0 0 0 3px rgba(53, 215, 232, 0.14),
        0 0 24px rgba(53, 215, 232, 0.08);
}

.form-alert {
    padding: 0.85rem 0.95rem;
    color: #ffd3cc;
    background: rgba(42, 9, 9, 0.42);
    border: 1px solid rgba(255, 110, 96, 0.32);
    font-size: 0.9rem;
    line-height: 1.45;
}

.login-note {
    display: grid;
    gap: 0.25rem;
    justify-items: center;
    margin-top: 0.1rem;
    text-align: center;
}

.login-note a {
    color: #ffffff;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-note a:hover {
    color: #35d7e8;
}

.register-page {
    position: relative;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 16% 28%, rgba(53, 215, 232, 0.1), transparent 26%),
        radial-gradient(circle at 82% 18%, rgba(184, 111, 37, 0.18), transparent 28%),
        linear-gradient(115deg, rgba(3, 7, 10, 0.98), rgba(4, 11, 14, 0.94) 58%, rgba(3, 7, 10, 0.98)),
        #071015;
}

.register-page::before {
    position: absolute;
    inset: 5.5rem clamp(1.25rem, 4vw, 4rem) 2rem;
    pointer-events: none;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 0 80px rgba(184, 111, 37, 0.04);
}

.register-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 72rem);
    grid-template-columns: minmax(0, 1fr) minmax(25rem, 27.5rem);
    gap: clamp(2.25rem, 6vw, 5.5rem);
}

.register-panel .account-copy {
    max-width: 37rem;
}

.register-panel .account-copy h1 {
    font-size: clamp(3rem, 5.5vw, 5.8rem);
}

.register-panel .account-copy p:not(.eyebrow) {
    max-width: 35rem;
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: clamp(1rem, 1.25vw, 1.18rem);
}

.benefit-list {
    display: grid;
    gap: 0.75rem;
    max-width: 32rem;
    margin: 1.65rem 0 0;
    padding: 0;
    list-style: none;
}

.benefit-list li {
    position: relative;
    padding-left: 1.4rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.45;
}

.benefit-list li::before {
    position: absolute;
    top: 0.62rem;
    left: 0;
    width: 0.45rem;
    height: 0.45rem;
    content: "";
    background: #35d7e8;
    box-shadow: 0 0 16px rgba(53, 215, 232, 0.38);
}

.register-form {
    width: min(100%, 27.5rem);
    justify-self: end;
    gap: 1rem;
    padding: clamp(1.65rem, 2.8vw, 2.25rem);
    background:
        linear-gradient(145deg, rgba(8, 20, 26, 0.92), rgba(3, 8, 11, 0.84)),
        rgba(3, 8, 11, 0.86);
    border-color: rgba(53, 215, 232, 0.22);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.025) inset,
        0 0 32px rgba(53, 215, 232, 0.075),
        0 28px 78px rgba(0, 0, 0, 0.48);
}

.register-form .button {
    width: 100%;
    margin-top: 0.25rem;
}

.role-choice-field {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 0.25rem;
    padding: 0;
    border: 0;
}

.role-choice-field legend {
    padding: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.role-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.account-form .role-choice-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: flex-start;
    min-height: 100%;
    padding: 0.9rem;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(2, 6, 9, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.13);
    cursor: pointer;
    letter-spacing: 0;
    text-transform: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.account-form .role-choice-card:hover {
    border-color: rgba(53, 215, 232, 0.36);
    transform: translateY(-1px);
}

.role-choice-card input {
    width: 1rem;
    min-height: 1rem;
    height: 1rem;
    margin-top: 0.15rem;
    accent-color: #35d7e8;
}

.role-choice-card:has(input:checked) {
    border-color: rgba(53, 215, 232, 0.76);
    box-shadow: 0 0 0 3px rgba(53, 215, 232, 0.1), 0 0 28px rgba(53, 215, 232, 0.08);
}

.role-choice-card strong {
    display: block;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.role-choice-card em {
    display: block;
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1.45;
}

.register-form input {
    min-height: 3rem;
    color: rgba(255, 255, 255, 0.94);
    background: rgba(2, 6, 9, 0.68);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.register-form input:focus {
    border-color: rgba(53, 215, 232, 0.78);
    box-shadow:
        0 0 0 3px rgba(53, 215, 232, 0.14),
        0 0 24px rgba(53, 215, 232, 0.08);
}

.register-form .role-choice-card input {
    width: 1rem;
    min-height: 1rem;
    height: 1rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.register-form em {
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.4;
    text-transform: none;
}

.dashboard-shell {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.15rem;
    max-width: 86rem;
    margin: 0 auto;
}

.dashboard-hero-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.35rem, 3vw, 2.15rem);
    border-color: rgba(53, 215, 232, 0.2);
}

.dashboard-hero-card::after {
    position: absolute;
    right: -4rem;
    bottom: -5rem;
    width: 18rem;
    height: 18rem;
    content: "";
    background: radial-gradient(circle, rgba(184, 111, 37, 0.22), transparent 65%);
    pointer-events: none;
}

.dashboard-hero-card h1 {
    font-size: clamp(2.4rem, 4.2vw, 4.5rem);
}

.dashboard-hero-card p {
    margin: 0.85rem 0 0;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.35rem, 2vw, 2rem);
    color: rgba(255, 255, 255, 0.86);
}

.player-profile {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 1.65rem);
}

.player-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}

.player-avatar {
    display: grid;
    flex: 0 0 auto;
    width: clamp(4.25rem, 8vw, 6.25rem);
    height: clamp(4.25rem, 8vw, 6.25rem);
    place-items: center;
    color: #071015;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), transparent 18%),
        linear-gradient(145deg, #35d7e8, #b86f25);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    box-shadow: 0 0 32px rgba(53, 215, 232, 0.22), 0 16px 42px rgba(0, 0, 0, 0.42);
    font-family: Georgia, Cambria, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    text-transform: uppercase;
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-avatar span {
    display: block;
    line-height: 1;
}

.avatar-edit-button {
    position: absolute;
    right: -0.15rem;
    bottom: -0.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    color: #071015;
    background: #35d7e8;
    border: 2px solid #071015;
    border-radius: 999px;
    box-shadow: 0 0 18px rgba(53, 215, 232, 0.35), 0 8px 18px rgba(0, 0, 0, 0.36);
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.avatar-edit-button:hover {
    background: #ffffff;
    box-shadow: 0 0 24px rgba(53, 215, 232, 0.45), 0 10px 22px rgba(0, 0, 0, 0.42);
    transform: translateY(-1px);
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.profile-badges span,
.role-badge {
    padding: 0.5rem 0.7rem;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(53, 215, 232, 0.2);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card,
.dashboard-card {
    padding: 1.2rem;
}

.stat-card,
.dashboard-card {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.stat-card:hover,
.dashboard-card:hover {
    border-color: rgba(53, 215, 232, 0.34);
    box-shadow: 0 0 28px rgba(53, 215, 232, 0.08), 0 24px 70px rgba(0, 0, 0, 0.42);
    transform: translateY(-2px);
}

.stat-icon {
    display: grid;
    width: 4rem;
    height: 4rem;
    margin-bottom: 0.75rem;
    place-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.stat-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(53, 215, 232, 0.24));
}

.stat-card span {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 0.55rem;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 2.25rem;
}

.card-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-card h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 1.6rem;
}

.card-heading > span {
    color: #35d7e8;
    font-weight: 900;
}

.level-row {
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.progress-track {
    height: 0.85rem;
    margin: 0.6rem 0 0.8rem;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.4);
}

.progress-fill {
    height: 100%;
    min-width: 0.35rem;
    background: linear-gradient(90deg, #35d7e8, #71f3ff, #b86f25);
    box-shadow: 0 0 24px rgba(53, 215, 232, 0.36);
}

.motivational-line {
    margin-top: 0.15rem;
    color: rgba(53, 215, 232, 0.78) !important;
    font-weight: 800;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 2.6rem;
    margin-top: auto;
    padding: 0 1rem;
    color: #071015;
    background: #35d7e8;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-action.is-disabled {
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: not-allowed;
}

.mission-card {
    border-color: rgba(184, 111, 37, 0.24);
}

.badge-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.3rem;
}

.badge-row span {
    display: grid;
    min-height: 4.5rem;
    place-items: center;
    padding: 0.6rem;
    color: rgba(255, 255, 255, 0.62);
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.11);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
}

.badge-row span::before {
    display: block;
    margin-bottom: 0.35rem;
    color: rgba(53, 215, 232, 0.68);
    content: "LOCKED";
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

.achievement-list {
    display: grid;
    gap: 0.65rem;
}

.achievement-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.achievement-item > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.3rem;
    min-height: 1.55rem;
    padding: 0 0.5rem;
    color: rgba(255, 255, 255, 0.56);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.achievement-item.is-unlocked {
    background: rgba(53, 215, 232, 0.055);
    border-color: rgba(53, 215, 232, 0.24);
}

.achievement-item.is-unlocked > span {
    color: #071015;
    background: #35d7e8;
    border-color: #35d7e8;
    box-shadow: 0 0 18px rgba(53, 215, 232, 0.18);
}

.achievement-item strong {
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 900;
}

.achievement-item p {
    margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.84rem;
    line-height: 1.45;
}

.achievement-item em {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.45rem;
    padding: 0.3rem 0.45rem;
    color: #e3bd7d;
    background: rgba(184, 111, 37, 0.08);
    border: 1px solid rgba(184, 111, 37, 0.2);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.achievement-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.achievement-stat-card,
.achievement-collection-card {
    background: linear-gradient(145deg, rgba(7, 17, 22, 0.9), rgba(3, 8, 11, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(14px);
}

.achievement-stat-card {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
}

.achievement-stat-card span {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.achievement-stat-card strong {
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.1;
}

.achievement-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.achievement-filter-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0 0.8rem;
    color: rgba(255, 255, 255, 0.64);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.achievement-filter-tabs a:hover,
.achievement-filter-tabs a.is-active {
    color: #071015;
    background: #35d7e8;
    border-color: #35d7e8;
}

.achievement-empty-state {
    border-color: rgba(184, 111, 37, 0.24);
}

.achievement-category-section {
    display: grid;
    gap: 1rem;
}

.achievement-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.achievement-collection-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.achievement-collection-card:hover {
    transform: translateY(-2px);
}

.achievement-collection-card.is-unlocked {
    border-color: rgba(53, 215, 232, 0.28);
    box-shadow: 0 0 30px rgba(53, 215, 232, 0.08), 0 24px 70px rgba(0, 0, 0, 0.38);
}

.achievement-collection-card.is-locked {
    opacity: 0.88;
}

.achievement-card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.achievement-icon {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0 0.55rem;
    color: #e3bd7d;
    background: rgba(184, 111, 37, 0.08);
    border: 1px solid rgba(184, 111, 37, 0.2);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.is-unlocked .achievement-icon {
    color: #071015;
    background: #35d7e8;
    border-color: #35d7e8;
    box-shadow: 0 0 18px rgba(53, 215, 232, 0.22);
}

.achievement-collection-card h3 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 1.35rem;
}

.achievement-collection-card p {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.55;
}

.achievement-progress-text {
    width: fit-content;
    padding: 0.45rem 0.6rem;
    color: #e3bd7d !important;
    background: rgba(184, 111, 37, 0.08);
    border: 1px solid rgba(184, 111, 37, 0.2);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.is-unlocked .achievement-progress-text {
    color: #8df7c8 !important;
    background: rgba(53, 215, 232, 0.08);
    border-color: rgba(53, 215, 232, 0.24);
}

.quiz-page .lesson-shell {
    gap: 2rem;
}

.quiz-hero {
    display: grid;
    gap: 0;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.4rem) clamp(2rem, 3.5vw, 2.8rem);
}

.quiz-hero-eyebrow {
    margin-bottom: 0.75rem;
}

.quiz-hero-title {
    max-width: 58rem;
    font-size: clamp(2.15rem, 4vw, 3.9rem) !important;
    line-height: 1.02 !important;
}

.quiz-hero-subtitle {
    max-width: 48rem;
    margin: 1rem 0 0;
}

.quiz-hero-meta {
    margin-top: 1.5rem !important;
    gap: 0.75rem;
}

.quiz-hero-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.45rem 0.75rem;
    color: rgba(255, 255, 255, 0.76);
    background: rgba(53, 215, 232, 0.055);
    border: 1px solid rgba(53, 215, 232, 0.18);
}

.quiz-form,
.quiz-results-list {
    display: grid;
    gap: 1.5rem;
}

.quiz-question-section {
    margin-top: 0.5rem;
}

.quiz-question-card {
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 2vw, 1.5rem);
    background: linear-gradient(145deg, rgba(7, 17, 22, 0.9), rgba(3, 8, 11, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.quiz-question-card.is-correct {
    border-color: rgba(53, 215, 232, 0.3);
}

.quiz-question-card.is-review {
    border-color: rgba(184, 111, 37, 0.22);
}

.quiz-question-card h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.quiz-options {
    display: grid;
    gap: 0.7rem;
}

.quiz-options label {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.quiz-options label:hover {
    border-color: rgba(53, 215, 232, 0.28);
}

.quiz-answer-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.9rem;
    color: rgba(255, 255, 255, 0.92);
    background: #020608;
    border: 1px solid rgba(53, 215, 232, 0.22);
    outline: none;
    resize: vertical;
}

.quiz-answer-input:focus {
    border-color: rgba(53, 215, 232, 0.68);
    box-shadow: 0 0 0 3px rgba(53, 215, 232, 0.1);
}

.quiz-code-block {
    max-width: 100%;
    margin: 0;
    overflow: auto;
    padding: 0.9rem;
    color: #8df7c8;
    background: #010405;
    border: 1px solid rgba(53, 215, 232, 0.18);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.quiz-programming-workspace {
    position: relative;
    display: grid;
    gap: 1rem;
    padding-top: 0.25rem;
}

.challenge-objective-panel {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(12, 18, 18, 0.92), rgba(5, 12, 15, 0.86));
    border: 1px solid rgba(184, 111, 37, 0.28);
    box-shadow: 0 0 30px rgba(184, 111, 37, 0.08);
}

.challenge-guidance-block,
.challenge-hint-panel {
    display: grid;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.challenge-guidance-block.is-task {
    background: rgba(184, 111, 37, 0.055);
    border-color: rgba(184, 111, 37, 0.24);
}

.challenge-guidance-block.success-checks {
    background: rgba(53, 215, 232, 0.04);
    border-color: rgba(53, 215, 232, 0.18);
}

.challenge-guidance-block p,
.challenge-hint-panel span {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.55;
}

.challenge-section-list {
    display: grid;
    gap: 0.75rem;
}

.challenge-section {
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem 0.95rem;
    background: rgba(1, 10, 14, 0.42);
    border: 1px solid rgba(184, 111, 37, 0.18);
}

.challenge-section h3 {
    margin: 0;
    color: #ffd28a;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.challenge-section ul {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding-left: 1.1rem;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.55;
}

.challenge-hint-panel {
    background: rgba(53, 215, 232, 0.035);
    border-color: rgba(53, 215, 232, 0.16);
}

@media (max-width: 720px) {
    .quiz-page .lesson-shell {
        gap: 1.5rem;
    }

    .quiz-hero {
        padding: 1.5rem 1rem 2rem;
    }

    .quiz-hero-meta {
        gap: 0.5rem;
    }

    .quiz-hero-meta span {
        width: 100%;
        justify-content: center;
    }
}

.avatar-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.avatar-modal[hidden] {
    display: none;
}

.teacher-page .dashboard-shell {
    gap: 1.5rem;
}

.teacher-hero-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.teacher-create-class-btn {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.teacher-hero-card h1 {
    max-width: 48rem;
}

.teacher-class-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.teacher-analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.teacher-class-card,
.teacher-form-card,
.teacher-table-card,
.student-class-card,
.learning-mode-card {
    border-color: rgba(53, 215, 232, 0.16);
}

.teacher-metric-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(7, 17, 22, 0.88), rgba(3, 8, 11, 0.78));
    border: 1px solid rgba(53, 215, 232, 0.16);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.teacher-metric-card span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-metric-card strong {
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1;
}

.teacher-code-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2rem;
    max-width: 100%;
    padding: 0.6rem 0.85rem;
    color: #001014 !important;
    background: #35d7e8;
    border: 1px solid #35d7e8;
    box-shadow: 0 0 22px rgba(53, 215, 232, 0.2);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    overflow-wrap: anywhere;
}

.class-join-code {
    flex: 0 1 auto;
}

.class-join-helper {
    margin: -0.35rem 0 0 !important;
    color: rgba(255, 255, 255, 0.56) !important;
    font-size: 0.86rem;
    line-height: 1.45 !important;
}

.teacher-code-badge.is-muted {
    color: rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.teacher-stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.teacher-stat-row div {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem;
    background: rgba(53, 215, 232, 0.04);
    border: 1px solid rgba(53, 215, 232, 0.14);
}

.teacher-stat-row span,
.teacher-table-row small,
.student-class-list span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.teacher-stat-row strong {
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 1.85rem;
}

.teacher-form-shell {
    max-width: 48rem;
}

.teacher-form-card {
    display: grid;
    gap: 1rem;
}

.teacher-form-field {
    display: grid;
    gap: 0.45rem;
}

.teacher-form-field span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-form-field input,
.teacher-form-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.9rem 1rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(53, 215, 232, 0.2);
    outline: none;
}

.teacher-form-field input:focus,
.teacher-form-field select:focus {
    border-color: rgba(53, 215, 232, 0.72);
    box-shadow: 0 0 0 3px rgba(53, 215, 232, 0.1);
}

.teacher-form-field em {
    color: #ff9c8f;
    font-style: normal;
    font-size: 0.85rem;
}

.teacher-student-table {
    display: grid;
    gap: 0.5rem;
    overflow-x: auto;
}

.teacher-table-head,
.teacher-table-row {
    display: grid;
    grid-template-columns: minmax(12rem, 1.3fr) repeat(5, minmax(5rem, 0.5fr)) minmax(14rem, 1.2fr) minmax(7rem, 0.7fr) minmax(8rem, 0.7fr);
    gap: 0.75rem;
    min-width: 78rem;
    align-items: center;
    padding: 0.85rem 1rem;
}

.teacher-table-head > *,
.teacher-table-row > * {
    min-width: 0;
}

.teacher-lesson-head,
.teacher-lesson-row {
    grid-template-columns: minmax(5rem, 0.45fr) minmax(14rem, 1.3fr) minmax(14rem, 1.2fr) minmax(6rem, 0.55fr) minmax(8rem, 0.75fr) minmax(7rem, 0.65fr);
    min-width: 58rem;
}

.teacher-table-head {
    color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-table-row {
    color: rgba(255, 255, 255, 0.72);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.teacher-table-row strong,
.student-class-list strong {
    display: block;
    color: #ffffff;
}

.teacher-table-row a strong {
    color: #ffffff;
}

.teacher-table-row a:hover strong {
    color: #35d7e8;
}

.class-roster-table {
    overflow: visible;
}

.class-roster-table .teacher-table-head,
.class-roster-table .teacher-table-row {
    width: 100%;
    min-width: 0;
    grid-template-columns:
        minmax(10rem, 1.15fr)
        minmax(3rem, 0.3fr)
        minmax(3rem, 0.3fr)
        minmax(4rem, 0.38fr)
        minmax(4.4rem, 0.42fr)
        minmax(5.75rem, 0.55fr)
        minmax(15rem, 1.18fr)
        minmax(7.4rem, 0.56fr)
        minmax(8rem, 0.62fr);
    gap: clamp(0.45rem, 0.7vw, 0.75rem);
}

.class-roster-table .teacher-table-head {
    font-size: 0.66rem;
}

.class-roster-table .teacher-table-row > span {
    overflow-wrap: anywhere;
}

.class-roster-table .teacher-table-row > span:nth-child(n+2):nth-child(-n+6),
.class-roster-table .teacher-table-row > span:nth-child(8) {
    overflow-wrap: normal;
}

.class-roster-table .teacher-table-row > span:nth-child(7) {
    line-height: 1.35;
}

.class-roster-table .teacher-table-row .card-action {
    width: 100%;
    min-width: 0;
    padding-inline: 0.65rem;
}

.teacher-student-table.class-roster-table .teacher-table-head,
.teacher-student-table.class-roster-table .teacher-table-row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.teacher-topic-list,
.teacher-support-list {
    display: grid;
    gap: 0.75rem;
}

.teacher-topic-row,
.teacher-support-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.8fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.teacher-topic-row strong,
.teacher-support-row strong {
    display: block;
    color: #ffffff;
}

.teacher-topic-row span,
.teacher-support-row span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.86rem;
}

.teacher-topic-progress {
    display: grid;
    gap: 0.45rem;
}

.student-class-list {
    display: grid;
    gap: 0.75rem;
}

.student-class-list div {
    padding: 0.85rem;
    background: rgba(53, 215, 232, 0.04);
    border: 1px solid rgba(53, 215, 232, 0.14);
}

.assigned-work-list {
    display: grid;
    gap: 1rem;
}

.assigned-work-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(53, 215, 232, 0.18);
}

.assigned-work-card.is-overdue {
    border-color: rgba(255, 110, 96, 0.34);
    background: rgba(42, 9, 9, 0.22);
}

.assigned-work-card.is-complete {
    border-color: rgba(53, 215, 232, 0.3);
    background: rgba(53, 215, 232, 0.055);
}

.assigned-work-card h3 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 1.35rem;
}

.assigned-lesson-list {
    display: grid;
    gap: 0.55rem;
}

.assigned-lesson-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.assigned-lesson-list span {
    color: rgba(255, 255, 255, 0.76);
}

.assigned-lesson-list strong {
    color: #35d7e8;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.assigned-lesson-list a {
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.assignment-picker,
.lesson-groups {
    display: grid;
    gap: 1rem;
    max-height: none;
    overflow: visible;
    padding-right: 0.25rem;
}

.assignment-form-card,
.assignment-lesson-field,
.assignment-picker,
.assignment-lesson-picker,
.component-picker__body,
.topic-picker,
.specpoint-picker,
.lesson-option-list {
    min-height: 0;
}

.assignment-lesson-picker {
    max-height: none;
    overflow: visible;
    padding-right: 0.25rem;
    padding-bottom: 0;
    -webkit-overflow-scrolling: touch;
}

.assignment-form-card {
    overflow: visible;
}

.assignment-lesson-field {
    overflow: visible;
}

.assignment-actions {
    position: static;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(53, 215, 232, 0.16);
}

.lesson-group {
    overflow: hidden;
    background: rgba(3, 12, 18, 0.78);
    border: 1px solid rgba(53, 215, 232, 0.18);
}

.component-picker.is-selected,
.topic-picker.is-selected,
.specpoint-picker.is-selected {
    border-color: rgba(53, 215, 232, 0.42);
}

.component-picker.is-partial,
.topic-picker.is-partial,
.specpoint-picker.is-partial {
    border-color: rgba(227, 189, 125, 0.38);
}

.picker-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: stretch;
    background: rgba(6, 18, 24, 0.92);
}

.lesson-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.2rem;
    color: #eaf7fb;
    background: rgba(6, 18, 24, 0.92);
    border: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.component-picker__header .lesson-group__header {
    background: transparent;
}

.lesson-group__header:hover,
.lesson-group__header:focus {
    background: rgba(10, 24, 31, 0.96);
    outline: none;
}

.lesson-group__header:focus-visible {
    box-shadow: 0 0 0 3px rgba(53, 215, 232, 0.16) inset;
}

.lesson-group__header strong {
    display: block;
    color: #35d7e8;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lesson-group__toggle {
    display: inline-grid;
    flex: 0 0 auto;
    width: 1.9rem;
    height: 1.9rem;
    place-items: center;
    color: #071015;
    background: #35d7e8;
    font-weight: 900;
}

.lesson-group__body {
    display: grid;
    gap: 1rem;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid rgba(53, 215, 232, 0.12);
}

.assignment-lesson-picker .component-picker__body {
    max-height: 540px;
    max-height: min(58vh, 540px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.75rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-color: rgba(53, 215, 232, 0.45) rgba(255, 255, 255, 0.04);
    scrollbar-width: thin;
}

.assignment-lesson-picker .component-picker__body::-webkit-scrollbar {
    width: 10px;
}

.assignment-lesson-picker .component-picker__body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

.assignment-lesson-picker .component-picker__body::-webkit-scrollbar-thumb {
    background: rgba(53, 215, 232, 0.45);
}

.assignment-lesson-picker .component-picker__body::-webkit-scrollbar-thumb:hover {
    background: rgba(53, 215, 232, 0.75);
}

.lesson-group__body[hidden] {
    display: none;
}

.picker-actions,
.lesson-group__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem 1rem 0.75rem 0;
}

.picker-actions button,
.lesson-group__actions button {
    min-height: 2.25rem;
    padding: 0 0.7rem;
    color: #35d7e8;
    background: rgba(53, 215, 232, 0.08);
    border: 1px solid rgba(53, 215, 232, 0.22);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.topic-picker,
.specpoint-picker {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    background: rgba(1, 10, 14, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.topic-picker {
    border-color: rgba(53, 215, 232, 0.14);
}

.specpoint-picker {
    margin-left: clamp(0rem, 1.5vw, 1rem);
    background: rgba(255, 255, 255, 0.025);
}

.topic-picker__body {
    display: grid;
    gap: 0.75rem;
}

.topic-picker__body[hidden] {
    display: none;
}

.picker-subheader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.topic-toggle,
.specpoint-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.topic-toggle:hover strong,
.topic-toggle:focus strong,
.specpoint-toggle:hover strong,
.specpoint-toggle:focus strong {
    color: #35d7e8;
}

.topic-toggle:focus-visible,
.specpoint-toggle:focus-visible {
    outline: 2px solid rgba(53, 215, 232, 0.5);
    outline-offset: 0.25rem;
}

.topic-toggle__icon,
.specpoint-toggle__icon {
    display: inline-grid !important;
    flex: 0 0 auto;
    width: 1.55rem;
    height: 1.55rem;
    margin-top: 0 !important;
    place-items: center;
    color: #071015 !important;
    background: rgba(53, 215, 232, 0.9);
    font-size: 0.9rem !important;
    font-weight: 900;
    line-height: 1;
}

.picker-subheader strong {
    display: block;
    color: #ffffff;
    font-size: 0.95rem;
}

.picker-subheader span {
    display: block;
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.78rem;
}

.lesson-option-list {
    display: grid;
    gap: 0.6rem;
}

.lesson-option-list[hidden] {
    display: none;
}

.lesson-option {
    position: relative;
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem 0.75rem;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(1, 10, 14, 0.55);
    border: 1px solid rgba(53, 215, 232, 0.1);
    cursor: pointer;
}

.lesson-option:hover {
    border-color: rgba(53, 215, 232, 0.28);
}

.lesson-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lesson-option__box {
    position: relative;
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.12rem;
    background: rgba(1, 10, 14, 0.85);
    border: 2px solid #35d7e8;
    box-shadow: 0 0 12px rgba(53, 215, 232, 0.08);
}

.lesson-option input:checked + .lesson-option__box {
    background: #35d7e8;
}

.lesson-option input:checked + .lesson-option__box::after {
    position: absolute;
    top: 0.05rem;
    left: 0.3rem;
    width: 0.3rem;
    height: 0.58rem;
    content: "";
    border: solid #031015;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.lesson-option input:focus-visible + .lesson-option__box {
    box-shadow: 0 0 0 3px rgba(53, 215, 232, 0.18);
}

.lesson-option__text {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
    color: #e7f5f7;
    line-height: 1.45;
}

.lesson-option__text strong {
    color: #ffffff;
    font-size: 0.92rem;
}

.lesson-option__text em {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    font-style: normal;
}

@media (max-width: 760px) {
    .assignment-lesson-picker {
        max-height: none;
        overflow: visible;
        padding-right: 0;
        padding-bottom: 0;
    }

    .assignment-lesson-picker .component-picker__body {
        max-height: none;
        overflow: visible;
        padding-right: 1rem;
    }

    .picker-header,
    .picker-subheader {
        grid-template-columns: 1fr;
    }

    .picker-actions {
        justify-content: flex-start;
        padding: 0 1rem 0.9rem;
    }

    .picker-subheader .picker-actions {
        padding: 0;
    }

    .specpoint-picker {
        margin-left: 0;
    }
}

.cq-form input,
.cq-form textarea,
.cq-form select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.9rem 1rem;
    color: #e8f4f6;
    background: rgba(1, 10, 14, 0.85);
    border: 1px solid rgba(53, 215, 232, 0.28);
    outline: none;
    font: inherit;
}

.cq-form textarea {
    min-height: 8.75rem;
    line-height: 1.5;
    resize: vertical;
}

.cq-form input:focus,
.cq-form textarea:focus,
.cq-form select:focus {
    border-color: #35d7e8;
    box-shadow: 0 0 0 2px rgba(53, 215, 232, 0.15), 0 0 24px rgba(53, 215, 232, 0.08);
}

.cq-form input::placeholder,
.cq-form textarea::placeholder {
    color: rgba(220, 230, 235, 0.55);
}

.cq-form input[type="date"] {
    color-scheme: dark;
}

.cq-form input:-webkit-autofill,
.cq-form input:-webkit-autofill:hover,
.cq-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: #e8f4f6;
    box-shadow: 0 0 0 1000px rgba(1, 10, 14, 0.95) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.cq-form .errorlist,
.cq-form .teacher-form-field em {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem;
    color: #ffb4a8;
    background: rgba(42, 9, 9, 0.38);
    border: 1px solid rgba(255, 110, 96, 0.28);
}

.cq-form .assignment-lesson-field .lesson-option input {
    width: 1rem;
    min-height: 1rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.teacher-assignment-head,
.teacher-assignment-row {
    grid-template-columns: minmax(12rem, 1.2fr) minmax(7rem, 0.6fr) minmax(7rem, 0.6fr) minmax(14rem, 1.2fr) minmax(8rem, 0.7fr);
    min-width: 56rem;
}

@media (max-width: 900px) {
    .teacher-hero-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .teacher-class-grid {
        grid-template-columns: 1fr;
    }

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

    .teacher-topic-row,
    .teacher-support-row {
        grid-template-columns: 1fr;
    }

    .assigned-lesson-list div {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .teacher-analytics-grid {
        grid-template-columns: 1fr;
    }
}

.avatar-modal-panel {
    width: min(100%, 42rem);
    max-height: min(42rem, calc(100vh - 2.5rem));
    overflow: auto;
    padding: clamp(1rem, 3vw, 1.6rem);
    background:
        radial-gradient(circle at 88% 12%, rgba(184, 111, 37, 0.16), transparent 34%),
        linear-gradient(145deg, rgba(7, 17, 22, 0.96), rgba(3, 8, 11, 0.92));
    border: 1px solid rgba(53, 215, 232, 0.24);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58), 0 0 34px rgba(53, 215, 232, 0.08);
}

.avatar-modal-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.avatar-modal-heading h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.avatar-modal-heading p:not(.eyebrow) {
    margin: 0.4rem 0 0;
    color: rgba(255, 255, 255, 0.64);
}

.avatar-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.avatar-modal-close:hover {
    color: #35d7e8;
    border-color: rgba(53, 215, 232, 0.38);
}

.avatar-choice-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.8rem;
}

.avatar-choice {
    aspect-ratio: 1;
    padding: 0.35rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.avatar-choice:hover,
.avatar-choice.is-selected {
    border-color: rgba(53, 215, 232, 0.9);
    box-shadow: 0 0 22px rgba(53, 215, 232, 0.2);
    transform: translateY(-1px);
}

.avatar-choice img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.avatar-form-message {
    min-height: 1.35rem;
    margin: 0.85rem 0 0;
    color: #e3bd7d;
    font-size: 0.86rem;
    font-weight: 800;
}

.avatar-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.theme-card {
    background:
        linear-gradient(145deg, rgba(8, 20, 26, 0.88), rgba(3, 8, 11, 0.78)),
        radial-gradient(circle at 90% 15%, rgba(184, 111, 37, 0.16), transparent 34%);
}

.dashboard-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.75fr);
    gap: 1rem;
}

.checklist-card ul {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.checklist-card li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.checklist-card li::before {
    position: absolute;
    top: 0.2rem;
    left: 0;
    display: grid;
    width: 1rem;
    height: 1rem;
    place-items: center;
    color: rgba(53, 215, 232, 0.85);
    content: "□";
    font-size: 0.9rem;
    line-height: 1;
}

.activity-list {
    display: grid;
    gap: 0.65rem;
}

.checklist-card li::before {
    content: none;
}

.checklist-card li.is-complete {
    color: rgba(255, 255, 255, 0.86);
    background: rgba(53, 215, 232, 0.055);
    border-color: rgba(53, 215, 232, 0.22);
}

.checklist-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.1rem;
    min-height: 1.45rem;
    padding: 0 0.45rem;
    color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.is-complete .checklist-marker {
    color: #071015;
    background: #35d7e8;
    border-color: #35d7e8;
    box-shadow: 0 0 16px rgba(53, 215, 232, 0.18);
}

.checklist-label {
    line-height: 1.45;
}

.checklist-badge {
    padding: 0.35rem 0.5rem;
    color: #e3bd7d;
    background: rgba(184, 111, 37, 0.08);
    border: 1px solid rgba(184, 111, 37, 0.2);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.activity-list div {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.activity-list strong {
    color: #35d7e8;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.activity-list span {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.45;
}

.course-page {
    position: relative;
    min-height: 100vh;
    padding: 7.5rem clamp(1.25rem, 4vw, 4rem) 3rem;
    background:
        radial-gradient(circle at 16% 14%, rgba(53, 215, 232, 0.14), transparent 26%),
        radial-gradient(circle at 86% 12%, rgba(184, 111, 37, 0.16), transparent 28%),
        linear-gradient(135deg, #04090c, #071015 48%, #030709);
}

.course-page::before {
    position: absolute;
    inset: 5.75rem clamp(1.25rem, 4vw, 4rem) 2rem;
    pointer-events: none;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 0 90px rgba(53, 215, 232, 0.035);
}

.course-shell {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.2rem;
    width: 100%;
    max-width: 86rem;
    margin: 0 auto;
}

.courses-page-shell {
    gap: 1.5rem;
}

.courses-inner {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding-inline: clamp(1.5rem, 3vw, 2.4rem);
}

.lesson-shell {
    max-width: 80rem;
}

.course-hero,
.course-card,
.specpoint-card,
.lesson-detail-card {
    background: linear-gradient(145deg, rgba(7, 17, 22, 0.9), rgba(3, 8, 11, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(14px);
}

.course-hero {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: clamp(1.5rem, 3vw, 2.4rem);
}

.courses-hero {
    padding-inline: 0;
}

.course-hero.compact {
    max-width: 100%;
}

.component-hero {
    padding: clamp(2.5rem, 5vw, 5rem);
}

.course-hero .component-hero-title {
    max-width: none;
    margin-bottom: 1.75rem;
    font-size: clamp(3rem, 6vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.course-hero .component-hero-subtitle {
    max-width: 53.125rem;
    margin-top: 1.25rem;
    line-height: 1.6;
}

.course-hero h1,
.lesson-detail-card h1 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(2.6rem, 5vw, 5rem);
    line-height: 0.98;
}

.course-hero p:not(.eyebrow),
.course-card p,
.specpoint-card p,
.lesson-detail-card p {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.65;
}

.course-grid,
.topic-grid,
.dashboard-grid {
    align-items: stretch;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pathway-section,
.qualification-section {
    display: grid;
    gap: 1.5rem;
    margin-top: 3rem;
}

.pathway-accordion {
    border: 0;
}

.pathway-accordion__summary {
    display: none;
}

.pathway-accordion:not([open]) > .pathway-accordion__body {
    display: block;
}

.course-hero + .qualification-section,
.qualification-section:first-of-type {
    margin-top: 0;
}

.pathway-section-heading,
.qualification-header {
    display: grid;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
}

.section-eyebrow {
    margin: 0;
    color: #35d7e8;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pathway-section-heading h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(2rem, 3vw, 3.1rem);
}

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

.pathway-card {
    position: relative;
}

.recommended-badge {
    width: fit-content;
    padding: 0.4rem 0.6rem;
    color: #071015;
    background: #35d7e8;
    box-shadow: 0 0 18px rgba(53, 215, 232, 0.22);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.topic-card {
    height: 100%;
}

.course-card,
.specpoint-card,
.lesson-detail-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.2rem;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.lesson-quest {
    gap: 1rem;
    padding: clamp(1.2rem, 3vw, 2rem);
}

.step-lesson {
    max-width: 76rem;
    margin: 0 auto;
}

.quest-step-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.quest-step-tab {
    position: relative;
    min-height: 2.7rem;
    padding: 0 0.65rem;
    color: rgba(255, 255, 255, 0.56);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.quest-step-tab::after {
    position: absolute;
    right: 0.45rem;
    bottom: 0.35rem;
    left: 0.45rem;
    height: 0.12rem;
    content: "";
    background: rgba(53, 215, 232, 0.24);
    opacity: 0;
}

.quest-step-tab.is-visited::after {
    opacity: 1;
}

.quest-step-tab.is-active {
    color: #ffffff;
    background: rgba(53, 215, 232, 0.1);
    border-color: rgba(53, 215, 232, 0.36);
    box-shadow: inset 0 0 18px rgba(53, 215, 232, 0.045), 0 0 18px rgba(53, 215, 232, 0.08);
}

.quest-stage {
    display: grid;
    gap: 0.85rem;
}

.quest-stage[hidden] {
    display: none;
}

.stage-heading {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.stage-heading h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.stage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.mission-stage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mission-stage-grid .mission-objective-grid {
    grid-template-columns: 1fr;
}

.lesson-stage--mission {
    width: 100%;
    max-width: 100%;
}

.mission-stage-grid > *,
.mission-stage-grid .mini-mission-card,
.mission-stage-grid .practice-terminal-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.mission-stage-grid .mini-mission-card {
    padding: clamp(1.25rem, 2.5vw, 1.65rem);
}

.lesson-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.lesson-section,
.practice-terminal-card {
    position: relative;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.course-card:hover,
.specpoint-card:hover {
    border-color: rgba(53, 215, 232, 0.34);
    box-shadow: 0 0 28px rgba(53, 215, 232, 0.08), 0 24px 70px rgba(0, 0, 0, 0.42);
    transform: translateY(-2px);
}

.course-card h2,
.specpoint-card h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 1.65rem;
}

.course-meta,
.lesson-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lesson-meta-pill,
.lesson-meta .status-badge {
    align-items: center;
    display: inline-flex;
    min-height: 2rem;
    white-space: nowrap;
}

.lesson-meta-pill {
    line-height: 1;
}

.lesson-meta .status-badge {
    flex: 0 0 auto;
    margin-left: 0.25rem;
}

.course-meta.wide {
    margin-top: 1rem;
}

.course-helper-text {
    max-width: 100%;
    margin: 0.65rem 0 0;
    color: rgba(255, 255, 255, 0.58) !important;
    font-size: 0.9rem;
}

.course-hero-copy {
    display: grid;
    gap: 0;
}

.course-mode-message {
    max-width: 48rem;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.5 !important;
}

.component-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.component-card-footer {
    display: grid;
    gap: 0.95rem;
    margin-top: auto;
}

.component-card-footer .card-action {
    margin-top: 0;
}

.component-stat {
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem 0.85rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.component-stat span,
.component-progress-heading span {
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.component-stat strong {
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 1.55rem;
    line-height: 1;
}

.component-progress-block {
    display: grid;
    gap: 0.55rem;
    padding: 0.9rem;
    background: rgba(53, 215, 232, 0.035);
    border: 1px solid rgba(53, 215, 232, 0.16);
}

.component-progress-block.coverage {
    background: rgba(184, 111, 37, 0.045);
    border-color: rgba(184, 111, 37, 0.18);
}

.component-progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.component-progress-heading strong {
    color: #35d7e8;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.component-progress-block p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.88rem;
}

.component-progress-block.coverage .component-progress-heading strong {
    color: #e3bd7d;
}

.coverage-progress div {
    background: linear-gradient(90deg, #b86f25, #35d7e8);
    box-shadow: 0 0 18px rgba(184, 111, 37, 0.22);
}

.coming-soon-note {
    color: #e3bd7d !important;
    font-size: 0.76rem !important;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mini-progress {
    height: 0.55rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-progress div {
    height: 100%;
    min-width: 0.2rem;
    background: linear-gradient(90deg, #35d7e8, #b86f25);
    box-shadow: 0 0 18px rgba(53, 215, 232, 0.28);
}

.topic-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.topic-card-header > div {
    min-width: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: fit-content;
    min-width: 5.25rem;
    padding: 0.4rem 0.6rem;
    color: rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
}

.status-badge.complete {
    color: #071015;
    background: #35d7e8;
    border-color: #35d7e8;
}

.specpoint-stack {
    display: grid;
    gap: 1rem;
}

.lesson-list {
    display: grid;
    gap: 0.75rem;
}

.lesson-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.lesson-row h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
}

.lesson-row p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
}

.lesson-content {
    padding: 0;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    border: 0;
    line-height: 1.72;
}

.lesson-content p {
    margin: 0 0 1rem;
}

.lesson-content p:last-child {
    margin-bottom: 0;
}

.lesson-list-content p {
    position: relative;
    padding-left: 1.2rem;
}

.lesson-list-content p::before {
    position: absolute;
    top: 0.65rem;
    left: 0;
    width: 0.42rem;
    height: 0.42rem;
    content: "";
    background: #35d7e8;
    box-shadow: 0 0 12px rgba(53, 215, 232, 0.35);
}

.learning-objectives-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.learning-objective-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(53, 215, 232, 0.04);
    border: 1px solid rgba(53, 215, 232, 0.18);
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.learning-objective-item:hover {
    background: rgba(53, 215, 232, 0.065);
    border-color: rgba(53, 215, 232, 0.3);
    transform: translateY(-1px);
}

.learning-objective-marker {
    flex: 0 0 auto;
    width: 0.65rem;
    height: 0.65rem;
    margin-top: 0.42rem;
    background: #35d7e8;
    box-shadow: 0 0 12px rgba(53, 215, 232, 0.55);
    transform: rotate(45deg);
}

.learning-objective-text {
    color: rgba(215, 221, 224, 0.9);
    line-height: 1.5;
}

.briefing-actions {
    margin-top: 0.5rem;
}

.common-mistakes-list {
    display: grid;
    gap: 0.75rem;
}

.common-mistakes-accordion {
    display: grid;
    gap: 0.75rem;
}

.common-mistakes-accordion summary {
    display: block;
    cursor: default;
    list-style: none;
}

.common-mistakes-accordion summary::-webkit-details-marker {
    display: none;
}

.common-mistakes-accordion summary span:first-child {
    display: block;
    margin: 0 0 0.75rem;
    color: #35d7e8;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.common-mistakes-count {
    display: none;
}

.lesson-accordion {
    position: relative;
}

.lesson-accordion-toggle {
    display: none;
}

.lesson-accordion__body {
    display: contents;
}

.learn-mobile-helper,
.learn-concept-toggle {
    display: none;
}

.learn-concept-body {
    display: contents;
}

.common-mistake-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.95rem;
    background: rgba(184, 111, 37, 0.055);
    border: 1px solid rgba(255, 180, 80, 0.22);
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.common-mistake-item:hover {
    background: rgba(184, 111, 37, 0.08);
    border-color: rgba(255, 180, 80, 0.34);
    transform: translateY(-1px);
}

.common-mistake-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    color: #071015;
    background: #e3bd7d;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.common-mistake-title {
    margin: 0;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.common-mistake-fix {
    margin: 0.3rem 0 0;
    color: rgba(220, 230, 233, 0.72);
    line-height: 1.55;
}

.code-rich-content {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    white-space: normal;
}

.practice-terminal-card {
    display: grid;
    gap: 1rem;
    border-color: rgba(53, 215, 232, 0.22);
    box-shadow: inset 0 0 34px rgba(53, 215, 232, 0.035);
}

.practice-terminal-card h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 1.65rem;
}

.pyodide-status {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pyodide-status.is-ready {
    color: #35d7e8;
}

.terminal-label {
    margin: 0;
    color: rgba(53, 215, 232, 0.78);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.python-editor {
    width: 100%;
    max-width: 100%;
    min-height: 13rem;
    padding: 1rem;
    resize: vertical;
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.92);
    background: #020608;
    border: 1px solid rgba(53, 215, 232, 0.25);
    outline: none;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.35);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.6;
}

.python-editor:focus {
    border-color: rgba(53, 215, 232, 0.72);
    box-shadow: 0 0 0 3px rgba(53, 215, 232, 0.12), inset 0 0 24px rgba(0, 0, 0, 0.35);
}

.terminal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.card-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.python-output {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 6rem;
    max-height: 13.75rem;
    margin: 0;
    overflow: auto;
    padding: 0.85rem;
    color: #8df7c8;
    background: #010405;
    border: 1px solid rgba(53, 215, 232, 0.2);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.python-output.is-error {
    color: #ffb4a8;
    border-color: rgba(255, 110, 96, 0.34);
}

.python-output.is-success {
    color: #8df7c8;
    border-color: rgba(53, 215, 232, 0.45);
    box-shadow: inset 0 0 22px rgba(53, 215, 232, 0.06);
}

body.task-overlay-open {
    overflow: hidden;
}

.mobile-task-helper,
.mobile-task-overlay {
    display: none;
}

.mobile-task-overlay[hidden] {
    display: none !important;
}

.mobile-task-summary {
    display: grid;
    gap: 0.9rem;
}

.mobile-task-summary h2,
.mobile-task-summary h3,
.mobile-task-summary h4,
.mobile-task-summary p {
    margin: 0;
}

.mobile-task-summary h2 {
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.08;
}

.mobile-task-summary h3,
.mobile-task-summary h4 {
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.mobile-task-summary p,
.mobile-task-summary li {
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.55;
}

.mobile-task-summary__section {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.mobile-task-summary__section--highlight,
.mobile-task-hint,
.mobile-task-summary__section--reward {
    background: rgba(216, 138, 45, 0.08);
    border-color: rgba(216, 138, 45, 0.24);
}

.compression-chamber .compression-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 0.72fr);
    align-items: center;
    gap: 0.55rem;
    margin-top: 1rem;
}

.compression-flow span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.7rem 0.8rem;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(53, 215, 232, 0.07);
    border: 1px solid rgba(53, 215, 232, 0.2);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.compression-flow .compression-core {
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.12);
    border-color: rgba(216, 138, 45, 0.34);
    box-shadow: inset 0 0 24px rgba(216, 138, 45, 0.08);
}

.compression-chamber .compression-visual-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.85rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.compression-chamber .compression-visual-card {
    display: grid;
    align-content: start;
    grid-template-rows: auto minmax(11.75rem, 1fr) auto;
    gap: 0.85rem;
    padding: 1rem;
    min-width: 0;
    border: 1px solid rgba(53, 215, 232, 0.22);
    background: linear-gradient(135deg, rgba(4, 18, 22, 0.96), rgba(6, 10, 12, 0.98));
}

.compression-chamber .compression-visual-card > :not(.visual-title-block):not(.visual-caption) {
    align-self: center;
}

.visual-title-block {
    display: grid;
    gap: 0.3rem;
}

.visual-title-block h3,
.compression-visual-card h3 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.2rem, 1.6vw, 1.55rem);
    line-height: 1.18;
}

.compression-svg {
    display: block;
    width: 100%;
    height: clamp(11.75rem, 15vw, 13.5rem);
    min-height: 0;
    overflow: visible;
}

.compression-svg text {
    fill: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 800;
}

.file-block {
    fill: rgba(53, 215, 232, 0.12);
    stroke: rgba(53, 215, 232, 0.58);
    stroke-width: 2;
}

.small-file {
    animation: cq-file-pulse 3.2s ease-in-out infinite;
}

.compression-process-block {
    fill: rgba(216, 138, 45, 0.13);
    stroke: rgba(216, 138, 45, 0.65);
    stroke-width: 2;
}

.visual-arrow-line {
    fill: none;
    stroke: rgba(53, 215, 232, 0.75);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 7 7;
}

.visual-caption {
    margin: 0;
    color: rgba(255, 255, 255, 0.68) !important;
    font-size: 0.9rem !important;
    line-height: 1.55;
}

.compression-block-comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.compression-block-comparison > div {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.compression-block-comparison strong {
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.compression-block-comparison p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.86rem;
}

.compression-block-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
}

.compression-block-row span {
    aspect-ratio: 1;
    background: rgba(53, 215, 232, 0.68);
    border: 1px solid rgba(148, 243, 255, 0.65);
    box-shadow: 0 0 14px rgba(53, 215, 232, 0.18);
}

.compression-block-row .is-removed {
    position: relative;
    background: rgba(216, 138, 45, 0.12);
    border-color: rgba(216, 138, 45, 0.42);
}

.compression-block-row .is-removed::after {
    position: absolute;
    inset: 45% 12%;
    content: "";
    background: rgba(255, 214, 157, 0.85);
    transform: rotate(-35deg);
}

.quality-tradeoff-visual {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 0.3rem 0.2rem;
}

.tradeoff-track {
    position: relative;
    height: 1rem;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(53, 215, 232, 0.75), rgba(216, 138, 45, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.tradeoff-thumb {
    position: absolute;
    top: 50%;
    left: 18%;
    width: 1.65rem;
    height: 1.65rem;
    background: #ffffff;
    border: 3px solid #35d7e8;
    border-radius: 50%;
    box-shadow: 0 0 24px rgba(53, 215, 232, 0.32);
    transform: translate(-50%, -50%);
    animation: cq-tradeoff-scan 5s ease-in-out infinite;
}

.tradeoff-labels {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.25;
    text-transform: uppercase;
}

.file-decision-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.file-decision-grid article {
    display: grid;
    gap: 0.45rem;
    padding: 0.9rem;
    background: linear-gradient(145deg, rgba(7, 17, 22, 0.9), rgba(3, 8, 11, 0.78));
    border: 1px solid rgba(53, 215, 232, 0.17);
}

.file-decision-grid strong {
    color: #ffffff;
}

.file-decision-grid span {
    width: fit-content;
    padding: 0.3rem 0.45rem;
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.09);
    border: 1px solid rgba(216, 138, 45, 0.24);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.file-decision-grid p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.88rem;
    line-height: 1.45;
}

@keyframes cq-file-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
    }
}

@keyframes cq-tradeoff-scan {
    0%, 100% {
        left: 18%;
    }
    50% {
        left: 82%;
    }
}

.network-map-room {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
}

.network-visual-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.9fr) minmax(17rem, 0.8fr);
    align-items: stretch;
    gap: 0.85rem;
    margin: 1rem 0;
}

.network-visual-card {
    display: grid;
    align-content: start;
    gap: 0.85rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(53, 215, 232, 0.22);
    background: linear-gradient(135deg, rgba(4, 18, 22, 0.96), rgba(6, 10, 12, 0.98));
}

.network-map-card {
    grid-template-rows: auto auto auto;
}

.network-map-svg {
    display: block;
    width: 100%;
    height: clamp(13.5rem, 23vw, 17rem);
    min-height: 0;
}

.network-map-svg text {
    fill: rgba(255, 255, 255, 0.88);
    font-size: 16px;
    font-weight: 900;
}

.network-zone {
    fill: rgba(53, 215, 232, 0.06);
    stroke: rgba(53, 215, 232, 0.42);
    stroke-width: 2;
}

.network-zone-title {
    fill: #eafcff !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.network-node,
.network-device {
    fill: rgba(53, 215, 232, 0.18);
    stroke: rgba(53, 215, 232, 0.68);
    stroke-width: 2;
}

.network-router {
    fill: rgba(216, 138, 45, 0.14);
    stroke: rgba(216, 138, 45, 0.72);
    stroke-width: 2;
}

.network-cloud {
    fill: rgba(255, 214, 157, 0.08);
    stroke: rgba(255, 214, 157, 0.5);
    stroke-width: 2;
}

.network-link {
    fill: none;
    stroke: rgba(53, 215, 232, 0.72);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wide-link {
    stroke: rgba(255, 214, 157, 0.72);
    stroke-width: 3;
    stroke-dasharray: 7 9;
}

.network-device-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.network-device-grid div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.35rem;
    padding: 0.7rem;
    min-width: 0;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.network-device-grid div:last-child {
    grid-column: 1 / -1;
}

.network-device-grid span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    color: #031014;
    background: #35d7e8;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.72rem;
    font-weight: 900;
}

.network-device-grid strong {
    align-self: center;
    color: #ffffff;
    font-weight: 900;
    line-height: 1.15;
}

.network-device-grid p {
    grid-column: 1 / -1;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
    line-height: 1.4;
}

.network-performance-visual {
    display: grid;
    gap: 1rem;
    padding: 0.5rem 0 0;
}

.performance-line {
    position: relative;
    height: 2.4rem;
}

.performance-line::before,
.performance-line::after {
    position: absolute;
    top: 50%;
    width: 1.4rem;
    height: 1.4rem;
    content: "";
    background: rgba(53, 215, 232, 0.2);
    border: 2px solid rgba(53, 215, 232, 0.7);
    transform: translateY(-50%);
}

.performance-line::before {
    left: 0;
}

.performance-line::after {
    right: 0;
}

.performance-line span {
    position: absolute;
    top: 50%;
    right: 1.4rem;
    left: 1.4rem;
    height: 0.45rem;
    background: linear-gradient(90deg, #35d7e8, #ffd69d, rgba(216, 138, 45, 0.74));
    transform: translateY(-50%);
}

.network-factor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.network-factor-grid span {
    padding: 0.5rem 0.6rem;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(53, 215, 232, 0.07);
    border: 1px solid rgba(53, 215, 232, 0.2);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.network-factor-grid span:last-child {
    grid-column: 1 / -1;
}

.wired-workshop {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
}

.wired-visual-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.85fr) minmax(17rem, 0.85fr);
    align-items: stretch;
    gap: 0.85rem;
    margin: 1rem 0;
}

.wired-visual-card {
    display: grid;
    align-content: start;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(53, 215, 232, 0.22);
    background: linear-gradient(135deg, rgba(4, 18, 22, 0.96), rgba(6, 10, 12, 0.98));
}

.wired-network-svg,
.signal-distance-svg {
    display: block;
    width: 100%;
    height: clamp(12.5rem, 19vw, 15rem);
}

.wired-network-svg {
    height: clamp(11rem, 17vw, 13.5rem);
}

.wired-network-svg text,
.signal-distance-svg text {
    fill: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    font-weight: 900;
}

.wireless-signal-line {
    fill: none;
    stroke: rgba(53, 215, 232, 0.82);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 0;
}

.wireless-signal-line.is-inner {
    stroke-width: 3;
    opacity: 0.78;
}

.wireless-signal-line.is-weak {
    stroke: rgba(255, 214, 157, 0.82);
    stroke-dasharray: 7 9;
}

.signal-distance-floor {
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 2;
    stroke-linecap: round;
}

.signal-label-pill {
    fill: rgba(3, 12, 18, 0.88);
    stroke: rgba(53, 215, 232, 0.32);
    stroke-width: 1;
}

.signal-obstacle {
    fill: rgba(216, 138, 45, 0.18);
    stroke: rgba(216, 138, 45, 0.58);
    stroke-width: 2;
}

.signal-device {
    fill: rgba(53, 215, 232, 0.12);
}

.signal-device-stand {
    fill: rgba(53, 215, 232, 0.32);
    stroke: rgba(53, 215, 232, 0.65);
    stroke-width: 1;
}

.signal-bar {
    fill: #35d7e8;
    filter: drop-shadow(0 0 8px rgba(53, 215, 232, 0.35));
}

.signal-bar.is-weak {
    fill: #ffd69d;
}

.signal-bar.is-faded {
    fill: rgba(255, 214, 157, 0.42);
}

.weak-node {
    fill: rgba(216, 138, 45, 0.16);
    stroke: rgba(216, 138, 45, 0.64);
}

.connection-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.connection-choice-grid div {
    display: grid;
    gap: 0.35rem;
    padding: 0.72rem;
    min-width: 0;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.connection-choice-grid strong {
    color: #ffffff;
    font-weight: 900;
}

.connection-choice-grid span {
    width: fit-content;
    padding: 0.28rem 0.45rem;
    color: #031014;
    background: #35d7e8;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.connection-choice-grid p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
    line-height: 1.4;
}

.security-ops-room {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
}

.security-visual-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.8fr) minmax(17rem, 0.8fr);
    align-items: stretch;
    gap: 0.85rem;
    margin: 1rem 0;
}

.security-visual-card {
    display: grid;
    align-content: start;
    gap: 0.9rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(53, 215, 232, 0.22);
    background: linear-gradient(135deg, rgba(4, 18, 22, 0.96), rgba(6, 10, 12, 0.98));
}

.security-landscape-card {
    grid-row: span 2;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.security-landscape-svg {
    align-self: center;
    display: block;
    width: 100%;
    height: clamp(13rem, 22vw, 17rem);
}

.security-landscape-svg text {
    fill: rgba(255, 255, 255, 0.88);
    font-size: 16px;
    font-weight: 900;
}

.security-core-node {
    fill: rgba(53, 215, 232, 0.11);
    stroke: rgba(53, 215, 232, 0.68);
    stroke-width: 2;
    filter: drop-shadow(0 0 18px rgba(53, 215, 232, 0.16));
}

.security-link {
    fill: none;
    stroke: rgba(53, 215, 232, 0.55);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 7 8;
}

.security-threat-node rect {
    fill: rgba(3, 12, 18, 0.9);
    stroke: rgba(53, 215, 232, 0.36);
    stroke-width: 2;
}

.security-threat-node.is-warning rect {
    fill: rgba(216, 138, 45, 0.12);
    stroke: rgba(216, 138, 45, 0.52);
}

.security-flow {
    display: grid;
    gap: 0.75rem;
    counter-reset: security-step;
}

.security-flow span {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(53, 215, 232, 0.07);
    border: 1px solid rgba(53, 215, 232, 0.22);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.security-flow span::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    color: #031014;
    content: counter(security-step);
    counter-increment: security-step;
    background: #35d7e8;
    font-size: 0.7rem;
    font-weight: 900;
}

.security-flow span:not(:last-child)::after {
    position: absolute;
    bottom: -0.76rem;
    left: 1.55rem;
    width: 1px;
    height: 0.76rem;
    content: "";
    background: rgba(53, 215, 232, 0.45);
}

.directory-tree {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.86rem;
}

.directory-tree span {
    padding: 0.5rem 0.65rem;
    border-left: 3px solid rgba(53, 215, 232, 0.64);
    background: rgba(53, 215, 232, 0.07);
}

.directory-tree span:nth-child(n + 2):nth-child(-n + 3) {
    margin-left: 1.2rem;
    border-left-color: rgba(216, 138, 45, 0.72);
}

.password-meter-stack {
    display: grid;
    gap: 0.7rem;
}

.password-meter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.password-meter strong {
    color: #ffffff;
    overflow-wrap: anywhere;
}

.password-meter span {
    width: fit-content;
    padding: 0.25rem 0.45rem;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.password-meter div {
    grid-column: 1 / -1;
    height: 0.55rem;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.11);
}

.password-meter i {
    display: block;
    height: 100%;
}

.password-meter p {
    grid-column: 1 / -1;
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.82rem;
    line-height: 1.45;
}

.password-meter.is-weak span {
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.11);
    border: 1px solid rgba(216, 138, 45, 0.26);
}

.password-meter.is-weak i {
    width: 30%;
    background: linear-gradient(90deg, rgba(216, 138, 45, 0.95), rgba(255, 214, 157, 0.9));
}

.password-meter.is-strong span {
    color: #031014;
    background: #35d7e8;
}

.password-meter.is-strong i {
    width: 92%;
    background: linear-gradient(90deg, #35d7e8, rgba(141, 247, 200, 0.9));
}

.security-chain {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 0.1rem;
}

.security-chain span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.7rem;
    padding: 0.65rem 0.45rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(53, 215, 232, 0.08);
    border: 2px solid rgba(53, 215, 232, 0.34);
    border-radius: 999px;
    font-size: clamp(0.58rem, 0.75vw, 0.66rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.security-chain span:nth-child(2) {
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.1);
    border-color: rgba(216, 138, 45, 0.42);
}

.prevention-visual-grid {
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(16rem, 0.78fr));
}

.pen-test-visual-grid {
    grid-template-columns: minmax(0, 1.05fr) repeat(2, minmax(15.5rem, 0.95fr));
    align-items: start;
}

.pen-test-visual-grid .security-visual-card {
    gap: 0.8rem;
    min-height: 0;
}

.pen-test-visual-grid .security-landscape-card {
    grid-row: auto;
    grid-template-rows: auto auto auto;
}

.defence-wall-svg {
    align-self: center;
    display: block;
    width: 100%;
    height: clamp(14rem, 23vw, 18rem);
}

.defence-wall-svg text {
    fill: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 900;
}

.defence-ring {
    fill: rgba(53, 215, 232, 0.035);
    stroke: rgba(53, 215, 232, 0.42);
    stroke-width: 3;
    stroke-dasharray: 10 8;
}

.defence-layer rect {
    fill: rgba(3, 12, 18, 0.93);
    stroke: rgba(53, 215, 232, 0.42);
    stroke-width: 2;
}

.defence-layer.is-warning rect {
    fill: rgba(216, 138, 45, 0.12);
    stroke: rgba(216, 138, 45, 0.52);
}

.pen-test-cycle-svg {
    align-self: start;
    display: block;
    width: 100%;
    height: clamp(12.5rem, 18vw, 15.5rem);
    margin-top: 0.1rem;
}

.pen-test-cycle-svg text {
    fill: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 900;
}

.vulnerability-radar {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    min-height: 12rem;
    padding: 0.75rem;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(53, 215, 232, 0.12) 0 2px, transparent 3px),
        radial-gradient(circle at center, transparent 0 28%, rgba(53, 215, 232, 0.12) 29% 30%, transparent 31% 48%, rgba(216, 138, 45, 0.16) 49% 50%, transparent 51%),
        rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(53, 215, 232, 0.18);
}

.vulnerability-radar span,
.ethical-comparison-grid span,
.security-report-card span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.45rem;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(3, 12, 18, 0.84);
    border: 1px solid rgba(53, 215, 232, 0.2);
    font-size: clamp(0.56rem, 0.68vw, 0.64rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    overflow-wrap: normal;
}

.ethical-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.ethical-comparison-grid div {
    display: grid;
    gap: 0.35rem;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.ethical-comparison-grid strong {
    color: #ffffff;
    font-size: clamp(0.74rem, 0.9vw, 0.86rem);
    line-height: 1.2;
}

.ethical-comparison-grid div:first-child span {
    color: #031014;
    background: rgba(53, 215, 232, 0.9);
}

.ethical-comparison-grid div:last-child span {
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.12);
    border-color: rgba(216, 138, 45, 0.26);
}

.security-report-card {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.65fr);
    gap: 0.5rem;
}

.security-report-card span:nth-child(3),
.security-report-card span:nth-child(4) {
    grid-column: 1 / -1;
    justify-content: flex-start;
    text-align: left;
}

.exam-security-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 1rem;
}

.exam-security-visual-grid .security-landscape-card {
    grid-row: auto;
}

.security-decision-matrix {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.security-decision-matrix div {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.85fr) minmax(0, 1.25fr);
    gap: 0.35rem;
    align-items: stretch;
}

.security-decision-matrix strong,
.security-decision-matrix span,
.security-case-board span,
.answer-builder-steps span {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 2.35rem;
    padding: 0.45rem 0.5rem;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(3, 12, 18, 0.78);
    border: 1px solid rgba(53, 215, 232, 0.18);
    font-size: clamp(0.56rem, 0.66vw, 0.64rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.security-decision-matrix strong {
    color: #031014;
    background: rgba(53, 215, 232, 0.86);
}

.security-case-board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.75rem;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(53, 215, 232, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(53, 215, 232, 0.08) 1px, transparent 1px),
        rgba(0, 0, 0, 0.22);
    background-size: 22px 22px;
    border: 1px solid rgba(53, 215, 232, 0.18);
}

.security-case-board span:last-child {
    grid-column: 1 / -1;
    color: #ffd69d;
    border-color: rgba(216, 138, 45, 0.3);
}

.answer-builder-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    counter-reset: answer-step;
}

.answer-builder-steps span {
    justify-content: flex-start;
    gap: 0.55rem;
}

.answer-builder-steps strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    flex: 0 0 auto;
    color: #031014;
    background: #35d7e8;
    font-size: 0.72rem;
}

.threat-defence-map-svg {
    display: block;
    width: 100%;
    height: clamp(14rem, 22vw, 17rem);
    margin-top: 0.25rem;
}

.threat-defence-map-svg text {
    fill: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 900;
}

.firewall-filter,
.encryption-flow {
    display: grid;
    gap: 0.65rem;
}

.firewall-filter span,
.firewall-filter strong,
.encryption-flow span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.7rem;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(53, 215, 232, 0.07);
    border: 1px solid rgba(53, 215, 232, 0.22);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.firewall-filter strong {
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.1);
    border-color: rgba(216, 138, 45, 0.36);
}

.firewall-filter .is-allowed {
    color: #031014;
    background: linear-gradient(90deg, #35d7e8, rgba(141, 247, 200, 0.92));
}

.firewall-filter .is-blocked {
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.12);
    border-color: rgba(216, 138, 45, 0.42);
}

.encryption-flow {
    grid-template-columns: 1fr;
}

.encryption-flow span {
    position: relative;
}

.encryption-flow span:not(:last-child)::after {
    position: absolute;
    bottom: -0.68rem;
    left: 50%;
    width: 1px;
    height: 0.68rem;
    content: "";
    background: rgba(53, 215, 232, 0.45);
}

.encryption-flow .is-scrambled {
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.12);
    border-color: rgba(216, 138, 45, 0.38);
    font-family: "Courier New", monospace;
    letter-spacing: 0.14em;
}

.access-pyramid {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
}

.access-pyramid span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(53, 215, 232, 0.08);
    border: 1px solid rgba(53, 215, 232, 0.28);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.access-pyramid span:nth-child(1) {
    width: 42%;
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.12);
    border-color: rgba(216, 138, 45, 0.42);
}

.access-pyramid span:nth-child(2) {
    width: 58%;
}

.access-pyramid span:nth-child(3) {
    width: 76%;
}

.access-pyramid span:nth-child(4) {
    width: 94%;
}

@media (max-width: 1180px) and (min-width: 769px) {
    .network-visual-grid,
    .wired-visual-grid,
    .security-visual-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .network-map-card,
    .wired-comparison-card,
    .security-landscape-card {
        grid-column: 1 / -1;
    }

    .network-map-svg,
    .wired-network-svg {
        height: clamp(14rem, 28vw, 18rem);
    }

    .exam-security-visual-grid .security-landscape-card {
        grid-row: auto;
    }

    .exam-security-visual-grid {
        grid-template-columns: 1fr;
    }
}

.mini-mission-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 1.15rem;
    padding: clamp(1.05rem, 2.5vw, 1.35rem);
    border-color: rgba(184, 111, 37, 0.34);
    background:
        radial-gradient(circle at 100% 0%, rgba(184, 111, 37, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(184, 111, 37, 0.16), rgba(0, 0, 0, 0.16) 48%),
        rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 34px rgba(184, 111, 37, 0.055), 0 0 30px rgba(184, 111, 37, 0.06);
}

.mini-mission-card h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: 1.65rem;
}

.mission-intro {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
}

.mission-objective-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.65fr);
    gap: 1.15rem;
    align-items: stretch;
}

.mission-steps,
.success-checks {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(184, 111, 37, 0.22);
}

.mission-guidance-block {
    margin-bottom: 1rem;
    padding: 0.85rem;
    background: rgba(53, 215, 232, 0.055);
    border: 1px solid rgba(53, 215, 232, 0.18);
}

.mission-steps ol + .mission-guidance-block {
    margin-top: 1.35rem;
}

.mission-step-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mission-step {
    display: grid;
    grid-template-columns: minmax(4.7rem, auto) minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    padding: 0.85rem 1rem;
    background: rgba(184, 111, 37, 0.055);
    border: 1px solid rgba(218, 150, 70, 0.24);
}

.mission-step-number {
    color: #e3bd7d;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mission-step-text {
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.55;
}

.expected-output-list {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.expected-output-item {
    padding: 0.55rem 0.7rem;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(53, 215, 232, 0.14);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    line-height: 1.45;
}

.success-check-intro {
    margin: 0 0 0.7rem;
    color: rgba(255, 255, 255, 0.66);
}

.success-check-list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.success-check-item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.success-check-marker {
    flex: 0 0 auto;
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.45rem;
    background: #35d7e8;
    box-shadow: 0 0 10px rgba(53, 215, 232, 0.55);
    transform: rotate(45deg);
}

.mission-hint-panel {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(184, 111, 37, 0.075);
    border: 1px solid rgba(184, 111, 37, 0.22);
}

.mission-hint-panel strong {
    color: #e3bd7d;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mission-hint-panel span {
    line-height: 1.6;
}

.mission-hint-panel.is-unlocked {
    color: rgba(255, 255, 255, 0.82);
    background: rgba(53, 215, 232, 0.08);
    border-color: rgba(53, 215, 232, 0.28);
}

.mission-hint-panel.is-unlocked strong {
    color: #8df7c8;
}

.mission-reward-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    align-items: stretch;
}

.mission-reward-panel > div:first-child {
    display: grid;
    gap: 0.18rem;
    padding: 0.85rem;
    background: rgba(53, 215, 232, 0.07);
    border: 1px solid rgba(53, 215, 232, 0.22);
}

.mission-reward-panel strong {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 900;
}

.mission-reward-panel span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.85rem;
}

.mission-start-cta {
    justify-self: start;
    box-shadow: 0 0 18px rgba(53, 215, 232, 0.18), 0 0 26px rgba(184, 111, 37, 0.09);
}

#mission-workspace {
    scroll-margin-top: 6rem;
}

.mission-state {
    display: grid;
    gap: 0.28rem;
    margin: 0;
    padding: 0.75rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mission-state span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
}

.mission-state.is-locked {
    color: #e3bd7d;
    background: rgba(184, 111, 37, 0.08);
    border: 1px solid rgba(184, 111, 37, 0.22);
}

.mission-state.is-passed {
    color: #8df7c8;
    background: rgba(53, 215, 232, 0.08);
    border: 1px solid rgba(53, 215, 232, 0.28);
}

.mission-state.is-failed {
    color: #ffb4a8;
    background: rgba(42, 9, 9, 0.34);
    border: 1px solid rgba(255, 110, 96, 0.26);
}

.lesson-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.completion-panel {
    display: grid;
    gap: 1rem;
}

.lesson-actions form {
    margin: 0;
}

.card-action {
    appearance: none;
    font-family: inherit;
    cursor: pointer;
}

button.card-action {
    border: 0;
}

.card-action.is-disabled {
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: not-allowed;
}

.card-action.is-secondary {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.card-action.is-mission-check {
    color: #8df7c8;
    background: rgba(53, 215, 232, 0.08);
    border: 1px solid rgba(53, 215, 232, 0.38);
    box-shadow: inset 0 0 18px rgba(53, 215, 232, 0.04);
}

@media (max-width: 900px) {
    .site-nav {
        grid-template-columns: 1fr auto;
    }

    .desktop-nav,
    .desktop-sign-in,
    .desktop-sign-in-form {
        display: none;
    }

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        background-position: 66% center;
    }

    .hero-overlay {
        background:
            linear-gradient(90deg, rgba(3, 7, 10, 0.98) 0%, rgba(3, 7, 10, 0.9) 48%, rgba(3, 7, 10, 0.62) 100%),
            radial-gradient(circle at 72% 34%, rgba(184, 111, 37, 0.16), transparent 30%);
    }

    .hero-inner {
        padding-top: 7rem;
    }

    .learning-feature-grid,
    .learning-feature-card-wide {
        grid-template-columns: 1fr;
    }

    .learning-feature-card {
        min-height: auto;
    }

    .account-panel {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-panel {
        grid-template-columns: minmax(0, 1fr) minmax(22rem, 25rem);
        gap: 2rem;
    }

    .register-panel {
        grid-template-columns: minmax(0, 1fr) minmax(23rem, 25rem);
        gap: 2rem;
    }

    .stat-grid,
    .dashboard-grid,
    .dashboard-lower-grid,
    .achievement-stats-grid,
    .achievement-card-grid,
    .pathway-grid,
    .topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mission-objective-grid,
    .mission-reward-panel,
    .mission-stage-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

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

@media (max-width: 640px) {
    .site-nav {
        padding: 1rem 1.15rem;
    }

    .hero {
        min-height: 100svh;
        background-position: 58% center;
    }

    .hero-backdrop {
        opacity: 0.78;
        filter: blur(10px) saturate(1.18);
        transform: scale(1.04);
    }

    .hero-overlay {
        background:
            linear-gradient(180deg, rgba(3, 7, 10, 0.76) 0%, rgba(3, 7, 10, 0.54) 38%, rgba(3, 7, 10, 0.9) 100%),
            linear-gradient(90deg, rgba(3, 7, 10, 0.72) 0%, rgba(3, 7, 10, 0.42) 52%, rgba(3, 7, 10, 0.68) 100%),
            radial-gradient(circle at 58% 20%, rgba(53, 215, 232, 0.2), transparent 34%),
            radial-gradient(circle at 68% 58%, rgba(216, 138, 45, 0.22), transparent 38%);
    }

    .hero-vignette {
        background:
            radial-gradient(circle at 56% 38%, rgba(0, 0, 0, 0.02) 0, rgba(0, 0, 0, 0.24) 45%, rgba(0, 0, 0, 0.72) 100%),
            linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 34%);
    }

    .hero-inner {
        padding: 6.25rem 1.15rem 1.5rem;
    }

    .hero-content {
        align-items: flex-end;
    }

    .hero-copy {
        padding-top: 30vh;
    }

    .hero-label {
        font-size: 0.72rem;
    }

    .hero h1 {
        font-size: clamp(3.4rem, 17vw, 4.5rem);
    }

    .hero-subtitle {
        font-size: clamp(1.65rem, 8vw, 2.25rem);
    }

    .hero-description {
        max-width: 34rem;
        font-size: 1rem;
        line-height: 1.62;
    }

    .hero-actions {
        gap: 0.8rem;
    }

    .learning-design-section {
        padding: 3rem 1.15rem;
    }

    .learning-feature-card {
        padding: 1.1rem;
    }

    .learning-feature-card .forgetting-curve-graph {
        max-height: none;
    }

    .forgetting-curve-labels text,
    .revision-marker text {
        font-size: 17px;
    }

    .button {
        width: 100%;
        min-width: 0;
    }

    .hero-notes {
        display: none;
    }

    .site-footer-inner {
        align-items: center;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .site-footer-copy,
    .site-footer-disclaimer {
        max-width: 42rem;
        text-align: center;
    }

    .site-footer-links {
        justify-content: center;
    }

    .account-page,
    .dashboard-page,
    .course-page {
        padding: 6.25rem 1.15rem 2rem;
    }

    .course-page::before {
        inset: 5rem 1.15rem 1.5rem;
    }

    .dashboard-page::before {
        inset: 5rem 1.15rem 1.5rem;
    }

    .login-page {
        align-items: flex-start;
    }

    .register-page {
        align-items: flex-start;
    }

    .login-page::before,
    .register-page::before {
        inset: 5rem 1.15rem 1.5rem;
    }

    .login-panel,
    .register-panel {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .login-panel .account-copy,
    .register-panel .account-copy {
        text-align: left;
    }

    .login-panel .account-copy h1 {
        font-size: clamp(3rem, 15vw, 4.5rem);
    }

    .login-form {
        width: 100%;
        justify-self: stretch;
        padding: 1.35rem;
    }

    .register-panel .account-copy h1 {
        font-size: clamp(2.9rem, 14vw, 4.35rem);
    }

    .register-form {
        width: 100%;
        justify-self: stretch;
        padding: 1.35rem;
    }

    .role-choice-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-card,
    .card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .player-profile {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-hero-card h1 {
        font-size: clamp(2.35rem, 11vw, 3.5rem);
    }

    .stat-grid,
    .dashboard-grid,
    .dashboard-lower-grid,
    .course-grid,
    .achievement-stats-grid,
    .achievement-card-grid,
    .pathway-grid,
    .topic-grid {
        grid-template-columns: 1fr;
    }

    .component-stats {
        grid-template-columns: 1fr;
    }

    .mission-start-cta,
    .terminal-actions .card-action {
        width: 100%;
    }

    .terminal-actions {
        gap: 0.6rem;
    }

    .badge-row {
        grid-template-columns: 1fr;
    }

    .avatar-choice-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .avatar-modal-actions .card-action {
        width: 100%;
    }

    .checklist-card li {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .quest-step-nav {
        grid-template-columns: 1fr;
    }

    .quest-step-tab {
        justify-content: flex-start;
        text-align: left;
    }

    .stage-actions .card-action,
    .lesson-actions .card-action,
    .lesson-actions form {
        width: 100%;
    }

    .message-stack {
        top: 4.75rem;
        right: 1.15rem;
        left: 1.15rem;
        width: auto;
        max-width: none;
    }
}

.mission-stage-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mission-stage-layout > *,
.mission-objective-card,
.mission-workspace-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.mission-objective-card .mission-objective-grid,
.mission-objective-card .mission-reward-panel {
    width: 100%;
    max-width: 100%;
}

.mission-workspace-card textarea,
.mission-workspace-card pre,
.mission-workspace-card code,
.code-editor,
.python-editor,
.terminal-output {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

@media (max-width: 1100px) {
    .mission-stage-layout {
        grid-template-columns: 1fr;
    }

    .mission-objective-card {
        order: 1;
    }

    .mission-workspace-card {
        order: 2;
    }
}

/* Final responsive safety layer for the full CodeQuest surface. */
.site-nav,
.hero-inner,
.account-panel,
.dashboard-shell,
.course-shell,
.lesson-shell,
.achievement-page-shell,
.teacher-form-shell,
.avatar-modal-panel {
    max-width: 100%;
}

.dashboard-card,
.dashboard-hero-card,
.stat-card,
.course-hero,
.course-card,
.specpoint-card,
.lesson-detail-card,
.quiz-question-card,
.achievement-collection-card,
.teacher-metric-card,
.teacher-table-card,
.teacher-topic-row,
.teacher-support-row,
.account-form {
    min-width: 0;
    overflow-wrap: anywhere;
}

.card-action,
.button,
.desktop-sign-in,
.mobile-sign-in,
.menu-button,
button,
input,
select,
textarea {
    min-height: 2.75rem;
}

.terminal-actions,
.lesson-actions,
.stage-actions,
.hero-actions,
.avatar-modal-actions {
    flex-wrap: wrap;
}

.python-editor,
.python-output,
.quiz-code-block,
.quiz-answer-input,
.terminal-output,
pre,
code {
    max-width: 100%;
}

.python-output,
.terminal-output {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.teacher-table-wrap,
.responsive-table,
.teacher-student-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.teacher-table-card {
    max-width: 100%;
    overflow: hidden;
}

.teacher-table-card .teacher-table-wrap,
.teacher-table-card .teacher-topic-list,
.teacher-table-card .teacher-lesson-groups,
.teacher-table-card .teacher-lesson-component,
.teacher-table-card .teacher-lesson-topic,
.teacher-table-card .student-lesson-progress-list {
    min-width: 0;
    max-width: 100%;
}

.teacher-table-wrap .teacher-table-head,
.teacher-table-wrap .teacher-table-row,
.teacher-table-wrap .teacher-topic-row,
.teacher-table-wrap .teacher-lesson-row {
    max-width: 100%;
}

.teacher-table-wrap .cell-long,
.teacher-table-wrap [data-label="Latest Activity"],
.teacher-table-wrap .student-lesson-main,
.teacher-table-wrap .teacher-lesson-row-status {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.teacher-lesson-table-wrap,
.teacher-card-list-wrap {
    overflow-x: hidden;
}

@media (max-width: 1100px) {
    .site-nav {
        grid-template-columns: 1fr auto;
    }

    .desktop-nav,
    .desktop-sign-in {
        display: none;
    }

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero h1,
    .account-copy h1,
    .course-hero h1,
    .lesson-detail-card h1 {
        font-size: clamp(2.7rem, 9vw, 4.8rem);
    }

    .dashboard-hero-card h1 {
        font-size: clamp(2.4rem, 7vw, 4.2rem);
    }

    .course-shell,
    .dashboard-shell {
        width: min(100%, 72rem);
    }

    .course-grid,
    .pathway-grid,
    .topic-grid,
    .dashboard-grid,
    .dashboard-lower-grid,
    .achievement-card-grid,
    .teacher-class-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-grid,
    .achievement-stats-grid,
    .teacher-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mission-stage-grid,
    .mission-stage-layout,
    .mission-objective-grid,
    .mission-reward-panel,
    .badge-row {
        grid-template-columns: 1fr;
    }

    .teacher-topic-row,
    .teacher-support-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .site-nav {
        padding: 1rem;
    }

    .mobile-menu {
        margin-inline: 1rem;
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
    }

    body.mobile-menu-open .site-header {
        position: relative;
        inset: auto;
        background: linear-gradient(180deg, rgba(4, 9, 12, 0.98), rgba(4, 9, 12, 0.9));
        border-bottom: 1px solid rgba(53, 215, 232, 0.16);
    }

    body.mobile-menu-open .account-page,
    body.mobile-menu-open .dashboard-page,
    body.mobile-menu-open .course-page {
        padding-top: 1.25rem;
    }

    body.mobile-menu-open .hero {
        min-height: auto;
    }

    body.mobile-menu-open .hero-inner {
        min-height: auto;
        padding-top: 1.75rem;
        padding-bottom: 2rem;
    }

    body.mobile-menu-open .hero-copy {
        padding-top: 0;
    }

    .hero-inner {
        padding: 6.5rem 1.15rem 1.75rem;
    }

    .hero-content {
        align-items: center;
    }

    .hero h1 {
        font-size: clamp(3rem, 15vw, 4.4rem);
    }

    .hero-subtitle {
        font-size: clamp(1.55rem, 7vw, 2.25rem);
    }

    .hero-description,
    .account-copy p,
    .course-hero p:not(.eyebrow),
    .dashboard-card p {
        font-size: 1rem;
        line-height: 1.62;
    }

    .account-page,
    .dashboard-page,
    .course-page {
        padding: 6rem 1rem 2rem;
    }

    .course-page::before,
    .dashboard-page::before {
        inset: 4.9rem 1rem 1.25rem;
    }

    .account-panel,
    .login-panel,
    .register-panel,
    .dashboard-grid,
    .dashboard-lower-grid,
    .course-grid,
    .pathway-grid,
    .topic-grid,
    .achievement-card-grid,
    .teacher-class-grid {
        grid-template-columns: 1fr;
    }

    .account-form,
    .login-form,
    .register-form,
    .dashboard-card,
    .dashboard-hero-card,
    .course-hero,
    .quiz-hero,
    .lesson-section,
    .teacher-form-card {
        padding: 1.15rem;
    }

    .account-copy h1,
    .register-panel .account-copy h1,
    .login-panel .account-copy h1,
    .course-hero h1,
    .lesson-detail-card h1,
    .quiz-hero-title {
        font-size: clamp(2.35rem, 11vw, 3.65rem) !important;
        line-height: 1 !important;
    }

    .course-hero .component-hero-title {
        max-width: 100%;
        font-size: clamp(2.4rem, 12vw, 4rem) !important;
        line-height: 1 !important;
    }

    .role-choice-grid,
    .stat-grid,
    .achievement-stats-grid,
    .teacher-analytics-grid,
    .component-stats {
        grid-template-columns: 1fr;
    }

    .player-profile,
    .dashboard-hero-card,
    .teacher-hero-card,
    .card-heading,
    .avatar-modal-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .player-avatar {
        width: 5rem;
        height: 5rem;
    }

    .avatar-modal {
        align-items: start;
        padding: 1rem;
        overflow-y: auto;
    }

    .avatar-modal-panel {
        max-height: none;
        padding: 1rem;
    }

    .avatar-choice-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .quest-step-nav {
        display: flex;
        gap: 0.6rem;
        overflow-x: auto;
        padding-bottom: 0.35rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .quest-step-tab {
        flex: 0 0 auto;
        min-width: 8rem;
        justify-content: center;
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .mission-stage-grid,
    .mission-stage-layout {
        gap: 1rem;
    }

    .python-editor {
        min-height: 14rem;
        font-size: 0.9rem;
    }

    .python-output,
    .terminal-output {
        max-height: 14rem;
    }

    .terminal-actions .card-action,
    .stage-actions .card-action,
    .lesson-actions .card-action,
    .lesson-actions form,
    .hero-actions .button,
    .avatar-modal-actions .card-action,
    .quiz-hero-meta span {
        width: 100%;
    }

    .quiz-options label {
        min-height: 3rem;
    }

    .achievement-filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .achievement-filter-tabs a {
        flex: 0 0 auto;
    }

    .teacher-table-head,
    .teacher-table-row {
        font-size: 0.85rem;
    }

    .qualification-section {
        gap: 1.25rem;
        margin-top: 2.25rem;
    }

    .pathway-accordion {
        display: block;
        margin-top: 1rem;
        overflow: hidden;
        border: 1px solid rgba(48, 217, 236, 0.25);
        background: rgba(3, 12, 18, 0.92);
        box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
    }

    .pathway-accordion:not([open]) > .pathway-accordion__body {
        display: none;
    }

    .course-hero + .pathway-accordion,
    .pathway-accordion:first-of-type {
        margin-top: 0;
    }

    .pathway-accordion__summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto 1rem;
        align-items: center;
        gap: 0.75rem;
        min-height: 3.65rem;
        padding: 1rem;
        color: #ffffff;
        cursor: pointer;
        list-style: none;
    }

    .pathway-accordion__summary::-webkit-details-marker {
        display: none;
    }

    .pathway-accordion__summary::after {
        grid-column: 3;
        justify-self: end;
        color: #35dff0;
        content: "+";
        font-size: 1.25rem;
        font-weight: 900;
        line-height: 1;
    }

    .pathway-accordion[open] > .pathway-accordion__summary::after {
        content: "-";
    }

    .pathway-accordion__summary > span:first-child {
        min-width: 0;
        font-family: Georgia, Cambria, serif;
        font-size: clamp(1.15rem, 5vw, 1.55rem);
        font-weight: 900;
        line-height: 1.1;
    }

    .pathway-accordion__meta {
        display: inline-flex;
        grid-column: 2;
        align-items: center;
        justify-content: center;
        max-width: 9rem;
        min-height: 1.65rem;
        padding: 0.35rem 0.55rem;
        color: #ffd69d;
        background: rgba(216, 138, 45, 0.1);
        border: 1px solid rgba(216, 138, 45, 0.26);
        font-size: 0.64rem;
        font-weight: 900;
        line-height: 1.1;
        overflow-wrap: anywhere;
        text-align: center;
        text-transform: uppercase;
    }

    .pathway-accordion__body {
        padding: 0 1rem 1rem;
    }

    .pathway-accordion__body .qualification-header {
        display: none;
    }

    .pathway-accordion .pathway-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .pathway-accordion .pathway-card {
        gap: 0.7rem;
        padding: 0.95rem;
    }

    .pathway-accordion .topic-card-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 0.7rem;
    }

    .pathway-accordion .topic-card-header h2 {
        font-size: clamp(1.1rem, 5vw, 1.35rem);
        line-height: 1.15;
    }

    .pathway-accordion .status-badge {
        min-width: 0;
        max-width: 7.5rem;
        padding: 0.35rem 0.5rem;
        white-space: normal;
        text-align: center;
    }

    .pathway-card.is-coming-soon {
        background:
            linear-gradient(145deg, rgba(7, 17, 22, 0.88), rgba(3, 8, 11, 0.76));
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
    }

    .pathway-card.is-coming-soon > p,
    .pathway-card.is-coming-soon .component-progress-block {
        display: none;
    }

    .pathway-card.is-coming-soon .card-action.is-disabled {
        min-height: 2rem;
        margin-top: 0;
        padding: 0.35rem 0.6rem;
        color: #ffd69d;
        background: rgba(216, 138, 45, 0.08);
        border-color: rgba(216, 138, 45, 0.22);
        font-size: 0.64rem;
    }

    .pathway-card.is-coming-soon .topic-card-header {
        align-items: start;
    }

    .pathway-card.is-coming-soon .topic-card-header h2 {
        font-size: 1.15rem;
        line-height: 1.15;
    }

    .pathway-card.is-available {
        border-color: rgba(53, 215, 232, 0.32);
        box-shadow: 0 0 28px rgba(53, 215, 232, 0.08), 0 18px 44px rgba(0, 0, 0, 0.32);
    }

    .pathway-card.is-available .card-action {
        width: 100%;
    }

    .pathway-card.is-available .component-progress-block {
        padding: 0.75rem;
    }

    .course-hero-copy {
        max-height: 9.5rem;
        margin-top: 0.85rem;
        padding-right: 0.65rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-color: rgba(53, 223, 240, 0.45) rgba(255, 255, 255, 0.04);
        scrollbar-width: thin;
    }

    .course-hero-copy .course-mode-message {
        margin-top: 0;
        font-size: 1rem;
    }

    .course-hero-copy .course-helper-text {
        margin-top: 0.55rem;
        font-size: 0.86rem;
        line-height: 1.5 !important;
    }

    .course-hero-copy::-webkit-scrollbar {
        width: 8px;
    }

    .course-hero-copy::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.04);
    }

    .course-hero-copy::-webkit-scrollbar-thumb {
        background: rgba(53, 223, 240, 0.45);
        border-radius: 999px;
    }

    .courses-inner {
        padding-inline: 1rem;
    }

    .qualification-header {
        gap: 0.55rem;
    }
}

@media (max-width: 520px) {
    .course-hero-copy {
        max-height: 8rem;
    }

    .site-logo {
        font-size: 0.82rem;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 16vw, 3.7rem);
    }

    .hero-actions,
    .lesson-actions,
    .stage-actions,
    .terminal-actions,
    .avatar-modal-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .button,
    .card-action {
        width: 100%;
        min-width: 0;
        justify-content: center;
        text-align: center;
    }

    .profile-badges,
    .course-meta,
    .lesson-meta,
    .quiz-hero-meta {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .profile-badges span,
    .course-meta span,
    .lesson-meta span {
        width: 100%;
        text-align: center;
    }

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

    .achievement-item,
    .checklist-card li {
        grid-template-columns: 1fr;
    }

    .teacher-stat-row {
        grid-template-columns: 1fr;
    }

    .teacher-table-head,
    .teacher-table-row {
        min-width: 64rem;
    }

    .teacher-lesson-head,
    .teacher-lesson-row {
        min-width: 52rem;
    }

    .message-stack {
        top: 4.75rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }
}

.bits-stat-card {
    position: relative;
}

.bits-stat-card a {
    color: var(--accent-cyan);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bit-icon {
    align-items: center;
    display: inline-flex;
    height: 2.7rem;
    justify-content: center;
    margin-bottom: 0.8rem;
    width: 2.7rem;
}

.bit-icon img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.bit-shop-page .dashboard-shell {
    gap: 1.4rem;
}

.bit-shop-hero {
    align-items: end;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
}

.bit-balance-panel {
    background: rgba(245, 178, 73, 0.08);
    border: 1px solid rgba(245, 178, 73, 0.42);
    padding: 1.2rem;
}

.bit-balance-panel span,
.bit-balance-panel small {
    color: rgba(255, 255, 255, 0.68);
    display: block;
}

.bit-balance-panel strong {
    color: #f5d38a;
    display: block;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.05;
    margin: 0.25rem 0 0.6rem;
}

.bit-shop-note {
    border-color: rgba(245, 178, 73, 0.32);
    padding-block: 1rem;
}

.shop-item-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.shop-item-card {
    background: rgba(2, 14, 18, 0.76);
    border: 1px solid rgba(38, 198, 218, 0.2);
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.shop-item-card.is-owned {
    border-color: rgba(255, 255, 255, 0.24);
}

.shop-item-card.is-equipped {
    border-color: rgba(38, 198, 218, 0.68);
    box-shadow: inset 0 0 0 1px rgba(38, 198, 218, 0.2);
}

.shop-item-heading {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.shop-item-heading h3 {
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
}

.shop-item-heading p,
.shop-coming-soon-card p {
    color: rgba(255, 255, 255, 0.68);
    margin: 0;
}

.bit-price {
    border: 1px solid rgba(245, 178, 73, 0.46);
    color: #f5d38a;
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0.38rem 0.5rem;
    text-transform: uppercase;
}

.shop-item-state {
    min-height: 1.6rem;
}

.shop-item-card form,
.shop-item-card .card-action {
    width: 100%;
}

.shop-coming-soon-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
    .bit-shop-hero,
    .shop-coming-soon-grid {
        grid-template-columns: 1fr;
    }

    .shop-item-heading {
        display: grid;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 100svh;
        background-position: 54% center;
    }

    .hero-backdrop {
        opacity: 0.78;
        filter: blur(10px) saturate(1.18);
        transform: scale(1.04);
    }

    .hero-overlay {
        background:
            linear-gradient(180deg, rgba(3, 7, 10, 0.64) 0%, rgba(3, 7, 10, 0.46) 36%, rgba(3, 7, 10, 0.86) 100%),
            linear-gradient(90deg, rgba(3, 7, 10, 0.66) 0%, rgba(3, 7, 10, 0.36) 52%, rgba(3, 7, 10, 0.62) 100%),
            radial-gradient(circle at 58% 20%, rgba(53, 215, 232, 0.2), transparent 34%),
            radial-gradient(circle at 68% 58%, rgba(216, 138, 45, 0.22), transparent 38%);
    }

    .hero-vignette {
        background:
            radial-gradient(circle at 56% 38%, rgba(0, 0, 0, 0.02) 0, rgba(0, 0, 0, 0.24) 45%, rgba(0, 0, 0, 0.72) 100%),
            linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 34%);
    }

    .hero-content {
        align-items: center;
    }

    .hero-copy {
        padding-top: clamp(3rem, 10vh, 5.5rem);
    }

    .hero-actions {
        margin-top: 1.65rem;
    }
}

@media (max-width: 768px) {
    .lesson-page {
        overflow-x: hidden;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .lesson-page::before {
        right: 0.75rem;
        left: 0.75rem;
    }

    .lesson-shell {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .lesson-quest {
        gap: 0.85rem;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
        padding: 0.95rem;
    }

    .lesson-page .quest-stage,
    .lesson-page .lesson-header,
    .lesson-page .lesson-section,
    .lesson-page .learning-objectives-list,
    .lesson-page .learning-objective-item,
    .lesson-page .mission-stage-grid,
    .lesson-page .mission-stage-layout,
    .lesson-page .mission-objective-grid,
    .lesson-page .mission-reward-panel,
    .lesson-page .practice-terminal-card,
    .lesson-page .mini-mission-card,
    .lesson-page .mission-steps,
    .lesson-page .success-checks {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .lesson-header {
        display: grid;
        gap: 0.75rem;
        padding-bottom: 0.9rem;
    }

    .lesson-header .eyebrow {
        line-height: 1.45;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .lesson-detail-card h1 {
        font-size: clamp(1.95rem, 9vw, 2.65rem) !important;
        line-height: 1.02 !important;
        overflow-wrap: anywhere;
    }

    .lesson-meta {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.45rem;
        width: 100%;
    }

    .lesson-meta span,
    .lesson-meta .status-badge {
        width: 100%;
        min-width: 0;
        justify-content: center;
        text-align: center;
    }

    .quest-step-nav {
        display: flex;
        gap: 0.45rem;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-inline: 0;
        overflow-x: auto;
        padding: 0.35rem 0.2rem 0.55rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .quest-step-tab {
        flex: 0 0 auto;
        min-width: 6.75rem;
        min-height: 2.45rem;
        justify-content: center;
        padding: 0 0.65rem;
        font-size: 0.68rem;
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .quest-stage {
        gap: 0.85rem;
    }

    .stage-heading {
        padding-bottom: 0.55rem;
    }

    .stage-heading h2,
    .practice-terminal-card h2,
    .mini-mission-card h2 {
        font-size: clamp(1.55rem, 8vw, 2.25rem);
        line-height: 1.05;
    }

    .lesson-section,
    .practice-terminal-card,
    .mini-mission-card,
    .mission-steps,
    .success-checks,
    .mission-guidance-block,
    .mission-hint-panel,
    .component-progress-block {
        padding: 0.9rem;
    }

    .lesson-content,
    .lesson-content p,
    .learning-objective-text,
    .common-mistake-title,
    .common-mistake-fix,
    .mission-step-text,
    .success-check-item,
    .mission-hint-panel span,
    .expected-output-item {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .learning-objective-item,
    .common-mistake-item,
    .mission-step,
    .expected-output-item {
        padding: 0.75rem;
    }

    .mission-stage-grid,
    .mission-stage-layout,
    .mission-objective-grid,
    .mission-reward-panel {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .mission-stage-grid .mini-mission-card {
        padding: 0.95rem;
    }

    .mission-step {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .success-check-item {
        gap: 0.55rem;
    }

    .mission-state {
        padding: 0.75rem;
        line-height: 1.35;
    }

    .card-heading {
        gap: 0.6rem;
    }

    .card-heading .status-badge,
    .pyodide-status {
        align-self: stretch;
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .python-editor {
        min-height: 12rem;
        padding: 0.8rem;
        font-size: 0.86rem;
        line-height: 1.55;
    }

    .python-output {
        min-height: 7rem;
        max-height: 12rem;
        padding: 0.75rem;
        font-size: 0.84rem;
        line-height: 1.5;
    }

    .mobile-task-helper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.75rem;
        background: rgba(53, 215, 232, 0.06);
        border: 1px solid rgba(53, 215, 232, 0.2);
    }

    .mobile-task-helper span {
        min-width: 0;
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.78rem;
        font-weight: 900;
        letter-spacing: 0.08em;
        line-height: 1.25;
        text-transform: uppercase;
    }

    .mobile-task-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 2.35rem;
        padding: 0 0.85rem;
        color: #071015;
        background: #35d7e8;
        border: 0;
        font-family: inherit;
        font-size: 0.68rem;
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        cursor: pointer;
    }

    .mobile-task-button:focus-visible,
    .mobile-task-overlay__close:focus-visible {
        outline: 3px solid rgba(53, 215, 232, 0.6);
        outline-offset: 3px;
    }

    .mobile-task-overlay.is-open {
        position: absolute;
        inset: 0;
        z-index: 20;
        display: flex;
        align-items: stretch;
        justify-content: center;
        padding: 0.75rem;
    }

    .mobile-task-overlay__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(1, 5, 8, 0.86);
        backdrop-filter: blur(6px);
    }

    .mobile-task-overlay__panel {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        width: 100%;
        height: 100%;
        min-height: 100%;
        overflow: hidden;
        background:
            radial-gradient(circle at 18% 0%, rgba(53, 215, 232, 0.14), transparent 38%),
            linear-gradient(145deg, rgba(7, 17, 22, 0.98), rgba(2, 7, 10, 0.98));
        border: 1px solid rgba(53, 215, 232, 0.34);
        box-shadow: 0 28px 80px rgba(0, 0, 0, 0.64), 0 0 34px rgba(53, 215, 232, 0.1);
    }

    .mobile-task-overlay__header,
    .mobile-task-overlay__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    }

    .mobile-task-overlay__footer {
        border-top: 1px solid rgba(255, 255, 255, 0.09);
        border-bottom: 0;
    }

    .mobile-task-overlay__header h2 {
        margin: 0;
        color: #ffffff;
        font-family: Georgia, Cambria, serif;
        font-size: 1.45rem;
        line-height: 1.05;
    }

    .mobile-task-overlay__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 2.4rem;
        height: 2.4rem;
        color: #35d7e8;
        background: rgba(53, 215, 232, 0.08);
        border: 1px solid rgba(53, 215, 232, 0.24);
        font-family: inherit;
        font-size: 1.4rem;
        font-weight: 900;
        line-height: 1;
        cursor: pointer;
    }

    .mobile-task-overlay__body {
        min-height: 0;
        overflow-y: auto;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-color: rgba(53, 223, 240, 0.45) rgba(255, 255, 255, 0.04);
        scrollbar-width: thin;
    }

    .mobile-task-overlay__body::-webkit-scrollbar {
        width: 8px;
    }

    .mobile-task-overlay__body::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.04);
    }

    .mobile-task-overlay__body::-webkit-scrollbar-thumb {
        background: rgba(53, 223, 240, 0.45);
        border-radius: 999px;
    }

    .terminal-actions,
    .stage-actions,
    .lesson-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.65rem;
        width: 100%;
    }

    .terminal-actions .card-action,
    .stage-actions .card-action,
    .lesson-actions .card-action,
    .lesson-actions form,
    .lesson-actions button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 420px) {
    .lesson-quest {
        padding: 0.8rem;
    }

    .lesson-section,
    .practice-terminal-card,
    .mini-mission-card,
    .mission-steps,
    .success-checks {
        padding: 0.8rem;
    }

    .quest-step-tab {
        min-width: 6.2rem;
        font-size: 0.64rem;
    }

    .lesson-detail-card h1 {
        font-size: clamp(1.9rem, 11vw, 2.6rem) !important;
    }
}

@media (max-width: 768px) {
    body.mobile-menu-open .hero {
        min-height: auto;
    }

    body.mobile-menu-open .hero-inner {
        min-height: 0;
        padding-top: 1.25rem;
        padding-bottom: 2rem;
    }

    body.mobile-menu-open .hero-content {
        flex: 0 0 auto;
    }

    body.mobile-menu-open .hero-copy {
        padding-top: 0;
    }
}

.theory-showcase-lesson .lesson-section,
.theory-showcase-lesson .cpu-core-panel,
.theory-showcase-lesson .exam-tip-panel,
.theory-showcase-lesson .concept-card,
.theory-showcase-lesson .exam-question-card {
    border: 1px solid rgba(53, 215, 232, 0.22);
    background: linear-gradient(135deg, rgba(4, 18, 22, 0.96), rgba(6, 10, 12, 0.98));
}

.theory-showcase-lesson .lesson-section {
    padding: clamp(0.95rem, 1.7vw, 1.25rem);
}

.cpu-control-room {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.8fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.cpu-core-panel,
.exam-tip-panel,
.concept-card,
.exam-question-card {
    padding: clamp(0.9rem, 1.5vw, 1.1rem);
}

.cpu-core-panel h3,
.concept-card h3,
.exam-question-card h3 {
    margin: 0.2rem 0 0.6rem;
    font-family: Georgia, Cambria, serif;
    color: #fff;
}

.cpu-flow-diagram {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1rem;
}

.performance-meter-row,
.cpu-spec-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.embedded-device-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
}

.performance-meter-row span,
.embedded-device-row span:not(.flow-arrow) {
    border: 1px solid rgba(53, 215, 232, 0.35);
    background: linear-gradient(180deg, rgba(53, 215, 232, 0.16), rgba(53, 215, 232, 0.04));
    color: #eafcff;
    padding: 0.7rem;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.embedded-device-row span:not(.flow-arrow) {
    flex: 1 1 10rem;
}

.performance-concept-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.performance-card {
    border-color: rgba(216, 138, 45, 0.28);
}

.embedded-concept-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.embedded-card {
    border-color: rgba(53, 215, 232, 0.28);
}

.memory-card {
    border-color: rgba(216, 138, 45, 0.3);
}

.cpu-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.device-classification-grid,
.device-investigation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
}

.device-classification-grid label,
.device-investigation-grid label {
    display: grid;
    gap: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem;
    font-weight: 800;
}

.device-classification-grid select,
.device-investigation-grid select {
    width: 100%;
    border: 1px solid rgba(53, 215, 232, 0.28);
    background: #061014;
    color: #fff;
    padding: 0.75rem;
    font: inherit;
}

.cpu-spec-card {
    border: 1px solid rgba(53, 215, 232, 0.28);
    background: rgba(53, 215, 232, 0.07);
    padding: 1rem;
}

.cpu-spec-card strong,
.cpu-spec-card span {
    display: block;
}

.cpu-spec-card strong {
    color: #fff;
    font-family: Georgia, Cambria, serif;
    font-size: 1.8rem;
    line-height: 1;
    margin: 0.25rem 0 0.8rem;
}

.cpu-spec-card span {
    color: rgba(234, 252, 255, 0.8);
    font-weight: 800;
    margin-top: 0.25rem;
}

.cpu-flow-diagram span:not(.flow-arrow) {
    border: 1px solid rgba(53, 215, 232, 0.35);
    background: rgba(53, 215, 232, 0.08);
    color: #eafcff;
    padding: 0.7rem 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 0.74rem;
}

.flow-arrow {
    color: #35d7e8;
    font-weight: 900;
}

.exam-tip-panel {
    border-color: rgba(216, 138, 45, 0.45);
    background: linear-gradient(135deg, rgba(94, 57, 17, 0.32), rgba(8, 12, 13, 0.96));
}

.concept-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.concept-card p {
    margin: 0;
    color: rgba(234, 252, 255, 0.82);
}

.concept-card span {
    display: block;
    margin-top: 0.75rem;
    color: rgba(255, 214, 157, 0.9);
    font-size: 0.9rem;
    line-height: 1.5;
}

.theory-question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
}

.theory-question-grid label,
.misconception-check-list label {
    display: grid;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 800;
}

.theory-question-grid select,
.misconception-check-list select {
    width: 100%;
    border: 1px solid rgba(53, 215, 232, 0.28);
    background: #061014;
    color: #fff;
    padding: 0.75rem;
    font: inherit;
}

.theory-feedback {
    min-height: 1.5rem;
    margin: 0.85rem 0 0;
    color: #35d7e8;
    font-weight: 800;
}

.activity-helper-text {
    margin: 0.45rem 0 0;
    color: rgba(234, 252, 255, 0.72);
    line-height: 1.55;
}

.misconception-check-list {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
}

.misconception-check-list label {
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 12rem);
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem;
}

.exam-practice-stack {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.model-answer {
    margin-top: 0.8rem;
    border-left: 3px solid #d88a2d;
    background: rgba(216, 138, 45, 0.12);
    padding: 0.85rem;
    color: rgba(255, 244, 225, 0.95);
    line-height: 1.55;
}

.exam-flow-section {
    border: 1px solid rgba(53, 215, 232, 0.18);
    background: rgba(2, 14, 18, 0.72);
    display: grid;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding: 0.9rem;
}

.attempt-quality-panel {
    border-color: rgba(216, 138, 45, 0.28);
}

.attempt-quality-panel.is-ready {
    border-color: rgba(53, 215, 232, 0.55);
    background: rgba(53, 215, 232, 0.07);
}

.attempt-quality-meter {
    color: #eafcff;
    font-size: 1.1rem;
    font-weight: 900;
}

.attempt-quality-meter span:first-child {
    color: #35d7e8;
}

.mark-point-list {
    display: grid;
    gap: 0.55rem;
}

.mark-point-list label {
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(234, 252, 255, 0.86);
    display: flex;
    gap: 0.75rem;
    line-height: 1.45;
    padding: 0.7rem;
}

.mark-point-list input[type="checkbox"] {
    accent-color: #35d7e8;
    appearance: auto;
    display: inline-block;
    flex: 0 0 auto;
    height: 1rem !important;
    margin: 0.22rem 0 0 !important;
    max-width: 1rem !important;
    min-width: 1rem !important;
    width: 1rem !important;
}

.model-answer + .mark-point-panel {
    margin-top: 1.35rem;
}

.improve-answer-panel textarea,
.exam-question-card textarea.quiz-answer-input {
    background: rgba(1, 10, 13, 0.82);
    border-color: rgba(53, 215, 232, 0.26);
    color: #eafcff;
}

.improve-answer-panel textarea::placeholder,
.exam-question-card textarea.quiz-answer-input::placeholder {
    color: rgba(234, 252, 255, 0.48);
}

.self-review-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.self-review-controls button {
    border: 1px solid rgba(53, 215, 232, 0.35);
    background: rgba(53, 215, 232, 0.08);
    color: #fff;
    padding: 0.55rem 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.self-review-controls button.is-selected {
    background: #35d7e8;
    color: #041014;
}

.exam-reveal-helper {
    margin: 0.6rem 0 0.45rem;
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.82rem;
    line-height: 1.45;
}

.card-action.is-disabled,
.card-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.exam-review-feedback {
    margin-top: 0.25rem;
}

.theory-activity-panel.is-complete,
.exam-practice-panel.is-complete {
    border-color: rgba(53, 215, 232, 0.55);
    box-shadow: 0 0 0 1px rgba(53, 215, 232, 0.12), 0 16px 40px rgba(53, 215, 232, 0.06);
}

.completion-requirements-panel.is-locked {
    border-color: rgba(216, 138, 45, 0.45);
}

.completion-requirements-panel.is-unlocked {
    border-color: rgba(53, 215, 232, 0.45);
}

.requirement-list {
    display: grid;
    gap: 0.6rem;
    margin-top: 1rem;
}

.requirement-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.7rem;
}

.requirement-item strong {
    color: rgba(255, 214, 157, 0.95);
    text-transform: uppercase;
    font-size: 0.72rem;
}

.requirement-item.is-complete strong {
    color: #35d7e8;
}

.generic-activity-list {
    display: grid;
    gap: 1.65rem;
    margin-top: 1rem;
}

.generic-activity-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(53, 215, 232, 0.16);
}

.generic-activity-card .card-heading {
    align-items: start;
}

.generic-activity-card .mission-objective-grid {
    margin-top: 0;
}

.generic-activity-card .mission-guidance-block,
.generic-activity-card .success-checks {
    min-height: 100%;
}

.generic-activity-card.is-complete {
    border-color: rgba(53, 215, 232, 0.55);
    box-shadow: inset 0 0 0 1px rgba(53, 215, 232, 0.12);
}

.generic-activity-card [data-complete-generic-activity] {
    justify-self: start;
    margin-bottom: 0.35rem;
    margin-top: 0.35rem;
}

.generic-check-panel {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    background: rgba(53, 215, 232, 0.045);
    border: 1px solid rgba(53, 215, 232, 0.18);
}

.generic-check-panel select.is-correct {
    border-color: rgba(53, 215, 232, 0.75);
    box-shadow: 0 0 0 1px rgba(53, 215, 232, 0.18);
}

.generic-check-panel select.is-incorrect {
    border-color: rgba(216, 138, 45, 0.75);
    box-shadow: 0 0 0 1px rgba(216, 138, 45, 0.18);
}

.term-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.term-chip-list span {
    border: 1px solid rgba(53, 215, 232, 0.35);
    background: rgba(53, 215, 232, 0.1);
    color: #eafcff;
    padding: 0.5rem 0.7rem;
    font-weight: 900;
}

.data-visual-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(13rem, 0.7fr);
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.data-visual-card {
    display: grid;
    align-content: start;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(53, 215, 232, 0.22);
    background: linear-gradient(135deg, rgba(4, 18, 22, 0.96), rgba(6, 10, 12, 0.98));
}

.data-visual-card h3 {
    margin: 0.2rem 0 0;
    color: #fff;
    font-family: Georgia, Cambria, serif;
}

.pixel-grid-demo {
    display: grid;
    grid-template-columns: repeat(4, 2.4rem);
    width: fit-content;
    gap: 0.18rem;
    padding: 0.55rem;
    background: #020608;
    border: 1px solid rgba(53, 215, 232, 0.26);
    box-shadow: 0 0 30px rgba(53, 215, 232, 0.08);
}

.pixel-grid-demo.compact {
    grid-template-columns: repeat(4, 2.1rem);
}

.pixel {
    display: inline-block;
    width: 2.4rem;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.08);
}

.pixel-grid-demo.compact .pixel {
    width: 2.1rem;
}

.pixel.red {
    background: #e35a5a;
}

.pixel.cyan {
    background: #35d7e8;
}

.pixel.gold {
    background: #d8a12d;
}

.pixel.purple {
    background: #9b6cff;
}

.sampling-diagram {
    width: 100%;
    min-height: 9rem;
}

.wave-axis {
    stroke: rgba(255, 255, 255, 0.22);
    stroke-width: 2;
}

.sound-wave {
    fill: none;
    stroke: #35d7e8;
    stroke-width: 4;
    filter: drop-shadow(0 0 8px rgba(53, 215, 232, 0.45));
}

.sample-markers line {
    stroke: rgba(216, 138, 45, 0.8);
    stroke-width: 2;
}

.sample-markers circle {
    fill: #ffd69d;
    stroke: #d88a2d;
    stroke-width: 2;
}

.character-code-card strong {
    display: block;
    width: fit-content;
    padding: 0.75rem;
    color: #8df7c8;
    background: #020608;
    border: 1px solid rgba(53, 215, 232, 0.28);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 1.15rem;
}

.pixel-decoder-layout {
    display: grid;
    grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    align-items: start;
    margin: 1rem 0;
}

.pixel-key {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.pixel-key span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    font-weight: 900;
}

.pixel-key .pixel {
    width: 0.9rem;
}

.theory-question-grid.one-column {
    grid-template-columns: 1fr;
    margin: 0;
}

.lesson-visual-card {
    display: grid;
    gap: 1rem;
    border-color: rgba(53, 215, 232, 0.28) !important;
    background:
        radial-gradient(circle at 10% 0%, rgba(53, 215, 232, 0.08), transparent 32%),
        linear-gradient(135deg, rgba(4, 18, 22, 0.96), rgba(6, 10, 12, 0.98)) !important;
}

.visual-header {
    display: grid;
    gap: 0.35rem;
}

.visual-title {
    margin: 0;
    color: #fff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.visual-caption {
    max-width: 56rem;
    margin: 0;
    color: rgba(234, 252, 255, 0.76);
    line-height: 1.55;
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.cpu-map-visual {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.three-card-visual {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.data-type-visual,
.boolean-visual {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.boolean-visual {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-node,
.visual-badge {
    display: grid;
    gap: 0.35rem;
    align-content: center;
    min-height: 5.25rem;
    padding: 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(53, 215, 232, 0.065);
    border: 1px solid rgba(53, 215, 232, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.visual-node strong,
.visual-badge {
    color: #ffffff;
    font-weight: 900;
}

.visual-node span,
.visual-node small,
.visual-badge small {
    color: rgba(234, 252, 255, 0.72);
    font-size: 0.86rem;
    line-height: 1.35;
}

.visual-node.is-central {
    border-color: rgba(216, 138, 45, 0.5);
    background: rgba(216, 138, 45, 0.11);
}

.visual-node.is-warning {
    border-color: rgba(216, 138, 45, 0.42);
    background: linear-gradient(135deg, rgba(94, 57, 17, 0.24), rgba(53, 215, 232, 0.045));
}

.visual-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.6rem;
}

.visual-flow .visual-node {
    flex: 1 1 11rem;
}

.visual-arrow {
    display: inline-grid;
    place-items: center;
    min-width: 1.6rem;
    color: #35d7e8;
    font-weight: 900;
}

.visual-comparison-table {
    display: grid;
    gap: 0.35rem;
}

.visual-comparison-table > div {
    display: grid;
    grid-template-columns: minmax(8rem, 0.75fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 0.35rem;
}

.visual-comparison-table span,
.visual-comparison-table strong {
    padding: 0.7rem;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    line-height: 1.35;
}

.visual-comparison-table div:first-child span {
    color: #071015;
    background: #35d7e8;
    border-color: #35d7e8;
    font-weight: 900;
}

.visual-comparison-table strong {
    color: #ffd69d;
}

.visual-notice-list {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding-left: 1.15rem;
    color: rgba(234, 252, 255, 0.8);
    line-height: 1.5;
}

.visual-meter {
    display: grid;
    gap: 0.55rem;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(216, 138, 45, 0.24);
}

.visual-meter::before {
    display: block;
    height: 0.7rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    content: "";
}

.visual-meter span {
    display: block;
    height: 0.7rem;
    margin-top: -1.25rem;
    background: linear-gradient(90deg, #35d7e8, #d88a2d);
    box-shadow: 0 0 18px rgba(216, 138, 45, 0.22);
}

.visual-meter strong {
    color: #ffd69d;
    font-size: 0.86rem;
}

.unit-ladder-visual,
.binary-place-visual,
.array-index-visual {
    display: grid;
    gap: 0.35rem;
}

.unit-ladder-visual {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.unit-ladder-visual span,
.binary-place-visual span,
.binary-place-visual strong,
.array-index-visual span {
    display: grid;
    min-height: 3.1rem;
    place-items: center;
    padding: 0.55rem;
    color: #eafcff;
    background: rgba(53, 215, 232, 0.075);
    border: 1px solid rgba(53, 215, 232, 0.25);
    font-weight: 900;
    text-align: center;
}

.binary-place-visual {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.binary-place-visual strong {
    color: #071015;
    background: #35d7e8;
    border-color: #35d7e8;
}

.array-index-visual {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.array-index-visual span {
    gap: 0.3rem;
}

.array-index-visual b {
    color: #ffd69d;
    font-size: 0.78rem;
}

.student-dashboard-v2 .dashboard-shell {
    gap: 1rem;
}

.student-compact-hero {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.student-compact-hero::after {
    opacity: 0.35;
}

.student-compact-hero .player-profile {
    align-items: center;
}

.student-compact-hero h1 {
    font-size: clamp(1.8rem, 3.4vw, 3rem);
}

.student-progress-overview {
    margin-top: 0.1rem;
}

.student-dashboard-v2 .stat-card {
    min-height: 9rem;
    padding: 1rem;
}

.student-dashboard-v2 .stat-icon {
    width: 3.1rem;
    height: 3.1rem;
    margin-bottom: 0.45rem;
}

.student-dashboard-v2 .stat-card strong {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.compact-xp-card {
    gap: 0.65rem;
}

.compact-xp-card p {
    margin: 0;
}

.continue-quest-card {
    display: grid;
    gap: 0.85rem;
    border-color: rgba(53, 215, 232, 0.34);
    background:
        radial-gradient(circle at 10% 0%, rgba(53, 215, 232, 0.1), transparent 34%),
        linear-gradient(145deg, rgba(7, 17, 22, 0.94), rgba(3, 8, 11, 0.86));
}

.continue-quest-card h3,
.assigned-work-card h3 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.dashboard-next-label {
    width: fit-content;
    margin: 0;
    padding: 0.4rem 0.55rem;
    color: #ffd69d !important;
    background: rgba(216, 138, 45, 0.09);
    border: 1px solid rgba(216, 138, 45, 0.22);
    font-size: 0.7rem !important;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.assigned-work-section {
    display: grid;
    gap: 1rem;
}

.assigned-work-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.student-dashboard-v2 .assigned-work-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(53, 215, 232, 0.16);
}

.student-dashboard-v2 .assigned-work-card.is-overdue {
    border-color: rgba(216, 138, 45, 0.45);
}

.student-dashboard-v2 .assigned-work-card.is-complete {
    border-color: rgba(53, 215, 232, 0.42);
}

.assignment-summary-details {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.035);
}

.assignment-summary-details summary {
    padding: 0.75rem;
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
}

.assignment-summary-list {
    display: grid;
    gap: 0.4rem;
    padding: 0 0.75rem 0.75rem;
}

.assignment-summary-list div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(0, 0, 0, 0.18);
}

.assignment-summary-list strong {
    color: #ffd69d;
    white-space: nowrap;
}

.assignment-summary-list a {
    color: rgba(255, 255, 255, 0.84);
    font-weight: 800;
}

.student-assignment-lesson-list .teacher-topic-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.student-assignment-lesson-list .teacher-topic-row.is-complete {
    border-color: rgba(53, 215, 232, 0.28);
    background: rgba(53, 215, 232, 0.045);
}

.student-assignment-lesson-list small {
    display: block;
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.78rem;
}

.student-assignment-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.student-lesson-progress-list {
    display: grid;
    gap: 0.7rem;
}

.student-lesson-progress-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(0, 0, 0, 0.18);
}

.student-lesson-progress-card.is-complete {
    border-color: rgba(53, 215, 232, 0.28);
    background: rgba(53, 215, 232, 0.045);
}

.teacher-lesson-overview-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.65rem;
}

.teacher-lesson-overview-grid article {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(53, 215, 232, 0.14);
}

.teacher-lesson-overview-grid span {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.teacher-lesson-overview-grid strong {
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1;
}

.teacher-lesson-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem);
    gap: 0.8rem;
    align-items: center;
    margin-top: 1rem;
}

.teacher-lesson-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.teacher-lesson-filter-tabs button {
    min-height: 2.25rem;
    padding: 0.45rem 0.65rem;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
    cursor: pointer;
}

.teacher-lesson-filter-tabs button:hover,
.teacher-lesson-filter-tabs button.is-active {
    color: #031014;
    background: #35d7e8;
    border-color: #35d7e8;
}

.teacher-lesson-search {
    min-width: 0;
}

.teacher-lesson-search input {
    min-height: 2.55rem;
    padding: 0 0.8rem;
}

.teacher-lesson-groups {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.teacher-lesson-component {
    display: grid;
    gap: 0.7rem;
    min-width: 0;
}

.teacher-lesson-component-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.teacher-lesson-component-heading h3 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.15;
}

.teacher-lesson-component-heading > span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-align: right;
    text-transform: uppercase;
}

.teacher-lesson-topic {
    min-width: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.teacher-lesson-topic[open] {
    border-color: rgba(53, 215, 232, 0.2);
}

.teacher-lesson-topic summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    cursor: pointer;
    list-style: none;
}

.teacher-lesson-topic summary::-webkit-details-marker {
    display: none;
}

.teacher-lesson-topic summary::before {
    content: "+";
    grid-row: 1;
    grid-column: 3;
    justify-self: end;
    color: #35d7e8;
    font-weight: 900;
}

.teacher-lesson-topic[open] summary::before {
    content: "-";
}

.teacher-lesson-topic summary strong {
    display: block;
    color: #ffffff;
    font-size: 0.98rem;
}

.teacher-lesson-topic summary span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.82rem;
}

.teacher-topic-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-end;
}

.teacher-topic-summary > span:not(.teacher-mini-badge) {
    color: #ffd69d;
    font-size: 0.78rem;
    font-weight: 900;
}

.teacher-mini-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.25rem 0.45rem;
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.09);
    border: 1px solid rgba(216, 138, 45, 0.24);
    font-size: 0.62rem !important;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.teacher-topic-track {
    height: 0.45rem;
    margin: 0 1rem 0.8rem;
}

.compact-teacher-lesson-list {
    gap: 0.45rem;
    padding: 0 0.75rem 0.75rem;
}

.teacher-lesson-row {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.95fr);
    gap: 0.75rem;
    padding: 0.75rem;
    box-shadow: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.teacher-lesson-row .teacher-code-badge {
    min-height: 1.75rem;
    padding: 0.38rem 0.5rem;
    font-size: 0.66rem;
}

.teacher-lesson-row .student-lesson-main {
    gap: 0.6rem;
}

.teacher-lesson-row .student-lesson-main strong {
    font-size: 0.95rem;
    line-height: 1.25;
}

.teacher-lesson-row .student-lesson-main span:not(.teacher-code-badge) {
    font-size: 0.78rem;
}

.teacher-lesson-row-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    min-width: 0;
    max-width: 100%;
}

.teacher-lesson-row-status .status-badge {
    min-height: 1.55rem;
    padding: 0.28rem 0.42rem;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
}

.teacher-lesson-row-status small {
    flex-basis: 100%;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.72rem;
    text-align: right;
}

.student-lesson-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    min-width: 0;
}

.student-lesson-main strong {
    display: block;
    color: #ffffff;
    overflow-wrap: anywhere;
}

.student-lesson-main span:not(.teacher-code-badge) {
    display: block;
    margin-top: 0.18rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.9rem;
}

.student-lesson-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: min(24rem, 100%);
}

.student-lesson-status small {
    flex-basis: 100%;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
    text-align: right;
}

.dashboard-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}

.dashboard-split-grid .dashboard-card {
    min-height: 100%;
}

.starter-details {
    padding: 0;
}

.starter-details summary {
    padding: 1rem;
    color: #ffffff;
    cursor: pointer;
    font-family: Georgia, Cambria, serif;
    font-size: 1.25rem;
    font-weight: 900;
}

.starter-details ul {
    margin: 0;
    padding: 0 1rem 1rem;
}

.dashboard-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: flex-start;
    padding: 0.85rem;
}

.dashboard-secondary-actions .card-action {
    margin-top: 0;
}

.student-dashboard-v2 .achievement-card .card-action {
    margin-top: 0;
}

@media (max-width: 980px) {
    .teacher-lesson-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .teacher-lesson-tools,
    .teacher-lesson-row {
        grid-template-columns: 1fr;
    }

    .teacher-lesson-row-status {
        justify-content: flex-start;
    }

    .teacher-lesson-row-status small {
        text-align: left;
    }

    .assigned-work-preview-grid,
    .dashboard-split-grid {
        grid-template-columns: 1fr;
    }

    .student-assignment-lesson-list .teacher-topic-row {
        grid-template-columns: 1fr;
    }

    .student-assignment-actions {
        justify-content: flex-start;
    }

    .student-lesson-progress-card {
        grid-template-columns: 1fr;
    }

    .student-lesson-status {
        justify-content: flex-start;
        min-width: 0;
    }

    .student-lesson-status small {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .student-dashboard-v2 .dashboard-shell {
        gap: 0.85rem;
    }

    .student-compact-hero {
        padding: 1.35rem;
    }

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

    .teacher-lesson-filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        -webkit-overflow-scrolling: touch;
    }

    .teacher-lesson-filter-tabs button {
        flex: 0 0 auto;
    }

    .teacher-lesson-component-heading,
    .teacher-lesson-topic summary {
        grid-template-columns: 1fr;
    }

    .teacher-lesson-component-heading > span,
    .teacher-topic-summary {
        justify-content: flex-start;
        padding-right: 0;
        text-align: left;
    }

    .teacher-lesson-topic summary::before {
        grid-row: auto;
        grid-column: auto;
        justify-self: start;
    }

    .student-compact-hero .player-profile {
        align-items: center;
        gap: 1.25rem;
        text-align: center;
    }

    .student-compact-hero .player-profile > div:last-child {
        display: grid;
        justify-items: center;
        min-width: 0;
        width: 100%;
    }

    .student-compact-hero .player-avatar-wrap {
        margin-inline: auto;
    }

    .student-compact-hero h1 {
        max-width: 100%;
        font-size: clamp(2.25rem, 9vw, 3.2rem);
        line-height: 1.05;
        text-wrap: balance;
    }

    .student-compact-hero p:not(.eyebrow) {
        max-width: 100%;
        font-size: clamp(1.45rem, 6vw, 2rem);
        line-height: 1.2;
        text-wrap: balance;
    }

    .student-compact-hero .profile-badges {
        justify-content: center;
        max-width: 30rem;
    }

    .student-compact-hero .profile-badges span {
        overflow-wrap: anywhere;
    }

    .student-dashboard-v2 .stat-card {
        min-height: 7.5rem;
    }

    .assigned-work-section > .card-heading,
    .continue-quest-card > .card-heading,
    .dashboard-split-grid .card-heading {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dashboard-secondary-actions .card-action {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .teacher-lesson-overview-grid {
        grid-template-columns: 1fr;
    }

    .student-compact-hero {
        padding: 1rem;
    }

    .student-compact-hero .player-profile {
        gap: 1.1rem;
    }

    .student-compact-hero .player-avatar {
        height: 5.25rem;
        width: 5.25rem;
    }

    .student-compact-hero h1 {
        font-size: clamp(2rem, 10vw, 2.65rem);
    }

    .student-compact-hero p:not(.eyebrow) {
        font-size: clamp(1.35rem, 6.5vw, 1.8rem);
    }
}

@media (max-width: 768px) {
    .cpu-control-room,
    .concept-card-grid,
    .theory-question-grid,
    .performance-concept-grid,
    .embedded-concept-grid,
    .compression-block-comparison,
    .file-decision-grid,
    .performance-meter-row,
    .cpu-spec-grid,
    .device-classification-grid,
    .device-investigation-grid {
        grid-template-columns: 1fr;
    }

    .compression-chamber .compression-flow {
        grid-template-columns: 1fr;
    }

    .compression-chamber .compression-visual-grid {
        grid-template-columns: 1fr;
    }

    .compression-chamber .compression-visual-card {
        grid-template-rows: auto;
    }

    .network-map-room,
    .wired-workshop,
    .security-ops-room,
    .network-visual-grid,
    .wired-visual-grid,
    .security-visual-grid,
    .connection-choice-grid,
    .network-device-grid {
        grid-template-columns: 1fr;
    }

    .network-map-card {
        grid-template-rows: auto;
    }

    .network-map-svg {
        min-height: 12rem;
    }

    .network-device-grid div:last-child {
        grid-column: auto;
    }

    .security-decision-matrix div {
        grid-template-columns: 1fr;
    }

    .answer-builder-steps {
        grid-template-columns: 1fr;
    }

    .network-factor-grid,
    .network-device-grid {
        grid-template-columns: 1fr;
    }

    .network-factor-grid span:last-child {
        grid-column: auto;
    }

    .security-landscape-card {
        grid-row: auto;
    }

    .security-chain {
        grid-template-columns: 1fr;
    }

    .compression-flow .flow-arrow {
        min-height: 1.4rem;
        padding: 0;
        background: transparent;
        border: 0;
    }

    .embedded-device-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .embedded-device-row .flow-arrow {
        text-align: center;
        transform: rotate(90deg);
    }

    .misconception-check-list label {
        grid-template-columns: 1fr;
    }

    .requirement-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .requirement-item strong {
        grid-column: 2;
    }

    .data-visual-grid,
    .pixel-decoder-layout {
        grid-template-columns: 1fr;
    }

    .pixel-grid-demo,
    .pixel-grid-demo.compact {
        grid-template-columns: repeat(4, minmax(2rem, 1fr));
        width: 100%;
    }

    .pixel,
    .pixel-grid-demo.compact .pixel {
        width: 100%;
    }

    .visual-grid,
    .cpu-map-visual,
    .three-card-visual,
    .data-type-visual,
    .boolean-visual,
    .unit-ladder-visual,
    .binary-place-visual,
    .array-index-visual {
        grid-template-columns: 1fr;
    }

    .visual-flow {
        display: grid;
        grid-template-columns: 1fr;
    }

    .visual-arrow {
        min-height: 1rem;
        transform: rotate(90deg);
    }

    .visual-comparison-table > div {
        grid-template-columns: 1fr;
    }
}

/* Lesson pages: wider working space with controlled reading width. */
.lesson-page {
    padding-right: clamp(1rem, 2.4vw, 2rem);
    padding-left: clamp(1rem, 2.4vw, 2rem);
}

.lesson-page::before {
    right: clamp(1rem, 2.4vw, 2rem);
    left: clamp(1rem, 2.4vw, 2rem);
}

.lesson-page .lesson-shell {
    width: min(100%, 1320px);
    max-width: 1320px;
}

.lesson-page .step-lesson,
.lesson-page .lesson-quest,
.lesson-page .quest-stage,
.lesson-page .lesson-section,
.lesson-page .theory-activity-panel,
.lesson-page .exam-practice-panel,
.lesson-page .practice-terminal-card,
.lesson-page .mission-workspace-card,
.lesson-page .lesson-visual-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.lesson-page .step-lesson {
    max-width: 1320px;
}

.lesson-page .lesson-content,
.lesson-page .lesson-section > p,
.lesson-page .activity-helper-text,
.lesson-page .visual-caption,
.lesson-page .stage-heading p {
    max-width: 850px;
}

.lesson-page .code-rich-content,
.lesson-page .practice-terminal-card .lesson-content,
.lesson-page .mission-workspace-card .lesson-content {
    max-width: 100%;
}

.lesson-page .lesson-section > .lesson-content.lesson-long-text {
    max-width: 100%;
}

.lesson-summary-panel {
    padding: 0 !important;
    overflow: hidden;
}

.lesson-summary-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 1rem;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 3.35rem;
    padding: 0.95rem 1rem;
    color: rgba(255, 255, 255, 0.92);
    background: transparent;
    border: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.lesson-summary-toggle::after {
    justify-self: end;
    content: "+";
    color: #35dff0;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
}

.lesson-summary-toggle[aria-expanded="true"]::after {
    content: "-";
}

.lesson-summary-toggle > span:first-child {
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lesson-summary-toggle .accordion-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    padding: 0.35rem 0.55rem;
    color: #ffd69d;
    background: rgba(216, 138, 45, 0.1);
    border: 1px solid rgba(216, 138, 45, 0.26);
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
}

.lesson-summary-body {
    padding: 0 1rem 1rem;
}

.lesson-summary-body[hidden] {
    display: none;
}

.lesson-summary-panel .lesson-content {
    max-width: min(100%, 1120px);
}

.lesson-summary-panel .lesson-content p {
    max-width: 100%;
}

.lesson-page .quest-step-nav {
    width: 100%;
    max-width: 100%;
}

.lesson-page .theory-question-grid,
.lesson-page .device-classification-grid,
.lesson-page .device-investigation-grid {
    grid-template-columns: repeat(2, minmax(14rem, 1fr));
    align-items: stretch;
}

.lesson-page .theory-question-grid > *,
.lesson-page .device-classification-grid > *,
.lesson-page .device-investigation-grid > *,
.lesson-page .concept-card-grid > *,
.lesson-page .visual-grid > * {
    min-width: 0;
}

.lesson-page .theory-question-grid select,
.lesson-page .device-classification-grid select,
.lesson-page .device-investigation-grid select,
.lesson-page .theory-question-grid input,
.lesson-page .theory-question-grid textarea {
    width: 100%;
    min-width: 0;
}

.lesson-page .data-visual-grid,
.lesson-page .lesson-visual-card,
.lesson-page .cpu-control-room {
    max-width: 100%;
}

.lesson-page svg,
.lesson-page .visual-svg-wrap,
.lesson-page .sampling-diagram {
    max-width: 100%;
}

@media (min-width: 1024px) {
    .lesson-page .lesson-shell {
        width: min(94vw, 1320px);
    }

    .lesson-page .lesson-quest {
        padding: clamp(1.35rem, 2vw, 2rem);
    }
}

@media (min-width: 1200px) {
    .lesson-page .embedded-concept-grid,
    .lesson-page .visual-grid.three-card-visual {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lesson-page .performance-concept-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .lesson-page .lesson-shell {
        width: min(100%, 1180px);
    }
}

@media (max-width: 768px) {
    .lesson-page {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .lesson-page::before {
        right: 0.75rem;
        left: 0.75rem;
    }

    .lesson-page .lesson-shell {
        width: 100%;
    }

    .lesson-page .theory-question-grid,
    .lesson-page .device-classification-grid,
    .lesson-page .device-investigation-grid {
        grid-template-columns: 1fr;
    }

    .lesson-page .quest-step-nav {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .lesson-page .quest-step-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .lesson-page .stage-actions,
    .lesson-page .terminal-actions,
    .lesson-page .lesson-actions,
    .lesson-page .self-review-controls {
        flex-wrap: wrap;
    }
}

/* Site-wide polish layer: shared sizing, controls, states and responsive guardrails. */
:root {
    --cq-ink: #071015;
    --cq-panel: rgba(7, 17, 22, 0.92);
    --cq-panel-soft: rgba(3, 8, 11, 0.82);
    --cq-line: rgba(255, 255, 255, 0.11);
    --cq-line-strong: rgba(53, 215, 232, 0.28);
    --cq-cyan: #35d7e8;
    --cq-bronze: #d88a2d;
    --cq-gold: #e3bd7d;
    --cq-green: #8df7c8;
    --cq-danger: #ff9c8f;
    --cq-muted: rgba(255, 255, 255, 0.66);
    --cq-card-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.page-shell,
.content-shell,
.dashboard-shell,
.course-shell,
.lesson-shell,
.courses-inner {
    width: min(94vw, 1320px);
    max-width: 1320px;
    margin-inline: auto;
}

.text-content,
.legal-content,
.lesson-copy {
    max-width: 850px;
}

.legal-content {
    justify-self: start;
}

.legal-page .course-shell {
    width: min(96vw, 1560px);
    max-width: 1560px;
    gap: clamp(0.9rem, 1.6vw, 1.25rem);
}

.legal-page .course-hero {
    display: grid;
    gap: 0.55rem;
    padding: clamp(1.15rem, 2.2vw, 1.85rem);
    overflow: hidden;
}

.legal-page .course-hero h1 {
    max-width: 100%;
    margin-bottom: 0.35rem;
    overflow-wrap: break-word;
    font-size: clamp(2.7rem, 5.2vw, 4.8rem);
    line-height: 1.08;
}

.legal-page .course-hero p:not(.eyebrow) {
    max-width: 74rem;
    margin-top: 0;
    font-size: clamp(0.98rem, 1.4vw, 1.18rem);
    line-height: 1.45;
}

.legal-page .legal-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
    gap: 0.85rem;
    width: 100%;
    max-width: none;
    justify-self: stretch;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.legal-page .lesson-section {
    display: grid;
    align-content: start;
    gap: 0.45rem;
    min-width: 0;
    margin: 0;
    padding: clamp(0.95rem, 1.8vw, 1.25rem);
}

.legal-page .lesson-section h2 {
    margin: 0;
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    line-height: 1.2;
}

.legal-page .lesson-section p {
    margin: 0;
    font-size: clamp(0.9rem, 1.15vw, 1rem);
    line-height: 1.55;
}

.dashboard-card,
.stat-card,
.dashboard-hero-card,
.course-hero,
.course-card,
.specpoint-card,
.lesson-detail-card,
.lesson-section,
.quiz-question-card,
.achievement-stat-card,
.achievement-collection-card,
.teacher-metric-card,
.teacher-table-card,
.teacher-topic-row,
.teacher-support-row,
.account-form,
.teacher-form-card {
    border: 1px solid var(--cq-line);
    background:
        linear-gradient(145deg, var(--cq-panel), var(--cq-panel-soft));
    box-shadow: var(--cq-card-shadow);
}

.dashboard-card,
.course-card,
.specpoint-card,
.lesson-section,
.quiz-question-card,
.achievement-collection-card,
.teacher-table-card {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.dashboard-card:hover,
.course-card:hover,
.specpoint-card:hover,
.achievement-collection-card:hover,
.teacher-topic-row:hover,
.teacher-support-row:hover {
    border-color: var(--cq-line-strong);
}

.teacher-page .dashboard-card:hover,
.teacher-page .teacher-topic-row:hover,
.teacher-page .teacher-support-row:hover {
    transform: none;
    box-shadow: var(--cq-card-shadow);
}

.button,
.card-action,
.desktop-sign-in,
.mobile-sign-in,
button.card-action {
    min-height: 2.75rem;
    border-radius: 0;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
}

.button-primary,
.card-action:not(.is-secondary):not(.is-disabled):not(:disabled) {
    color: #041014;
    background: linear-gradient(180deg, #6cecf6, var(--cq-cyan));
    border: 1px solid rgba(112, 243, 255, 0.92);
    box-shadow: 0 0 22px rgba(53, 215, 232, 0.18), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.button-secondary,
.card-action.is-secondary,
.desktop-sign-in {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(175, 205, 211, 0.34);
}

.button-primary:hover,
.card-action:not(.is-secondary):not(.is-disabled):not(:disabled):hover {
    color: #031014;
    background: #ffffff;
    border-color: #ffffff;
}

.button-secondary:hover,
.card-action.is-secondary:hover,
.desktop-sign-in:hover {
    color: var(--cq-cyan);
    background: rgba(0, 0, 0, 0.42);
    border-color: rgba(53, 215, 232, 0.65);
}

.button:focus-visible,
.card-action:focus-visible,
.desktop-sign-in:focus-visible,
.mobile-sign-in:focus-visible,
.menu-button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--cq-cyan);
    outline-offset: 3px;
}

.status-badge,
.recommended-badge,
.teacher-code-badge,
.profile-badges span,
.role-badge,
.achievement-progress-text,
.achievement-icon,
.dashboard-next-label,
.checklist-marker,
.checklist-badge,
.quiz-hero-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.85rem;
    padding: 0.42rem 0.66rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: normal;
}

.status-badge {
    min-width: 0;
    color: rgba(224, 233, 235, 0.78);
    background: rgba(255, 255, 255, 0.065);
}

.status-badge.complete,
.status-badge.is-complete,
.is-unlocked .status-badge,
.teacher-code-badge:not(.is-muted),
.recommended-badge {
    color: #031014 !important;
    background: var(--cq-cyan);
    border-color: var(--cq-cyan);
}

.status-badge.warning,
.status-badge.is-warning,
.assigned-work-card.is-overdue .status-badge,
.teacher-code-badge.is-muted,
.achievement-progress-text,
.dashboard-next-label {
    color: var(--cq-gold) !important;
    background: rgba(216, 138, 45, 0.09);
    border-color: rgba(216, 138, 45, 0.28);
}

.status-badge.locked,
.status-badge.is-locked,
.card-action.is-disabled {
    color: rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.11);
}

input,
select,
textarea,
.quiz-answer-input,
.python-editor,
.teacher-form-field input,
.teacher-form-field select,
.cq-form input,
.cq-form textarea,
.cq-form select,
.account-form input {
    width: 100%;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.94);
    background-color: rgba(1, 5, 7, 0.72);
    border: 1px solid rgba(53, 215, 232, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

select {
    color-scheme: dark;
}

select option {
    color: #ffffff;
    background: #071015;
}

textarea {
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.empty-state,
.compact-empty-state {
    display: grid;
    gap: 0.65rem;
    align-content: start;
    padding: clamp(1rem, 2vw, 1.25rem);
    border: 1px solid rgba(216, 138, 45, 0.22);
    background:
        linear-gradient(135deg, rgba(216, 138, 45, 0.08), rgba(53, 215, 232, 0.035)),
        rgba(0, 0, 0, 0.18);
}

.empty-state h2,
.empty-state h3,
.compact-empty-state h3 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, Cambria, serif;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.empty-state p,
.compact-empty-state p {
    margin: 0;
}

.compact-empty-state .card-action {
    margin-top: 0.35rem;
}

.teacher-table-wrap,
.responsive-table,
.teacher-student-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.teacher-student-table .teacher-table-head,
.teacher-student-table .teacher-table-row {
    width: max-content;
}

.teacher-page .dashboard-hero-card h1,
.teacher-page .dashboard-card h2,
.teacher-page .teacher-topic-row strong,
.teacher-page .teacher-support-row strong {
    letter-spacing: 0;
}

.teacher-page .dashboard-hero-card p {
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.6;
}

.course-meta,
.lesson-meta,
.profile-badges,
.hero-actions,
.lesson-actions,
.stage-actions,
.terminal-actions,
.avatar-modal-actions {
    min-width: 0;
}

.course-meta span,
.lesson-meta span {
    overflow-wrap: anywhere;
}

.lesson-page .lesson-section,
.lesson-page .lesson-visual-card,
.lesson-page .practice-terminal-card,
.lesson-page .mission-workspace-card,
.lesson-page .theory-activity-panel,
.lesson-page .exam-practice-panel {
    border-color: rgba(255, 255, 255, 0.105);
}

.lesson-page .lesson-visual-card {
    border-color: rgba(53, 215, 232, 0.28);
}

.visual-panel,
.visual-svg-wrap,
.visual-comparison {
    min-width: 0;
    overflow: hidden;
}

.visual-node,
.visual-badge,
.learning-objective-item,
.common-mistake-item,
.quiz-options label,
.challenge-guidance-block,
.requirement-item,
.activity-list > div,
.achievement-item {
    border-radius: 0;
}

.quiz-options input,
.role-choice-card input,
.lesson-option input {
    width: auto;
    min-height: auto;
}

.python-output,
.terminal-output,
.quiz-code-block,
pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.site-footer {
    border-top: 1px solid rgba(53, 215, 232, 0.14);
}

@media (min-width: 1024px) {
    .dashboard-page,
    .course-page,
    .account-page {
        padding-inline: clamp(1.25rem, 3vw, 2.5rem);
    }

    .dashboard-page::before,
    .course-page::before {
        right: clamp(1.25rem, 3vw, 2.5rem);
        left: clamp(1.25rem, 3vw, 2.5rem);
    }

    .course-grid,
    .topic-grid,
    .pathway-grid,
    .achievement-card-grid,
    .teacher-class-grid {
        gap: 1rem;
    }
}

@media (max-width: 900px) {
    .page-shell,
    .content-shell,
    .dashboard-shell,
    .course-shell,
    .lesson-shell,
    .courses-inner {
        width: 100%;
    }

    .topic-card-header,
    .card-heading,
    .achievement-card-topline {
        align-items: flex-start;
    }
}

@media (max-width: 1180px), (hover: none) and (pointer: coarse) {
    .student-dashboard-v2 .student-compact-hero {
        display: grid;
        place-items: center;
    }

    .student-dashboard-v2 .student-compact-hero .player-profile {
        align-items: center;
        display: grid;
        justify-items: center;
        margin-inline: auto;
        max-width: 32rem;
        text-align: center;
        width: 100%;
    }

    .student-dashboard-v2 .student-compact-hero .player-profile > div:last-child {
        display: grid;
        justify-items: center;
        text-align: center;
        width: 100%;
    }

    .student-dashboard-v2 .student-compact-hero .player-avatar-wrap {
        justify-self: center;
        margin-inline: auto;
    }

    .student-dashboard-v2 .student-compact-hero .eyebrow,
    .student-dashboard-v2 .student-compact-hero h1,
    .student-dashboard-v2 .student-compact-hero p {
        margin-inline: auto;
        max-width: 100%;
        text-align: center;
        width: 100%;
    }

    .student-dashboard-v2 .student-compact-hero .profile-badges {
        display: grid;
        gap: 0.55rem;
        grid-template-columns: 1fr;
        justify-content: center;
        margin-inline: auto;
        width: min(100%, 29rem);
    }

    .student-dashboard-v2 .student-compact-hero .profile-badges span {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 520px) {
    .hero {
        min-height: auto;
    }

    .hero-inner {
        min-height: min(92vh, 44rem);
        padding-bottom: 1.25rem;
    }

    .hero-actions,
    .lesson-actions,
    .stage-actions,
    .terminal-actions,
    .avatar-modal-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .button,
    .card-action,
    .desktop-sign-in,
    .mobile-sign-in {
        width: 100%;
        min-width: 0;
    }

    .status-badge,
    .recommended-badge,
    .teacher-code-badge,
    .profile-badges span {
        max-width: 100%;
    }

    .visual-node,
    .visual-badge {
        min-height: 4.25rem;
    }

    .student-dashboard-v2 .student-compact-hero .player-profile {
        align-items: center;
        display: grid;
        justify-items: center;
        text-align: center;
        width: 100%;
    }

    .student-dashboard-v2 .student-compact-hero .player-profile > div:last-child {
        justify-items: center;
        text-align: center;
        width: 100%;
    }

    .student-dashboard-v2 .student-compact-hero .eyebrow,
    .student-dashboard-v2 .student-compact-hero h1,
    .student-dashboard-v2 .student-compact-hero p {
        margin-inline: auto;
        text-align: center;
        width: 100%;
    }

    .student-dashboard-v2 .student-compact-hero .profile-badges {
        align-items: stretch;
        justify-content: center;
        margin-inline: auto;
        width: min(100%, 29rem);
    }
}

.lesson-long-text,
.lesson-copy-card,
.lesson-explanation-card,
.model-answer {
    scrollbar-color: rgba(53, 223, 240, 0.45) rgba(255, 255, 255, 0.04);
    scrollbar-width: thin;
}

.lesson-long-text::-webkit-scrollbar,
.lesson-copy-card::-webkit-scrollbar,
.lesson-explanation-card::-webkit-scrollbar,
.model-answer::-webkit-scrollbar {
    width: 8px;
}

.lesson-long-text::-webkit-scrollbar-track,
.lesson-copy-card::-webkit-scrollbar-track,
.lesson-explanation-card::-webkit-scrollbar-track,
.model-answer::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

.lesson-long-text::-webkit-scrollbar-thumb,
.lesson-copy-card::-webkit-scrollbar-thumb,
.lesson-explanation-card::-webkit-scrollbar-thumb,
.model-answer::-webkit-scrollbar-thumb {
    background: rgba(53, 223, 240, 0.45);
    border-radius: 999px;
}

@media (max-width: 768px) {
    .quest-stage[data-step-panel="learn"] {
        gap: 0.85rem;
    }

    .quest-stage[data-step-panel="learn"] > .cpu-control-room,
    .quest-stage[data-step-panel="learn"] > .concept-card-grid,
    .quest-stage[data-step-panel="learn"] > .data-visual-grid,
    .quest-stage[data-step-panel="learn"] > .lesson-section,
    .quest-stage[data-step-panel="learn"] > .learn-mobile-helper {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-left: 0;
    }

    .quest-stage[data-step-panel="learn"] > .cpu-control-room,
    .quest-stage[data-step-panel="learn"] > .concept-card-grid,
    .quest-stage[data-step-panel="learn"] > .data-visual-grid {
        gap: 0.75rem;
        margin-bottom: 0;
    }

    .quest-stage[data-step-panel="learn"] .cpu-core-panel,
    .quest-stage[data-step-panel="learn"] .learn-concept-accordion,
    .quest-stage[data-step-panel="learn"] .lesson-accordion {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .learn-mobile-helper {
        display: block;
        margin: -0.2rem 0 0;
        padding: 0 0.1rem;
        color: rgba(234, 252, 255, 0.7);
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .learn-concept-accordion {
        gap: 0;
        padding: 0;
        overflow: hidden;
        border: 1px solid rgba(48, 217, 236, 0.22);
        background:
            linear-gradient(145deg, rgba(3, 12, 18, 0.95), rgba(7, 17, 22, 0.9));
        box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
    }

    .learn-concept-accordion.exam-tip-panel,
    .exam-tip-panel.learn-concept-accordion {
        border-color: rgba(216, 138, 45, 0.3);
        background:
            linear-gradient(145deg, rgba(48, 29, 10, 0.42), rgba(3, 12, 18, 0.92));
    }

    .learn-concept-toggle {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto 1rem;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        min-height: 3.45rem;
        padding: 0.95rem 1rem;
        color: rgba(255, 255, 255, 0.92);
        background: transparent;
        border: 0;
        font-family: inherit;
        text-align: left;
        cursor: pointer;
    }

    .learn-concept-toggle::after {
        flex: 0 0 auto;
        grid-column: 3;
        justify-self: end;
        content: "+";
        color: #35dff0;
        font-size: 1.25rem;
        font-weight: 900;
        line-height: 1;
    }

    .learn-concept-accordion.is-open > .learn-concept-toggle::after {
        content: "-";
    }

    .learn-concept-title {
        min-width: 0;
        color: #ffffff;
        font-size: 0.82rem;
        font-weight: 900;
        letter-spacing: 0.06em;
        line-height: 1.35;
        text-transform: uppercase;
    }

    .learn-concept-meta {
        display: inline-flex;
        grid-column: 2;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        min-height: 1.65rem;
        max-width: 7rem;
        padding: 0.35rem 0.55rem;
        color: #ffd69d;
        background: rgba(216, 138, 45, 0.1);
        border: 1px solid rgba(216, 138, 45, 0.26);
        font-size: 0.62rem;
        font-weight: 900;
        line-height: 1.1;
        text-align: center;
        text-transform: uppercase;
    }

    .learn-concept-body {
        display: grid;
        gap: 0.65rem;
        padding: 0 1rem 1rem;
    }

    .learn-concept-body[hidden] {
        display: none;
    }

    .learn-concept-body > .eyebrow:first-child,
    .learn-concept-body > h3:first-of-type,
    .learn-concept-body > .card-heading:first-child {
        display: none;
    }

    .learn-concept-body p,
    .learn-concept-body span {
        margin: 0;
        line-height: 1.55;
    }

    .lesson-accordion {
        gap: 0;
        padding: 0;
        overflow: hidden;
        border: 1px solid rgba(48, 217, 236, 0.25);
        background: rgba(3, 12, 18, 0.92);
    }

    .lesson-accordion-toggle {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto 1rem;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        min-height: 3.45rem;
        padding: 0.95rem 1rem;
        color: rgba(255, 255, 255, 0.9);
        background: transparent;
        border: 0;
        font-family: inherit;
        text-align: left;
        cursor: pointer;
    }

    .lesson-accordion-toggle::after {
        flex: 0 0 auto;
        grid-column: 3;
        justify-self: end;
        content: "+";
        color: #35dff0;
        font-size: 1.25rem;
        font-weight: 900;
        line-height: 1;
    }

    .lesson-accordion.is-open > .lesson-accordion-toggle::after {
        content: "-";
    }

    .lesson-accordion-title {
        min-width: 0;
        color: #ffffff;
        font-size: 0.78rem;
        font-weight: 900;
        letter-spacing: 0.08em;
        line-height: 1.35;
        text-transform: uppercase;
    }

    .lesson-accordion-meta {
        display: inline-flex;
        grid-column: 2;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        min-height: 1.65rem;
        max-width: 8rem;
        padding: 0.35rem 0.55rem;
        color: #ffd69d;
        background: rgba(216, 138, 45, 0.1);
        border: 1px solid rgba(216, 138, 45, 0.26);
        font-size: 0.66rem;
        font-weight: 900;
        line-height: 1.1;
        overflow-wrap: anywhere;
        text-align: center;
        text-transform: uppercase;
    }

    .lesson-accordion-meta[hidden] {
        display: none;
    }

    .lesson-accordion__body {
        display: block;
        padding: 0 0.95rem 1rem;
    }

    .lesson-accordion__body[hidden] {
        display: none;
    }

    .lesson-accordion__body > .eyebrow:first-child,
    .lesson-accordion__body > .visual-header:first-child .eyebrow:first-child {
        display: none;
    }

    .lesson-long-text,
    .lesson-copy-card,
    .lesson-explanation-card {
        max-height: 420px;
        overflow-y: auto;
        padding-right: 0.75rem;
        -webkit-overflow-scrolling: touch;
    }

    .model-answer {
        max-height: 320px;
        overflow-y: auto;
        padding-right: 0.75rem;
        -webkit-overflow-scrolling: touch;
    }

    .common-mistakes-accordion {
        gap: 0;
        padding: 0;
        overflow: hidden;
        border: 1px solid rgba(48, 217, 236, 0.25);
        background: rgba(3, 12, 18, 0.9);
    }

    .common-mistakes-accordion summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.85rem;
        min-height: 3.4rem;
        padding: 0.95rem 1rem;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.88);
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        list-style: none;
    }

    .common-mistakes-accordion summary span:first-child {
        margin: 0;
        color: #ffffff;
        font-size: 0.78rem;
    }

    .common-mistakes-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        min-height: 1.65rem;
        padding: 0.35rem 0.55rem;
        color: #ffd69d;
        background: rgba(216, 138, 45, 0.1);
        border: 1px solid rgba(216, 138, 45, 0.26);
        font-size: 0.66rem;
        line-height: 1;
    }

    .common-mistakes-accordion summary::after {
        content: "Show mistakes +";
        flex: 0 0 auto;
        color: #35dff0;
        font-size: 0.68rem;
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .common-mistakes-accordion[open] summary::after {
        content: "Hide mistakes -";
    }

    .common-mistakes-accordion .common-mistakes-list {
        gap: 0.55rem;
        padding: 0 0.85rem 0.85rem;
    }

    .common-mistakes-accordion .common-mistake-item {
        gap: 0.6rem;
        padding: 0.75rem;
    }

    .common-mistakes-accordion .common-mistake-title {
        font-size: 0.9rem;
        line-height: 1.25;
    }

    .common-mistakes-accordion .common-mistake-fix {
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .common-mistakes-accordion .common-mistake-marker {
        width: 1.3rem;
        height: 1.3rem;
        margin-top: 0.05rem;
    }
}

@media (max-width: 430px) {
    .lesson-long-text,
    .lesson-copy-card,
    .lesson-explanation-card {
        max-height: 360px;
    }

    .model-answer {
        max-height: 280px;
    }
}

/* Teacher dashboard responsive corrections. Keep these after the shared safety layers. */
@media (max-width: 1280px) {
    .teacher-student-table .teacher-table-head,
    .teacher-student-table .teacher-table-row {
        width: 100%;
        min-width: 0;
        gap: 0.5rem;
        padding-inline: 0.75rem;
    }

    .teacher-student-table .teacher-table-head:not(.teacher-assignment-head),
    .teacher-student-table .teacher-table-row:not(.teacher-assignment-row) {
        grid-template-columns: minmax(9rem, 1.1fr) repeat(5, minmax(3rem, 0.35fr)) minmax(11rem, 1fr) minmax(5.75rem, 0.55fr) minmax(7rem, 0.6fr);
    }

    .teacher-student-table .teacher-assignment-head,
    .teacher-student-table .teacher-assignment-row {
        grid-template-columns: minmax(10rem, 1.1fr) minmax(5.5rem, 0.55fr) minmax(5.5rem, 0.55fr) minmax(10rem, 1fr) minmax(7rem, 0.65fr);
    }

    .teacher-student-table.class-roster-table .teacher-table-head:not(.teacher-assignment-head),
    .teacher-student-table.class-roster-table .teacher-table-row:not(.teacher-assignment-row) {
        grid-template-columns:
            minmax(9rem, 1fr)
            minmax(2.7rem, 0.26fr)
            minmax(2.7rem, 0.26fr)
            minmax(3.6rem, 0.34fr)
            minmax(4rem, 0.38fr)
            minmax(5.35rem, 0.5fr)
            minmax(12rem, 0.98fr)
            minmax(6.8rem, 0.54fr)
            minmax(7.2rem, 0.58fr);
    }

    .teacher-student-table .teacher-table-row .card-action {
        width: 100%;
        min-width: 0;
        padding-inline: 0.65rem;
    }

    .site-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .teacher-student-table {
        overflow: visible;
    }

    .teacher-student-table .teacher-table-head {
        display: none;
    }

    .teacher-student-table .teacher-table-row,
    .teacher-student-table .teacher-assignment-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        padding: 0.9rem;
    }

    .teacher-student-table .teacher-table-row > span {
        display: grid;
        gap: 0.2rem;
        align-content: start;
    }

    .teacher-student-table .teacher-table-row > span::before {
        content: attr(data-label);
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.64rem;
        font-weight: 900;
        letter-spacing: 0.08em;
        line-height: 1.1;
        text-transform: uppercase;
    }

    .teacher-student-table .teacher-table-row > span:first-child,
    .teacher-student-table .teacher-table-row:not(.teacher-assignment-row) > span:nth-child(7),
    .teacher-student-table .teacher-assignment-row > span:nth-child(4),
    .teacher-student-table .teacher-table-row > span:last-child {
        grid-column: 1 / -1;
    }

    .teacher-student-table.class-roster-table .teacher-table-row:not(.teacher-assignment-row) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem 1rem;
        padding: 1rem;
    }

    .teacher-student-table.class-roster-table .teacher-table-row > span:first-child,
    .teacher-student-table.class-roster-table .teacher-table-row > span:nth-child(7),
    .teacher-student-table.class-roster-table .teacher-table-row > span:last-child {
        grid-column: 1 / -1;
    }

    .teacher-student-table.class-roster-table .teacher-table-row > span:nth-child(n+2):nth-child(-n+6) {
        min-height: 2.4rem;
    }

    .teacher-student-table.class-roster-table .teacher-table-row .card-action {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .teacher-student-table .teacher-table-row,
    .teacher-student-table .teacher-assignment-row {
        grid-template-columns: 1fr;
    }

    .teacher-student-table.class-roster-table .teacher-table-row:not(.teacher-assignment-row) {
        grid-template-columns: 1fr;
    }

    .teacher-student-table.class-roster-table .teacher-table-row > span:nth-child(n+2):nth-child(-n+6) {
        min-height: 0;
    }
}
.teacher-written-panel,
.teacher-written-card,
.teacher-feedback-box,
.teacher-marking-layout {
    border-color: rgba(34, 211, 238, 0.22);
}

.teacher-written-form,
.teacher-mark-form,
.teacher-written-filter {
    display: grid;
    gap: 0.85rem;
}

.teacher-written-form label,
.teacher-mark-form label,
.teacher-written-filter label {
    color: var(--text-muted);
    display: grid;
    font-weight: 700;
    gap: 0.45rem;
}

.teacher-written-form textarea,
.teacher-mark-form textarea,
.teacher-mark-form input,
.teacher-written-filter input,
.teacher-written-filter select {
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    color: var(--text-main);
    padding: 0.8rem 0.9rem;
}

.teacher-written-form textarea:focus,
.teacher-mark-form textarea:focus,
.teacher-mark-form input:focus,
.teacher-written-filter input:focus,
.teacher-written-filter select:focus {
    border-color: rgba(34, 211, 238, 0.68);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
    outline: none;
}

.teacher-feedback-box {
    display: grid;
    gap: 0.5rem;
}

.teacher-written-card {
    display: grid;
    gap: 1rem;
}

.teacher-written-card .card-heading {
    margin-bottom: 0.15rem;
}

.teacher-answer-box,
.teacher-returned-feedback-box {
    padding: 1.1rem 1.2rem;
}

.teacher-answer-box p,
.teacher-returned-feedback-box p {
    line-height: 1.55;
    margin: 0;
}

.teacher-returned-feedback-box {
    gap: 0.85rem;
    margin-top: 0.25rem;
}

.teacher-returned-feedback-box h4 {
    color: var(--text-main);
    margin: 0;
}

.teacher-returned-feedback-box strong {
    color: var(--text-main);
}

.teacher-improve-form {
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.teacher-improve-form label {
    gap: 0.65rem;
}

.teacher-mark-decision {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 1rem;
}

.teacher-mark-decision legend {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    padding: 0 0.4rem;
    text-transform: uppercase;
}

.teacher-mark-action-list {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-mark-action-card {
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    cursor: pointer;
    display: grid !important;
    gap: 0.85rem !important;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 6rem;
    padding: 1rem;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.teacher-mark-action-card:hover {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(34, 211, 238, 0.44);
}

.teacher-mark-action-card input[type="radio"] {
    border: 0;
    height: 1px;
    margin: 0;
    opacity: 0;
    padding: 0;
    position: absolute;
    width: 1px;
}

.teacher-mark-radio {
    background: rgba(2, 6, 23, 0.9);
    border: 2px solid rgba(148, 163, 184, 0.52);
    border-radius: 999px;
    box-shadow: inset 0 0 0 4px rgba(2, 6, 23, 0.9);
    display: inline-block;
    height: 1.15rem;
    margin-top: 0.15rem;
    width: 1.15rem;
}

.teacher-mark-action-copy {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.teacher-mark-action-copy strong {
    color: var(--text-main);
    line-height: 1.25;
}

.teacher-mark-action-copy small {
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1.4;
}

.teacher-mark-action-card:has(input[type="radio"]:checked) {
    background: rgba(8, 47, 73, 0.54);
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18), 0 18px 40px rgba(8, 47, 73, 0.2);
}

.teacher-mark-action-card:has(input[type="radio"]:checked) .teacher-mark-radio {
    background: var(--accent-cyan);
    border-color: rgba(226, 232, 240, 0.95);
}

.teacher-mark-action-card input[type="radio"]:checked + .teacher-mark-radio {
    background: var(--accent-cyan);
    border-color: rgba(226, 232, 240, 0.95);
}

.teacher-mark-action-card:has(input[type="radio"]:focus-visible) {
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.teacher-mark-submit {
    justify-self: start;
}

.marking-filter-grid {
    align-items: end;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
}

.actionable-feedback-list {
    gap: 0.85rem;
}

.actionable-feedback-card {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(11rem, auto);
}

.actionable-feedback-card small {
    color: rgba(255, 255, 255, 0.58);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.4;
    margin-top: 0.3rem;
}

.actionable-feedback-meta {
    align-items: end;
    display: grid;
    gap: 0.55rem;
    justify-items: end;
}

.actionable-feedback-meta small {
    margin: 0;
    text-align: right;
}

.feedback-more-link {
    justify-content: center;
    margin-top: 0.9rem;
    width: 100%;
}

.feedback-history-link {
    color: var(--text-muted);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    margin-top: 0.9rem;
    text-transform: uppercase;
}

.teacher-hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.class-overview-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.class-assignment-card-grid,
.class-dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.class-assignment-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0.9rem;
    min-width: 0;
    padding: 1rem;
}

.class-assignment-card h3 {
    margin: 0;
}

.class-assignment-card .card-action {
    justify-content: center;
    width: 100%;
}

.compact-coverage-list .teacher-topic-row {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.assigned-roster-table .teacher-table-head,
.assigned-roster-table .teacher-table-row {
    grid-template-columns:
        minmax(10rem, 1.3fr)
        minmax(5rem, 0.45fr)
        minmax(5rem, 0.45fr)
        minmax(12rem, 1fr)
        minmax(8rem, 0.65fr);
}

.curriculum-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.curriculum-filter-tabs a {
    align-items: center;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--text-muted);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    min-height: 2.35rem;
    padding: 0.55rem 0.8rem;
    text-decoration: none;
    text-transform: uppercase;
}

.curriculum-filter-tabs a:hover,
.curriculum-filter-tabs a.is-active {
    border-color: rgba(34, 211, 238, 0.6);
    color: var(--text-main);
}

.teacher-assignment-table .teacher-assignment-head,
.teacher-assignment-table .teacher-assignment-row {
    align-items: center;
    grid-template-columns:
        minmax(9rem, 1.25fr)
        minmax(4.5rem, 0.45fr)
        minmax(8rem, 0.9fr)
        minmax(10rem, 1.05fr)
        minmax(7.5rem, 0.75fr);
    min-width: 0 !important;
    width: 100% !important;
}

.teacher-assignment-table .teacher-assignment-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.teacher-assignment-table .teacher-assignment-head > span:nth-child(2),
.teacher-assignment-table .teacher-assignment-row > span:nth-child(2),
.teacher-assignment-table .teacher-assignment-head > span:nth-child(5),
.teacher-assignment-table .teacher-assignment-row > span:nth-child(5) {
    justify-self: stretch;
    text-align: center;
}

.teacher-assignment-table .teacher-assignment-head > span:nth-child(3),
.teacher-assignment-table .teacher-assignment-row > span:nth-child(3),
.teacher-assignment-table .teacher-assignment-head > span:nth-child(4),
.teacher-assignment-table .teacher-assignment-row > span:nth-child(4) {
    line-height: 1.35;
}

.teacher-assignment-table [data-label="Latest Activity"] small {
    display: block;
    line-height: 1.35;
}

.teacher-assignment-table [data-label="Details"] .card-action {
    justify-content: center;
    min-width: 0;
    width: 100%;
}

@media (max-width: 900px) {
    .teacher-assignment-table .teacher-assignment-head {
        display: none;
    }

    .teacher-assignment-table .teacher-assignment-row {
        align-items: stretch;
        border-color: rgba(34, 211, 238, 0.16);
        gap: 0.8rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-assignment-table .teacher-assignment-row > span {
        display: grid;
        gap: 0.25rem;
        text-align: left;
    }

    .teacher-assignment-table .teacher-assignment-row > span::before {
        color: rgba(255, 255, 255, 0.5);
        content: attr(data-label);
        font-size: 0.64rem;
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .teacher-assignment-table .teacher-assignment-row > span:first-child,
    .teacher-assignment-table .teacher-assignment-row > span:nth-child(4),
    .teacher-assignment-table .teacher-assignment-row > span:last-child {
        grid-column: 1 / -1;
    }

    .teacher-assignment-table .teacher-assignment-row > span:nth-child(2),
    .teacher-assignment-table .teacher-assignment-row > span:nth-child(5) {
        justify-self: stretch;
        text-align: left;
    }
}

@media (max-width: 520px) {
.teacher-assignment-table .teacher-assignment-row {
        grid-template-columns: 1fr;
    }
}

.teacher-student-focus-grid {
    align-items: start;
    display: grid;
    gap: clamp(1rem, 2vw, 1.4rem);
    grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.8fr);
}

.teacher-student-main-column,
.teacher-student-side-column,
.assigned-work-card-list {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.assigned-work-filters {
    margin-bottom: 1rem;
}

.assigned-progress-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.assigned-progress-card h3 {
    margin: 0;
}

.assigned-progress-card p {
    margin: 0;
}

.assigned-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.assigned-progress-meta span {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.35rem 0.5rem;
}

.compact-written-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0.75rem 0 1rem;
}

.written-response-card-list {
    display: grid;
    gap: 0.75rem;
}

.teacher-written-response-card {
    align-items: start;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0.75rem;
    padding: 0.9rem;
}

.teacher-written-response-card strong,
.teacher-written-response-card p,
.teacher-written-response-card span {
    overflow-wrap: anywhere;
}

.teacher-written-response-card p {
    color: rgba(255, 255, 255, 0.68);
    margin: 0.25rem 0;
}

.teacher-written-response-card span {
    color: rgba(255, 255, 255, 0.55);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.4;
}

.teacher-written-response-card .card-action {
    justify-content: center;
    width: 100%;
}

.teacher-written-response-card.is-history {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(148, 163, 184, 0.14);
}

.student-feedback-history-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    gap: 0.75rem;
    margin-top: 0.9rem;
    padding: 0.85rem;
}

.student-feedback-history-card > summary {
    cursor: pointer;
    list-style: none;
}

.student-feedback-history-card > summary::-webkit-details-marker {
    display: none;
}

.student-feedback-history-card > summary span {
    display: grid;
    gap: 0.25rem;
}

.student-feedback-history-card > summary strong {
    color: var(--text-main);
}

.student-feedback-history-card > summary small {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
}

.student-feedback-history-card > span {
    display: grid;
    gap: 0.25rem;
}

.student-feedback-history-card > span strong {
    color: var(--text-main);
}

.student-feedback-history-card > span small,
.feedback-history-note {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
}

.student-feedback-history-card > summary::after {
    color: #35d7e8;
    content: "Open";
    float: right;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-top: -2.2rem;
    text-transform: uppercase;
}

.student-feedback-history-card[open] > summary::after {
    content: "Close";
}

.systems-premium-hero {
    border-color: rgba(34, 211, 238, 0.24);
}

.systems-premium-visual-grid,
.systems-scenario-grid {
    display: grid;
    gap: 1rem;
}

.systems-premium-visual {
    overflow: hidden;
}

.systems-premium-svg {
    display: block;
    height: auto;
    max-width: 100%;
}

.systems-notice-list {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0.9rem;
}

.systems-notice-list span {
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.18);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
    padding: 0.65rem;
}

.systems-interface-visual,
.systems-resource-visual,
.systems-exam-room {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.systems-interface-visual > div,
.systems-resource-visual > div,
.systems-exam-room > div,
.systems-utility-toolkit span {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.9rem;
}

.systems-interface-visual strong,
.systems-resource-visual strong,
.systems-exam-room strong,
.systems-utility-toolkit b {
    color: var(--text-main);
    display: block;
}

.systems-interface-visual span,
.systems-resource-visual span,
.systems-exam-room span,
.systems-utility-toolkit span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
    font-weight: 800;
}

.systems-interface-visual code {
    background: rgba(0, 0, 0, 0.32);
    border-left: 3px solid rgba(34, 211, 238, 0.64);
    color: #7dd3fc;
    padding: 0.45rem;
}

.access-pyramid span {
    text-align: center;
}

.access-pyramid span:first-of-type {
    background: rgba(217, 119, 6, 0.2);
}

.systems-resource-visual .ram {
    border-left: 4px solid rgba(34, 211, 238, 0.7);
    padding-left: 0.5rem;
}

.systems-resource-visual .ram.free {
    border-color: rgba(148, 163, 184, 0.36);
    opacity: 0.72;
}

.systems-utility-toolkit {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.systems-scenario-card {
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(34, 211, 238, 0.16);
}

.feedback-history-group-list {
    display: grid;
    gap: 0.85rem;
}

.feedback-history-group {
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem;
}

.feedback-history-group > summary {
    cursor: pointer;
    list-style: none;
}

.feedback-history-group > summary::-webkit-details-marker {
    display: none;
}

.feedback-history-group > summary span {
    display: grid;
    gap: 0.25rem;
}

.feedback-history-group > summary strong {
    color: var(--text-main);
}

.feedback-history-group > summary small {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
}

.feedback-history-group > summary::after {
    color: #35d7e8;
    content: "Open";
    float: right;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-top: -2.2rem;
    text-transform: uppercase;
}

.feedback-history-group[open] > summary::after {
    content: "Close";
}

.full-curriculum-progress-card > summary {
    cursor: pointer;
    list-style: none;
}

.full-curriculum-progress-card > summary::-webkit-details-marker {
    display: none;
}

.full-curriculum-progress-card > summary h2,
.full-curriculum-progress-card > summary p {
    margin-bottom: 0;
}

.full-curriculum-progress-card > summary::after {
    color: #35d7e8;
    content: "Open";
    float: right;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-top: -2rem;
    text-transform: uppercase;
}

.full-curriculum-progress-card[open] > summary::after {
    content: "Close";
}

@media (max-width: 980px) {
    .teacher-student-focus-grid {
        grid-template-columns: 1fr;
    }

    .class-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .class-assignment-card-grid,
    .class-dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .marking-filter-grid .card-action {
        width: 100%;
    }

    .systems-notice-list,
    .systems-interface-visual,
    .systems-resource-visual,
    .systems-exam-room,
    .systems-utility-toolkit,
    .systems-scenario-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .teacher-hero-actions {
        justify-content: stretch;
        width: 100%;
    }

    .teacher-hero-actions .card-action {
        justify-content: center;
        width: 100%;
    }

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

    .compact-coverage-list .teacher-topic-row {
        grid-template-columns: 1fr;
    }

    .assigned-roster-table .teacher-table-head {
        display: none;
    }

    .assigned-roster-table .teacher-table-row {
        grid-template-columns: 1fr;
    }

    .marking-filter-grid,
    .actionable-feedback-card {
        grid-template-columns: 1fr;
    }

    .actionable-feedback-meta {
        align-items: stretch;
        justify-items: stretch;
    }

    .actionable-feedback-meta small {
        text-align: left;
    }

    .actionable-feedback-meta .card-action {
        justify-content: center;
        width: 100%;
    }

    .assigned-progress-card .card-heading {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .assigned-progress-card .status-badge,
    .assigned-progress-card .card-action {
        width: 100%;
        justify-content: center;
    }

    .compact-written-grid {
        grid-template-columns: 1fr;
    }

    .teacher-mark-action-list {
        grid-template-columns: 1fr;
    }

    .teacher-mark-action-card {
        min-height: 0;
    }

    .teacher-mark-form .card-action,
    .teacher-written-form .card-action {
        width: 100%;
    }
}
