﻿:root {
    color-scheme: light;
    --bg: #f8fcff;
    --paper: rgba(255, 255, 255, 0.86);
    --paper-strong: rgba(255, 255, 255, 0.94);
    --glass: rgba(255, 255, 255, 0.78);
    --glass-soft: rgba(255, 255, 255, 0.62);
    --ink: #172033;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.28);
    --line-strong: rgba(96, 165, 250, 0.34);
    --cyan: #67e8f9;
    --blue: #60a5fa;
    --blue-deep: #2563eb;
    --pink: #f9a8d4;
    --lavender: #c4b5fd;
    --mint: #86efac;
    --cream: #fff7ed;
    --code: #141a2a;
    --radius-sm: 16px;
    --radius: 24px;
    --radius-lg: 34px;
    --shadow-soft: 0 22px 70px rgba(96, 165, 250, 0.16);
    --shadow-card: 0 18px 46px rgba(51, 65, 85, 0.10);
    --shadow-float: 0 34px 120px rgba(99, 102, 241, 0.22);
    --gradient-cta: linear-gradient(135deg, #38bdf8 0%, #818cf8 52%, #f9a8d4 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,255,0.92), transparent 38rem),
        linear-gradient(180deg, #fbfdff 0%, #f8fcff 42%, #eef9ff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    letter-spacing: 0;
    overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { color: inherit; }
::selection { background: rgba(249, 168, 212, 0.35); }

.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.star-field {
    position: absolute;
    inset: 0;
    opacity: 0.48;
    background-image:
        radial-gradient(circle, rgba(37, 99, 235, 0.34) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(236, 72, 153, 0.18) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(14, 165, 233, 0.18) 0 1px, transparent 1.2px);
    background-size: 92px 92px, 137px 137px, 211px 211px;
    background-position: 8px 18px, 42px 70px, 110px 24px;
    animation: starDrift 28s ease-in-out infinite alternate;
}

.orb {
    position: absolute;
    width: clamp(18rem, 34vw, 34rem);
    aspect-ratio: 1;
    border-radius: 999px;
    filter: blur(22px);
    opacity: 0.54;
    mix-blend-mode: multiply;
    animation: floatOrb 12s ease-in-out infinite alternate;
}

.orb-cyan {
    top: 8%;
    right: -8%;
    background: radial-gradient(circle at 34% 32%, rgba(103, 232, 249, 0.86), rgba(96, 165, 250, 0.24) 58%, transparent 72%);
}

.orb-pink {
    left: -10%;
    top: 34%;
    animation-delay: -3s;
    background: radial-gradient(circle at 54% 44%, rgba(249, 168, 212, 0.78), rgba(196, 181, 253, 0.22) 60%, transparent 74%);
}

.orb-lavender {
    right: 14%;
    bottom: -18%;
    animation-delay: -6s;
    background: radial-gradient(circle at 45% 40%, rgba(196, 181, 253, 0.70), rgba(134, 239, 172, 0.22) 58%, transparent 74%);
}

.progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    height: 3px;
    width: 0;
    background: var(--gradient-cta);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.36);
}

.topbar {
    position: sticky;
    top: 14px;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1180px, calc(100% - 28px));
    min-height: 68px;
    margin: 14px auto 0;
    padding: 0.72rem 0.85rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    box-shadow: 0 16px 54px rgba(96, 165, 250, 0.14);
    backdrop-filter: blur(22px) saturate(170%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.78rem;
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 34px rgba(96, 165, 250, 0.24), inset 0 0 0 3px rgba(255, 255, 255, 0.38);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: 1rem; line-height: 1.1; }
.brand small { margin-top: 0.1rem; color: var(--muted); font-size: 0.78rem; }

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.46rem;
    flex-wrap: wrap;
}

.top-actions a,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    padding: 0.62rem 1rem;
    background: rgba(255, 255, 255, 0.74);
    color: var(--ink);
    text-decoration: none;
    font-weight: 780;
    font-size: 0.92rem;
    cursor: pointer;
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.top-actions a:hover,
.button:hover,
.preview-thumb:hover,
.quick-link:hover,
.journey-card:hover,
.copy-button:hover {
    transform: translateY(-3px);
}

