/* =========================================================
   DEEP LEARNING FUNDAMENTALS
   style.css
   ========================================================= */

:root {
    --page-bg: #f7f9fc;
    --surface: #ffffff;
    --surface-soft: #f8faff;

    --text: #17233d;
    --text-secondary: #58677f;
    --text-muted: #8b97aa;

    --border: #e6ebf3;
    --border-strong: #d7e0ed;

    --blue: #4263eb;
    --blue-dark: #304ed0;
    --blue-soft: #edf2ff;

    --purple: #7958e8;
    --purple-soft: #f1edff;

    --green: #138b68;
    --green-soft: #e9f8f1;

    --orange: #c7772b;
    --orange-soft: #fff3e7;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;

    --shadow-sm:
        0 2px 8px rgba(28, 48, 86, 0.035);

    --shadow-md:
        0 12px 35px rgba(28, 48, 86, 0.065);

    --shadow-lg:
        0 22px 65px rgba(28, 48, 86, 0.085);

    --page-width: 1480px;

    --reader-font-size: 16px;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        sans-serif;

    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body,
button,
input {
    font-family: inherit;
}

button,
input {
    font-size: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(66, 99, 235, 0.25);
    outline-offset: 3px;
}

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

button {
    color: inherit;
}

img {
    max-width: 100%;
}

.hidden {
    display: none !important;
}

.app-shell {
    min-height: 100vh;
    overflow: clip;
}

.section-container {
    width: min(var(--page-width), calc(100% - 64px));
    margin: 0 auto;
}


/* =========================================================
   TOP BAR
   ========================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;

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

    min-height: 78px;
    padding: 0 42px;

    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(225, 232, 242, 0.9);

    backdrop-filter: blur(20px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.5px;

    border-radius: 13px;

    background:
        linear-gradient(135deg,
            #5478ff 0%,
            #7358e9 100%);

    box-shadow:
        0 6px 16px rgba(75, 98, 231, 0.23);
}

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

.brand-copy strong {
    color: #1a2946;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -0.2px;
}

.brand-copy small {
    margin-top: 4px;
    color: #8c98ac;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1.8px;
}

.brand-parent {
    color: #8b96a6;
    font-weight: 500;
    text-decoration: none;
}

.brand-separator {
    color: #c4cbd4;
    font-weight: 400;
}

.brand-current {
    color: #202938;
    font-weight: 600;
}

.brand-copy small {
    display: block;
    margin-top: 3px;
    color: #8b96a6;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .08em;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.top-nav a {
    color: #67758c;
    font-size: 13px;
    font-weight: 550;
    transition: color 0.2s ease;
}

.top-nav a:hover {
    color: var(--blue);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button {
    display: grid;
    place-items: center;

    min-width: 36px;
    height: 36px;
    padding: 0 7px;

    color: #68758b;
    font-size: 12px;
    font-weight: 700;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 9px;

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

.icon-button:hover {
    background: var(--blue-soft);
    border-color: #cad6ff;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 42px;
    padding: 0 17px;

    color: #ffffff;
    font-size: 12px;
    font-weight: 700;

    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 10px;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.primary-button:hover {
    background: var(--blue-dark);
    box-shadow: 0 5px 15px rgba(66, 99, 235, 0.2);
    transform: translateY(-1px);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    isolation: isolate;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(520px, 1fr);
    align-items: start;
    gap: 50px;

    min-height: 590px;
    padding: 40px max(64px, calc((100vw - 1370px) / 2));

    overflow: hidden;

    background:
        linear-gradient(120deg,
            #ffffff 0%,
            #f6f8ff 55%,
            #f2f5ff 100%);

    border-bottom: 1px solid #e9edf6;
}

.hero-background {
    position: absolute;
    z-index: -1;

    pointer-events: none;
    border-radius: 50%;
    filter: blur(2px);
}

.hero-background-one {
    top: -250px;
    right: -80px;

    width: 700px;
    height: 700px;

    background:
        radial-gradient(circle,
            rgba(132, 156, 255, 0.18),
            rgba(132, 156, 255, 0) 70%);
}

.hero-background-two {
    bottom: -300px;
    left: 25%;

    width: 600px;
    height: 600px;

    background:
        radial-gradient(circle,
            rgba(185, 160, 255, 0.15),
            rgba(185, 160, 255, 0) 70%);
}

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 760px;

    padding-top: 20px;
}

.eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 26px;

    color: #6778b4;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;

    background: #6d82ff;
    border-radius: 50%;

    box-shadow: 0 0 0 5px rgba(109, 130, 255, 0.1);
}

.eyebrow-divider {
    color: #c4cce0;
}

.hero h1 {
    margin: 0;

    color: #182747;
    font-size: clamp(36px, 4vw, 58px);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -2.2px;
}

.hero h1 span {
    color: transparent;

    background:
        linear-gradient(105deg,
            #4165e8 0%,
            #7158e8 52%,
            #8a6ce9 100%);

    -webkit-background-clip: text;
    background-clip: text;
}

.hero-description {
    max-width: 660px;
    margin: 26px 0 0;

    color: #65738a;
    font-size: 15px;
    line-height: 2.05;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;

    margin-top: 34px;
}

.hero-primary-button,
.hero-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    min-height: 49px;
    padding: 0 23px;

    border-radius: 11px;

    font-size: 13px;
    font-weight: 750;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.hero-primary-button {
    color: #ffffff;
    background: var(--blue);
    border: 1px solid var(--blue);

    box-shadow: 0 8px 20px rgba(66, 99, 235, 0.19);
}

.hero-primary-button:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
}

.hero-secondary-button {
    color: #4b5b78;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #dce3f0;
}

.hero-secondary-button:hover {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 38px;

    margin-top: 46px;
    padding-top: 26px;

    border-top: 1px solid rgba(216, 225, 241, 0.8);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-stat strong {
    color: #253657;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-stat span {
    color: #8995a9;
    font-size: 11px;
}


/* Hero network illustration */

.hero-visual {
    position: relative;

    width: 100%;
    min-height: 520px;

    display: flex;

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

    padding-top: 20px;

    box-sizing: border-box;
}

.visual-orbit {
    position: absolute;

    border: 1px solid rgba(112, 135, 227, 0.18);
    border-radius: 50%;
}

.orbit-one {
    width: 350px;
    height: 350px;

    transform: rotate(-25deg) scaleX(1.2);
}

.orbit-two {
    width: 290px;
    height: 290px;

    border-style: dashed;
    transform: rotate(28deg) scaleX(1.3);
}

.network-card {
    position: relative;
    z-index: 2;

    width: min(100%, 390px);
    padding: 25px 27px;

    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(218, 226, 243, 0.95);
    border-radius: 22px;

    box-shadow:
        0 25px 80px rgba(59, 78, 145, 0.11),
        0 5px 18px rgba(59, 78, 145, 0.04);

    backdrop-filter: blur(15px);
}

.network-card-top,
.network-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.network-card-top {
    color: #8a96ad;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.network-status {
    width: 7px;
    height: 7px;

    background: #38b78a;
    border-radius: 50%;
}

.network-equation {
    margin: 26px 0 34px;

    color: #344b88;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 23px;
    font-weight: 700;
    text-align: center;
}

.network-layers {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;

    min-height: 120px;
}

.network-layer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.network-layer i {
    display: block;

    width: 17px;
    height: 17px;

    background: #dce6ff;
    border: 2px solid #7590ee;
    border-radius: 50%;

    box-shadow: 0 2px 5px rgba(89, 116, 219, 0.1);
}

.network-layer-middle i {
    background: #eee7ff;
    border-color: #a48be9;
}

.network-connections {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 20px;
}

.network-connections span {
    display: block;
    height: 1px;

    background:
        linear-gradient(90deg,
            #9eb1f2,
            #c0afea);

    opacity: 0.65;
}

.network-card-bottom {
    margin-top: 28px;

    color: #9aa4b8;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1px;
}

.visual-node {
    position: absolute;
    z-index: 3;

    display: grid;
    place-items: center;

    width: 39px;
    height: 39px;

    color: #4c62c8;
    font-family: Consolas, monospace;
    font-size: 14px;
    font-weight: 800;

    background: #ffffff;
    border: 1px solid #e0e7fb;
    border-radius: 13px;

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

.node-one {
    top: 20px;
    left: 14%;
}

.node-two {
    top: 23%;
    right: 1%;
    color: #7958e8;
}

.node-three {
    bottom: 14%;
    left: 10%;
    color: #16886d;
}

.node-four {
    right: 10%;
    bottom: 8%;
    color: #bc7b31;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.roadmap-section {
    padding-top: 105px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;

    margin-bottom: 35px;
}

.section-kicker {
    margin-bottom: 12px;

    color: #647bd2;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 2px;
}

.section-heading h2,
.reader-topline h2 {
    margin: 0;

    color: #1c2b49;
    font-size: clamp(25px, 2.6vw, 35px);
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -1px;
}

.section-heading p,
.reader-topline>div>p {
    max-width: 720px;
    margin: 14px 0 0;

    color: #7b879a;
    font-size: 13px;
    line-height: 1.95;
}


/* =========================================================
   ROADMAP
   ========================================================= */

.roadmap-heading {
    align-items: flex-end;
}

.roadmap-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 285px;
    height: 44px;
    padding: 0 12px;

    color: #8793a8;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 11px;

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

.search-box:focus-within {
    border-color: #aab8f6;
    box-shadow: 0 0 0 4px rgba(66, 99, 235, 0.07);
}

.search-box>span {
    font-size: 20px;
}

.search-box input {
    width: 100%;
    min-width: 0;

    color: #273650;
    background: transparent;
    border: 0;
    outline: 0;

    font-size: 12px;
}

.search-box input::placeholder {
    color: #a1aabd;
}

.search-box kbd {
    flex-shrink: 0;

    padding: 2px 5px;

    color: #9aa5b7;
    background: #f6f8fb;
    border: 1px solid #edf0f5;
    border-radius: 4px;

    font-family: inherit;
    font-size: 9px;
}

.text-button {
    padding: 8px 4px;

    color: #73809a;
    background: transparent;
    border: 0;

    font-size: 11px;
    font-weight: 650;
}

.text-button:hover {
    color: var(--blue);
}

.learning-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}


/* Sidebar */

.chapter-sidebar {
    position: sticky;
    top: 98px;

    overflow: hidden;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);

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

.sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 22px 21px 17px;

    border-bottom: 1px solid #eef1f6;

    color: #34445f;
    font-size: 12px;
    font-weight: 750;
}

.sidebar-heading span:last-child {
    color: #96a1b4;
    font-size: 10px;
    font-weight: 600;
}

.chapter-list {
    max-height: 580px;
    padding: 10px;

    overflow-y: auto;
}

.chapter-list::-webkit-scrollbar,
.toc-list::-webkit-scrollbar {
    width: 4px;
}

.chapter-list::-webkit-scrollbar-thumb,
.toc-list::-webkit-scrollbar-thumb {
    background: #e0e6f0;
    border-radius: 10px;
}

.chapter-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;

    width: 100%;
    padding: 11px 10px;

    text-align: left;

    color: #738098;
    background: transparent;
    border: 0;
    border-radius: 9px;

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

.chapter-nav-item:hover {
    color: #3c56c6;
    background: #f7f8ff;
}

.chapter-nav-item.active {
    color: #3e5be0;
    background: #edf2ff;
}

.chapter-nav-number {
    display: grid;
    place-items: center;

    width: 29px;
    height: 29px;
    flex-shrink: 0;

    color: #8996af;
    background: #f5f7fb;
    border: 1px solid #edf0f5;
    border-radius: 8px;

    font-size: 9px;
    font-weight: 800;
}

.chapter-nav-item.active .chapter-nav-number {
    color: #ffffff;
    background: var(--blue);
    border-color: var(--blue);
}

.chapter-nav-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;

    min-width: 0;
}

