:root {
    color-scheme: dark;
    --bg: #08070d;
    --bg-soft: #100a15;
    --surface: rgba(24, 15, 30, .88);
    --surface-strong: #1a101f;
    --surface-warm: rgba(43, 19, 27, .9);
    --line: rgba(255, 184, 91, .18);
    --line-strong: rgba(255, 137, 54, .46);
    --ink: #fff7ec;
    --muted: #c9bac9;
    --quiet: #97899a;
    --ember: #ff6b2c;
    --ember-deep: #d93c20;
    --gold: #ffc44d;
    --rose: #e84e87;
    --violet: #9c62ff;
    --green: #5ce0a0;
    --red: #ff6d78;
    --shadow: 0 24px 80px rgba(0, 0, 0, .42);
    --glow: 0 0 0 1px rgba(255, 127, 46, .08), 0 14px 42px rgba(255, 78, 31, .12);
    --radius: 22px;
    --radius-small: 14px;
    --shell: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    cursor: url("../cursors/phoenix-normal.cur"), auto;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 12%, rgba(156, 55, 255, .12), transparent 30rem),
        radial-gradient(circle at 92% 38%, rgba(255, 84, 31, .12), transparent 32rem),
        linear-gradient(180deg, #08070d 0%, #0c0811 42%, #08070d 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.68;
    text-rendering: optimizeLegibility;
    cursor: url("../cursors/phoenix-normal.cur"), auto;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .32;
    background-image:
        linear-gradient(rgba(255, 255, 255, .012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 86%);
}

::selection {
    color: #160b0b;
    background: var(--gold);
}

a,
button,
summary,
select,
label,
input[type="checkbox"] {
    cursor: url("../cursors/phoenix-pointer.cur"), pointer;
}

a {
    color: var(--gold);
    text-decoration-thickness: .08em;
    text-underline-offset: .18em;
}

a:hover {
    color: #ffe0a0;
}

img {
    display: block;
    max-width: 100%;
}

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

h1,
h2,
h3 {
    color: #fff9f1;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.08;
    letter-spacing: -.025em;
}

h1 {
    margin-bottom: 22px;
    font-size: clamp(2.7rem, 6.4vw, 5.9rem);
}

h2 {
    margin-bottom: 16px;
    font-size: clamp(1.75rem, 3vw, 2.65rem);
}

h3 {
    margin-bottom: 11px;
    font-size: 1.35rem;
}

p:last-child,
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}

[hidden] {
    display: none !important;
}

.shell {
    width: min(calc(100% - 40px), var(--shell));
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 14px;
    color: #1b0b09;
    background: var(--gold);
    border-radius: 8px;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 151, 62, .16);
    background: rgba(8, 7, 13, .82);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .26);
    backdrop-filter: blur(18px) saturate(140%);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand:hover,
.footer-brand:hover {
    color: var(--ink);
}

.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 187, 83, .34);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 125, 43, .19), rgba(90, 28, 54, .12) 62%, transparent 64%);
    box-shadow: 0 0 24px rgba(255, 99, 34, .18);
    transition: transform .25s ease, box-shadow .25s ease;
}

.brand:hover .brand-mark {
    transform: rotate(-3deg) scale(1.05);
    box-shadow: 0 0 34px rgba(255, 99, 34, .36);
}

.brand-mark img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    line-height: 1.1;
}

.brand-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    letter-spacing: .01em;
}

.brand-copy small {
    margin-top: 5px;
    color: var(--quiet);
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-nav a {
    position: relative;
    padding: 10px 13px;
    color: var(--muted);
    font-size: .94rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: 6px;
    left: 16px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--ember), var(--gold));
    transform: scaleX(0);
    transition: transform .2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--ink);
    background: rgba(255, 111, 43, .08);
}

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

.menu-button {
    display: none;
    width: 46px;
    height: 46px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
}

.menu-button span:not(.sr-only) {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
}

