:root {
    --bg: #0b1020;
    --panel: #141a2e;
    --panel-light: #1b2340;
    --text: #f5f7ff;
    --muted: #aab3cf;
    --accent: #54e0c7;
    --accent-dark: #2ebfa5;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(84, 224, 199, 0.12), transparent 30%),
        linear-gradient(135deg, #090d19, #10172b);
    color: var(--text);
}

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

button {
    font: inherit;
}

.topbar {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 90px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--accent);
}

nav {
    display: flex;
    gap: 34px;
}

nav a {
    color: var(--muted);
    font-weight: 600;
    transition: 0.2s ease;
}

nav a:hover {
    color: var(--text);
}

.hero {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;

    min-height: calc(100vh - 90px);

    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 70px;
    align-items: center;

    padding: 70px 0;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    max-width: 800px;
}

.hero h1 span {
    display: block;
    color: var(--accent);
}

.hero-description {
    margin-top: 28px;
    max-width: 650px;

    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.start-button {
    display: inline-block;
    margin-top: 34px;

    border: none;
    border-radius: 14px;

    background: var(--accent);
    color: #08110f;

    padding: 16px 26px;

    font-weight: 800;
    font-size: 1rem;

    cursor: pointer;

    box-shadow: 0 12px 30px rgba(84, 224, 199, 0.2);

    transition:
        transform 0.2s ease,
        background 0.2s ease;

}

.start-button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.hero-solo {
    grid-template-columns: 1fr;
    min-height: auto;

    max-width: 900px;

    padding: 90px 0 60px;
}

.courses-section {
    padding-top: 10px;
}

.path-preview {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.02)
    );

    border: 1px solid var(--border);
    border-radius: 28px;

    padding: 34px;

    box-shadow: var(--shadow);
}

.lesson-card {
    display: flex;
    align-items: center;
    gap: 18px;

    padding: 20px;

    border-radius: 18px;
    border: 1px solid var(--border);

    background: var(--panel);

    transition: 0.2s ease;
}

.lesson-card:hover {
    transform: translateX(4px);
}

.lesson-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
}

.lesson-card p {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 5px;
}

.lesson-card h3 {
    font-size: 1.05rem;
}

.lesson-card.complete .lesson-icon {
    background: var(--accent);
    color: #07110f;
}

.lesson-card.current {
    border-color: rgba(84, 224, 199, 0.45);
    background: var(--panel-light);
}

.lesson-card.current .lesson-icon {
    background: rgba(84, 224, 199, 0.14);
    color: var(--accent);
    border: 1px solid rgba(84, 224, 199, 0.45);
}

.lesson-card.locked {
    opacity: 0.52;
}

.lesson-card.locked .lesson-icon {
    background: rgba(255, 255, 255, 0.05);
}

.path-line {
    width: 3px;
    height: 34px;
    margin-left: 48px;

    background: linear-gradient(
        to bottom,
        rgba(84, 224, 199, 0.55),
        rgba(255, 255, 255, 0.08)
    );
}

