:root {
    color-scheme: dark;
    --bg: #06101a;
    --bg-deep: #030912;
    --panel: rgba(11, 25, 39, 0.88);
    --panel-solid: #0c1927;
    --panel-soft: #102234;
    --text: #f4f9fc;
    --body-text: #c5d2da;
    --muted: #afc0ca;
    --faint: #8398a6;
    --line: rgba(160, 197, 217, 0.2);
    --line-strong: rgba(92, 228, 255, 0.4);
    --cyan: #68e5ff;
    --cyan-soft: #b2f2ff;
    --blue: #578bff;
    --violet: #a77cff;
    --green: #61e6a6;
    --amber: #ffc66e;
    --red: #ff7f8d;
    --sidebar-width: 318px;
    --topbar-height: 72px;
    --radius: 16px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

body[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f8fb;
    --bg-deep: #ecf2f7;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-solid: #ffffff;
    --panel-soft: #edf5fa;
    --text: #102430;
    --body-text: #314d5d;
    --muted: #476475;
    --faint: #617d8c;
    --line: rgba(25, 71, 96, 0.18);
    --line-strong: rgba(0, 149, 190, 0.25);
    --cyan: #008eaf;
    --cyan-soft: #007a98;
    --blue: #3468dd;
    --violet: #7950cf;
    --green: #15865b;
    --shadow: 0 24px 80px rgba(45, 72, 92, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--topbar-height) + 26px);
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 72% -10%, rgba(42, 124, 162, 0.14), transparent 30%),
        linear-gradient(180deg, var(--bg-deep), var(--bg) 24%, var(--bg));
    color: var(--text);
    font-family: var(--sans);
    font-size: 16.5px;
    line-height: 1.72;
    min-height: 100vh;
    transition: background-color 180ms ease, color 180ms ease;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

code,
pre,
kbd {
    font-family: var(--mono);
}

code {
    color: var(--cyan-soft);
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0.12em 0.34em;
    font-size: 0.9em;
}

.skip-link {
    position: fixed;
    left: 20px;
    top: -80px;
    z-index: 999;
    background: var(--cyan);
    color: var(--bg-deep);
    font-weight: 800;
    padding: 10px 16px;
    border-radius: 8px;
    transition: top 160ms ease;
}

.skip-link:focus {
    top: 14px;
}

.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--topbar-height);
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(260px, 1fr) var(--sidebar-width);
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-deep) 94%, transparent);
    backdrop-filter: blur(20px);
}

.brand,
.topbar-actions {
    height: 100%;
    display: flex;
    align-items: center;
}

.brand {
    padding: 0 22px;
    border-right: 1px solid var(--line);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--cyan) 58%, transparent);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(88, 223, 255, 0.15), rgba(87, 139, 255, 0.05));
    color: var(--cyan);
    font: 800 13px/1 var(--mono);
    box-shadow:
        inset 0 0 20px rgba(88, 223, 255, 0.08),
        0 0 16px rgba(88, 223, 255, 0.08);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}

.brand-copy strong {
    font-size: 15px;
    letter-spacing: 0.075em;
}

.brand-copy strong i {
    color: var(--cyan);
    font-style: normal;
    font-weight: 800;
}

.brand-copy small {
    margin-top: 5px;
    color: var(--faint);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-center {
    display: flex;
    justify-content: center;
    padding: 0 24px;
}

.search-trigger {
    width: min(430px, 100%);
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 11px;
    color: color-mix(in srgb, var(--muted) 92%, var(--text));
    background: rgba(105, 147, 170, 0.06);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease;
}

.search-trigger:hover {
    border-color: var(--line-strong);
    background: rgba(88, 223, 255, 0.06);
}

.search-trigger kbd {
    margin-left: auto;
    min-width: 24px;
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--faint);
    background: var(--panel-solid);
    font-size: 11px;
    text-align: center;
}

.search-symbol {
    width: 14px;
    height: 14px;
    position: relative;
    display: inline-block;
    border: 1.8px solid currentColor;
    border-radius: 50%;
}

.search-symbol::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 1.8px;
    right: -5px;
    bottom: -2px;
    transform: rotate(45deg);
    border-radius: 2px;
    background: currentColor;
}