.top-actions a:focus-visible,
.button:focus-visible,
.preview-thumb:focus-visible,
.quick-link:focus-visible,
.copy-button:focus-visible,
.back-top:focus-visible,
.lightbox-close:focus-visible,
.search-input:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.45);
    outline-offset: 3px;
}

.top-actions .nav-primary,
.button.primary {
    color: #fff;
    border-color: transparent;
    background: var(--gradient-cta);
    box-shadow: 0 16px 42px rgba(96, 165, 250, 0.28);
}

.button.secondary,
.button.ghost {
    background: rgba(255,255,255,0.78);
    border-color: rgba(96, 165, 250, 0.22);
}

.button.secondary { color: #1d4ed8; }
.button.ghost { color: var(--ink-soft); }

main {
    position: relative;
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    min-height: calc(100vh - 94px);
    padding: clamp(3.2rem, 7vw, 7rem) 0 2.6rem;
}

.hero-copy,
.hero-preview { position: relative; z-index: 1; }

.hero-copy { animation: heroRise 620ms ease-out both; }
.hero-preview { animation: heroRise 760ms ease-out 90ms both; }

.status-line {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.48rem 0.78rem;
    color: #0f766e;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 999px;
    box-shadow: 0 12px 34px rgba(45, 212, 191, 0.12);
    font-size: 0.84rem;
    font-weight: 820;
    backdrop-filter: blur(18px);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #14b8a6;
    box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.13);
    animation: pulse 1.8s ease-in-out infinite;
}

.eyebrow {
    margin: 0 0 0.85rem;
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    max-width: 12ch;
    font-size: clamp(3rem, 6.4vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.hero h1 span { display: block; }

.hero-lede {
    max-width: 47rem;
    margin: 1.35rem 0 0;
    color: #475569;
    font-size: clamp(1.03rem, 1.5vw, 1.22rem);
    overflow-wrap: anywhere;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.82rem;
    margin: 1.85rem 0 0;
}

.hero-preview {
    display: grid;
    gap: 0.95rem;
    transform-style: preserve-3d;
}

.preview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.86);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.70);
    box-shadow: var(--shadow-float);
    backdrop-filter: blur(24px) saturate(170%);
    transform: perspective(1100px) rotateX(2deg) rotateY(-4deg);
    animation: floatPanel 7s ease-in-out infinite alternate;
    transition: transform 260ms ease, box-shadow 260ms ease;
}

.preview-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.55), transparent 34%, rgba(103,232,249,0.16));
}

.preview-card:hover {
    transform: perspective(1100px) rotateX(0deg) rotateY(0deg) translateY(-5px);
}

.preview-toolbar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    height: 44px;
    padding: 0 1rem;
    color: var(--muted);
    background: rgba(255,255,255,0.78);
    border-bottom: 1px solid rgba(148,163,184,0.20);
    font-size: 0.78rem;
}

.preview-toolbar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #fb7185;
}
.preview-toolbar span:nth-child(2) { background: #fbbf24; }
.preview-toolbar span:nth-child(3) { background: #34d399; }
.preview-toolbar strong { margin-left: 0.35rem; color: var(--ink-soft); font-weight: 820; }

.preview-card > img {
    width: 100%;
    aspect-ratio: 16 / 10.2;
    object-fit: cover;
    object-position: top;
    background: #fff;
    transition: opacity 220ms ease, transform 360ms ease;
}

.preview-card.is-swapping > img { opacity: 0.36; transform: translateY(8px) scale(1.012); }

.preview-caption {
    position: absolute;
    z-index: 3;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255,255,255,0.72);
    border-radius: 20px;
    color: var(--ink);
    background: rgba(255,255,255,0.80);
    box-shadow: 0 16px 44px rgba(96,165,250,0.14);
    backdrop-filter: blur(18px) saturate(160%);
}
.preview-caption strong { font-size: 0.98rem; }
.preview-caption span { color: #475569; font-size: 0.84rem; }

.preview-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.preview-thumb {
    display: grid;
    gap: 0.45rem;
    padding: 0.48rem;
    border: 1px solid rgba(255,255,255,0.88);
    border-radius: 22px;
    background: rgba(255,255,255,0.72);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    backdrop-filter: blur(16px);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.preview-thumb.active { border-color: rgba(96,165,250,0.68); box-shadow: 0 20px 54px rgba(96,165,250,0.20); }
.preview-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 16px; }
.preview-thumb span { color: var(--ink-soft); font-size: 0.78rem; font-weight: 860; text-align: center; }

.journey,
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.95rem;
}
.journey { margin: 0 0 1rem; }
.quick-grid { margin: 0 0 1.25rem; }

.journey-card,
.quick-link {
    position: relative;
    overflow: hidden;
    min-height: 152px;
    border: 1px solid rgba(255,255,255,0.86);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.74);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px) saturate(160%);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.journey-card { padding: 1.15rem; }