@media (max-width: 850px) {
    .topbar {
        min-height: 78px;
    }

    nav {
        gap: 18px;
        font-size: 0.9rem;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 45px;
        padding: 55px 0;
    }

    .hero-text {
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .path-preview {
        max-width: 620px;
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 560px) {
    .topbar {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        width: min(100% - 24px, 1180px);
    }

    nav {
        display: none;
    }

    .path-preview {
        padding: 20px;
        border-radius: 22px;
    }

    .lesson-card {
        padding: 16px;
    }

    .lesson-icon {
        width: 50px;
        height: 50px;
    }

    .path-line {
        margin-left: 40px;
    }
}
/* ========================================
   LEARN PAGE
======================================== */

.active-nav {
    color: var(--accent);
}

.user-stats {
    display: flex;
    gap: 18px;

    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
}

.learn-page {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;

    padding: 70px 0 120px;
}

.course-header {
    margin-bottom: 60px;
}

.course-header h1 {
    font-size: clamp(2.8rem, 6vw, 4.8rem);
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

.course-header > p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.7;
    max-width: 680px;
}

.course-progress {
    margin-top: 30px;

    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-track {
    flex: 1;
    height: 10px;

    background: rgba(255, 255, 255, 0.08);

    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;

    background: var(--accent);
    border-radius: 20px;
}

.course-progress span {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.learning-path {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.unit-banner {
    width: 100%;

    background: linear-gradient(
        135deg,
        rgba(84, 224, 199, 0.17),
        rgba(84, 224, 199, 0.04)
    );

    border: 1px solid rgba(84, 224, 199, 0.25);
    border-radius: 22px;

    padding: 26px 30px;
    margin-bottom: 45px;
}

.unit-banner span {
    color: var(--accent);

    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.unit-banner h2 {
    margin-top: 7px;
    font-size: 1.7rem;
}

.unit-banner p {
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.6;
}

.second-unit {
    margin-top: 45px;
}

.path-node {
    width: min(620px, 100%);

    display: flex;
    align-items: center;
    gap: 22px;
}

.node-left {
    transform: translateX(-70px);
}

.node-right {
    transform: translateX(70px);
}

.node-circle {
    width: 82px;
    height: 82px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 1.25rem;
    font-weight: 800;

    border: 4px solid var(--panel-light);

    background: var(--panel);
}

.available .node-circle {
    background: var(--accent);
    color: #08110f;

    border-color: rgba(84, 224, 199, 0.25);

    box-shadow:
        0 8px 0 var(--accent-dark),
        0 15px 35px rgba(84, 224, 199, 0.2);

    cursor: pointer;
}

.node-info {
    flex: 1;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 16px;

    padding: 18px 20px;
}

.node-info span {
    color: var(--accent);

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.node-info h3 {
    margin-top: 5px;
}

.node-info p {
    margin-top: 6px;

    color: var(--muted);
    font-size: 0.9rem;
}

.locked {
    opacity: 0.45;
}

.vertical-path {
    width: 5px;
    height: 55px;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.09);

    margin: 8px 0;
}

@media (max-width: 750px) {

    /* Keep the account button; hide the streak and XP text
       (the account-menu wrapper carries its own spans too). */

    .user-stats span {
        display: none;
    }

    .user-stats {
        gap: 0;
    }

    .account-modal {
        padding: 30px 22px;
    }

    .node-left,
    .node-right {
        transform: none;
    }

    .node-circle {
        width: 68px;
        height: 68px;
    }
}
/* ========================================
   LESSON PAGE
======================================== */

.lesson-body {
    background:
        radial-gradient(
            circle at top center,
            rgba(84, 224, 199, 0.08),
            transparent 35%
        ),
        #090d19;
}

.lesson-link {
    color: inherit;
    text-decoration: none;
}

.lesson-page {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;

    min-height: 100vh;

    display: flex;
    flex-direction: column;
}

.lesson-topbar {
    min-height: 100px;

    display: flex;
    align-items: center;
    gap: 25px;
}

.exit-lesson {
    color: var(--muted);

    font-size: 1.4rem;
    font-weight: 700;

    transition: 0.2s ease;
}

.exit-lesson:hover {
    color: var(--text);
}

.lesson-progress-track {
    flex: 1;

    height: 12px;

    background: rgba(255, 255, 255, 0.08);

    border-radius: 50px;
    overflow: hidden;
}

.lesson-progress-fill {
    width: 20%;
    height: 100%;

    background: var(--accent);

    border-radius: 50px;

    transition: width 0.35s ease;
}

.lesson-xp {
    color: var(--accent);

    font-weight: 800;

    min-width: 80px;
    text-align: right;
}

.question-card {
    width: min(720px, 100%);
    margin: auto;

    padding: 50px 0 70px;
}

.question-number {
    color: var(--accent);

    font-size: 0.78rem;
    font-weight: 800;

    letter-spacing: 0.15em;

    margin-bottom: 16px;
}

.question-card h1 {
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1.08;

    letter-spacing: -0.035em;
}

.question-instruction {
    color: var(--muted);

    margin-top: 15px;
    margin-bottom: 35px;
}

.answer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 16px;
}

.answer-button {
    min-height: 95px;

    padding: 20px;

    border-radius: 16px;

    border: 2px solid rgba(255, 255, 255, 0.09);

    background: var(--panel);

    color: var(--text);

    text-align: left;

    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.answer-button:hover {
    transform: translateY(-2px);

    border-color: rgba(84, 224, 199, 0.4);
}

.answer-button.selected {
    border-color: var(--accent);

    background: rgba(84, 224, 199, 0.09);
}

.answer-button.correct {
    border-color: var(--accent);

    background: rgba(84, 224, 199, 0.16);
}

.answer-button.incorrect {
    border-color: #ff6978;

    background: rgba(255, 105, 120, 0.1);
}

.lesson-footer {
    min-height: 120px;

    border-top: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.feedback-message {
    color: var(--muted);

    font-weight: 600;
}

.check-button {
    min-width: 170px;

    padding: 15px 25px;

    border: none;
    border-radius: 14px;

    background: var(--accent);
    color: #08110f;

    font-weight: 800;
    font-size: 1rem;

    cursor: pointer;

    transition: 0.2s ease;
}

.check-button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.check-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (max-width: 650px) {

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

    .lesson-footer {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;

        padding: 22px 0;
    }

    .check-button {
        width: 100%;
    }

    .lesson-xp {
        display: none;
    }
}
/* ========================================
   COMPLETED LESSONS
======================================== */

.path-node.complete .node-circle {
    background: var(--accent);
    color: #08110f;

    border-color: rgba(84, 224, 199, 0.25);

    box-shadow:
        0 6px 0 var(--accent-dark),
        0 12px 28px rgba(84, 224, 199, 0.18);
}

.path-node.complete .node-info {
    border-color: rgba(84, 224, 199, 0.25);
}

.path-node.complete .node-info span {
    color: var(--accent);
}

/* ========================================
   PRACTICE PAGE
======================================== */

.practice-page {
    width: min(1000px, calc(100% - 40px));
    margin: 0 auto;

    padding: 70px 0 120px;
}

.practice-header {
    margin-bottom: 45px;
}

.practice-header h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    letter-spacing: -0.04em;
}

.practice-header > p:not(.eyebrow) {
    margin-top: 15px;

    color: var(--muted);

    line-height: 1.7;

    max-width: 650px;
}

.practice-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 22px;
}

.practice-card {
    background: var(--panel);

    border:
        1px solid var(--border);

    border-radius: 22px;

    padding: 28px;

    transition: 0.2s ease;
}

.practice-card:hover {
    transform: translateY(-4px);

    border-color:
        rgba(84, 224, 199, 0.3);
}

.practice-card span {
    color: var(--accent);

    font-size: 0.72rem;

    font-weight: 800;

    letter-spacing: 0.13em;
}

.practice-card h2 {
    margin-top: 10px;
}

.practice-card p {
    color: var(--muted);

    margin-top: 10px;

    line-height: 1.6;
}

.practice-button {
    display: inline-block;

    margin-top: 25px;

    padding: 12px 18px;

    border: none;
    border-radius: 12px;

    background: var(--accent);

    color: #08110f;

    font-weight: 800;
    font: inherit;

    cursor: pointer;

    transition: transform 0.15s ease;
}

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

.locked-practice {
    display: none;
}

.practice-session-shell {
    width: min(900px, 100%);
    margin: 0 auto;
}


@media (max-width: 700px) {

    .practice-grid {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   PROGRESS PAGE
======================================== */

.progress-page {
    width: min(1000px, calc(100% - 40px));
    margin: 0 auto;

    padding: 70px 0 120px;
}

.progress-header {
    margin-bottom: 45px;
}

.progress-header h1 {
    font-size:
        clamp(2.8rem, 6vw, 4.5rem);

    letter-spacing: -0.04em;
}

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;
}

.stat-card {
    background: var(--panel);

    border:
        1px solid var(--border);

    border-radius: 20px;

    padding: 30px;

    text-align: center;
}

.stat-card > span {
    font-size: 2rem;
}

.stat-card h2 {
    margin-top: 14px;

    font-size: 2.4rem;

    color: var(--accent);
}

.stat-card p {
    color: var(--muted);

    margin-top: 6px;
}


@media (max-width: 800px) {

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


@media (max-width: 500px) {

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

/* ========================================
   SLIDE STUDY MODULE
======================================== */

.module-page {
    width: min(1050px, calc(100% - 40px));
    margin: 0 auto;
    padding: 50px 0 100px;
}


.module-shell {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 28px;

    min-height: 650px;

    padding: 30px;

    box-shadow: var(--shadow);

    display: flex;
    flex-direction: column;
}


.module-top {
    display: flex;
    align-items: center;
    gap: 30px;

    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}


.module-exit {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

button.module-exit {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}


.module-exit:hover {
    color: var(--text);
}


.module-progress-area {
    flex: 1;

    display: flex;
    align-items: center;
    gap: 15px;
}


.module-progress-track {
    flex: 1;

    height: 10px;

    background: var(--panel-light);
    border-radius: 999px;

    overflow: hidden;
}


.module-progress-fill {
    height: 100%;
    width: 10%;

    background: var(--accent);

    border-radius: 999px;

    transition: width 0.3s ease;
}


.module-progress-area span {
    color: var(--muted);
    font-weight: 800;
    min-width: 55px;
}


.module-slides {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 50px 25px;
}


.module-slide {
    display: none !important;

    width: 100%;
    max-width: 820px;

    animation: moduleSlideIn 0.3s ease;
}


.module-slide.active-slide {
    display: block !important;
}


.module-slide.active-slide {
    display: block !important;
}


@keyframes moduleSlideIn {

    from {
        opacity: 0;
        transform: translateX(20px);
    }

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


.module-slide h1 {
    font-size: clamp(2.8rem, 7vw, 5rem);
    line-height: 1;
    letter-spacing: -0.05em;

    margin-top: 10px;
    margin-bottom: 25px;

    overflow-wrap: break-word;
}

@media (max-width: 480px) {

    .module-slide h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }
}


.module-slide > p {
    color: var(--muted);
    line-height: 1.8;

    font-size: 1.05rem;
    margin-top: 15px;
}


.module-lead {
    font-size: 1.25rem !important;
    color: var(--text) !important;
}


.module-visual {
    min-height: 150px;

    margin: 35px 0;
    padding: 20px;

    border: 1px solid var(--border);
    border-radius: 22px;

    background:
        radial-gradient(
            circle at center,
            rgba(84, 224, 199, 0.15),
            transparent 65%
        );

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    overflow: hidden;

    font-size: clamp(4rem, 10vw, 7rem);
}


.module-visual.module-visual-text {
    line-height: 1.8;
    font-size: clamp(1.3rem, 3.5vw, 2rem);
}


.module-takeaway {
    margin-top: 30px;

    padding: 22px 24px;

    background: rgba(84, 224, 199, 0.08);
    border: 1px solid rgba(84, 224, 199, 0.2);
    border-radius: 16px;

    line-height: 1.7;
}


.module-takeaway strong {
    color: var(--accent);
}


.module-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 18px;

    margin: 35px 0;
}


.module-card-grid.three-column {
    grid-template-columns: repeat(3, 1fr);
}


.module-card {
    padding: 24px;

    border-radius: 18px;

    border: 1px solid var(--border);

    background: var(--panel-light);
}


.module-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}


.module-card p {
    color: var(--muted);
    line-height: 1.6;
}


.module-card strong {
    display: block;
    color: var(--accent);

    font-size: 1.5rem;
    margin-top: 10px;
}


.module-card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}


.scale-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;

    margin: 35px 0;
}


.scale-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;

    padding: 22px;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: var(--panel-light);
}


.scale-row strong,
.scale-row span {
    min-width: 0;
    overflow-wrap: break-word;
}


.scale-row span {
    color: var(--accent);
    font-weight: 800;
}


.module-controls {
    display: flex;
    justify-content: space-between;

    padding-top: 25px;
    border-top: 1px solid var(--border);
}


.module-nav-button {
    border: none;

    padding: 14px 24px;

    border-radius: 14px;

    background: var(--accent);
    color: #08110f;

    font-weight: 900;
    font-size: 1rem;

    cursor: pointer;
}


.module-nav-button:hover {
    background: var(--accent-dark);
}


.module-nav-button.secondary-button {
    background: var(--panel-light);
    color: var(--text);

    border: 1px solid var(--border);
}


.module-nav-button:disabled {
    opacity: 0.3;
    cursor: default;
}


.module-finish-slide {
    text-align: center;
}


@media (max-width: 700px) {

    .module-shell {
        padding: 20px;
    }

    .module-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .module-progress-area {
        width: 100%;
    }

    .module-slides {
        padding: 35px 5px;
    }

    .module-card-grid,
    .module-card-grid.three-column {
        grid-template-columns: 1fr;
    }

}

/* ========================================
   DYNAMIC UNIT CONTAINERS
======================================== */

#unit3Container {
    display: contents;
}

#unit4Container {
    display: contents;
}

#unit5Container {
    display: contents;
}

#unit6Container {
    display: contents;
}