.topbar-actions {
    justify-content: flex-end;
    gap: 12px;
    padding: 0 22px;
}

.edition-badge {
    color: var(--cyan-soft);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.icon-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}

.icon-button:hover {
    color: var(--cyan);
    border-color: var(--line-strong);
}

.menu-button {
    display: none;
    margin-right: 12px;
}

.menu-button span {
    width: 16px;
    height: 1.5px;
    display: block;
    margin: 2px 0;
    background: currentColor;
}

.theme-icon {
    font-size: 18px;
}

.sidebar {
    position: fixed;
    z-index: 90;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: color-mix(in srgb, var(--panel-solid) 97%, var(--bg-deep));
    border-right: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.sidebar-search {
    display: none;
    padding: 18px 18px 8px;
}

.sidebar-search label {
    display: block;
    margin-bottom: 8px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-search-box {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: var(--bg-deep);
}

.sidebar-search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.sidebar-search-box button {
    border: 0;
    color: var(--faint);
    background: transparent;
    cursor: pointer;
    font-size: 20px;
}

.course-progress {
    padding: 20px 20px 17px;
    border-bottom: 1px solid var(--line);
}

.course-progress > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

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

.course-progress strong {
    color: var(--cyan);
    font: 700 11px/1 var(--mono);
}

.progress-track {
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(133, 166, 185, 0.13);
}

.progress-track span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: 0 0 12px var(--cyan);
}

.book-navigation {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 10px 28px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.nav-part {
    margin: 2px 0;
}

.nav-part summary {
    min-height: 44px;
    display: grid;
    grid-template-columns: 31px 1fr 16px;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: color-mix(in srgb, var(--muted) 86%, var(--text));
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.nav-part summary::-webkit-details-marker {
    display: none;
}

.nav-part summary:hover {
    color: var(--text);
    background: rgba(111, 157, 181, 0.06);
}

.part-number {
    color: var(--cyan);
    font-family: var(--mono);
}

.chevron {
    justify-self: end;
    color: var(--faint);
    transition: transform 150ms ease;
}

.nav-part[open] .chevron {
    transform: rotate(180deg);
}

.chapter-list {
    position: relative;
    margin: 2px 0 8px 24px;
    padding-left: 13px;
    border-left: 1px solid var(--line);
}

.sidebar-chapter {
    position: relative;
    min-height: 36px;
    display: grid;
    grid-template-columns: 25px 1fr 7px;
    align-items: center;
    gap: 7px;
    margin: 2px 0;
    padding: 7px 8px;
    color: color-mix(in srgb, var(--muted) 92%, var(--text));
    border-radius: 7px;
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease;
}

.sidebar-chapter:hover {
    color: var(--text);
    background: rgba(88, 223, 255, 0.055);
}

.sidebar-chapter > span {
    color: color-mix(in srgb, var(--faint) 88%, var(--muted));
    font: 600 10px/1 var(--mono);
}

.sidebar-chapter strong {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-chapter.is-active {
    color: #ffffff;
    background:
        linear-gradient(90deg, rgba(58, 148, 190, 0.24), rgba(88, 223, 255, 0.07)),
        var(--panel-solid);
    box-shadow: inset 0 0 0 1px rgba(88, 223, 255, 0.08);
}

body[data-theme="light"] .sidebar-chapter.is-active {
    color: #0b3442;
    background:
        linear-gradient(90deg, rgba(64, 190, 220, 0.24), rgba(104, 229, 255, 0.1)),
        #e4f7fb;
    box-shadow:
        inset 0 0 0 1px rgba(0, 142, 175, 0.18),
        0 4px 16px rgba(24, 112, 135, 0.08);
}

body[data-theme="light"] .sidebar-chapter.is-active strong {
    color: #0b3442;
}

body[data-theme="light"] .sidebar-chapter.is-active > span {
    color: #006f88;
}

body[data-theme="light"] .sidebar-chapter.is-active i {
    background: #007f9d;
    box-shadow: 0 0 7px rgba(0, 127, 157, 0.38);
}

.sidebar-chapter.is-active::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: -14px;
    width: 2px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}

.sidebar-chapter.is-active > span {
    color: var(--cyan);
}

.sidebar-chapter i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}

.no-search-results {
    margin: 30px 12px;
    color: var(--muted);
    font-size: 13px;
}

.sidebar-footer {
    min-height: 49px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    color: var(--faint);
    border-top: 1px solid var(--line);
    font-size: 10px;
}

.online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 9px var(--green);
}

.main-content {
    min-width: 0;
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
}

.reading-progress {
    position: fixed;
    z-index: 101;
    top: calc(var(--topbar-height) - 1px);
    left: var(--sidebar-width);
    right: 0;
    height: 2px;
}

.reading-progress span {
    width: 0;
    height: 100%;
    display: block;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: 0 0 12px var(--cyan);
}

.article {
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 42px 50px 90px;
}

.article-hero {
    position: relative;
    overflow: hidden;
    min-height: 350px;
    padding: 46px 50px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(15, 38, 57, 0.98), rgba(6, 16, 26, 0.96)),
        var(--panel-solid);
    box-shadow: var(--shadow);
}