.hero {
    position: relative;
    isolation: isolate;
    min-height: 720px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 137, 54, .2);
    background:
        linear-gradient(90deg, rgba(8, 7, 13, .98) 0%, rgba(8, 7, 13, .84) 43%, rgba(8, 7, 13, .34) 73%, rgba(8, 7, 13, .72) 100%),
        linear-gradient(0deg, #08070d 0%, transparent 36%),
        url("../img/phoenix-hero.webp") center / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .55;
    background:
        radial-gradient(circle at 66% 44%, rgba(255, 177, 48, .23), transparent 20rem),
        radial-gradient(circle at 78% 32%, rgba(255, 45, 107, .19), transparent 25rem);
    mix-blend-mode: screen;
}

.hero-glow {
    position: absolute;
    right: 10%;
    bottom: -180px;
    z-index: -1;
    width: 620px;
    height: 430px;
    border-radius: 50%;
    background: rgba(255, 77, 28, .13);
    filter: blur(70px);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .72fr);
    align-items: center;
    gap: clamp(40px, 8vw, 108px);
    min-height: 720px;
    padding-block: 92px;
}

.hero-copy {
    max-width: 760px;
}

.hero h1 span {
    color: transparent;
    background: linear-gradient(90deg, #ff7935 0%, #ffc553 46%, #ff668b 100%);
    background-clip: text;
    -webkit-background-clip: text;
    filter: drop-shadow(0 8px 34px rgba(255, 97, 34, .2));
}

.lead {
    max-width: 760px;
    margin-bottom: 28px;
    color: #d8cbd8;
    font-size: clamp(1.08rem, 1.5vw, 1.28rem);
}

.eyebrow {
    margin-bottom: 14px;
    color: var(--gold);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

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

.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    overflow: hidden;
    color: #1a0908;
    font: inherit;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border: 1px solid rgba(255, 206, 102, .58);
    border-radius: 13px;
    background: linear-gradient(135deg, #ffbd48 0%, #ff762f 56%, #f34d38 100%);
    box-shadow: 0 12px 35px rgba(255, 74, 25, .22), inset 0 1px 0 rgba(255, 255, 255, .42);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, border-color .2s ease;
}

.button::after {
    content: "";
    position: absolute;
    inset: -2px;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .34) 44%, transparent 64%);
    transform: translateX(-120%);
    transition: transform .55s ease;
}

.button:hover {
    color: #1a0908;
    transform: translateY(-2px);
    filter: saturate(1.08) brightness(1.04);
    box-shadow: 0 18px 42px rgba(255, 74, 25, .31), inset 0 1px 0 rgba(255, 255, 255, .48);
}

.button:hover::after {
    transform: translateX(120%);
}

.button.secondary,
.button.ghost {
    color: var(--ink);
    border-color: rgba(255, 164, 79, .32);
    background: rgba(22, 13, 28, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 30px rgba(0, 0, 0, .2);
    backdrop-filter: blur(10px);
}

.button.secondary:hover,
.button.ghost:hover {
    color: #fff;
    border-color: rgba(255, 181, 88, .7);
    background: rgba(52, 25, 41, .88);
}

.button.ghost {
    border-color: rgba(156, 98, 255, .36);
    background: rgba(99, 50, 153, .13);
}

.button.small {
    min-height: 42px;
    padding: 10px 17px;
    font-size: .92rem;
}

.button input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 9px 0 0;
    accent-color: var(--gold);
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 26px;
}

.hero-points span {
    padding: 6px 10px;
    color: #ddcfdb;
    font-size: .83rem;
    border: 1px solid rgba(255, 180, 92, .19);
    border-radius: 999px;
    background: rgba(8, 7, 13, .45);
    backdrop-filter: blur(8px);
}

.ember-frame {
    position: relative;
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow), var(--glow), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.ember-frame::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 191, 65, .42), transparent 27%, transparent 70%, rgba(232, 78, 135, .3));
    filter: blur(10px);
    opacity: .45;
}