#unit7Container {
    display: contents;
}

#unit8Container {
    display: contents;
}

/* ========================================
   COMPLETE STUDY MODULE BUTTON
======================================== */

.complete-study-button {
    border: none;

    padding: 16px 32px;

    border-radius: 14px;

    background: var(--accent);
    color: #08110f;

    font-weight: 900;
    font-size: 1.05rem;

    cursor: pointer;

    margin-top: 20px;

    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.complete-study-button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* ========================================
   GAMES HUB PAGE
======================================== */

.games-page {
    width: min(1050px, calc(100% - 40px));
    margin: 0 auto;

    padding: 50px 0 100px;
}

.games-header {
    margin-bottom: 40px;
}

.games-header h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    letter-spacing: -0.03em;

    margin: 10px 0 14px;
}

.games-header p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;

    max-width: 640px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.game-hub-card {
    position: relative;

    padding: 26px;

    border-radius: 22px;
    border: 1px solid var(--border);

    background: var(--panel);

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.game-hub-card.playable {
    border-color: rgba(255, 181, 69, 0.35);

    background:
        linear-gradient(
            135deg,
            rgba(255, 181, 69, 0.1),
            rgba(255, 181, 69, 0.02)
        );
}

.game-hub-card.coming-soon {
    opacity: 0.55;
}

.game-hub-badge {
    align-self: flex-start;

    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;

    padding: 6px 12px;
    border-radius: 999px;

    margin-bottom: 12px;
}

.game-hub-card.playable .game-hub-badge {
    color: #2a1400;
    background: linear-gradient(135deg, #ffd166, #f77f00);
}

.game-hub-card.locked .game-hub-badge {
    color: var(--muted);
    background: var(--panel-light);
    border: 1px solid var(--border);
}

.game-hub-card.coming-soon .game-hub-badge {
    color: var(--muted);
    background: var(--panel-light);
    border: 1px solid var(--border);
}

.game-hub-icon {
    font-size: 2.2rem;
    margin-bottom: 6px;
}

.game-hub-card h3 {
    font-size: 1.25rem;
}

.game-hub-card p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;

    margin-bottom: 16px;
}

.game-hub-cta {
    margin-top: auto;

    display: inline-block;

    padding: 12px 20px;

    border-radius: 12px;

    font-weight: 800;
    font-size: 0.9rem;

    text-align: center;
}

.game-hub-card.playable .game-hub-cta {
    background: var(--accent);
    color: #08110f;

    cursor: pointer;

    transition: transform 0.15s ease;
}

.game-hub-card.playable .game-hub-cta:hover {
    transform: translateY(-2px);
}

.game-hub-card.locked .game-hub-cta,
.game-hub-card.coming-soon .game-hub-cta {
    background: var(--panel-light);
    color: var(--muted);

    border: 1px solid var(--border);
}

@media (max-width: 700px) {

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

/* ========================================
   GAME PAGES
======================================== */

.game-page {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;

    padding: 40px 0 100px;
}

.game-shell {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 28px;

    padding: 30px;

    box-shadow: var(--shadow);
}

.game-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);

    margin-bottom: 30px;
}

.game-badge {
    color: var(--accent);

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;

    background: rgba(84, 224, 199, 0.1);
    border: 1px solid rgba(84, 224, 199, 0.25);
    border-radius: 999px;

    padding: 8px 16px;
}

.game-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.08;

    letter-spacing: -0.03em;

    margin-bottom: 14px;
}

.game-lead {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;

    margin-bottom: 35px;
}

.ordered-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;

    margin-bottom: 30px;
}