body[data-theme="light"] .article-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(234, 246, 252, 0.93)),
        var(--panel-solid);
}

.hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.34;
    background-image:
        linear-gradient(rgba(88, 223, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 223, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to left, black, transparent 78%);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
}

.hero-orb-one {
    width: 260px;
    height: 260px;
    top: -96px;
    right: -40px;
    border: 1px solid rgba(88, 223, 255, 0.2);
    box-shadow:
        inset 0 0 80px rgba(88, 223, 255, 0.1),
        0 0 100px rgba(35, 132, 184, 0.08);
}

.hero-orb-two {
    width: 118px;
    height: 118px;
    right: 190px;
    bottom: -46px;
    background: rgba(108, 83, 255, 0.08);
    box-shadow: 0 0 70px rgba(108, 83, 255, 0.22);
}

.hud-frame {
    position: absolute;
    z-index: 1;
    inset: 12px;
    pointer-events: none;
}

.hud-frame i {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0.78;
}

.hud-frame i::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
}

.hud-frame i:nth-child(1) {
    top: 0;
    left: 0;
    border-top: 1px solid var(--cyan);
    border-left: 1px solid var(--cyan);
}

.hud-frame i:nth-child(1)::after {
    top: -4px;
    left: 20px;
}

.hud-frame i:nth-child(2) {
    top: 0;
    right: 0;
    border-top: 1px solid var(--cyan);
    border-right: 1px solid var(--cyan);
}

.hud-frame i:nth-child(2)::after {
    top: 20px;
    right: -4px;
}

.hud-frame i:nth-child(3) {
    right: 0;
    bottom: 0;
    border-right: 1px solid var(--cyan);
    border-bottom: 1px solid var(--cyan);
}

.hud-frame i:nth-child(3)::after {
    right: 20px;
    bottom: -4px;
}

.hud-frame i:nth-child(4) {
    bottom: 0;
    left: 0;
    border-bottom: 1px solid var(--cyan);
    border-left: 1px solid var(--cyan);
}

.hud-frame i:nth-child(4)::after {
    bottom: 20px;
    left: -4px;
}

.hud-orbit {
    position: absolute;
    z-index: 0;
    top: 90px;
    right: 74px;
    width: 154px;
    height: 154px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(104, 229, 255, 0.32);
    border-radius: 50%;
    box-shadow:
        inset 0 0 38px rgba(104, 229, 255, 0.05),
        0 0 36px rgba(104, 229, 255, 0.05);
    opacity: 0.72;
}

.hud-orbit::before,
.hud-orbit::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.hud-orbit::before {
    inset: 13px;
    border: 5px solid transparent;
    border-top-color: var(--cyan);
    border-right-color: rgba(104, 229, 255, 0.23);
    transform: rotate(24deg);
    filter: drop-shadow(0 0 5px rgba(104, 229, 255, 0.5));
}

.hud-orbit::after {
    inset: 32px;
    border: 1px dashed rgba(104, 229, 255, 0.45);
}

.hud-orbit span {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    color: var(--cyan-soft);
    border: 1px solid rgba(104, 229, 255, 0.38);
    border-radius: 50%;
    background: rgba(6, 16, 26, 0.88);
    font: 800 13px/1 var(--mono);
    letter-spacing: 0.08em;
}

