/* Docker Handbook — offline-first editorial reading system */
:root {
    color-scheme: light;
    --page: #f8f8f5;
    --panel: #fff;
    --sidebar: #f3f5f1;
    --ink: #1d292b;
    --muted: #637071;
    --hair: #e2e8e3;
    --brand: #177d74;
    --brand-strong: #116a62;
    --brand-soft: #e8f4f0;
    --warm: #e2a769;
    --code: #182528;
    --code-text: #e3f1ef;
    --warning: #fff8eb;
    --warning-border: #edd5b0;
    --shadow: 0 9px 35px rgba(23, 42, 42, 0.04);
    --radius: 18px;
    --sidebar-width: 302px;
    --topbar-height: 66px;
}
html[data-theme="dark"] {
    color-scheme: dark;
    --page: #141b1c;
    --panel: #1b2526;
    --sidebar: #182123;
    --ink: #eff6f2;
    --muted: #9eaeaa;
    --hair: #344240;
    --brand: #65c8b7;
    --brand-strong: #8de0d2;
    --brand-soft: #193b36;
    --warm: #ebbf85;
    --code: #0b1315;
    --code-text: #e2f7f1;
    --warning: #332d22;
    --warning-border: #655136;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.11);
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}
body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family:
        Inter,
        "Segoe UI",
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    line-height: 1.66;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
button,
input {
    font: inherit;
}
button,
a {
    -webkit-tap-highlight-color: transparent;
}
a {
    color: var(--brand-strong);
    text-decoration: none;
}
a:hover {
    color: var(--brand);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}
::selection {
    background: #93dac7;
    color: #12302c;
}
[hidden] {
    display: none !important;
}
.app-shell {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 40;
    display: flex;
    flex-direction: column;
    background: var(--sidebar);
    border-right: 1px solid var(--hair);
}
.sidebar-top {
    height: 85px;
    flex-shrink: 0;
    padding: 18px 22px 12px;
    border-bottom: 1px solid var(--hair);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--ink);
}
.brand:hover {
    color: var(--ink);
}
.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--ink);
    border-radius: 13px;
    color: var(--page);
    font-size: 23px;
    font-weight: 850;
    letter-spacing: -3px;
    padding-right: 4px;
}
.brand-mark-accent {
    color: var(--warm);
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    gap: 4px;
}
.brand-text strong {
    font-size: 15px;
    letter-spacing: -0.3px;
}
.brand-text small {
    font-size: 11px;
    color: var(--muted);
}
.sidebar-search {
    padding: 18px 18px 10px;
    flex-shrink: 0;
}
.search-launch {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border: 1px solid var(--hair);
    background: var(--panel);
    border-radius: 11px;
    padding: 0 10px;
    cursor: pointer;
    color: var(--muted);
    font-size: 12px;
    text-align: left;
}
.search-launch span:nth-child(2) {
    flex: 1;
}
.search-launch:hover {
    border-color: var(--brand);
    color: var(--ink);
}
.search-icon {
    font-size: 22px;
    line-height: 1;
}
.search-launch kbd {
    border: 1px solid var(--hair);
    border-radius: 5px;
    min-width: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}
.nav-subhead {
    color: var(--muted);
    letter-spacing: 1.6px;
    font-weight: 800;
    font-size: 10px;
    margin: 15px 22px 8px;
}
.sidebar-nav {
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--hair) transparent;
}
.nav-home {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--ink);
    font-weight: 650;
    padding: 11px 20px;
    margin: 0 12px 5px;
    border-radius: 10px;
    font-size: 13px;
}
.nav-home:hover {
    background: var(--brand-soft);
}
.nav-home-icon {
    font-size: 21px;
    color: var(--brand);
    line-height: 1;
}
.nav-group {
    margin: 1px 12px;
}
.nav-group summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    cursor: pointer;
    list-style: none;
    min-height: 41px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}