.lesson-ticket {
    padding: 28px;
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(43, 20, 34, .92), rgba(17, 11, 23, .94)),
        radial-gradient(circle at 100% 0%, rgba(255, 122, 40, .22), transparent 17rem);
    backdrop-filter: blur(16px);
}

.ticket-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.lesson-number,
.live-dot {
    color: var(--gold);
    font-size: .73rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.live-dot::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px var(--green);
}

.lesson-ticket h2 {
    font-size: 2rem;
}

.lesson-ticket p {
    color: var(--muted);
}

.ticket-list,
.check-list {
    padding: 0;
    list-style: none;
}

.ticket-list li,
.check-list li {
    position: relative;
    padding-left: 27px;
    margin: 9px 0;
    color: #e7dce4;
}

.ticket-list li::before,
.check-list li::before {
    content: "";
    position: absolute;
    top: .56em;
    left: 3px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--gold);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 0 12px rgba(255, 196, 77, .35);
}

.text-link {
    display: inline-flex;
    gap: 8px;
    margin-top: 8px;
    font-weight: 800;
    text-decoration: none;
}

.text-link span {
    transition: transform .2s ease;
}

.text-link:hover span {
    transform: translateX(4px);
}

.section {
    position: relative;
    padding-block: 88px;
}

.section.alt {
    border-block: 1px solid rgba(255, 151, 62, .1);
    background:
        radial-gradient(circle at 14% 20%, rgba(156, 98, 255, .08), transparent 23rem),
        linear-gradient(180deg, rgba(255, 255, 255, .014), rgba(255, 255, 255, .005));
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(270px, .7fr);
    align-items: end;
    gap: 40px;
    margin-bottom: 34px;
}

.section-heading h2 {
    margin-bottom: 0;
}

.section-heading > p {
    color: var(--muted);
}

.grid-3,
.grid-4 {
    display: grid;
    gap: 20px;
}

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

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

.path-card,
.content-card {
    position: relative;
    min-height: 210px;
    padding: 27px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: linear-gradient(145deg, rgba(31, 18, 37, .88), rgba(15, 10, 20, .94));
    box-shadow: 0 14px 38px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .035);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.path-card::after,
.content-card::after {
    content: "";
    position: absolute;
    right: -55px;
    bottom: -70px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 98, 35, .09);
    filter: blur(5px);
    transition: transform .3s ease, background .3s ease;
}

.path-card:hover,
.content-card:hover {
    z-index: 1;
    border-color: rgba(255, 164, 72, .52);
    transform: translateY(-6px);
    box-shadow: 0 23px 55px rgba(0, 0, 0, .32), 0 0 30px rgba(255, 89, 32, .08);
}

.path-card:hover::after,
.content-card:hover::after {
    background: rgba(255, 98, 35, .17);
    transform: scale(1.2);
}

.path-card p,
.content-card p {
    color: var(--muted);
}

.card-number,
.content-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 26px;
    color: var(--gold);
    font-size: .77rem;
    font-weight: 900;
    border: 1px solid rgba(255, 171, 69, .34);
    border-radius: 12px;
    background: rgba(255, 106, 39, .08);
    box-shadow: inset 0 0 16px rgba(255, 91, 34, .07);
}

.content-icon {
    border-radius: 50%;
    font-size: 1rem;
}

.content-card a {
    position: relative;
    z-index: 2;
    font-weight: 800;
    text-decoration: none;
}

.progress-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 36px 42px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background:
        linear-gradient(110deg, rgba(50, 20, 35, .88), rgba(17, 11, 23, .92)),
        radial-gradient(circle at 85% 50%, rgba(255, 105, 37, .18), transparent 18rem);
    box-shadow: var(--shadow), var(--glow);
}

.progress-panel h2 {
    margin-bottom: 8px;
}

.progress-panel p:not(.eyebrow) {
    color: var(--muted);
}