.hud-readout {
    position: absolute;
    z-index: 2;
    right: 25px;
    bottom: 20px;
    display: flex;
    gap: 18px;
    color: color-mix(in srgb, var(--cyan) 68%, var(--muted));
    font: 700 8px/1 var(--mono);
    letter-spacing: 0.1em;
}

.article-hero::after {
    content: "";
    position: absolute;
    z-index: 1;
    right: 26px;
    bottom: 38px;
    width: 220px;
    height: 1px;
    background:
        linear-gradient(
            90deg,
            transparent,
            var(--cyan) 18%,
            var(--cyan) 64%,
            transparent 64%,
            transparent 69%,
            var(--cyan) 69%,
            var(--cyan) 82%,
            transparent
        );
    opacity: 0.55;
    filter: drop-shadow(0 0 4px var(--cyan));
}

.breadcrumbs,
.hero-kicker,
.article-hero h1,
.hero-lead,
.hero-meta {
    position: relative;
    z-index: 1;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 34px;
    color: var(--faint);
    font-size: 11px;
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--cyan);
}

.hero-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: var(--cyan);
    font: 700 11px/1 var(--mono);
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 11px var(--cyan);
}

.article-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.4rem, 4.8vw, 4.6rem);
    line-height: 0.99;
    letter-spacing: -0.055em;
}

.hero-lead {
    max-width: 700px;
    margin: 24px 0 31px;
    color: var(--body-text);
    font-size: clamp(1.04rem, 1.6vw, 1.24rem);
    line-height: 1.63;
}

body:not([data-theme="light"]) .hero-lead {
    color: #ffffff;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-meta span {
    padding: 7px 10px;
    color: color-mix(in srgb, var(--muted) 88%, var(--text));
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(123, 169, 191, 0.045);
    font-size: 11px;
}

.hero-meta b {
    color: var(--muted);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 800px) 190px;
    justify-content: center;
    gap: 74px;
    margin-top: 58px;
}

.article-body {
    min-width: 0;
}

.article-section {
    margin: 0 0 72px;
}

.article-section h2 {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 0 18px;
    color: var(--text);
    font-size: clamp(1.65rem, 3vw, 2.22rem);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.article-section h2::after {
    content: "";
    width: 58px;
    height: 1px;
    flex: 0 0 auto;
    background: linear-gradient(90deg, var(--cyan), transparent);
    opacity: 0.62;
    filter: drop-shadow(0 0 4px var(--cyan));
}

.article-section h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.article-section p {
    color: var(--body-text);
}

body:not([data-theme="light"]) .article-body p:not(.eyebrow) {
    color: #ffffff;
}

.article-section > p:not(.eyebrow) {
    max-width: 740px;
}

.lead-paragraph {
    color: var(--body-text);
    font-size: 1.13rem;
    line-height: 1.76;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--cyan) !important;
    font: 700 10px/1 var(--mono);
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.on-this-page {
    position: sticky;
    top: calc(var(--topbar-height) + 30px);
    align-self: start;
    padding-left: 18px;
    border-left: 1px solid var(--line);
}

.on-this-page > p {
    margin: 0 0 12px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.on-this-page nav {
    display: grid;
    gap: 5px;
}

.on-this-page a {
    position: relative;
    padding: 5px 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    text-decoration: none;
}

.on-this-page a:hover,
.on-this-page a.is-active {
    color: var(--cyan);
}

.on-this-page a.is-active::before {
    content: "";
    position: absolute;
    left: -19px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--cyan);
    box-shadow: 0 0 9px var(--cyan);
}

.learning-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.learning-card {
    position: relative;
    overflow: hidden;
    min-height: 165px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(115, 165, 191, 0.07), rgba(115, 165, 191, 0.015));
    transition: transform 160ms ease, border-color 160ms ease;
}

.learning-card::before,
.learning-card::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    opacity: 0.6;
}

.learning-card::before {
    top: 7px;
    right: 7px;
    border-top: 1px solid var(--cyan);
    border-right: 1px solid var(--cyan);
}

.learning-card::after {
    bottom: 7px;
    left: 7px;
    border-bottom: 1px solid var(--cyan);
    border-left: 1px solid var(--cyan);
}

.learning-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.learning-card > span {
    color: var(--cyan);
    font: 700 10px/1 var(--mono);
}

.learning-card h3 {
    margin-top: 30px;
    color: var(--text);
}