.nav-group summary::-webkit-details-marker {
    display: none;
}
.nav-group summary:hover {
    background: var(--brand-soft);
}
.nav-group[open] summary {
    background: var(--brand-soft);
    color: var(--ink);
}
.nav-group-no {
    color: var(--brand);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    min-width: 24px;
}
.nav-group-label {
    flex: 1;
}
.nav-progress {
    font-size: 10px;
    color: var(--muted);
    font-weight: 500;
}
.nav-group-overview {
    display: block;
    margin: 0 0 2px 39px;
    padding: 6px 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-strong);
}
.nav-lesson {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 8px 8px 20px;
    margin-left: 23px;
    margin-right: 0;
    border-left: 1px solid var(--hair);
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--muted);
    border-radius: 0 8px 8px 0;
}
.nav-lesson:hover {
    background: var(--panel);
    color: var(--ink);
}
.nav-lesson.active {
    background: var(--panel);
    color: var(--brand-strong);
    border-left: 2px solid var(--brand);
    font-weight: 800;
}
.nav-dot {
    display: block;
    flex: none;
    width: 7px;
    height: 7px;
    border: 1px solid #b7c8c2;
    border-radius: 50%;
}
.nav-lesson.complete .nav-dot {
    background: var(--brand);
    border-color: var(--brand);
}
.nav-ref {
    display: block;
    font-size: 12px;
    color: var(--muted);
    padding: 9px 22px;
    margin: 1px 12px;
    border-radius: 9px;
}
.nav-ref:hover {
    color: var(--brand-strong);
    background: var(--brand-soft);
}
.sidebar-bottom {
    padding: 16px 21px 14px;
    border-top: 1px solid var(--hair);
    background: var(--sidebar);
    flex-shrink: 0;
}
.progress-caption {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
}
.progress-caption b {
    font-variant-numeric: tabular-nums;
    color: var(--brand);
}
.progress-track {
    height: 6px;
    background: var(--hair);
    border-radius: 20px;
    margin: 10px 0;
    overflow: hidden;
}
.progress-track i {
    display: block;
    height: 100%;
    background: var(--brand);
    width: 0;
    transition: width 0.3s;
}
.sidebar-bottom p {
    font-size: 10px;
    line-height: 1.45;
    color: var(--muted);
    margin: 0;
}
.mobile-close,
.menu-scrim {
    display: none;
}
.main-pane {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.topbar {
    height: var(--topbar-height);
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--page), transparent 5%);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hair);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 38px;
}
.topbar-path {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
}
.topbar-path a {
    font-weight: 800;
    color: var(--ink);
}
.topbar-path span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 270px;
}
.topbar-actions {
    display: flex;
    gap: 11px;
    align-items: center;
}
.offline-pill {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    margin-right: 6px;
}
.offline-pill span {
    width: 6px;
    height: 6px;
    background: var(--brand);
    border-radius: 100%;
}
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: transparent;
    border: 1px solid var(--hair);
    border-radius: 10px;
    color: var(--ink);
    font-size: 19px;
    cursor: pointer;
}
.icon-btn:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
}
.menu-trigger {
    display: none;
}
.main-content {
    width: 100%;
    max-width: 1600px;
    flex: 1;
    margin: 0 auto;
}
.global-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 42px 34px;
    border-top: 1px solid var(--hair);
    color: var(--muted);
    font-size: 11px;
}
.global-footer span:last-child {
    text-align: right;
}
/* shared */
h1,
h2,
h3,
h4 {
    letter-spacing: -0.035em;
    line-height: 1.2;
}
h1 {
    font-size: clamp(34px, 3.8vw, 56px);
    margin: 0;
}
h2 {
    font-size: clamp(23px, 2.2vw, 29px);
    margin: 0;
}
h3 {
    font-size: 18px;
    margin: 0;
}
.section-label {
    font-size: 10px;
    font-weight: 850;
    color: var(--brand);
    letter-spacing: 2px;
    text-transform: uppercase;
}
.primary-btn,
.secondary-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 11px;
    font-weight: 750;
    font-size: 13px;
}
.primary-btn {
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
    box-shadow: 0 6px 18px rgba(21, 125, 112, 0.12);
}
.primary-btn:hover {
    color: #fff;
    background: var(--brand-strong);
}
.secondary-btn {
    color: var(--ink);
    background: var(--panel);
    border: 1px solid var(--hair);
    cursor: pointer;
}
.secondary-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}
.text-link {
    font-size: 13px;
    font-weight: 750;
}
.back-index {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 12px;
    font-weight: 750;
    color: var(--brand-strong);
}
/* index: a curated table of contents, not a long-form landing page */
.home-page {
    max-width: 1330px;
    margin: auto;
    padding: 28px 40px 80px;
}
.hero {
    background: var(--ink);
    color: var(--page);
    border-radius: 23px;
    overflow: hidden;
    position: relative;
    padding: 30px 38px 40px;
    min-height: 350px;
}
.hero-topline {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    font-size: 10px;
    letter-spacing: 1.9px;
    color: color-mix(in srgb, var(--page), transparent 24%);
    font-weight: 800;
}
.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 36px;
    align-items: center;
    margin-top: 25px;
}
.hero-copy h1 {
    line-height: 1.1;
    letter-spacing: -0.06em;
    font-size: clamp(42px, 5.5vw, 75px);
}
.hero-copy h1 em {
    font-style: normal;
    color: #8be0d0;
}
.hero-copy p {
    max-width: 590px;
    font-size: 15px;
    line-height: 1.8;
    color: color-mix(in srgb, var(--page), transparent 24%);
    margin: 22px 0 28px;
}
.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.hero .primary-btn {
    background: #80d6bd;
    border-color: #80d6bd;
    color: #123b35;
}
.hero .primary-btn:hover {
    background: #b5efe0;
    border-color: #b5efe0;
}
.hero .secondary-btn {
    color: #ecf5f1;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}
.hero-graphic {
    padding: 8px;
}
.hero-graphic-inner {
    padding: 24px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: inset 0 0 40px rgba(130, 255, 195, 0.02);
}
.hg-title {
    font-size: 9px;
    letter-spacing: 2.3px;
    opacity: 0.65;
    font-weight: 750;
    margin-bottom: 16px;
}
.hg-line {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
}
.hg-line span {
    font-size: 11px;
    color: #92dccc;
    font-weight: 750;
}
.hg-line strong {
    flex: 1;
    letter-spacing: 1.2px;
}
.hg-line i {
    font-size: 10px;
    font-style: normal;
    opacity: 0.65;
    text-align: right;
}
.hg-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
    font-size: 9px;
    letter-spacing: 1.7px;
    color: #92dccc;
    font-weight: 800;
}
.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--hair);
    border-radius: 15px;
    background: var(--panel);
    margin: 20px 0 52px;
}
.home-stats > div {
    padding: 18px 18px;
    display: flex;
    gap: 7px;
    align-items: baseline;
    justify-content: center;
}
.home-stats > div:not(:last-child) {
    border-right: 1px solid var(--hair);
}
.home-stats strong {
    font-size: 24px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -1px;
}
.home-stats span {
    font-size: 11px;
    color: var(--muted);
}
.how-to {
    display: grid;
    grid-template-columns: 0.85fr 2fr;
    gap: 35px;
    align-items: start;
    margin: 0 0 60px;
}
.how-to-title h2 {
    margin-top: 12px;
    font-size: 29px;
}
.how-to-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.how-to-items > div {
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--hair);
    border-radius: 13px;
}
.how-to-items b {
    color: var(--brand);
    font-size: 13px;
    display: block;
    margin-bottom: 12px;
}
.how-to-items strong {
    font-size: 13px;
}
.how-to-items p {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.6;
    margin: 6px 0 0;
}
.module-section {
    margin: 0 0 60px;
}
.module-section-heading {
    margin-bottom: 20px;
}
.module-section-heading h2 {
    margin-top: 8px;
}
.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}
.module-card {
    display: flex;
    gap: 16px;
    min-height: 186px;
    padding: 19px;
    border: 1px solid var(--hair);
    background: var(--panel);
    border-radius: 15px;
    color: var(--ink);
    transition:
        transform 0.2s,
        border-color 0.2s,
        box-shadow 0.2s;
}
.module-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand);
    color: var(--ink);
    box-shadow: var(--shadow);
}
.module-number {
    font-size: 26px;
    font-weight: 900;
    color: var(--brand);
    line-height: 1.15;
    letter-spacing: -1px;
    min-width: 38px;
}
.module-kind {
    font-size: 10px;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 800;
}
.module-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.module-body h3 {
    margin: 8px 0 9px;
    font-size: 17px;
    line-height: 1.25;
}
.module-body p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.62;
    margin: 0 0 12px;
}
.module-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    color: var(--muted);
    font-size: 11px;
}
.module-arrow {
    font-size: 18px;
    color: var(--brand);
}
.tool-section {
    margin: 16px 0 45px;
}
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.tool-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: var(--brand-soft);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 750;
    color: var(--ink);
}
.tool-card:hover {
    background: var(--panel);
}
.tool-glyph {
    font-size: 16px;
    color: var(--brand);
}
.home-disclaimer {
    padding: 20px 24px;
    border: 1px solid var(--hair);
    border-radius: 13px;
    background: var(--panel);
}
.home-disclaimer strong {
    font-size: 13px;
}
.home-disclaimer p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
    margin: 7px 0 0;
}
/* chapter hub */
.chapter-header {
    padding: 56px min(7vw, 90px) 50px;
    background: var(--panel);
    border-bottom: 1px solid var(--hair);
}
.chapter-tag {
    color: var(--brand);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 1.8px;
    margin-bottom: 19px;
}
.chapter-header h1 {
    max-width: 870px;
}
.chapter-header > p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 730px;
    margin: 23px 0 20px;
}
.chapter-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}
.hub-section {
    padding: 55px min(7vw, 90px) 0;
}
.hub-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 24px;
}
.hub-heading h2 {
    margin: 10px 0 0;
}
.hub-progress {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}
.lesson-card {
    display: flex;
    gap: 19px;
    min-height: 195px;
    border: 1px solid var(--hair);
    background: var(--panel);
    padding: 24px;
    border-radius: 15px;
    color: var(--ink);
}
.lesson-card:hover {
    border-color: var(--brand);
    color: var(--ink);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.lesson-card-n {
    font-size: 31px;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--brand);
    line-height: 1;
}
.lesson-card > div {
    display: flex;
    flex-direction: column;
}
.lesson-card h3 {
    font-size: 19px;
    line-height: 1.3;
    margin: 0 0 10px;
}
.lesson-card p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0 0 18px;
}
.lesson-card > div > span {
    font-size: 12px;
    font-weight: 850;
    color: var(--brand);
    margin-top: auto;
}
.lesson-card b {
    font-size: 17px;
}
.dl-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--hair);
    border-radius: 14px;
    color: var(--ink);
    background: var(--panel);
}
.dl-card:hover {
    color: var(--ink);
    border-color: var(--brand);
}
.dl-card.neutral {
    cursor: default;
}
.dl-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 13px;
    font-size: 24px;
}
.dl-card > span:nth-child(2) {
    flex: 1;
}
.dl-card strong {
    display: block;
    font-size: 14px;
}
.dl-card small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px;
}
.dl-arrow {
    color: var(--brand);
    font-size: 20px;
}
.download-footnote {
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
    margin: 14px 0 0;
}
.chapter-end {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 46px min(7vw, 90px) 70px;
    flex-wrap: wrap;
}
/* article */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 790px) 195px;
    gap: 56px;
    max-width: 1240px;
    padding: 52px 40px 85px;
    margin: 0 auto;
    justify-content: center;
}
.article {
    min-width: 0;
}
.article-crumb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: 800;
    margin-bottom: 18px;
}
.article-crumb a {
    color: var(--brand);
    text-transform: uppercase;
}
.article h1 {
    font-size: clamp(34px, 3.6vw, 53px);
    max-width: 800px;
}
.article-deck {
    font-size: 17px;
    line-height: 1.72;
    color: var(--muted);
    margin: 20px 0 13px;
}
.meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 11px;
    font-size: 11px;
    color: var(--muted);
}
.meta-chip {
    background: var(--brand-soft);
    color: var(--brand-strong);
    border-radius: 20px;
    padding: 5px 12px;
    font-weight: 800;
}
.reading-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--hair);
}
.reading-actions button {
    cursor: pointer;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--hair);
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
}
.reading-actions button:hover {
    border-color: var(--brand);
    color: var(--brand);
}
.reading-actions button.is-active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    border-color: var(--brand);
}
.section {
    padding-top: 43px;
    margin-top: 5px;
}
.section h2 {
    margin: 11px 0 20px;
}
.article-prose {
    font-size: 15px;
    line-height: 1.95;
    color: var(--ink);
}
.article-prose p {
    margin: 0 0 19px;
}
.article-prose strong {
    font-weight: 800;
}
.article-prose a {
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--brand), transparent 55%);
    text-underline-offset: 3px;
}
.article-prose ul,
.article-prose ol {
    padding-left: 23px;
}
.article-prose li {
    padding-left: 3px;
    margin: 7px 0;
}
.article-prose blockquote {
    border-left: 3px solid var(--brand);
    background: var(--brand-soft);
    padding: 14px 18px;
    margin: 16px 0;
    color: var(--ink);
    border-radius: 0 11px 11px 0;
}
.article-prose blockquote p:last-child {
    margin-bottom: 0;
}
.article-prose code:not(pre code),
.lab-task code:not(pre code),
.quiz-answer code:not(pre code) {
    background: var(--brand-soft);
    color: var(--brand-strong);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}