.quick-link {
    display: block;
    padding: 1rem 1rem 1rem 4rem;
    text-align: left;
    text-decoration: none;
    color: var(--ink);
    cursor: pointer;
}
.journey-card:hover,
.quick-link:hover { border-color: rgba(249,168,212,0.62); box-shadow: 0 28px 80px rgba(249,168,212,0.16); }

.journey-card::after,
.quick-link::after {
    content: "";
    position: absolute;
    inset: auto 1rem 1rem auto;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(103,232,249,0.34), transparent 70%);
}

.journey-card span,
.quick-link i {
    display: inline-grid;
    place-items: center;
    min-width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(103,232,249,0.56), rgba(249,168,212,0.42));
    font-weight: 920;
    font-style: normal;
    font-size: 0.78rem;
}
.quick-link i { position: absolute; top: 1rem; left: 1rem; }
.journey-card strong,
.quick-link strong { display: block; margin-top: 0.6rem; font-size: 1.05rem; line-height: 1.35; }
.journey-card p { margin: 0.45rem 0 0; color: #475569; font-size: 0.92rem; }
.quick-link span { display: block; color: #64748b; font-size: 0.82rem; font-weight: 780; }

.reader-shell {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 1rem 0 5rem;
}

.sidebar { position: sticky; top: 98px; max-height: calc(100vh - 112px); }
.sidebar-panel {
    max-height: inherit;
    overflow: auto;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.86);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.80);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px) saturate(170%);
}

.search-label { display: block; margin-bottom: 0.45rem; color: #64748b; font-size: 0.78rem; font-weight: 860; }
.search-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(96,165,250,0.28);
    border-radius: 999px;
    padding: 0.75rem 0.95rem;
    color: var(--ink);
    background: rgba(255,255,255,0.88);
    outline: none;
}
.search-input:focus { border-color: rgba(96,165,250,0.72); box-shadow: 0 0 0 5px rgba(96,165,250,0.14); }
.search-state { min-height: 1.4rem; margin: 0.45rem 0 0.7rem; color: #64748b; font-size: 0.78rem; }

.toc { display: grid; gap: 0.18rem; }
.toc a {
    display: block;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 0.56rem 0.66rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.35;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.toc a:hover,
.toc a.active { color: #1d4ed8; background: rgba(239,246,255,0.86); border-color: rgba(96,165,250,0.30); }
.toc a:hover { transform: translateX(2px); }
.toc .level-1 { margin-top: 0.35rem; color: var(--ink); font-weight: 900; }
.toc .level-2 { padding-left: 1.05rem; font-size: 0.84rem; }

.doc-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.86);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.74);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px) saturate(170%);
}