.learning-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.project-preview {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 25px;
    align-items: center;
    margin-top: 28px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(79, 128, 154, 0.045);
}

.project-window {
    overflow: hidden;
    min-height: 250px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--bg-deep);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.window-bar {
    height: 34px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
}

.window-bar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--faint);
}

.window-bar i:first-child {
    background: var(--red);
}

.window-bar i:nth-child(2) {
    background: var(--amber);
}

.window-bar i:nth-child(3) {
    background: var(--green);
}

.window-bar span {
    margin-left: auto;
    color: var(--faint);
    font: 9px/1 var(--mono);
}

.window-body {
    display: grid;
    grid-template-columns: 74px 1fr;
    min-height: 215px;
}

.window-nav {
    border-right: 1px solid var(--line);
    background:
        linear-gradient(var(--line) 7px, transparent 7px) 17px 27px / 38px 28px repeat-y;
}

.window-copy {
    padding: 34px 28px;
}

.window-copy > span {
    width: 75%;
    height: 7px;
    display: block;
    margin: 0 0 10px;
    border-radius: 5px;
    background: var(--line);
}

.window-copy > span:first-child {
    width: 43%;
    height: 12px;
    background: rgba(88, 223, 255, 0.33);
}

.window-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 28px;
}

.window-cards i {
    height: 70px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(88, 223, 255, 0.04);
}

.project-points p {
    display: flex;
    gap: 10px;
    margin: 14px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.project-points span {
    color: var(--green);
    font-weight: 900;
}

.callout {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 15px;
    margin: 10px 0 72px;
    padding: 20px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: linear-gradient(120deg, rgba(88, 223, 255, 0.08), rgba(88, 223, 255, 0.02));
}

.callout::after {
    content: "";
    position: absolute;
    top: 0;
    right: 20px;
    width: 72px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan));
    box-shadow: 0 0 8px var(--cyan);
}

.callout-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: var(--cyan);
    border: 1px solid currentColor;
    border-radius: 8px;
    font: 800 14px/1 var(--mono);
}

.callout strong {
    display: block;
    margin: 2px 0 4px;
}

.callout p {
    margin: 0;
    color: var(--body-text);
    font-size: 13px;
}

.callout-warning {
    border-color: rgba(255, 198, 110, 0.27);
    background: linear-gradient(120deg, rgba(255, 198, 110, 0.08), rgba(255, 198, 110, 0.02));
}

.callout-warning .callout-icon {
    color: var(--amber);
}

.callout-security {
    border-color: rgba(97, 230, 166, 0.27);
    background: linear-gradient(120deg, rgba(97, 230, 166, 0.08), rgba(97, 230, 166, 0.02));
}

.callout-security .callout-icon {
    color: var(--green);
}

.flow-diagram {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
}