.progress-value {
    min-width: 145px;
    color: transparent;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-weight: 800;
    line-height: 1;
    text-align: right;
    background: linear-gradient(180deg, var(--gold), var(--ember));
    background-clip: text;
    -webkit-background-clip: text;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding-block: 82px 74px;
    border-bottom: 1px solid rgba(255, 141, 55, .16);
    background:
        linear-gradient(90deg, rgba(8, 7, 13, .95), rgba(18, 9, 22, .74)),
        radial-gradient(circle at 86% 30%, rgba(255, 81, 31, .18), transparent 24rem);
}

.page-hero::after {
    content: "";
    position: absolute;
    top: -100px;
    right: max(4vw, calc((100vw - var(--shell)) / 2));
    width: 340px;
    height: 340px;
    pointer-events: none;
    opacity: .17;
    background: url("../img/phoenix-drawing.webp") center / contain no-repeat;
    filter: drop-shadow(0 0 34px rgba(255, 103, 32, .35));
}

.page-hero .shell {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    max-width: 950px;
    font-size: clamp(2.5rem, 5.5vw, 4.9rem);
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 26px;
    color: var(--quiet);
    font-size: .9rem;
}

.crumbs a {
    color: var(--muted);
}

.roadmap-note,
.library-explainer {
    max-width: 920px;
    margin-top: 24px;
    padding: 15px 18px;
    color: #e7dce4;
    border-left: 3px solid var(--gold);
    border-radius: 0 12px 12px 0;
    background: rgba(255, 152, 54, .07);
}

.material-list {
    display: grid;
    gap: 16px;
}

.material-row {
    position: relative;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 26px;
    padding: 25px 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: linear-gradient(145deg, rgba(28, 17, 34, .88), rgba(14, 10, 19, .92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
    transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.material-row::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(var(--gold), var(--ember), var(--rose));
    opacity: .45;
}

.material-row:hover {
    border-color: rgba(255, 164, 72, .4);
    transform: translateX(5px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .25), 0 0 24px rgba(255, 89, 32, .06);
}

.material-status-available {
    background:
        radial-gradient(circle at 92% 20%, rgba(255, 106, 39, .13), transparent 18rem),
        linear-gradient(145deg, rgba(39, 20, 38, .94), rgba(16, 10, 20, .96));
}

.material-index {
    color: rgba(255, 201, 101, .92);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.7rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 20px rgba(255, 111, 38, .18);
}

.material-row h2 {
    margin: 8px 0 8px;
    font-size: 1.65rem;
}

.material-row p {
    margin-bottom: 10px;
    color: var(--muted);
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    color: var(--gold);
    font-size: .69rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 186, 73, .25);
    border-radius: 999px;
    background: rgba(255, 116, 38, .07);
}

.status-next {
    color: #d2b8ff;
    border-color: rgba(156, 98, 255, .34);
    background: rgba(156, 98, 255, .08);
}

.status-planned {
    color: var(--quiet);
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .025);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--quiet);
    font-size: .88rem;
}

.lesson-layout {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    align-items: start;
    gap: 34px;
}

.lesson-nav {
    position: sticky;
    top: 104px;
    display: grid;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: rgba(19, 12, 24, .82);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .2);
    backdrop-filter: blur(12px);
}

.lesson-nav strong {
    margin-bottom: 8px;
    color: var(--gold);
}

.lesson-nav a {
    padding: 7px 9px;
    color: var(--muted);
    font-size: .9rem;
    text-decoration: none;
    border-radius: 8px;
}

.lesson-nav a:hover {
    color: var(--ink);
    background: rgba(255, 110, 41, .08);
}

.lesson-main {
    display: grid;
    gap: 22px;
}

.lesson-section,
.question-block,
.study-question,
.oral-question {
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(27, 17, 33, .92), rgba(14, 10, 19, .95));
    box-shadow: 0 18px 52px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .03);
}

.lesson-section p:not(.section-number),
.question-block > p,
.study-question > p,
.oral-question > p {
    color: #d5c8d3;
}