.chapter-nav-copy strong {
    overflow: hidden;

    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-nav-copy small {
    color: #a1aabd;
    font-size: 9px;
}

.chapter-nav-check {
    color: #1a9c76;
    font-size: 12px;
    font-weight: 800;
}


/* Sidebar progress */

.sidebar-progress {
    padding: 19px 20px 21px;

    background: #fafbfe;
    border-top: 1px solid #edf0f5;
}

.progress-label,
.reader-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-label {
    color: #77849a;
    font-size: 10px;
}

.progress-label strong {
    color: #435fdb;
    font-size: 12px;
}

.progress-track {
    height: 5px;
    margin-top: 12px;

    overflow: hidden;

    background: #e9edf6;
    border-radius: 10px;
}

.progress-fill {
    display: block;

    width: 0;
    height: 100%;

    background:
        linear-gradient(90deg,
            #4d73f3,
            #8066e9);

    border-radius: inherit;

    transition: width 0.35s ease;
}

.sidebar-progress p {
    margin: 11px 0 0;

    color: #9aa5b6;
    font-size: 10px;
    line-height: 1.8;
}


/* Main roadmap */

.course-main {
    min-width: 0;
}

.course-main-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    min-height: 48px;
    margin-bottom: 14px;
    padding: 0 4px;
}

.result-summary {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #77849a;
    font-size: 11px;
}

.result-dot {
    width: 7px;
    height: 7px;

    background: #43b18a;
    border-radius: 50%;
}

.toolbar-actions {
    display: flex;
    gap: 7px;
}

.small-button {
    min-height: 32px;
    padding: 0 10px;

    color: #74819a;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;

    font-size: 10px;
    font-weight: 650;
}

.small-button:hover {
    color: var(--blue);
    border-color: #cad5ff;
}

.roadmap-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.chapter-card {
    overflow: hidden;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);

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

.chapter-card:hover {
    border-color: #d5def2;
    box-shadow: var(--shadow-sm);
}

.chapter-card.current {
    border-color: #b9c8ff;
    box-shadow: 0 0 0 3px rgba(66, 99, 235, 0.045);
}

.chapter-card-header {
    display: flex;
    align-items: center;
    gap: 20px;

    padding: 25px 27px;

    cursor: pointer;
    transition: background 0.2s ease;
}

.chapter-card-header:hover {
    background: #fbfcff;
}

.chapter-card-header:focus-visible {
    outline: 3px solid rgba(66, 99, 235, 0.25);
    outline-offset: -3px;
}

.chapter-card-number {
    display: grid;
    place-items: center;

    width: 56px;
    height: 56px;
    flex-shrink: 0;

    color: #5269d6;
    background: #eff2ff;
    border-radius: 13px;

    font-size: 15px;
    font-weight: 850;
}

.chapter-card:nth-child(4n + 2) .chapter-card-number {
    color: #805fe0;
    background: #f3eeff;
}

.chapter-card:nth-child(4n + 3) .chapter-card-number {
    color: #16896a;
    background: #eaf8f2;
}

.chapter-card:nth-child(4n + 4) .chapter-card-number {
    color: #bb792f;
    background: #fff4e7;
}

.chapter-card-info {
    flex: 1;
    min-width: 0;
}

.chapter-card-info h3 {
    margin: 0;

    color: #263651;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.45;
}

.chapter-card-info p {
    margin: 6px 0 0;

    color: #8a96a9;
    font-size: 13px;
    line-height: 1.8;
}

.chapter-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;

    flex-shrink: 0;
}