.flow-node {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.flow-node span {
    margin-bottom: 16px;
    color: var(--faint);
    font: 700 9px/1 var(--mono);
}

.flow-node strong {
    font-size: 13px;
}

.flow-node small {
    margin-top: 5px;
    color: var(--faint);
    font-size: 10px;
}

.flow-node-accent {
    border-color: var(--line-strong);
    box-shadow: inset 0 0 30px rgba(88, 223, 255, 0.045);
}

.flow-diagram > i {
    color: var(--cyan);
    font-style: normal;
}

.flow-diagram .flow-return {
    display: none;
}

.code-block,
.terminal-block {
    overflow: hidden;
    margin: 26px 0;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #040b12;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.code-toolbar,
.terminal-title {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    color: #758c9c;
    border-bottom: 1px solid rgba(133, 166, 185, 0.13);
    background: #08121c;
    font: 600 10px/1 var(--mono);
}

.code-toolbar > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-toolbar > span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}

.copy-button {
    margin-left: auto;
    padding: 5px 9px;
    color: #8ca0ad;
    border: 1px solid rgba(133, 166, 185, 0.16);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    font: 600 9px/1 var(--mono);
}

.copy-button:hover {
    color: var(--cyan);
    border-color: var(--line-strong);
}

.code-block pre,
.terminal-block pre {
    margin: 0;
    padding: 22px;
    overflow-x: auto;
    color: #c6d5de;
    font-size: 13px;
    line-height: 1.8;
    tab-size: 4;
}

.code-block code,
.terminal-block code {
    padding: 0;
    color: inherit;
    border: 0;
    background: transparent;
    font-size: inherit;
}

.code-keyword,
.code-tag {
    color: #c39aff;
}

.code-string {
    color: #89dfb6;
}

.code-number {
    color: #ffbd7a;
}

.code-function {
    color: #78d9f6;
}

.terminal-title > span {
    color: var(--red);
    font-size: 8px;
}

.terminal-title > span:nth-child(2) {
    color: var(--amber);
}

.terminal-title > span:nth-child(3) {
    color: var(--green);
}

.terminal-title strong {
    margin-left: auto;
    font-weight: 500;
}

.prompt {
    color: var(--cyan);
}

.status-list {
    display: grid;
    gap: 9px;
    margin-top: 25px;
}

.status-list > div {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(93, 135, 158, 0.035);
}

.status-list b {
    font: 800 16px/1 var(--mono);
}

.status-2xx {
    color: var(--green);
}

.status-3xx {
    color: var(--cyan);
}

.status-4xx {
    color: var(--amber);
}

.status-5xx {
    color: var(--red);
}

.status-list span {
    display: flex;
    flex-direction: column;
}

.status-list strong {
    font-size: 12px;
}

.status-list small {
    margin-top: 3px;
    color: var(--faint);
    font-size: 10px;
}

.checklist {
    display: grid;
    gap: 8px;
    margin: 24px 0;
}

.checklist label {
    padding: 12px 14px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(94, 137, 160, 0.035);
    cursor: pointer;
    font-size: 13px;
}

.checklist input {
    margin: 0 10px 0 0;
    accent-color: var(--cyan);
}

.step-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 27px 0;
    list-style: none;
}

.step-list li {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(86, 128, 150, 0.035);
}

.step-list li > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--cyan);
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    font: 700 10px/1 var(--mono);
}

.step-list strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.step-list p {
    margin: 0;
    color: var(--body-text);
    font-size: 12px;
}

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

.explanation-list {
    display: grid;
    gap: 10px;
    margin: 24px 0;
}

.explanation-list > div {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    align-items: start;
}

.explanation-list > div > span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    color: var(--cyan);
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    font: 700 9px/1 var(--mono);
}