.doc-header {
    display: grid;
    gap: 0.24rem;
    padding: clamp(1.2rem, 2.4vw, 2rem);
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 20%, rgba(249,168,212,0.34), transparent 34%),
        radial-gradient(circle at 85% 5%, rgba(103,232,249,0.34), transparent 32%),
        rgba(255,255,255,0.72);
    border-bottom: 1px solid rgba(148,163,184,0.18);
}
.doc-header span { color: #2563eb; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.doc-header strong { font-size: clamp(1.35rem, 2.4vw, 2.2rem); line-height: 1.15; }
.doc-header p { max-width: 44rem; margin: 0.3rem 0 0; color: #475569; }

.loading { display: grid; place-items: center; min-height: 320px; color: #64748b; }
.loading span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(96,165,250,0.20); border-top-color: var(--blue-deep); animation: spin 800ms linear infinite; }

.doc-content {
    display: grid;
    gap: 1.1rem;
    padding: clamp(1rem, 2.6vw, 2rem);
}
.doc-content:empty { display: none; }

.chapter-block {
    position: relative;
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 2vw, 1.35rem);
    border: 1px solid rgba(255,255,255,0.86);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.76);
    box-shadow: var(--shadow-card);
    scroll-margin-top: 104px;
}

.chapter-kicker,
.topic-kicker {
    width: fit-content;
    border-radius: 999px;
    color: #2563eb;
    background: rgba(239,246,255,0.9);
    border: 1px solid rgba(96,165,250,0.24);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.chapter-kicker { padding: 0.32rem 0.62rem; }
.topic-kicker { padding: 0.24rem 0.52rem; }

.topic-block {
    display: grid;
    gap: 0.78rem;
    padding: clamp(0.92rem, 1.8vw, 1.18rem);
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 20px;
    background: rgba(255,255,255,0.72);
}
.topic-block--loose { margin-top: 0; }

.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4 { margin: 0; color: var(--ink); letter-spacing: 0; scroll-margin-top: 110px; }
.doc-content h1 { font-size: clamp(1.62rem, 3vw, 2.45rem); line-height: 1.16; }
.doc-content h2 { font-size: clamp(1.24rem, 2vw, 1.7rem); line-height: 1.22; }
.doc-content h3 { margin-top: 0.55rem; font-size: 1.08rem; }
.doc-content h4 { margin-top: 0.35rem; color: #334155; font-size: 0.98rem; }

.doc-content p,
.doc-content li { color: #475569; font-size: 1rem; overflow-wrap: anywhere; }
.doc-content p { margin: 0; }
.doc-content ul,
.doc-content ol { margin: 0.2rem 0 0.4rem; padding-left: 1.35rem; }
.doc-content li + li { margin-top: 0.32rem; }
.doc-content a { color: #1d4ed8; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc-content strong { color: var(--ink); }
.doc-content code:not(.block-code) {
    padding: 0.14rem 0.36rem;
    border: 1px solid rgba(96,165,250,0.24);
    border-radius: 999px;
    background: rgba(239,246,255,0.9);
    color: #1e40af;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
}

.code-panel {
    margin: 0.2rem 0 0.45rem;
    overflow: hidden;
    background: var(--code);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    box-shadow: 0 18px 46px rgba(20,26,42,0.18);
}
.code-panel figcaption { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 42px; padding: 0.55rem 0.75rem; background: rgba(255,255,255,0.06); color: #cbd5e1; font-size: 0.82rem; font-weight: 760; }
.copy-button { border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; padding: 0.3rem 0.66rem; background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; transition: transform 180ms ease, background 180ms ease, border-color 180ms ease; }
.code-panel pre { margin: 0; overflow-x: auto; padding: 1rem; }
.code-panel code { color: #edf2ff; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 0.92rem; line-height: 1.65; white-space: pre; }

.shot {
    margin: 0.2rem 0 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.86);
    border-radius: 20px;
    background: rgba(255,255,255,0.82);
    box-shadow: var(--shadow-card);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.shot:hover { transform: translateY(-3px); border-color: rgba(96,165,250,0.46); box-shadow: 0 26px 74px rgba(96,165,250,0.18); }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.shot img { width: 100%; max-height: 720px; object-fit: contain; object-position: top; background: #fff; }
.shot figcaption { padding: 0.62rem 0.9rem; color: #64748b; border-top: 1px solid rgba(148,163,184,0.18); font-size: 0.82rem; }

.doc-empty { padding: 2rem; border: 1px dashed rgba(96,165,250,0.32); border-radius: var(--radius); color: #64748b; background: rgba(255,255,255,0.8); }
.back-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: none; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,0.72); border-radius: 50%; background: var(--gradient-cta); color: #fff; cursor: pointer; box-shadow: 0 16px 44px rgba(96,165,250,0.28); }
.back-top.show { display: block; }
.toast { position: fixed; left: 50%; bottom: 1.25rem; z-index: 120; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; padding: 0.68rem 0.95rem; border-radius: 999px; background: rgba(23,32,51,0.88); color: #fff; box-shadow: var(--shadow-card); transition: opacity 180ms ease, transform 180ms ease; backdrop-filter: blur(12px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.lightbox { position: fixed; inset: 0; z-index: 110; display: none; place-items: center; padding: 4rem 1rem 1rem; background: rgba(15,23,42,0.78); backdrop-filter: blur(10px); }
.lightbox.open { display: grid; }
.lightbox img { max-height: calc(100vh - 6rem); width: auto; border-radius: var(--radius); background: #fff; }
.lightbox-close { position: fixed; top: 1rem; right: 1rem; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,0.5); border-radius: 50%; background: rgba(255,255,255,0.16); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.noscript { position: fixed; inset: auto 1rem 1rem; z-index: 200; padding: 1rem; border-radius: var(--radius); background: #fff2f0; border: 1px solid #ffccc7; color: #c43c35; }
.is-hidden { display: none !important; }
mark { border-radius: 6px; background: rgba(253,224,71,0.58); color: inherit; padding: 0 0.12rem; }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 560ms ease, transform 560ms ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.doc-content [data-reveal],
.doc-content .chapter-block,
.doc-content .topic-block {
    opacity: 1;
    transform: none;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 5px rgba(20,184,166,0.12); } 50% { box-shadow: 0 0 0 9px rgba(20,184,166,0.04); } }
@keyframes floatOrb { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(24px,-32px,0) scale(1.06); } }
@keyframes floatPanel { from { transform: perspective(1100px) rotateX(2deg) rotateY(-4deg) translateY(0); } to { transform: perspective(1100px) rotateX(1deg) rotateY(-2deg) translateY(-14px); } }
@keyframes starDrift { from { transform: translate3d(0,0,0); } to { transform: translate3d(28px,-22px,0); } }
@keyframes heroRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
}

@media (max-width: 1180px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero h1 { max-width: 14ch; }
    .journey, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reader-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; max-height: none; }
    .sidebar-panel { max-height: 360px; }
}

@media (max-width: 700px) {
    .orb { opacity: 0.38; }
    .topbar { position: sticky; top: 8px; align-items: flex-start; flex-direction: column; border-radius: 24px; padding: 0.75rem; }
    .top-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.38rem; }
    .top-actions a { min-width: 0; padding: 0.55rem 0.2rem; text-align: center; font-size: 0.76rem; white-space: nowrap; }
    .top-actions .nav-primary { grid-column: 1 / -1; }
    main { width: min(100% - 20px, 1380px); }
    .hero { padding-top: 1.6rem; gap: 1.5rem; }
    .status-line { font-size: 0.78rem; }
    .hero h1 { max-width: none; font-size: clamp(2rem, 9.6vw, 2.7rem); line-height: 1.04; word-break: keep-all; }
    .hero-lede { font-size: 0.98rem; }
    .button { width: 100%; }
    .journey, .quick-grid, .preview-strip { grid-template-columns: 1fr; }
    .preview-card { transform: none; animation: none; border-radius: 24px; }
    .preview-caption { position: static; border-radius: 0; }
    .preview-thumb { grid-template-columns: 86px 1fr; align-items: center; }
    .preview-thumb span { text-align: left; }
    .journey-card, .quick-link { min-height: auto; }
    .quick-link { padding: 1rem 1rem 1rem 3.9rem; }
    .doc-content { padding: 0.9rem; }
    .chapter-block { padding: 0.92rem; border-radius: 22px; }
    .topic-block { padding: 0.86rem; border-radius: 18px; }
    .doc-content h1 { font-size: 1.42rem; }
    .doc-content h2 { font-size: 1.18rem; }
    .code-panel code { font-size: 0.82rem; white-space: pre-wrap; overflow-wrap: anywhere; }
    .code-panel pre { overflow-x: hidden; }
}