.flow-diagram {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    background: var(--panel);
    border: 1px solid var(--hair);
    border-radius: 14px;
    padding: 20px;
    scrollbar-width: thin;
}
.flow-step {
    flex: 1;
    min-width: max-content;
    text-align: center;
    padding: 12px 13px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 11px;
    font-weight: 850;
    border-radius: 9px;
    white-space: nowrap;
}
.flow-arrow {
    font-size: 20px;
    flex-shrink: 0;
    color: var(--brand);
}
.flow-sub {
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--muted);
    margin: 11px 0 0;
}
.article-prose pre {
    background: var(--code);
    color: var(--code-text);
    border-radius: 13px;
    padding: 44px 20px 21px;
    position: relative;
    overflow-x: auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    font-size: 12px;
    line-height: 1.8;
    white-space: pre;
    scrollbar-color: #475c5b transparent;
    margin: 16px 0;
}
.article-prose pre code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
    color: inherit;
    font-size: inherit;
}
.code-wrap {
    position: relative;
}
.code-wrap pre {
    margin-top: 0;
}
.code-label {
    position: absolute;
    top: 11px;
    left: 18px;
    color: #97b5ae;
    font-family: ui-monospace, monospace;
    font-size: 10px;
    z-index: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.copy-code {
    position: absolute;
    right: 10px;
    top: 9px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 7px;
    color: #e8f8f2;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 9px;
    cursor: pointer;
}
.copy-code:hover {
    background: rgba(255, 255, 255, 0.18);
}
.aside-explainer {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
    margin: 13px 0 0;
}
.lab-task {
    display: flex;
    gap: 15px;
    border: 1px solid var(--hair);
    border-radius: 14px;
    background: var(--panel);
    padding: 19px 21px;
}
.lab-task-icon {
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 10px;
    width: 34px;
    height: 34px;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.lab-task > div {
    line-height: 1.9;
    font-size: 14px;
}
.lab-task p {
    margin: 0;
}
.practice-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-size: 12px;
    font-weight: 750;
    color: var(--muted);
    cursor: pointer;
}
.practice-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}
.warning-panel {
    display: flex;
    align-items: start;
    gap: 14px;
    padding: 21px;
    background: var(--warning);
    border: 1px solid var(--warning-border);
    border-radius: 14px;
}
.warning-panel > span {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #d99d55;
    color: #2e2314;
    border-radius: 50%;
    font-weight: 900;
    width: 27px;
    height: 27px;
    flex-shrink: 0;
    font-size: 14px;
}
.warning-panel div {
    font-size: 14px;
    line-height: 1.8;
}
.warning-panel p {
    margin: 0;
}
.quiz-reveal {
    background: var(--panel);
    border: 1px solid var(--hair);
    border-radius: 14px;
    overflow: hidden;
}
.quiz-reveal summary {
    padding: 20px 22px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 760;
    cursor: pointer;
}
.quiz-reveal summary::-webkit-details-marker {
    display: none;
}
.reveal-indicator {
    font-size: 11px;
    color: var(--brand);
    font-weight: 800;
    white-space: nowrap;
}
.quiz-reveal[open] summary {
    border-bottom: 1px solid var(--hair);
}
.quiz-answer {
    font-size: 13px;
    color: var(--ink);
    line-height: 1.85;
    padding: 0 22px 18px;
}
.quiz-answer p {
    margin: 17px 0 0;
}
.article-extra {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 55px 0 10px;
}
.article-extra > div {
    padding: 20px;
    border-radius: 13px;
    border: 1px solid var(--hair);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    align-items: start;
}
.extra-kicker {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--brand);
    font-weight: 850;
}
.article-extra h3 {
    margin-top: 10px;
    font-size: 17px;
}
.article-extra p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.75;
    flex: 1;
}
.article-extra a {
    font-size: 12px;
    font-weight: 800;
    margin-top: 10px;
}
.article-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}
.pager-link {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 19px;
    border: 1px solid var(--hair);
    border-radius: 13px;
    background: var(--panel);
    color: var(--ink);
    min-height: 110px;
}
.pager-link:hover {
    border-color: var(--brand);
    color: var(--ink);
}
.pager-link small {
    font-size: 9px;
    color: var(--brand);
    letter-spacing: 1.4px;
    font-weight: 800;
}
.pager-link strong {
    font-size: 13px;
    line-height: 1.45;
}
.pager-link.next {
    grid-column: 2;
}
.article-aside {
    min-width: 0;
}
.toc-stick {
    position: sticky;
    top: calc(var(--topbar-height) + 36px);
    border-left: 1px solid var(--hair);
    padding: 0 0 0 19px;
}
.toc-title {
    font-size: 10px;
    color: var(--muted);
    font-weight: 850;
    letter-spacing: 1.5px;
    margin: 0 0 12px;
}
.toc-stick > a {
    display: block;
    font-size: 12px;
    color: var(--muted);
    padding: 6px 0;
}
.toc-stick > a:hover {
    color: var(--brand);
}
.toc-divider {
    height: 1px;
    background: var(--hair);
    margin: 15px 0;
}
.toc-stick p {
    font-size: 11px;
    line-height: 1.7;
    color: var(--muted);
}
.toc-stick > a.toc-chapter {
    color: var(--brand);
    font-weight: 800;
    margin-top: 13px;
}
/* reference */
.ref-content {
    max-width: 950px;
    margin: auto;
    padding: 52px 40px 85px;
}
.ref-hero {
    padding-bottom: 25px;
    border-bottom: 1px solid var(--hair);
}
.ref-hero h1 {
    margin-bottom: 15px;
}
.ref-hero p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
}
.ref-prose {
    margin-top: 35px;
}
.ref-prose h2 {
    margin: 38px 0 17px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hair);
}
.ref-prose h3 {
    font-size: 18px;
    margin: 25px 0 8px;
}
.ref-prose table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    font-size: 12px;
}
.ref-prose th,
.ref-prose td {
    border-bottom: 1px solid var(--hair);
    padding: 11px 12px;
    text-align: left;
    vertical-align: top;
}
.ref-prose th {
    background: var(--brand-soft);
}
.other-references {
    margin-top: 55px;
    border-top: 1px solid var(--hair);
    padding-top: 25px;
}
.other-references h2 {
    font-size: 23px;
    margin-bottom: 15px;
}
.other-references > div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.quickref-link {
    padding: 8px 12px;
    border: 1px solid var(--hair);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    background: var(--panel);
}
/* search overlay */
.search-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 20, 23, 0.57);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10vh 15px 35px;
}
.search-panel {
    width: min(660px, 100%);
    background: var(--panel);
    color: var(--ink);
    border: 1px solid var(--hair);
    box-shadow: 0 25px 90px rgba(0, 0, 0, 0.2);
    border-radius: 18px;
    overflow: hidden;
}
.search-input-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--hair);
}
.search-input-row > span {
    font-size: 25px;
    color: var(--brand);
}
.search-input-row input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: var(--ink);
}
.search-input-row input::placeholder {
    color: var(--muted);
    font-size: 14px;
}
.search-input-row button {
    border: 1px solid var(--hair);
    border-radius: 7px;
    padding: 5px 8px;
    background: var(--page);
    color: var(--muted);
    font-size: 10px;
    cursor: pointer;
}
.search-results {
    max-height: min(65vh, 560px);
    overflow-y: auto;
    padding: 8px;
}
.search-result {
    display: block;
    padding: 12px 14px;
    border-radius: 11px;
    color: var(--ink);
    border: 1px solid transparent;
}
.search-result:hover,
.search-result.selected {
    background: var(--brand-soft);
    color: var(--ink);
    border-color: var(--hair);
}
.search-result small {
    display: block;
    font-size: 10px;
    color: var(--brand);
    font-weight: 800;
    margin-bottom: 3px;
}
.search-result strong {
    font-size: 13px;
}
.search-result p {
    font-size: 11px;
    color: var(--muted);
    margin: 2px 0 0;
    line-height: 1.55;
}
.search-empty {
    padding: 18px 15px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}
