:root {
    --ink: #172033;
    --text: #273244;
    --muted: #637083;
    --paper: #fffdf8;
    --panel: #ffffff;
    --line: #d9e0ea;
    --blue: #2563eb;
    --green: #16845b;
    --orange: #f97316;
    --rose: #e11d48;
    --violet: #7c3aed;
    --shadow: 0 16px 38px rgba(23, 32, 51, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

.support-header {
    background: linear-gradient(135deg, #fff7ed 0%, #e0f2fe 52%, #ecfccb 100%);
    border-bottom: 1px solid var(--line);
}

.support-header.compact {
    background: #f8fafc;
}

.support-nav,
.result-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
}

.brand {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-links a {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.nav-links a:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.75);
}

.home-hero,
.lesson-hero {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    padding: 54px 0 66px;
}

.lesson-hero {
    padding: 44px 0 48px;
}

.home-hero h1,
.lesson-hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(2.15rem, 5vw, 4rem);
    line-height: 1.06;
}

.hero-text,
.lesson-hero p {
    max-width: 720px;
    color: #3d4b60;
    font-size: 1.08rem;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--orange);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dark-eyebrow {
    color: var(--green);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
}

.primary-button,
.small-button {
    background: var(--blue);
    color: #ffffff;
}

.primary-button:hover,
.small-button:hover {
    background: #1d4ed8;
}

.ghost-button {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
}

.small-button {
    min-width: 92px;
}

.hero-panel,
.wide-panel,
.intro-card,
.lesson-sidebar,
.lesson-preview,
.guide-section,
.toolbox,
.result-checklist {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-panel {
    align-self: start;
    padding: 24px;
}

.hero-panel h2 {
    margin-top: 0;
}

.hero-panel ul,
.result-checklist ul {
    padding-left: 20px;
}

.support-main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 60px;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.intro-card {
    padding: 22px;
    border-top-width: 5px;
}

.html-card {
    border-top-color: var(--orange);
}

.css-card {
    border-top-color: var(--blue);
}

.js-card {
    border-top-color: #eab308;
}

.php-card {
    border-top-color: var(--green);
}

.step-number,
.step-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 8px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.82rem;
    font-weight: 800;
}

.wide-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 24px;
    padding: 24px;
}

.wide-panel h2 {
    margin: 0;
}

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

.lesson-sidebar {
    position: sticky;
    top: 16px;
    align-self: start;
    padding: 16px;
}

.sidebar-title {
    margin: 0 0 10px;
    color: var(--muted);
    font-weight: 800;
}

.lesson-sidebar a {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
}

.lesson-sidebar a:hover {
    background: #f1f5f9;
}

.lesson-list {
    display: grid;
    gap: 18px;
}

.lesson-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
}

.lesson-preview h2 {
    margin: 10px 0 6px;
}

.lesson-preview p {
    margin-bottom: 0;
}

.guide-page {
    background: #f8fafc;
}

.guide-hero {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 50px;
}

.guide-hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.08;
}

.guide-hero p {
    max-width: 760px;
    color: #3d4b60;
    font-size: 1.06rem;
}

.guide-main {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 60px;
}

.guide-section,
.toolbox {
    margin-bottom: 22px;
    padding: 24px;
}

.guide-section h2,
.toolbox h2 {
    margin-top: 0;
}

.reference-list,
.concept-list,
.example-list {
    display: grid;
    gap: 12px;
    padding-left: 0;
    list-style: none;
}

.reference-list li,
.concept-list li,
.example-list li {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 14px 16px;
}