.section-number {
    margin-bottom: 9px;
    color: var(--gold);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .17em;
}

.concept-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
    margin: 28px 0 34px;
}

.concept-strip span {
    position: relative;
    padding: 15px 8px;
    color: var(--muted);
    text-align: center;
    border: 1px solid rgba(255, 162, 70, .18);
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
}

.concept-strip span:not(:last-child)::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: -13px;
    z-index: 2;
    color: var(--ember);
    transform: translateY(-50%);
}

.concept-strip b {
    color: var(--gold);
    font-size: 1.12rem;
}

.memory-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 14px;
    margin: 26px 0;
}

.memory-box {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(255, 172, 71, .32);
    border-radius: 12px;
    background: rgba(255, 104, 37, .055);
}

.memory-box::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(var(--gold), var(--ember));
}

.memory-box strong,
.memory-box span {
    display: block;
}

.memory-box strong {
    color: var(--gold);
}

.memory-box span {
    margin-top: 8px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 1.1rem;
}

pre {
    max-width: 100%;
    margin: 24px 0;
    padding: 22px;
    overflow: auto;
    color: #fff3df;
    border: 1px solid rgba(255, 168, 76, .2);
    border-radius: 13px;
    background: #09070d;
    box-shadow: inset 0 0 38px rgba(117, 48, 113, .11);
}

code,
.inline-code {
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: .95em;
}

.inline-code {
    padding: .13em .38em;
    color: #ffd48b;
    border: 1px solid rgba(255, 178, 75, .18);
    border-radius: 5px;
    background: rgba(255, 117, 40, .08);
}

.callout {
    margin-top: 24px;
    padding: 18px 20px;
    color: #eadfe8;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
}

.callout strong {
    display: block;
    margin-bottom: 5px;
    color: var(--ink);
}

.callout.amber {
    border-left-color: var(--gold);
    background: rgba(255, 154, 54, .065);
}

.callout.green {
    border-left-color: var(--green);
    background: rgba(92, 224, 160, .055);
}

input,
textarea,
select {
    width: 100%;
    color: var(--ink);
    font: inherit;
    border: 1px solid rgba(255, 175, 81, .24);
    border-radius: 11px;
    background: rgba(7, 6, 11, .78);
    box-shadow: inset 0 1px 12px rgba(0, 0, 0, .18);
}

input,
select {
    min-height: 48px;
    padding: 9px 12px;
}

textarea {
    padding: 14px 16px;
    line-height: 1.55;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(255, 192, 77, .7);
    box-shadow: 0 0 0 4px rgba(255, 152, 54, .09), inset 0 1px 12px rgba(0, 0, 0, .2);
}

input[type="checkbox"] {
    width: 19px;
    min-height: 19px;
    accent-color: var(--ember);
}

.homework-form,
.question-library,
[data-oral-questions] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.study-question,
.oral-question {
    min-width: 0;
}

.question-block label:first-child {
    display: block;
    margin-bottom: 10px;
    color: #fff9ef;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 700;
}

.question-block label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-family: inherit;
    font-size: 1.05rem;
}

.save-state {
    min-height: 24px;
    color: var(--green);
    font-size: .84rem;
}

.answer-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.answer-details {
    border: 1px solid rgba(255, 164, 72, .18);
    border-radius: 10px;
    background: rgba(255, 255, 255, .025);
}

.answer-details summary {
    padding: 11px 14px;
    color: var(--gold);
    font-weight: 800;
}

.answer-details p {
    padding: 0 14px 14px;
    color: var(--muted);
}

.answer-details.solution {
    border-color: rgba(92, 224, 160, .2);
}

.answer-details.solution summary {
    color: var(--green);
}

.preserve-lines {
    white-space: pre-line;
}