.chapter-card-progress {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 145px;
}

.chapter-card-count {
    color: #72809a;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

.chapter-progress-track {
    display: block;
    height: 5px;
    overflow: hidden;
    background: #e9edf6;
    border-radius: 10px;
}

.chapter-progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #4d73f3, #8066e9);
    border-radius: inherit;
    transition: width 0.35s ease;
}

.chapter-card-arrow {
    display: grid;
    place-items: center;

    width: 29px;
    height: 29px;

    color: #8c99ad;
    background: #f7f8fb;
    border: 1px solid #eef1f6;
    border-radius: 8px;

    transition: transform 0.2s ease;
}

.chapter-card.expanded .chapter-card-arrow {
    transform: rotate(180deg);
}

.chapter-card-body {
    display: none;
    padding: 0 25px 22px;
}

.chapter-card.expanded .chapter-card-body {
    display: block;
}

.chapter-card-divider {
    height: 1px;
    margin-bottom: 14px;
    background: #edf0f5;
}

.chapter-lesson-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.lesson-link {

    display: flex;
    align-items: flex-start;
    gap: 10px;

    min-width: 0;
    padding: 15px 16px;

    text-align: left;

    color: #697891;
    background: #fafbfe;
    border: 1px solid #f0f2f7;
    border-radius: 9px;

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

.lesson-link:hover {
    color: #405de0;
    background: #f3f5ff;
    border-color: #dce3ff;
}

.lesson-link.completed {
    background: #f4fbf8;
    border-color: #e0f2e9;
}

.lesson-link-number {
    flex-shrink: 0;

    color: #a1abc0;
    font-family: Consolas, monospace;
    font-size: 10px;
    font-weight: 750;
}

.lesson-link-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.lesson-link-copy strong {
    color: inherit;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.6;
}

.lesson-link-copy small {
    color: #9aa5b7;
    font-size: 12px;
    line-height: 1.7;
}

.lesson-link-status {
    flex-shrink: 0;
    color: #199b75;
    font-size: 11px;
}


.lesson-heading {
    margin: 0 0 20px;

    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;

    color: #111827;

    cursor: pointer;
}

.lesson-heading:hover {
    color: #315d91;
}


.empty-state {
    padding: 75px 20px;

    text-align: center;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.empty-state-icon {
    color: #7b8ce5;
    font-size: 35px;
}

.empty-state h3 {
    margin: 13px 0 5px;
    font-size: 18px;
}

.empty-state p {
    margin: 0 0 20px;
    color: #8793a8;
    font-size: 12px;
}

.loading-placeholder {
    padding: 30px;

    color: #8d99ad;
    text-align: center;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
}


/* =========================================================
   READER
   ========================================================= */

.reader-section {
    margin-top: 110px;
    padding: 75px 0 105px;

    background:
        linear-gradient(180deg,
            #f1f4fc 0%,
            #f8faff 220px,
            #f8faff 100%);

    border-top: 1px solid #e8edf6;
}

.reader-topline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;

    margin-bottom: 34px;
}

.reader-progress-card {
    width: 280px;
    flex-shrink: 0;

    padding: 18px 20px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 13px;

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

.reader-progress-top {
    color: #75839a;
    font-size: 11px;
}

.reader-progress-top strong {
    color: var(--blue);
    font-size: 16px;
}

.reader-progress-caption {
    display: block;
    margin-top: 9px;

    color: #9ba6b7;
    font-size: 10px;
}

.reader-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 25px;
}

.reader-content {
    min-width: 0;
    padding: 50px clamp(25px, 5vw, 65px);

    background: #ffffff;
    border: 1px solid #e5eaf3;
    border-radius: 18px;

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

    font-size: var(--reader-font-size);
}

.reader-content .article-eyebrow {
    margin-bottom: 15px;

    color: #6579d5;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1.8px;
}

.reader-content .article-title {
    margin: 0;

    color: #1b2b49;
    font-size: clamp(29px, 3vw, 42px);
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -1.5px;
}

.reader-content .article-lead {
    margin: 20px 0 0;

    color: #6b7890;
    font-size: 1.04em;
    line-height: 2.05;
}

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

    margin-top: 22px;
}

.article-meta span {
    padding: 5px 10px;

    color: #6e7d98;
    background: #f5f7fc;
    border: 1px solid #edf0f7;
    border-radius: 7px;

    font-size: 10px;
}

.article-cover {
    position: relative;

    margin: 35px 0 40px;
    padding: 30px;

    overflow: hidden;

    background:
        radial-gradient(circle at 85% 10%,
            rgba(130, 147, 255, 0.15),
            transparent 35%),
        linear-gradient(135deg,
            #f3f6ff,
            #faf8ff);

    border: 1px solid #e6eafd;
    border-radius: 15px;
}

.article-cover-label {
    color: #8190c8;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.6px;
}

.article-cover h3 {
    max-width: 500px;
    margin: 13px 0 10px;

    color: #344b8e;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.5;
}

.article-cover p {
    max-width: 580px;
    margin: 0;

    color: #7e8ba4;
    font-size: 12px;
    line-height: 1.9;
}

.article-section {
    padding-top: 26px;
    margin-top: 35px;

    border-top: 1px solid #edf0f6;

    scroll-margin-top: 105px;
}

.article-section:first-of-type {
    margin-top: 0;
}

.article-section h2 {
    margin: 0 0 20px;

    color: #263752;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: -0.5px;
}

.article-section h3 {
    margin: 27px 0 12px;

    color: #314260;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.55;
}

.article-section h4 {
    margin: 22px 0 9px;

    color: #435571;
    font-size: 14px;
    font-weight: 800;
}

.article-section p {
    margin: 0 0 18px;

    color: #52627a;
    font-size: 1em;
    line-height: 2.05;
    overflow-wrap: anywhere;
}

.article-section strong {
    color: #2d4164;
    font-weight: 750;
}

.article-section ul,
.article-section ol {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin: 17px 0 22px;
    padding-left: 24px;

    color: #596982;
    font-size: 0.95em;
    line-height: 1.9;
}

.article-section li::marker {
    color: #7589e8;
}

.article-section a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: #cbd5ff;
    text-underline-offset: 3px;
}

.article-callout {
    margin: 24px 0;
    padding: 21px 23px;

    background: #f5f7ff;
    border: 1px solid #e4e9ff;
    border-left: 4px solid #7187ed;
    border-radius: 9px;
}

.article-callout.callout-green {
    background: #f2faf6;
    border-color: #def1e7;
    border-left-color: #43a985;
}

.article-callout.callout-orange {
    background: #fff8f0;
    border-color: #f7e8d6;
    border-left-color: #d99a51;
}

.article-callout strong {
    display: block;
    margin-bottom: 8px;

    color: #3e559e;
    font-size: 13px;
}

.article-callout p {
    margin: 0;
    color: #63728b;
    font-size: 0.9em;
    line-height: 1.95;
}

.formula-box {
    margin: 23px 0;
    padding: 23px 20px;

    overflow-x: auto;

    color: #344d9d;
    background: #f7f8ff;
    border: 1px solid #e6eaff;
    border-radius: 10px;

    font-family:
        "Cambria Math",
        "Times New Roman",
        serif;

    font-size: 19px;
    line-height: 1.8;
    text-align: center;
}

.code-block {
    position: relative;

    margin: 22px 0;
    overflow: hidden;

    background: #f7f9fc;
    border: 1px solid #e3e9f2;
    border-radius: 11px;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 11px 15px;

    background: #f0f3f9;
    border-bottom: 1px solid #e4e9f1;
}

.code-block-header span {
    color: #7c8aa1;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.6px;
}

.copy-code-button {
    padding: 5px 9px;

    color: #5d6e91;
    background: #ffffff;
    border: 1px solid #dfe5ef;
    border-radius: 6px;

    font-size: 10px;
}

.copy-code-button:hover {
    color: var(--blue);
    border-color: #b9c7ff;
}

.code-block pre {
    margin: 0;
    padding: 20px;

    overflow-x: auto;

    color: #33435f;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 12px;
    line-height: 1.9;
    tab-size: 4;
}

.code-block code {
    font-family: inherit;
    white-space: pre;
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;

    margin: 23px 0;
}

.concept-card {
    padding: 17px;

    background: #fafbfe;
    border: 1px solid #edf0f6;
    border-radius: 10px;
}

.concept-card strong {
    display: block;
    margin-bottom: 7px;

    color: #3a4d70;
    font-size: 12px;
}

.concept-card p {
    margin: 0;

    color: #7a879c;
    font-size: 0.8em;
    line-height: 1.85;
}

.practice-box {
    margin: 30px 0;
    padding: 24px;

    background:
        linear-gradient(135deg,
            #f1f5ff,
            #f8f6ff);

    border: 1px solid #e2e8ff;
    border-radius: 12px;
}

.practice-box .practice-label {
    display: inline-block;
    margin-bottom: 10px;

    color: #6c7ed0;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.6px;
}

.practice-box h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.practice-box p {
    margin-bottom: 12px;
    font-size: 0.9em;
}

.practice-box ul {
    margin-bottom: 0;
}

.thinking-box {
    margin: 24px 0;
    padding: 20px 22px;

    background: #fffbf4;
    border: 1px solid #f4e8d4;
    border-radius: 10px;
}

.thinking-box strong {
    display: block;
    margin-bottom: 9px;

    color: #a46d31;
    font-size: 12px;
}

.thinking-box ol {
    margin-bottom: 0;
}

.lesson-completion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-top: 45px;
    padding: 23px;

    background: #fafbfe;
    border: 1px solid #e8edf5;
    border-radius: 12px;
}

.lesson-completion-copy strong {
    display: block;

    color: #334563;
    font-size: 13px;
}

.lesson-completion-copy p {
    margin: 5px 0 0;

    color: #8793a7;
    font-size: 11px;
}

.complete-lesson-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 41px;
    padding: 0 15px;

    flex-shrink: 0;

    color: #ffffff;
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 9px;

    font-size: 11px;
    font-weight: 750;
}