.ordered-slot {
    min-height: 110px;

    padding: 10px 8px;

    border: 2px dashed var(--border);
    border-radius: 14px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    gap: 4px;

    background: rgba(255, 255, 255, 0.02);
}

.ordered-slot-rank {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
}

.ordered-slot-placeholder {
    color: var(--muted);
    font-size: 1.4rem;
    font-weight: 800;
    opacity: 0.4;
}

.ordered-slot.filled {
    border: 2px solid var(--accent);
    background: rgba(84, 224, 199, 0.1);

    animation: slotPop 0.3s ease;
}

.ordered-slot-emoji {
    font-size: 1.6rem;
}

.ordered-slot-label {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.ordered-slot-size {
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
}

@keyframes slotPop {

    from {
        transform: scale(0.85);
        opacity: 0.4;
    }

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

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;

    margin-bottom: 25px;
}

.game-tile {
    min-height: 90px;

    padding: 16px;

    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.09);

    background: var(--panel-light);
    color: var(--text);

    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;

    font-size: 1rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease;
}

.game-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(84, 224, 199, 0.4);
}

.game-tile-emoji {
    font-size: 1.7rem;
    flex-shrink: 0;
}

.game-tile.wrong {
    border-color: #ff6978;
    background: rgba(255, 105, 120, 0.12);

    animation: tileShake 0.4s ease;
}

@keyframes tileShake {

    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.game-feedback {
    color: var(--muted);
    font-weight: 600;

    min-height: 24px;
}

.game-complete {
    text-align: center;
}

.game-complete h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 10px;
}

.game-complete-xp {
    color: var(--accent);
    font-weight: 900;
    font-size: 1.3rem;

    margin-bottom: 18px;
}

.game-complete-lead {
    color: var(--muted);
    max-width: 480px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.game-recap {
    display: grid;
    gap: 10px;

    margin-bottom: 35px;
    text-align: left;
}

.game-recap-row {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 14px 18px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--panel-light);
}

.game-recap-emoji {
    font-size: 1.4rem;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.game-recap-emoji svg {
    width: 34px;
    height: 34px;
}

.game-recap-label {
    flex: 1;
    font-weight: 700;
}

.game-recap-size {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
}

.game-complete-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.equipment-card {
    text-align: center;

    padding: 40px 30px;

    border: 1px solid var(--border);
    border-radius: 22px;

    background:
        radial-gradient(
            circle at center,
            rgba(84, 224, 199, 0.1),
            transparent 65%
        );

    margin-bottom: 25px;

    animation: slotPop 0.3s ease;
}

.equipment-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 16px;
}

.equipment-icon svg {
    width: 130px;
    height: 130px;
}

.equipment-name {
    font-size: 1.7rem;
    margin-bottom: 12px;
}

.equipment-desc {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;

    max-width: 480px;
    margin: 0 auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;

    margin-bottom: 25px;
}

.category-button {
    min-height: 90px;

    padding: 16px;

    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.09);

    background: var(--panel-light);
    color: var(--text);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;

    font-size: 0.9rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease;
}

.category-button:hover {
    transform: translateY(-2px);
    border-color: rgba(84, 224, 199, 0.4);
}

.category-button-icon {
    font-size: 1.6rem;
}

.category-button.correct {
    border-color: var(--accent);
    background: rgba(84, 224, 199, 0.16);
}

.category-button.wrong {
    border-color: #ff6978;
    background: rgba(255, 105, 120, 0.12);

    animation: tileShake 0.4s ease;
}

.category-button.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.recap-category-group {
    margin-bottom: 6px;
}

.recap-category-title {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.04em;

    margin: 18px 0 10px;
}

.recap-category-group:first-child .recap-category-title {
    margin-top: 0;
}

.stack-visual {
    display: flex;
    flex-direction: column;

    border-radius: 16px;
    overflow: hidden;

    border: 1px solid var(--border);

    margin-bottom: 25px;
}

.stack-layer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    font-weight: 800;
    font-size: 0.85rem;

    flex-shrink: 0;

    overflow: hidden;
    white-space: nowrap;

    transition:
        height 0.5s ease,
        opacity 0.5s ease,
        padding 0.5s ease;

    animation: slotPop 0.3s ease;
}

.stack-layer-thickness {
    opacity: 0.75;
    font-size: 0.75rem;
    flex-shrink: 0;

    margin-left: 10px;
}

.stack-layer.sacrificial {
    border-top: 1px dashed rgba(170, 179, 207, 0.5);
    border-bottom: 1px dashed rgba(170, 179, 207, 0.5);
}

.stack-substrate {
    height: 56px;

    background: var(--panel-light);
    border-top: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--muted);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.stack-layer.flash {
    animation: layerFlash 0.7s ease;
}

@keyframes layerFlash {

    0%, 100% {
        box-shadow: none;
    }

    30% {
        box-shadow: inset 0 0 0 3px var(--text);
    }
}

.process-log {
    display: grid;
    gap: 8px;

    margin-bottom: 25px;
}

.process-log-row {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 16px;

    border-radius: 12px;
    border: 1px solid rgba(84, 224, 199, 0.25);

    background: rgba(84, 224, 199, 0.07);

    font-size: 0.85rem;

    animation: slotPop 0.3s ease;
}

.process-log-row.deposit-row {
    border-color: var(--border);
    background: var(--panel-light);
}

.process-log-check {
    flex-shrink: 0;
    color: var(--accent);
    font-weight: 800;
}

.process-log-mask {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.03em;

    flex-shrink: 0;
}

.process-log-row.deposit-row .process-log-mask {
    color: var(--muted);
}

.process-log-name {
    font-weight: 700;
}

.process-log-empty {
    color: var(--muted);
    font-size: 0.85rem;
    font-style: italic;
}

.game-tile.pattern-tile {
    border-color: rgba(84, 224, 199, 0.3);
}

.game-tile-tag {
    display: block;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    margin-top: 3px;
}

.recap-section-title {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;

    margin: 30px 0 14px;
}

.stack-visual.released .stack-layer.sacrificial {
    height: 6px !important;
    padding: 0;
    opacity: 0.35;
}

.stack-visual.released .stack-layer.sacrificial .stack-layer-name,
.stack-visual.released .stack-layer.sacrificial .stack-layer-thickness {
    display: none;
}

.release-button {
    display: block;
    margin: 0 auto 12px;

    background: linear-gradient(135deg, #ffd166, #f77f00);
    color: #2a1400;
}

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

.release-button:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
}

.release-caption {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;

    max-width: 440px;
    margin: 0 auto 30px;
    text-align: center;
}

.lab-stage {
    text-align: center;
    margin-bottom: 30px;
}

.plate-stage {
    position: relative;

    height: 210px;
    max-width: 260px;

    margin: 0 auto 25px;
}