.compiler-launcher {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(380px, 1.2fr);
    gap: 34px;
    margin-bottom: 28px;
    padding: 30px;
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(46, 21, 36, .93), rgba(17, 11, 23, .96)),
        radial-gradient(circle at 88% 0%, rgba(255, 107, 44, .15), transparent 20rem);
}

.compact-steps {
    padding-left: 22px;
    color: var(--muted);
}

.compact-steps li {
    margin: 7px 0;
}

.compiler-links {
    display: grid;
    gap: 12px;
}

.compiler-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 15px 17px;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid rgba(255, 171, 71, .2);
    border-radius: 13px;
    background: rgba(8, 7, 13, .5);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.compiler-card:hover {
    color: var(--ink);
    border-color: rgba(255, 179, 78, .55);
    background: rgba(48, 22, 37, .7);
    transform: translateX(5px);
}

.compiler-card span:not(.compiler-badge) {
    display: grid;
}

.compiler-card small {
    color: var(--quiet);
}

.compiler-card b {
    color: var(--gold);
    font-size: .86rem;
}

.compiler-badge {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #190b09;
    font-weight: 950;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--gold), var(--ember));
}

.practice-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 630px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(12, 8, 16, .82);
    box-shadow: var(--shadow), var(--glow);
}

.task-sidebar {
    padding: 27px 20px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(42, 20, 37, .72), rgba(14, 9, 18, .9));
}

.task-list {
    display: grid;
    gap: 9px;
}

.task-button {
    padding: 13px 14px;
    color: var(--muted);
    font: inherit;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
}

.task-button:hover,
.task-button.is-active {
    color: var(--ink);
    border-color: rgba(255, 166, 70, .27);
    background: rgba(255, 107, 44, .075);
}

.task-button small {
    color: var(--quiet);
}

.editor-pane {
    padding: clamp(24px, 4vw, 38px);
}

.code-editor {
    min-height: 340px;
    margin-top: 8px;
    color: #ffe7c7;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 16px;
    tab-size: 4;
}

.practice-toolbar,
.solution-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
}

.practice-toolbar > span {
    color: var(--quiet);
    font-size: .82rem;
}

.expected-output {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    padding: 14px 16px;
    border: 1px solid rgba(92, 224, 160, .18);
    border-radius: 11px;
    background: rgba(92, 224, 160, .045);
}

.expected-output span {
    color: var(--green);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.test-list {
    padding: 0;
    list-style: none;
}

.test-list li {
    margin: 7px 0;
    padding: 10px 12px;
    color: var(--muted);
    border-left: 3px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .02);
}

.test-list li.pass {
    color: #c7f8df;
    border-left-color: var(--green);
    background: rgba(92, 224, 160, .05);
}

.test-list li.fail {
    color: #ffd1d5;
    border-left-color: var(--red);
    background: rgba(255, 109, 120, .05);
}

.editor-status {
    min-height: 56px;
    margin-top: 15px;
    padding: 13px 15px;
    color: #e4d8e2;
    border: 1px solid rgba(156, 98, 255, .17);
    border-radius: 10px;
    background: rgba(156, 98, 255, .045);
}

.solution-panel {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid rgba(92, 224, 160, .2);
    border-radius: 13px;
    background: rgba(92, 224, 160, .035);
}

.solution-heading {
    margin-top: 0;
}

.solution-heading h3 {
    margin-bottom: 0;
}

.text-button {
    padding: 4px;
    color: var(--gold);
    font: inherit;
    font-weight: 800;
    border: 0;
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.oral-toolbar,
.library-toolbar {
    display: grid;
    align-items: end;
    gap: 18px;
    margin: 24px 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: rgba(23, 14, 28, .8);
}

.oral-toolbar {
    grid-template-columns: minmax(170px, .55fr) minmax(0, 1.45fr);
}

.oral-controls {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.library-toolbar {
    grid-template-columns: 1.2fr .8fr auto;
}

.library-toolbar label,
.oral-controls label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
}

.library-progress {
    display: grid;
    min-width: 190px;
    text-align: right;
}

.library-progress strong {
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
}

.library-progress span,
.library-count {
    color: var(--quiet);
    font-size: .88rem;
}

.library-explainer {
    max-width: none;
    margin: 0 0 16px;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--quiet);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.oral-question,
.study-question {
    margin-bottom: 20px;
}

.oral-question.is-good {
    border-color: rgba(92, 224, 160, .42);
}

.oral-question.is-needs-work {
    border-color: rgba(255, 109, 120, .48);
}

.answer-area {
    margin-top: 12px;
}

.oral-feedback {
    margin-top: 18px;
    padding: 0;
}

.oral-feedback:not(:empty) {
    padding: 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .028);
}