.search-help {
    padding: 10px 15px;
    border-top: 1px solid var(--hair);
    color: var(--muted);
    font-size: 10px;
}
@media (max-width: 1400px) {
    .article-layout {
        gap: 30px;
        grid-template-columns: minmax(0, 780px) 180px;
    }
    .home-page {
        padding-left: 30px;
        padding-right: 30px;
    }
}
@media (max-width: 1150px) {
    .article-layout {
        grid-template-columns: minmax(0, 840px);
        max-width: 900px;
    }
    .article-aside {
        display: none;
    }
    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .how-to {
        grid-template-columns: 1fr;
    }
    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hero-inner {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 10px;
    }
    .hero-copy h1 {
        font-size: 48px;
    }
    .hero-graphic-inner {
        padding: 15px;
    }
    .hg-line i {
        display: none;
    }
}
@media (max-width: 850px) {
    :root {
        --sidebar-width: 0px;
    }
    .sidebar {
        width: min(340px, 87vw);
        transform: translateX(-110%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow);
    }
    body.menu-open .sidebar {
        transform: translateX(0);
    }
    .menu-scrim {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(0, 0, 0, 0.4);
    }
    body.menu-open .menu-scrim {
        display: block;
    }
    .mobile-close {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: var(--panel);
        border-radius: 9px;
        color: var(--ink);
        width: 34px;
        height: 34px;
        cursor: pointer;
    }
    .main-pane {
        margin-left: 0;
        width: 100%;
    }
    .menu-trigger {
        display: inline-flex;
    }
    .topbar {
        padding: 0 20px;
    }
    .home-page {
        padding: 22px 20px 55px;
    }
    .chapter-header {
        padding: 42px 26px;
    }
    .hub-section {
        padding: 40px 26px 0;
    }
    .chapter-end {
        padding: 38px 26px 60px;
    }
    .ref-content {
        padding: 36px 25px 60px;
    }
    .global-footer {
        padding: 25px;
    }
    .hero-copy h1 {
        font-size: 46px;
    }
}
@media (max-width: 630px) {
    body {
        font-size: 14px;
    }
    .topbar {
        height: 60px;
    }
    .offline-pill {
        display: none;
    }
    .topbar-path span:last-child {
        max-width: 145px;
        font-size: 11px;
    }
    .hero {
        padding: 22px;
        border-radius: 18px;
    }
    .hero-topline {
        font-size: 9px;
        letter-spacing: 1px;
    }
    .hero-edition {
        display: none;
    }
    .hero-inner {
        display: block;
        margin-top: 30px;
    }
    .hero-copy h1 {
        font-size: clamp(41px, 10vw, 55px);
    }
    .hero-copy p {
        font-size: 13px;
    }
    .hero-graphic {
        display: none;
    }
    .home-stats {
        grid-template-columns: repeat(2, 1fr);
        margin-bottom: 40px;
    }
    .home-stats > div:nth-child(2) {
        border-right: 0;
    }
    .home-stats > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--hair);
    }
    .home-stats > div {
        padding: 17px 10px;
    }
    .home-stats strong {
        font-size: 21px;
    }
    .how-to-items {
        grid-template-columns: 1fr;
    }
    .how-to-items > div {
        display: grid;
        grid-template-columns: 32px 1fr;
        column-gap: 14px;
        padding: 14px;
    }
    .how-to-items b {
        grid-row: span 2;
    }
    .how-to-items strong {
        font-size: 13px;
    }
    .how-to-items p {
        margin: 3px 0 0;
    }
    .module-grid,
    .lesson-grid,
    .tool-grid {
        grid-template-columns: 1fr;
    }
    .module-section {
        margin-bottom: 40px;
    }
    .module-card {
        min-height: 150px;
    }
    .lesson-card {
        min-height: 165px;
        padding: 20px;
    }
    .chapter-header h1 {
        font-size: 39px;
    }
    .chapter-header > p {
        font-size: 15px;
    }
    .hub-heading {
        display: block;
    }
    .hub-progress {
        display: block;
        margin-top: 13px;
    }
    .article-layout {
        padding: 35px 22px 65px;
    }
    .article h1 {
        font-size: 37px;
    }
    .article-deck {
        font-size: 15px;
    }
    .article-prose {
        font-size: 14px;
        line-height: 1.85;
    }
    .reading-actions {
        gap: 6px;
    }
    .reading-actions button {
        font-size: 10px;
        padding: 8px;
    }
    .flow-diagram {
        padding: 13px;
    }
    .flow-step {
        padding: 10px;
        font-size: 10px;
    }
    .section {
        padding-top: 34px;
    }
    .section h2 {
        font-size: 24px;
    }
    .article-extra {
        grid-template-columns: 1fr;
    }
    .article-pager {
        grid-template-columns: 1fr;
    }
    .pager-link.next {
        grid-column: 1;
    }
    .quiz-reveal summary {
        display: block;
    }
    .reveal-indicator {
        display: block;
        margin-top: 11px;
    }
    .global-footer {
        display: block;
        font-size: 10px;
    }
    .global-footer span {
        display: block;
    }
    .global-footer span:last-child {
        text-align: left;
        margin-top: 7px;
    }
    .tool-card {
        padding: 13px;
    }
    .ref-prose {
        font-size: 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
@media print {
    .sidebar,
    .topbar,
    .global-footer,
    .reading-actions,
    .article-aside,
    .article-pager,
    .search-modal,
    .menu-scrim {
        display: none !important;
    }
    .main-pane {
        margin: 0;
        width: 100%;
    }
    .article-layout {
        display: block;
        padding: 0;
        max-width: 100%;
    }
    .section {
        break-inside: avoid-page;
    }
    .article-prose pre {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }
    .home-page {
        padding: 0;
    }
    .hero {
        background: #f7f7f3 !important;
        color: #111 !important;
    }
    .hero-copy h1 em {
        color: #167d73 !important;
    }
}
/* Keep the title panel contrast consistent in dark mode. */
.hero {
    background: #193531;
    color: #f5faf7;
}
.hero-topline,
.hero-copy p {
    color: #d6e8e1;
}
.saved-launch {
    width: 100%;
    text-align: left;
    margin-top: 8px;
    padding: 9px 10px;
    border: 1px solid var(--hair);
    border-radius: 9px;
    background: var(--panel);
    color: var(--brand-strong);
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}
.saved-launch:hover {
    border-color: var(--brand);
}