.explanation-list p {
    margin: 1px 0 0;
    font-size: 13px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.comparison-grid article {
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(92, 139, 162, 0.04);
}

.comparison-grid h3 {
    margin: 26px 0 7px;
    font: 700 20px/1 var(--mono);
}

.comparison-grid p,
.comparison-grid strong {
    font-size: 12px;
}

.comparison-grid strong {
    color: var(--text);
}

.comparison-status {
    display: inline-block;
    padding: 5px 8px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font: 700 9px/1 var(--mono);
    text-transform: uppercase;
}

.comparison-status.standard {
    color: var(--green);
}

.comparison-status.proposal {
    color: var(--violet);
}

.placeholder-panel {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 22px;
    align-items: center;
    margin: 26px 0;
    padding: 25px;
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    background: rgba(88, 223, 255, 0.03);
}

.placeholder-panel > span {
    color: var(--cyan);
    font: 800 38px/1 var(--mono);
}

.placeholder-panel strong {
    display: block;
    margin-bottom: 5px;
}

.placeholder-panel p {
    margin: 0;
    font-size: 13px;
}

.chapter-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 72px 0 0;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.chapter-link {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease;
}

.chapter-link:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.chapter-link-next {
    text-align: right;
}

.chapter-link span {
    margin-bottom: 8px;
    color: var(--faint);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.chapter-link strong {
    color: var(--text);
    font-size: 13px;
}

.site-footer {
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 35px 50px;
    color: var(--faint);
    border-top: 1px solid var(--line);
    font-size: 11px;
}

.site-footer > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-footer p {
    margin: 0;
}

.brand-mark-small {
    width: 31px;
    height: 31px;
    border-radius: 8px;
    font-size: 10px;
}

.sidebar-overlay {
    position: fixed;
    z-index: 80;
    inset: var(--topbar-height) 0 0;
    background: rgba(1, 6, 11, 0.68);
    backdrop-filter: blur(3px);
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: var(--sidebar-width) 1fr auto;
    }

    .article {
        padding-inline: 34px;
    }

    .article-layout {
        grid-template-columns: minmax(0, 760px);
    }

    .hud-orbit {
        right: 46px;
        opacity: 0.42;
    }

    .on-this-page {
        display: none;
    }
}

@media (max-width: 1024px) {
    .topbar {
        grid-template-columns: auto 1fr auto;
    }

    .brand {
        border-right: 0;
    }

    .menu-button {
        display: block;
    }

    .sidebar {
        width: min(360px, 88vw);
        transform: translateX(-105%);
        box-shadow: 25px 0 80px rgba(0, 0, 0, 0.38);
        transition: transform 180ms ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-search {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .reading-progress {
        left: 0;
    }

    .topbar-center {
        justify-content: flex-end;
    }

    .search-trigger {
        width: 44px;
        justify-content: center;
    }

    .search-trigger span:not(.search-symbol),
    .search-trigger kbd {
        display: none;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 720px) {
    :root {
        --topbar-height: 64px;
    }

    .topbar {
        grid-template-columns: 1fr auto;
    }

    .topbar-center {
        display: none;
    }

    .brand {
        padding: 0 14px;
    }

    .topbar-actions {
        padding: 0 14px;
    }

    .edition-badge {
        display: none;
    }

    .article {
        padding: 20px 16px 65px;
    }

    .article-hero {
        min-height: 0;
        padding: 30px 24px 32px;
        border-radius: 16px;
    }

    .breadcrumbs {
        margin-bottom: 28px;
        overflow: hidden;
        white-space: nowrap;
    }

    .article-hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.5rem);
    }

    .hud-orbit {
        top: 68px;
        right: -54px;
        width: 130px;
        height: 130px;
        opacity: 0.23;
    }

    .hud-readout,
    .article-hero::after {
        display: none;
    }

    .hero-lead {
        font-size: 1rem;
    }

    .hero-meta span:last-child {
        display: none;
    }

    .article-layout {
        margin-top: 43px;
    }

    .article-section {
        margin-bottom: 56px;
    }

    .learning-grid,
    .comparison-grid,
    .compact-steps,
    .chapter-nav {
        grid-template-columns: 1fr;
    }

    .project-preview {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .flow-diagram,
    .laravel-flow {
        grid-template-columns: 1fr;
    }

    .flow-diagram > i {
        justify-self: center;
        transform: rotate(90deg);
    }

    .flow-node {
        min-height: 95px;
    }

    .code-block pre,
    .terminal-block pre {
        padding: 18px;
        font-size: 11px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 30px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
/* Structured chapter content */
.chapter-objectives,
.exercise-steps,
.source-list {
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

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

.chapter-objectives li,
.exercise-steps li {
    position: relative;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    border-radius: 10px;
    color: var(--text);
}

.chapter-objectives li {
    padding: 1rem 1rem 1rem 2.65rem;
}

.chapter-objectives li::before {
    content: "✓";
    position: absolute;
    left: 1rem;
    color: var(--cyan);
    font-weight: 800;
}

.practice-section {
    margin-top: 3rem;
    padding: 1.5rem;
    border: 1px solid color-mix(in srgb, var(--cyan) 45%, var(--line));
    border-radius: 14px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--cyan) 8%, transparent), transparent 45%),
        var(--panel);
}

.exercise-steps {
    counter-reset: exercise;
    display: grid;
    gap: .65rem;
}

.exercise-steps li {
    counter-increment: exercise;
    padding: .85rem 1rem .85rem 3.2rem;
}

.exercise-steps li::before {
    content: counter(exercise, decimal-leading-zero);
    position: absolute;
    left: 1rem;
    color: var(--cyan);
    font-family: var(--mono);
    font-size: .72rem;
    font-weight: 800;
}

.source-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.source-list {
    display: grid;
    gap: .55rem;
}

.source-list li {
    padding-left: 1.4rem;
    position: relative;
}

.source-list li::before {
    content: "↗";
    position: absolute;
    left: 0;
    color: var(--cyan);
}

.source-list a {
    color: var(--cyan);
    text-underline-offset: 3px;
}

@media (max-width: 680px) {
    .chapter-objectives {
        grid-template-columns: 1fr;
    }
}