.result-panel {
    display: none;
    margin: 26px 0;
    padding: 30px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(46, 21, 36, .94), rgba(16, 10, 21, .96));
    box-shadow: var(--shadow), var(--glow);
}

.result-panel.is-visible {
    display: block;
}

.result-score {
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4rem, 9vw, 7rem);
    font-weight: 900;
    line-height: 1;
}

.result-score.pass {
    color: var(--green);
}

.result-score.review {
    color: var(--gold);
}

.oral-complete {
    display: flex !important;
    align-items: flex-start;
    gap: 11px;
    margin-top: 24px;
}

.study-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.study-actions label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
}

.study-answer {
    margin-top: 18px;
    padding: 18px;
    border-left: 3px solid var(--green);
    border-radius: 0 10px 10px 0;
    background: rgba(92, 224, 160, .045);
}

.study-answer strong {
    color: var(--green);
}

.source-warning-global,
.source-warning-card,
.source-warning-details {
    border: 1px solid rgba(255, 171, 61, .48);
    border-left: 5px solid var(--gold);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(122, 62, 18, .22), rgba(53, 21, 31, .46));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 0 28px rgba(255, 126, 35, .08);
}

.source-warning-global {
    margin: 2px 0 18px;
    padding: 18px 20px;
}

.source-warning-card {
    margin: 0 0 22px;
    padding: 18px 20px;
}

.source-warning-details {
    margin-top: 18px;
    padding: 16px 18px;
}

.source-warning-global strong,
.source-warning-card strong,
.source-warning-details strong {
    color: #ffd080;
}

.source-warning-global > strong,
.source-warning-card > strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.source-warning-global p,
.source-warning-card p,
.source-warning-details p {
    margin: 0;
    color: #f4ded0 !important;
}

.source-warning-details p + p {
    margin-top: 10px;
}

.answer-code {
    margin-top: 16px;
}

.source-audit {
    content-visibility: auto;
    contain-intrinsic-size: 2200px;
}

.audit-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.audit-stats > div {
    display: grid;
    min-height: 120px;
    place-content: center;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(18, 12, 23, .76);
}

.audit-stats strong {
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.4rem;
    line-height: 1;
}

.audit-stats span {
    margin-top: 7px;
    color: var(--quiet);
    font-size: .82rem;
}

.audit-stats .state-readable strong {
    color: var(--green);
}

.audit-stats .state-duplicate strong {
    color: #c3a4ff;
}

.audit-stats .state-correction strong,
.audit-stats .state-damaged strong {
    color: var(--gold);
}

.source-index {
    display: grid;
    gap: 8px;
}

.source-question {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 11px;
    background: rgba(15, 10, 19, .75);
}

.source-question summary {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 150px;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 12px 16px;
    list-style: none;
}

.source-question summary::-webkit-details-marker {
    display: none;
}

.source-question summary:hover {
    background: rgba(255, 255, 255, .022);
}

.source-number {
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 800;
}

.source-prompt {
    color: #eadfe8;
    font-size: 1rem;
}

.source-state {
    justify-self: end;
    padding: 4px 8px;
    color: var(--green);
    font-size: .68rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    border: 1px solid rgba(92, 224, 160, .24);
    border-radius: 999px;
}

.source-duplicate .source-state {
    color: #d1baff;
    border-color: rgba(156, 98, 255, .3);
}