.complete-lesson-button.completed {
    color: #167c5d;
    background: #e9f8f1;
    border-color: #d6efe3;
}

.chapter-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;

    margin-top: 17px;
}

.chapter-navigation-button {
    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 0;
    padding: 19px;

    text-align: left;

    background: #ffffff;
    border: 1px solid #e4eaf3;
    border-radius: 11px;

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

.chapter-navigation-button:hover {
    border-color: #bdcaff;
    transform: translateY(-2px);
}

.chapter-navigation-button:last-child {
    text-align: right;
}

.chapter-navigation-button span {
    color: #9aa5b7;
    font-size: 10px;
}

.chapter-navigation-button strong {
    color: #3e5275;
    font-size: 12px;
}


/* Right TOC */

.reader-toc {
    position: sticky;
    top: 100px;
    min-width: 0;
}

.toc-card {
    padding: 23px 19px;

    background: #ffffff;
    border: 1px solid #e5eaf3;
    border-radius: 14px;

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

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.toc-kicker {
    color: #94a0b5;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 1.5px;
}

.toc-header h3 {
    margin: 5px 0 0;

    color: #34445f;
    font-size: 15px;
    font-weight: 800;
}

.toc-count {
    display: grid;
    place-items: center;

    min-width: 28px;
    height: 28px;
    padding: 0 6px;

    color: #5970d3;
    background: #f0f3ff;
    border-radius: 8px;

    font-size: 10px;
    font-weight: 800;
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 3px;

    max-height: 460px;
    margin-top: 21px;
    padding-right: 3px;

    overflow-y: auto;
}

.toc-link {
    position: relative;

    display: block;

    padding: 9px 10px 9px 14px;

    color: #8390a6;
    border-radius: 7px;

    font-size: 11px;
    line-height: 1.7;

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

.toc-link::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;

    width: 2px;

    content: "";

    background: transparent;
    border-radius: 2px;
}

.toc-link:hover {
    color: #5269d2;
    background: #f7f8ff;
}

.toc-link.active {
    color: #405ad1;
    background: #f1f4ff;
    font-weight: 750;
}

.toc-link.active::before {
    background: #6178ec;
}

.toc-empty {
    color: #a0aabd;
    font-size: 11px;
}

.toc-divider {
    height: 1px;
    margin: 20px 0 17px;

    background: #edf0f5;
}

.toc-complete-button {
    width: 100%;
    min-height: 39px;
    padding: 0 10px;

    color: #60719a;
    background: #f7f8fc;
    border: 1px solid #e8edf5;
    border-radius: 8px;

    font-size: 10px;
    font-weight: 700;
}

.toc-complete-button:hover {
    color: #167c5d;
    background: #effaf5;
    border-color: #d6efe3;
}


/* =========================================================
   STUDY METHOD
   ========================================================= */

.study-method {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 90px;

    padding-top: 105px;
    padding-bottom: 110px;
}

.study-method-copy h2 {
    margin: 0;

    color: #1d2d4a;
    font-size: clamp(28px, 3vw, 39px);
    font-weight: 850;
    line-height: 1.5;
    letter-spacing: -1px;
}

.study-method-copy p {
    max-width: 520px;
    margin: 20px 0 0;

    color: #77849a;
    font-size: 13px;
    line-height: 2.1;
}

.study-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.study-step {
    display: flex;
    align-items: flex-start;
    gap: 18px;

    padding: 20px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 13px;
}

.study-step-number {
    display: grid;
    place-items: center;

    width: 39px;
    height: 39px;
    flex-shrink: 0;

    color: #5169d4;
    background: #edf2ff;
    border-radius: 11px;

    font-size: 11px;
    font-weight: 850;
}

.study-step h3 {
    margin: 0;

    color: #34455f;
    font-size: 14px;
    font-weight: 800;
}

.study-step p {
    margin: 6px 0 0;

    color: #8490a4;
    font-size: 11px;
    line-height: 1.9;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    padding: 40px 42px 0;

    background: #ffffff;
    border-top: 1px solid #e8edf5;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    width: min(var(--page-width), 100%);
    margin: 0 auto;
    padding-bottom: 30px;
}

.footer-inner>p {
    margin: 0;

    color: #8995a9;
    font-size: 11px;
}

.back-to-top {
    color: #6175d3;
    font-size: 11px;
    font-weight: 750;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    max-width: var(--page-width);
    margin: 0 auto;
    padding: 17px 0 21px;

    color: #a0aabc;
    border-top: 1px solid #edf0f5;

    font-size: 9px;
    letter-spacing: 0.8px;
}


/* =========================================================
   TOAST
   ========================================================= */

.toast {
    position: fixed;
    z-index: 1000;
    right: 25px;
    bottom: 25px;

    max-width: min(380px, calc(100vw - 40px));
    padding: 12px 18px;

    color: #ffffff;
    background: #263754;
    border-radius: 10px;

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

    font-size: 12px;
    line-height: 1.7;

    opacity: 0;
    pointer-events: none;

    transform: translateY(10px);

    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (min-width: 1600px) {
    .hero {
        padding-right: calc((100vw - 1370px) / 2);
        padding-left: calc((100vw - 1370px) / 2);
    }
}

@media (max-width: 1200px) {
    .hero {
        gap: 25px;
        padding-right: 40px;
        padding-left: 40px;
    }

    .hero h1 {
        font-size: 43px;
    }

    .reader-layout {
        grid-template-columns: minmax(0, 1fr) 245px;
        gap: 17px;
    }

    .study-method {
        gap: 45px;
    }

    .topbar {
        padding-right: 25px;
        padding-left: 25px;
    }

    .top-nav {
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .section-container {
        width: calc(100% - 36px);
    }

    .topbar {
        min-height: 68px;
    }

    .top-nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 75px 35px;
    }

    .hero-content {
        max-width: 720px;
    }

    .hero-visual {
        min-height: 330px;
    }

    .roadmap-section {
        padding-top: 75px;
    }

    .roadmap-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .roadmap-tools {
        width: 100%;
    }

    .search-box {
        flex: 1;
        width: auto;
    }

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

    .chapter-sidebar {
        position: static;
    }

    .chapter-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3px;

        max-height: 300px;
    }

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

    .reader-toc {
        position: static;
        grid-row: 1;
    }

    .toc-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));

        max-height: none;
    }

    .reader-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
    }

    .reader-progress-card {
        width: 100%;
    }

    .study-method {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .study-method-copy h2 br {
        display: none;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .section-container {
        width: calc(100% - 28px);
    }

    .topbar {
        gap: 10px;
        padding: 0 14px;
    }

    .brand-mark {
        width: 37px;
        height: 37px;
        border-radius: 11px;
    }

    .brand-copy strong {
        font-size: 12px;
    }

    .brand-copy small {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .top-actions {
        gap: 5px;
    }

    .icon-button {
        min-width: 31px;
        height: 33px;
    }

    .top-actions .primary-button {
        min-height: 35px;
        padding: 0 10px;
        font-size: 10px;
    }

    .hero {
        min-height: auto;
        padding: 55px 21px 45px;
    }

    .hero h1 {
        font-size: 34px;
        letter-spacing: -1.2px;
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-stats {
        gap: 20px;
    }

    .hero-stat strong {
        font-size: 17px;
    }

    .hero-visual {
        min-height: 280px;
    }

    .network-card {
        padding: 20px;
    }

    .network-equation {
        font-size: 19px;
    }

    .visual-node {
        width: 33px;
        height: 33px;
    }

    .section-heading h2,
    .reader-topline h2 {
        font-size: 25px;
    }

    .roadmap-tools {
        gap: 7px;
    }

    .search-box kbd {
        display: none;
    }

    .chapter-list {
        grid-template-columns: 1fr;
        max-height: 330px;
    }

    .chapter-card-header {
        gap: 11px;
        padding: 17px 14px;
    }

    .chapter-card-number {
        width: 43px;
        height: 43px;
        border-radius: 10px;
    }

    .chapter-card-info h3 {
        font-size: 16px;
    }

    .chapter-card-info p {
        font-size: 11px;
    }

    .chapter-card-meta {
        gap: 7px;
    }

    .chapter-card-progress {
        width: 74px;
        gap: 5px;
    }

    .chapter-card-count {
        font-size: 9px;
    }

    .chapter-card-body {
        padding: 0 14px 16px;
    }

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

    .lesson-link-copy strong {
        font-size: 14px;
    }

    .reader-section {
        margin-top: 65px;
        padding: 55px 0 65px;
    }

    .reader-content {
        padding: 28px 20px;
    }

    .reader-content .article-title {
        font-size: 30px;
    }

    .article-cover {
        padding: 22px;
    }

    .article-cover h3 {
        font-size: 20px;
    }

    .article-section h2 {
        font-size: 22px;
    }

    .article-section h3 {
        font-size: 16px;
    }

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

    .formula-box {
        font-size: 16px;
    }

    .lesson-completion {
        align-items: flex-start;
        flex-direction: column;
    }

    .chapter-navigation {
        grid-template-columns: 1fr;
    }

    .toc-list {
        grid-template-columns: 1fr;
    }

    .study-method {
        padding-top: 65px;
        padding-bottom: 70px;
    }

    .footer {
        padding: 30px 18px 0;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .footer-bottom {
        font-size: 8px;
    }

    .toast {
        right: 14px;
        bottom: 14px;
    }
}