.plate {
    position: absolute;
    left: 0;
    right: 0;

    height: 22px;
    border-radius: 6px;

    background: linear-gradient(135deg, #ffd166, #f77f00);

    box-shadow: 0 6px 16px rgba(247, 127, 0, 0.25);
}

.plate-fixed {
    top: 0;
}

.plate-movable {
    top: 100px;

    transition: top 0.15s ease;
}

.gap-label {
    position: absolute;
    left: 50%;
    top: 80px;

    transform: translateX(-50%);

    color: var(--muted);
    font-weight: 800;
    font-size: 0.8rem;

    background: var(--panel);
    padding: 2px 10px;
    border-radius: 999px;

    transition: top 0.15s ease;
}

.lab-readout {
    margin-bottom: 16px;
}

.lab-readout-label {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    margin-bottom: 4px;
}

.lab-readout-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent);

    margin-bottom: 14px;
}

.force-meter-track {
    position: relative;

    width: 100%;
    max-width: 420px;
    height: 14px;

    margin: 0 auto;

    background: var(--panel-light);
    border-radius: 999px;
    overflow: visible;
}

.force-meter-fill {
    height: 100%;
    width: 0%;

    background: linear-gradient(90deg, var(--accent), #ffd166, #f77f00);
    border-radius: 999px;

    transition: width 0.15s ease;
}

.force-meter-target {
    position: absolute;
    top: -5px;

    width: 4px;
    height: 24px;

    background: var(--text);
    border-radius: 2px;

    transform: translateX(-2px);
}

.target-badge {
    display: inline-block;

    color: var(--accent);
    font-weight: 800;
    font-size: 0.85rem;

    background: rgba(84, 224, 199, 0.1);
    border: 1px solid rgba(84, 224, 199, 0.25);
    border-radius: 999px;

    padding: 8px 18px;
}

.slider-panel {
    display: grid;
    gap: 22px;

    margin-bottom: 25px;
}

.slider-row {
    display: grid;
    gap: 10px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-weight: 800;
}

.slider-value {
    color: var(--accent);
}

.slider-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;

    width: 100%;
    height: 8px;

    border-radius: 999px;
    background: var(--panel-light);

    outline: none;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;

    width: 26px;
    height: 26px;

    border-radius: 50%;

    background: var(--accent);
    border: 4px solid #08110f;

    cursor: pointer;
}

.slider-row input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;

    background: var(--accent);
    cursor: pointer;
}

.lock-in-button {
    display: block;
    margin: 0 auto 12px;
    min-width: 200px;
}

.lock-in-button.wrong {
    animation: tileShake 0.4s ease;
}

.formula-recap {
    max-width: 520px;
    margin: 0 auto 30px;

    padding: 24px;

    border: 1px solid rgba(84, 224, 199, 0.2);
    border-radius: 16px;

    background: rgba(84, 224, 199, 0.06);

    text-align: center;
}

.formula-recap-formula {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);

    margin-bottom: 14px;
}

.formula-recap-text {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;
    text-align: left;
}

.accel-tune-lead {
    text-align: center;
    margin-bottom: 20px;
}

.accel-stage {
    max-width: 340px;
    margin: 0 auto 22px;
}

.accel-svg {
    width: 100%;
    height: auto;
    display: block;
}

.acoustic-stage {
    max-width: 380px;
    margin: 0 auto 22px;
}

.acoustic-svg {
    width: 100%;
    height: auto;
    display: block;
}

.acoustic-svg circle,
.acoustic-svg text {
    transition: cx 0.2s ease, x 0.2s ease;
}

.accel-mass-rect {
    transition: width 0.15s ease, height 0.15s ease, x 0.15s ease, y 0.15s ease;
}

.accel-readout-grid,
.accel-final-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;

    max-width: 420px;
    margin: 0 auto 24px;
}

.accel-readout-box {
    padding: 14px 16px;

    border: 1px solid rgba(84, 224, 199, 0.2);
    border-radius: 12px;

    background: rgba(84, 224, 199, 0.06);

    text-align: center;
}

.accel-readout-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;

    margin-bottom: 6px;
}

.accel-readout-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--accent);
}

.device-phase-header {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 18px 22px;

    border: 1px solid rgba(84, 224, 199, 0.25);
    border-radius: 16px;

    background: rgba(84, 224, 199, 0.07);

    margin-bottom: 22px;
}

.device-phase-icon {
    font-size: 2.4rem;
    flex-shrink: 0;
}

.device-phase-label {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;

    margin-bottom: 4px;
}

.device-phase-name {
    font-size: 1.2rem;
}

.build-zone {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    min-height: 70px;

    padding: 18px;

    border: 2px dashed var(--border);
    border-radius: 16px;

    margin-bottom: 22px;
}

.build-zone-empty {
    color: var(--muted);
    font-size: 0.9rem;
    margin: auto;
}

.build-part {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 16px;

    border-radius: 12px;
    border: 1px solid var(--accent);

    background: rgba(84, 224, 199, 0.12);

    font-weight: 700;
    font-size: 0.85rem;

    animation: slotPop 0.3s ease;
}

.build-part-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.build-part-icon svg {
    width: 100%;
    height: 100%;
}

.part-tile-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.part-tile-icon svg {
    width: 100%;
    height: 100%;
}

.phase-complete-panel {
    text-align: center;

    padding: 30px;

    border: 1px solid rgba(255, 209, 102, 0.3);
    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 209, 102, 0.1),
            rgba(247, 127, 0, 0.03)
        );
}

.phase-complete-title {
    font-size: 1.3rem;
    font-weight: 900;

    margin-bottom: 10px;
}

.phase-complete-blurb {
    color: var(--muted);
    line-height: 1.6;

    max-width: 460px;
    margin: 0 auto 22px;
}

@media (max-width: 700px) {

    .game-shell {
        padding: 20px;
    }

    .ordered-strip {
        grid-template-columns: repeat(4, 1fr);
    }

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

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

    .game-top {
        flex-wrap: wrap;
        gap: 14px;
    }

    .game-complete-actions {
        flex-direction: column;
    }
}

/* ========================================
   SUPERCAPACITOR GAMES
======================================== */

.sc-emoji-icon {
    font-size: 3.6rem;
    line-height: 1;
}

.game-tile.hint {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(84, 224, 199, 0.25);
}

.sc-round-title {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.06em;

    margin-bottom: 6px;
}

.sc-round-lead {
    color: var(--muted);
    line-height: 1.5;

    margin-bottom: 18px;
}

.sc-plot-wrap {
    max-width: 520px;
    margin: 0 auto 22px;
}

.sc-plot {
    width: 100%;
    height: auto;
    display: block;
}

.sc-plot .sc-axis,
.sc-figure .sc-axis {
    stroke: var(--muted);
    stroke-width: 1.2;
    opacity: 0.7;
}

.sc-plot .sc-axis-label,
.sc-figure .sc-axis-label {
    fill: var(--muted);
    font-size: 9px;
}

.sc-zone ellipse {
    fill: rgba(84, 224, 199, 0.1);
    stroke: rgba(84, 224, 199, 0.5);
    stroke-width: 1.3;

    cursor: pointer;

    transition: fill 0.15s ease, stroke 0.15s ease;
}