.reference-list a {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.reference-list a:hover {
    text-decoration: underline;
}

.concept-list strong,
.example-list strong {
    color: var(--ink);
}

.mini-example {
    margin: 14px 0;
    border-left: 5px solid var(--green);
    border-radius: 8px;
    background: #f0fdf4;
    padding: 14px 16px;
}

.mini-example p {
    margin: 0 0 8px;
}

.task-list {
    display: grid;
    gap: 12px;
    padding-left: 0;
    list-style: none;
}

.task-list li {
    padding: 14px 16px;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    background: #f8fafc;
}

.task-list strong {
    color: var(--ink);
}

.checklist li {
    margin-bottom: 8px;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 0;
    list-style: none;
}

.tool-tags li {
    padding: 6px 10px;
    border-radius: 8px;
    background: #eef2ff;
    color: #3730a3;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92rem;
}

pre {
    overflow-x: auto;
    border-radius: 8px;
    background: #111827;
    color: #e5e7eb;
    padding: 16px;
}

code {
    font-family: Consolas, Monaco, monospace;
}

.note-box {
    border-left: 5px solid var(--orange);
    border-radius: 8px;
    background: #fff7ed;
    padding: 16px;
}

.next-step {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.result-page {
    background: #101828;
    color: #e5e7eb;
}

.result-header {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.45), transparent 36%),
        linear-gradient(135deg, #101828, #1e293b);
}

.result-nav .brand,
.result-nav .nav-links a {
    color: #ffffff;
}

.result-nav .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.result-hero,
.result-main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.result-hero {
    padding: 48px 0 56px;
}

.result-hero h1 {
    max-width: 720px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.06;
}

.result-hero p {
    max-width: 700px;
    color: #cbd5e1;
    font-size: 1.08rem;
}

.result-main {
    padding: 36px 0 62px;
}

.result-stats,
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.result-stats span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 800;
}

.result-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
}

.result-button.primary {
    background: var(--blue);
    color: #ffffff;
}

.result-button.primary:hover {
    background: #1d4ed8;
}

.result-button.secondary {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--blue);
}

.result-button.secondary:hover {
    border-color: var(--blue);
}

.result-toolbar,
.result-games-section {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

.result-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 18px;
}

.result-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.result-games-section {
    padding: 22px;
}

.result-games-section h2 {
    margin-top: 0;
}

.result-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.result-game-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(23, 32, 51, 0.1);
    padding: 18px;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.result-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(23, 32, 51, 0.16);
}

.result-game-image {
    display: block;
    width: calc(100% + 36px);
    height: 142px;
    margin: -18px -18px 16px;
    object-fit: cover;
    border-bottom: 1px solid var(--line);
}

.result-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.result-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.88rem;
    font-weight: 800;
}

.result-game-card h3 {
    margin-bottom: 6px;
}

.result-rating-label {
    margin: 0 0 10px;
    color: var(--orange);
    font-weight: 800;
}

.result-card-link {
    display: inline-flex;
    margin-top: 8px;
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.result-card-link:hover {
    text-decoration: underline;
}

.result-is-hidden {
    display: none;
}

.mock-app {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.mock-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    background: #172033;
    color: #ffffff;
}

.mock-toolbar span {
    font-size: 1.2rem;
    font-weight: 800;
}

.mock-toolbar button,
.mock-form button {
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    padding: 10px 14px;
}

.mock-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    background: #e0f2fe;
}

.mock-stats span {
    padding: 7px 11px;
    border-radius: 8px;
    background: #ffffff;
    font-weight: 800;
}

.mock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    padding: 18px;
}

.mock-card {
    min-height: 220px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(23, 32, 51, 0.1);
    overflow: hidden;
}

.mock-card h2 {
    margin: 16px 0 8px;
}

.mock-card-image {
    display: block;
    width: calc(100% + 36px);
    height: 132px;
    margin: -18px -18px 16px;
    object-fit: cover;
    border-bottom: 1px solid var(--line);
}

.mock-card strong {
    color: var(--orange);
}

.mock-tag {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
}

.mock-form {
    margin: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.mock-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.mock-fields span {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
}

.result-checklist {
    margin-top: 24px;
    padding: 24px;
    color: var(--text);
}

.result-footer,
.support-footer {
    padding: 24px 16px;
    text-align: center;
}

.support-footer {
    background: #f1f5f9;
    color: var(--muted);
}

.result-footer {
    background: #0f172a;
    color: #cbd5e1;
}

@media (max-width: 780px) {
    .home-hero,
    .lesson-layout {
        grid-template-columns: 1fr;
    }

    .lesson-sidebar {
        position: static;
    }

    .lesson-preview,
    .wide-panel,
    .mock-toolbar,
    .result-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .support-nav,
    .result-nav {
        align-items: flex-start;
        flex-direction: column;
    }
}