.source-correction .source-state,
.source-damaged .source-state {
    color: var(--gold);
    border-color: rgba(255, 196, 77, .32);
}

.source-damaged {
    border-color: rgba(255, 109, 120, .25);
}

.source-detail {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    padding: 0 16px 16px 102px;
}

.source-detail span {
    color: var(--quiet);
    font-size: .82rem;
}

.source-detail p {
    color: var(--muted);
}

.empty-state {
    padding: 60px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(22, 14, 27, .75);
}

.site-footer {
    padding-block: 38px;
    border-top: 1px solid rgba(255, 150, 60, .15);
    background: #07060a;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-brand img {
    filter: drop-shadow(0 0 14px rgba(255, 100, 32, .25));
}

.site-footer p,
.footer-note {
    color: var(--quiet);
    font-size: .86rem;
}

.site-footer p {
    margin: 8px 0 0;
}

.footer-note {
    display: grid;
    justify-items: end;
    gap: 5px;
    text-align: right;
}

@media (max-width: 1040px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(300px, .65fr);
        gap: 38px;
    }

    .compiler-launcher {
        grid-template-columns: 1fr;
    }

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

    .lesson-nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
    }
}

@media (max-width: 860px) {
    .menu-button {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 20px;
        left: 20px;
        display: none;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line-strong);
        border-radius: 14px;
        background: rgba(13, 9, 17, .97);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: grid;
    }

    .main-nav a {
        padding: 12px 14px;
    }

    .hero {
        min-height: auto;
        background:
            linear-gradient(180deg, rgba(8, 7, 13, .8) 0%, rgba(8, 7, 13, .94) 53%, #08070d 100%),
            url("../img/phoenix-hero.webp") 62% top / auto 430px no-repeat;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-block: 330px 70px;
    }

    .lesson-ticket {
        max-width: 650px;
    }

    .section-heading,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .material-row {
        grid-template-columns: 66px minmax(0, 1fr);
    }

    .material-row > .button,
    .material-row > span:last-child {
        grid-column: 2;
        justify-self: start;
    }

    .practice-shell {
        grid-template-columns: 1fr;
    }

    .task-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .task-list {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

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

    .source-question summary {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .source-state {
        grid-column: 2;
        justify-self: start;
    }

    .source-detail {
        padding-left: 92px;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .shell {
        width: min(calc(100% - 28px), var(--shell));
    }

    .brand-copy small {
        display: none;
    }

    .brand-mark {
        width: 50px;
        height: 50px;
    }

    .hero-grid {
        padding-top: 280px;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 13vw, 4.1rem);
    }

    .section,
    .page-hero {
        padding-block: 62px;
    }

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

    .actions,
    .actions .button {
        width: 100%;
    }

    .progress-panel,
    .footer-grid,
    .practice-toolbar,
    .solution-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .progress-panel {
        padding: 28px;
    }

    .progress-value {
        text-align: left;
    }

    .material-row {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .material-row > .button,
    .material-row > span:last-child {
        grid-column: 1;
    }

    .concept-strip {
        grid-template-columns: 1fr;
    }

    .concept-strip span:not(:last-child)::after {
        top: auto;
        right: 50%;
        bottom: -16px;
        transform: translateX(50%) rotate(90deg);
    }

    .compiler-launcher,
    .editor-pane,
    .lesson-section,
    .question-block,
    .study-question,
    .oral-question {
        padding: 22px;
    }

    .compiler-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .compiler-card b {
        grid-column: 2;
    }

    .oral-toolbar,
    .library-toolbar,
    .oral-controls {
        grid-template-columns: 1fr;
    }

    .library-progress {
        text-align: left;
    }

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

    .source-question summary {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .source-state {
        grid-column: 1;
    }

    .source-detail {
        grid-template-columns: 1fr;
        padding: 0 16px 16px;
    }

    .footer-note {
        justify-items: start;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