.sc-zone:hover ellipse {
    fill: rgba(84, 224, 199, 0.24);
}

.sc-zone text {
    fill: var(--text);
    font-size: 10.5px;
    font-weight: 700;

    pointer-events: none;
}

.sc-zone.correct ellipse {
    fill: rgba(84, 224, 199, 0.35);
    stroke: var(--accent);
}

.sc-zone.wrong ellipse {
    fill: rgba(255, 105, 120, 0.25);
    stroke: #ff6978;

    animation: tileShake 0.4s ease;
}

.sc-dots circle {
    fill: var(--accent);
    stroke: #08110f;
    stroke-width: 1;
}

.sc-note {
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;

    margin-top: 4px;
}

.sc-figure-wrap {
    max-width: 460px;
    margin: 0 auto 20px;

    padding: 12px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.02);
}

.sc-figure {
    width: 100%;
    height: auto;
    display: block;
}

.sc-figure .sc-curve,
.sc-size-chart .sc-curve {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.4;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.sc-figure .sc-curve-fail,
.sc-size-chart .sc-curve-fail {
    stroke: #ff6978;
}

.sc-question {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;

    margin-bottom: 14px;
}

.sc-size-card {
    text-align: center;

    padding: 26px 24px;

    border: 1px solid var(--border);
    border-radius: 22px;

    background:
        radial-gradient(
            circle at center,
            rgba(84, 224, 199, 0.1),
            transparent 65%
        );

    margin-bottom: 20px;
}

.sc-size-icon {
    font-size: 2.6rem;
    line-height: 1;

    margin-bottom: 8px;
}

.sc-size-text {
    color: var(--muted);
    line-height: 1.6;

    max-width: 520px;
    margin: 0 auto 14px;
}

.sc-size-spec {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.sc-size-spec span {
    padding: 6px 12px;

    border: 1px solid var(--border);
    border-radius: 999px;

    font-size: 0.82rem;
    color: var(--muted);
}

.sc-size-spec strong {
    color: var(--text);
}

.sc-size-chart-wrap {
    max-width: 480px;
    margin: 0 auto 18px;
}

.sc-size-chart {
    width: 100%;
    height: auto;
    display: block;
}

.sc-size-chart .sc-axis {
    stroke: var(--muted);
    stroke-width: 1.2;
    opacity: 0.7;
}

.sc-size-chart .sc-axis-label {
    fill: var(--muted);
    font-size: 9px;
}

.sc-size-chart .sc-limit {
    stroke: #ff6978;
    stroke-width: 1.2;
    stroke-dasharray: 4 3;
}

.sc-size-chart .sc-need {
    stroke: var(--muted);
    stroke-width: 1.2;
    stroke-dasharray: 2 3;
}

.sc-size-chart .sc-limit-label {
    fill: var(--muted);
    font-size: 8.5px;
}

.sc-size-chart .sc-fail-dot {
    fill: #ff6978;
}

.sc-size-result {
    text-align: center;
    line-height: 1.55;

    padding: 12px 16px;

    border: 1px solid var(--border);
    border-radius: 14px;

    margin-bottom: 18px;

    color: var(--muted);
}

.sc-size-result.pass {
    border-color: rgba(84, 224, 199, 0.5);
    background: rgba(84, 224, 199, 0.08);
    color: var(--text);
}

.sc-size-result.fail {
    border-color: rgba(255, 105, 120, 0.5);
    background: rgba(255, 105, 120, 0.08);
    color: var(--text);
}

.sc-size-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    margin-bottom: 12px;
}

.sc-hub-done {
    color: var(--accent);
}

.lock-in-button[hidden] {
    display: none;
}

/* ========================================
   FET COURSE DIAGRAMS
======================================== */

.module-visual.fet-diagram {
    padding: 14px;
}

.module-visual.fet-diagram svg {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
}

.fd-label {
    fill: var(--text);
    font-size: 10px;
    font-weight: 700;
}

.fd-sub {
    fill: var(--muted);
    font-size: 8.5px;
}

.fd-accent {
    fill: var(--accent);
    font-size: 9px;
    font-weight: 700;
}

.fd-p {
    fill: rgba(170, 179, 207, 0.14);
    stroke: rgba(170, 179, 207, 0.5);
    stroke-width: 1.2;
}

.fd-n {
    fill: rgba(84, 224, 199, 0.26);
    stroke: var(--accent);
    stroke-width: 1.2;
}

.fd-ox {
    fill: rgba(255, 214, 102, 0.28);
    stroke: #ffd666;
    stroke-width: 1.2;
}

.fd-metal {
    fill: rgba(245, 247, 255, 0.22);
    stroke: var(--text);
    stroke-width: 1.2;
}

.fd-depl {
    fill: rgba(255, 105, 120, 0.14);
    stroke: rgba(255, 105, 120, 0.55);
    stroke-width: 1;
    stroke-dasharray: 3 2;
}

.fd-channel {
    stroke: var(--accent);
    stroke-width: 2.4;
    stroke-dasharray: 5 3;
}

.fd-axis {
    stroke: var(--muted);
    stroke-width: 1.2;
    fill: none;
}

.fd-grid {
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 1;
}

.fd-curve {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.2;
    stroke-linejoin: round;
}

.fd-curve-alt {
    fill: none;
    stroke: #ffd666;
    stroke-width: 2.2;
    stroke-linejoin: round;
}

.fd-dash {
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.2;
    stroke-dasharray: 4 3;
}

.fd-hole {
    fill: #ffd666;
}

.fd-electron {
    fill: var(--accent);
}

.fd-ion {
    fill: #ff6978;
}

.fd-arrow {
    fill: var(--text);
}

.fd-sym {
    font-size: 9px;
    font-weight: 900;
}

@media (max-width: 600px) {

    .module-visual.fet-diagram {
        padding: 8px;
        min-height: 0;
    }

    .fd-label {
        font-size: 13px;
    }

    .fd-sub {
        font-size: 11px;
    }

    .fd-accent {
        font-size: 11.5px;
    }

    .fd-sym {
        font-size: 12px;
    }
}

/* ========================================
   SUBSCRIPTS AND SUPERSCRIPTS
   Keep them from stretching line spacing.
======================================== */

sub,
sup {
    line-height: 0;
    font-size: 0.72em;
}

.module-visual .math-visual {
    text-align: center;
}

/* ========================================
   BRAND AND HOME
   Self-hosted fonts, the logo mark, the
   background grid, and the styles for the
   home, About, and Career paths pages.
======================================== */

@font-face {
    font-family: "Inter";
    src: url("fonts/inter-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter";
    src: url("fonts/inter-latin-ext.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    src: url("fonts/inter-greek.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --copper: #ffb86b;
    --accent-soft: rgba(84, 224, 199, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(circle at top right, rgba(84, 224, 199, 0.13), transparent 32%),
        radial-gradient(circle at bottom left, rgba(255, 184, 107, 0.05), transparent 30%),
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(135deg, #090d19, #10172b);
    background-size: auto, auto, 56px 56px, 56px 56px, auto;
}

.eyebrow,
.game-badge,
.game-hub-badge,
.node-info > span,
.unit-banner > span {
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    letter-spacing: 0.16em;
}

.logo::before {
    content: "";
    width: 28px;
    height: 28px;
    flex: none;
    background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 32 32%22%3E%3Ccircle cx=%2216%22 cy=%2216%22 r=%2212.2%22 fill=%22%23141a2e%22 stroke=%22%2354e0c7%22 stroke-width=%221.7%22/%3E%3CclipPath id=%22w%22%3E%3Ccircle cx=%2216%22 cy=%2216%22 r=%2211.3%22/%3E%3C/clipPath%3E%3Cg clip-path=%22url(%23w)%22 stroke=%22%2354e0c7%22 stroke-opacity=%22.4%22 stroke-width=%22.85%22%3E%3Cpath d=%22M11 3V29M16 3V29M21 3V29M3 11H29M3 16H29M3 21H29%22/%3E%3C/g%3E%3Crect x=%2216.5%22 y=%2211.5%22 width=%224%22 height=%224%22 rx=%22.6%22 fill=%22%2354e0c7%22/%3E%3C/svg%3E") center / contain no-repeat;
}

svg text {
    font-family: var(--font-sans);
}

.game-hub-card.playable:hover {
    transform: translateY(-4px);
    border-color: rgba(84, 224, 199, 0.5);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.game-hub-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ic {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.hm-nav {
    gap: 26px;
}

.hm-nav a {
    font-size: 0.95rem;
}

/* ---------- home hero ---------- */

.hm-hero {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;

    padding: 64px 0 48px;
}

.hm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);

    background: var(--accent-soft);
    border: 1px solid rgba(84, 224, 199, 0.3);
    border-radius: 999px;

    padding: 7px 14px;
    margin-bottom: 24px;
}

.hm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(84, 224, 199, 0.18);
    animation: hmPulse 2.4s ease-in-out infinite;
}

@keyframes hmPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(84, 224, 199, 0.18); }
    50% { box-shadow: 0 0 0 7px rgba(84, 224, 199, 0.04); }
}

.hm-hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.9rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-weight: 800;
}

.hm-hero h1 span {
    display: block;
    padding-bottom: 0.1em;
    margin-bottom: -0.1em;
    background: linear-gradient(90deg, var(--accent), #9ef2e2 55%, var(--copper));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hm-lead {
    margin-top: 22px;
    max-width: 560px;

    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.hm-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;

    margin-top: 32px;
}

.hm-cta-row .start-button {
    margin-top: 0;
}

.hm-ghost {
    display: inline-block;

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;

    padding: 15px 24px;

    font-weight: 700;
    color: var(--text);

    transition: border-color 0.2s ease, background 0.2s ease;
}

.hm-ghost:hover {
    border-color: rgba(84, 224, 199, 0.6);
    background: rgba(84, 224, 199, 0.07);
}

.hm-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 30px;
}

.hm-chips li {
    font-size: 0.85rem;
    color: var(--muted);

    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);

    padding: 7px 14px;
}

.hm-chips strong {
    color: var(--text);
}

.hm-hero-art {
    position: relative;
}

.hm-wafer {
    display: block;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;

    filter: drop-shadow(0 30px 60px rgba(84, 224, 199, 0.14));
}

.hm-wafer .die {
    fill: rgba(84, 224, 199, 0.1);
    stroke: rgba(84, 224, 199, 0.38);
    stroke-width: 1;

    animation: dieExpose 7s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}

.hm-wafer .die.bad {
    fill: rgba(255, 184, 107, 0.18);
    stroke: rgba(255, 184, 107, 0.6);

    animation-name: dieExposeBad;
}

@keyframes dieExpose {
    0% { fill: rgba(84, 224, 199, 0.1); }
    3% { fill: rgba(84, 224, 199, 0.85); }
    24% { fill: rgba(84, 224, 199, 0.22); }
    100% { fill: rgba(84, 224, 199, 0.1); }
}

@keyframes dieExposeBad {
    0% { fill: rgba(255, 184, 107, 0.18); }
    3% { fill: rgba(255, 184, 107, 0.85); }
    24% { fill: rgba(255, 184, 107, 0.3); }
    100% { fill: rgba(255, 184, 107, 0.18); }
}

.hm-wafer .scan rect {
    fill: var(--accent);
    filter: drop-shadow(0 0 6px rgba(84, 224, 199, 0.9));

    transform-box: fill-box;
    animation: waferScan 7s ease-in-out infinite;
}

@keyframes waferScan {
    0% { transform: translateY(0); opacity: 0; }
    2% { opacity: 1; }
    44% { transform: translateY(374px); opacity: 1; }
    48% { transform: translateY(374px); opacity: 0; }
    100% { transform: translateY(374px); opacity: 0; }
}

.hm-art-caption {
    text-align: center;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.6;

    margin-top: 16px;
}

.hm-art-caption span {
    color: var(--copper);
}

@media (prefers-reduced-motion: reduce) {

    .hm-dot,
    .hm-wafer .die,
    .hm-wafer .scan rect {
        animation: none;
    }

    .hm-wafer .scan {
        display: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ---------- home sections ---------- */

.hm-section {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 52px 0;
}

.hm-section-head {
    max-width: 720px;
    margin-bottom: 30px;
}

.hm-section-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.035em;

    margin-bottom: 12px;
}

.hm-section-head p {
    color: var(--muted);
    line-height: 1.7;
}

.hm-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.hm-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;

    padding: 28px;
}

.hm-card h3 {
    font-size: 1.2rem;
    letter-spacing: -0.01em;

    margin-bottom: 8px;
}

.hm-card p {
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.97rem;
}

.hm-icon {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(84, 224, 199, 0.28);
    border-radius: 14px;

    margin-bottom: 18px;
}

.hm-step-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--copper);

    margin-bottom: 10px;
}

.hm-topics {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hm-topics li {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text);

    border: 1px solid rgba(84, 224, 199, 0.28);
    border-radius: 10px;
    background: rgba(84, 224, 199, 0.06);

    padding: 9px 14px;
}

.hm-roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.hm-role {
    display: flex;
    flex-direction: column;
    gap: 12px;

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;

    padding: 22px;

    transition: transform 0.2s ease, border-color 0.2s ease;
}

.hm-role:hover {
    transform: translateY(-3px);
    border-color: rgba(84, 224, 199, 0.5);
}

.hm-role h3 {
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.hm-role p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.hm-more {
    margin-top: 22px;
}

.hm-more a {
    color: var(--accent);
    font-weight: 700;
}

.hm-more a:hover {
    text-decoration: underline;
}

/* ---------- footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 40px;

    background: rgba(9, 13, 25, 0.6);
}

.sf-inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 46px;

    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 28px 50px;
}

.sf-brand .logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
}

.sf-brand p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;

    margin-top: 12px;
    max-width: 380px;
}

.sf-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    align-content: flex-start;
    justify-content: flex-end;
}

.sf-links a {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.sf-links a:hover {
    color: var(--text);
}

.sf-legal {
    grid-column: 1 / -1;

    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.7;
    opacity: 0.85;

    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* ---------- inner pages (About, Careers) ---------- */

.pg-hero {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
    padding: 70px 0 34px;
}

.pg-hero h1 {
    font-size: clamp(2.2rem, 5.4vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.pg-hero h1 span {
    color: var(--accent);
}

.pg-hero p.pg-lead {
    margin-top: 18px;
    max-width: 680px;

    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.pg-body {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 0 40px;
}

.pg-body h2 {
    font-size: 1.5rem;
    letter-spacing: -0.02em;

    margin: 38px 0 12px;
}

.pg-body p,
.pg-body li {
    color: var(--muted);
    line-height: 1.75;
}

.pg-body p + p {
    margin-top: 12px;
}

.pg-body ul {
    padding-left: 22px;
    margin-top: 10px;
}

.pg-body li + li {
    margin-top: 6px;
}

.pg-body strong {
    color: var(--text);
}

.pg-note {
    border: 1px solid rgba(255, 184, 107, 0.3);
    background: rgba(255, 184, 107, 0.06);
    border-radius: 16px;

    padding: 18px 22px;
    margin-top: 26px;
}

.pg-note p {
    color: var(--text);
}

.cr-wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 0 30px;
}

.cr-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cr-card {
    display: flex;
    flex-direction: column;
    gap: 14px;

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;

    padding: 28px;

    scroll-margin-top: 24px;
}

.cr-card:target {
    border-color: rgba(84, 224, 199, 0.6);
    box-shadow: 0 0 0 4px rgba(84, 224, 199, 0.1);
}

.cr-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cr-head .hm-icon {
    margin-bottom: 0;
}

.cr-card h3 {
    font-size: 1.3rem;
    letter-spacing: -0.015em;
}

.cr-card p {
    color: var(--muted);
    line-height: 1.7;
}

.cr-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent);

    margin-top: 4px;
}

.cr-learn {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cr-learn a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;

    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);

    padding: 11px 14px;

    font-size: 0.93rem;
    font-weight: 600;

    transition: border-color 0.2s ease, background 0.2s ease;
}

.cr-learn a::after {
    content: "\2192";
    color: var(--accent);
}

.cr-learn a:hover {
    border-color: rgba(84, 224, 199, 0.55);
    background: rgba(84, 224, 199, 0.07);
}

.cr-employers {
    margin-top: 30px;
}

.cr-employers .hm-topics li {
    font-family: var(--font-sans);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {

    .hm-hero {
        grid-template-columns: 1fr;
        gap: 34px;
        padding-top: 40px;
    }

    .hm-hero-art {
        order: 2;
    }

    .hm-wafer {
        max-width: 340px;
    }

    .hm-steps {
        grid-template-columns: 1fr;
    }

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

    .sf-inner {
        grid-template-columns: 1fr;
    }

    .sf-links {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {

    .hm-nav {
        display: none;
    }

    .topbar {
        min-height: 72px;
    }

    .hm-cta-row .start-button,
    .hm-ghost {
        flex: 1 1 100%;
        text-align: center;
    }

    .hm-section {
        padding: 38px 0;
    }
}

/* Inter runs a little wider than Arial, so equation visuals get a
   slightly smaller size on phones to keep them on one line. */

@media (max-width: 600px) {

    .module-visual.module-visual-text {
        font-size: 1.15rem;
    }
}

/* ---------- polish ---------- */

.hm-card .hm-step-num {
    color: var(--copper);
    font-size: 0.72rem;
    line-height: 1.2;
}

.games-header .eyebrow,
.progress-header .eyebrow {
    color: var(--accent);
}

@media (max-width: 700px) {

    .hm-role {
        display: grid;
        grid-template-columns: 44px 1fr;
        column-gap: 14px;
        row-gap: 4px;

        padding: 18px;
    }

    .hm-role .hm-icon {
        grid-row: 1 / span 2;

        width: 44px;
        height: 44px;
        margin-bottom: 0;
    }

    .hm-role h3 {
        align-self: end;
    }
}

.cr-card .cr-label {
    color: var(--accent);
    font-size: 0.72rem;
    line-height: 1.2;
}

/* ========================================
   CHIP COURSE DIAGRAMS
======================================== */

.fd-melt {
    fill: rgba(255, 184, 107, 0.35);
    stroke: #ffb86b;
    stroke-width: 1.2;
}

.fd-crystal {
    fill: rgba(84, 224, 199, 0.16);
    stroke: var(--accent);
    stroke-width: 1.3;
}

.fd-lost {
    fill: rgba(255, 184, 107, 0.14);
    stroke: rgba(255, 184, 107, 0.7);
    stroke-width: 1;
}


/* Part banners sit clear of the last node above them. */

.learning-path .unit-banner:not(:first-child) {
    margin-top: 50px;
}


/* ========================================
   ACCOUNTS: SIGN-IN BUTTON & MODAL
======================================== */

.account-button {
    border: 1px solid var(--border);
    border-radius: 999px;

    background: var(--panel-light);
    color: var(--text);

    padding: 8px 16px;

    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;

    cursor: pointer;

    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    transition: border-color 0.2s ease, color 0.2s ease;
}

.account-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.account-button.signed-in {
    border-color: rgba(84, 224, 199, 0.4);
    color: var(--accent);
}

.account-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(6, 9, 18, 0.72);
    backdrop-filter: blur(3px);
}

.account-overlay[hidden] {
    display: none;
}

.account-modal {
    position: relative;
    width: min(420px, 100%);

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;

    padding: 38px 34px;

    box-shadow: var(--shadow);
}

.account-modal h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.account-modal p {
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.6;
    margin-bottom: 18px;
}

.account-modal strong {
    color: var(--text);
}

.account-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;

    border: none;
    background: none;
    color: var(--muted);

    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.account-modal-close:hover {
    color: var(--text);
}

.account-input {
    width: 100%;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--panel-light);
    color: var(--text);

    padding: 14px 16px;

    font-family: var(--font-sans);
    font-size: 1rem;

    margin-bottom: 16px;
}

.account-input:focus {
    outline: none;
    border-color: var(--accent);
}

.account-code-input {
    letter-spacing: 0.3em;
    font-family: var(--font-mono);
    text-align: center;
}

.account-submit {
    width: 100%;
    margin-top: 0;
    text-align: center;
}

.account-link {
    display: block;
    width: 100%;

    margin-top: 14px;

    border: none;
    background: none;
    color: var(--muted);

    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: underline;

    cursor: pointer;
}

.account-link:hover {
    color: var(--text);
}

.account-hint {
    font-size: 0.85rem;
}

.account-error {
    color: #ff6978;
    font-size: 0.88rem;
    margin-top: -6px;
    margin-bottom: 12px;
}
