/* ============== SKYBOUND SHARED STYLES ============== */
:root {
    --ink: #0a0e14;
    --ink-2: #131822;
    --ink-3: #1c2230;
    --bone: #f4f1ea;
    --bone-2: #e8e3d6;
    --paper: #faf7f0;
    --amber: #e8a838;
    --amber-deep: #c47f1d;
    --amber-glow: rgba(232, 168, 56, 0.18);
    --crimson: #c8331f;
    --jade: #4a8b6f;
    --steel: #5d6878;
    --steel-2: #8a94a3;
    --line: rgba(244, 241, 234, 0.12);
    --line-2: rgba(244, 241, 234, 0.08);
    --serif: 'Cormorant Garamond', 'Noto Serif SC', serif;
    --serif-cn: 'Noto Serif SC', serif;
    --display: 'Space Grotesk', sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--ink);
    color: var(--bone);
    font-family: var(--serif-cn);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============== NAV ============== */
nav.skybound-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 48px;
    background: rgba(10, 14, 20, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: var(--display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.18em;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--bone);
    text-decoration: none;
}

.nav-brand-mark {
    width: 26px; height: 26px;
}
.nav-brand-mark svg {
    width: 100%; height: 100%;
    stroke: var(--amber);
    fill: none;
    stroke-width: 1.5;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-links a {
    color: var(--bone);
    text-decoration: none;
    font-family: var(--display);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 400;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    color: var(--amber);
}

.nav-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--steel-2);
    letter-spacing: 0.1em;
}

/* ============== BUTTONS ============== */
.btn {
    font-family: var(--display);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 16px 32px;
    text-decoration: none;
    border: 1px solid var(--line);
    color: var(--bone);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(244, 241, 234, 0.02);
    cursor: pointer;
}
.btn:hover {
    background: var(--amber);
    color: var(--ink);
    border-color: var(--amber);
    transform: translateY(-2px);
}
.btn.primary {
    background: var(--amber);
    color: var(--ink);
    border-color: var(--amber);
    font-weight: 600;
}
.btn.primary:hover {
    background: transparent;
    color: var(--amber);
}
.btn.ghost {
    border-color: var(--line);
    background: transparent;
}

/* ============== PAGE HEADER (subpage hero) ============== */
.page-hero {
    padding: 160px 48px 80px;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(232, 168, 56, 0.08), transparent 50%),
        linear-gradient(180deg, #0a0e14 0%, #0d1219 100%);
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(244, 241, 234, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 241, 234, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}
.page-hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    position: relative; z-index: 2;
}
.crumbs {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--steel-2);
    text-transform: uppercase;
    margin-bottom: 32px;
    display: flex;
    gap: 14px;
    align-items: center;
}
.crumbs a {
    color: var(--steel-2);
    text-decoration: none;
    transition: color 0.2s;
}
.crumbs a:hover { color: var(--amber); }
.crumbs .sep { color: var(--amber); }
.crumbs .here { color: var(--amber); }

.page-eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--amber);
    letter-spacing: 0.3em;
    margin-bottom: 24px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 16px;
}
.page-eyebrow::before {
    content: '';
    width: 60px; height: 1px;
    background: var(--amber);
}
.page-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(48px, 8vw, 110px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}
.page-title .italic {
    font-style: italic;
    color: var(--amber);
    font-weight: 400;
}
.page-title-cn {
    font-family: var(--serif-cn);
    font-weight: 600;
    font-size: clamp(20px, 2.4vw, 32px);
    color: var(--bone-2);
    margin-bottom: 24px;
}
.page-lede {
    font-family: var(--serif);
    font-style: italic;
    font-size: 22px;
    color: var(--bone-2);
    max-width: 860px;
    line-height: 1.55;
    margin-bottom: 12px;
}
.page-lede-cn {
    font-family: var(--serif-cn);
    font-size: 16px;
    color: var(--steel-2);
    max-width: 860px;
    line-height: 1.85;
    margin-bottom: 36px;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
.hero-pill {
    padding: 8px 16px;
    border: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 11px;
    color: var(--steel-2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.hero-pill strong { color: var(--amber); font-weight: 500; }

/* ============== ARTICLE / DOC LAYOUT ============== */
.doc-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 48px 120px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 80px;
    align-items: start;
}

.toc {
    position: sticky;
    top: 100px;
    border-left: 1px solid var(--line);
    padding-left: 20px;
}
.toc-title {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    color: var(--amber);
    margin-bottom: 16px;
    text-transform: uppercase;
}
.toc ul { list-style: none; }
.toc li { padding: 6px 0; }
.toc a {
    color: var(--steel-2);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    transition: color 0.2s, padding-left 0.2s;
    display: block;
}
.toc a:hover { color: var(--amber); padding-left: 4px; }
.toc a.active { color: var(--amber); }

.article {
    max-width: 860px;
}
.article h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 44px;
    line-height: 1.1;
    margin-top: 64px;
    margin-bottom: 8px;
    scroll-margin-top: 110px;
}
.article h2:first-child { margin-top: 0; }
.article h2 .italic {
    font-style: italic;
    color: var(--amber);
}
.article h2 .num {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--amber);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 12px;
    font-weight: 400;
}
.article h3 {
    font-family: var(--serif-cn);
    font-weight: 600;
    font-size: 22px;
    line-height: 1.3;
    color: var(--bone);
    margin-top: 40px;
    margin-bottom: 16px;
    scroll-margin-top: 110px;
}
.article p {
    font-family: var(--serif-cn);
    font-size: 16px;
    line-height: 1.85;
    color: var(--bone-2);
    margin-bottom: 18px;
}
.article p strong, .article li strong {
    color: var(--amber);
    font-weight: 500;
}
.article ul, .article ol {
    margin: 0 0 24px 0;
    padding-left: 24px;
}
.article ul li, .article ol li {
    font-family: var(--serif-cn);
    font-size: 15px;
    line-height: 1.85;
    color: var(--bone-2);
    margin-bottom: 8px;
}

.callout {
    margin: 28px 0;
    padding: 20px 24px;
    border-left: 3px solid var(--amber);
    background: rgba(232, 168, 56, 0.05);
    font-family: var(--serif-cn);
    font-size: 14px;
    line-height: 1.75;
    color: var(--bone-2);
}
.callout-title {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--amber);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}
.callout.warn { border-left-color: var(--crimson); background: rgba(200, 51, 31, 0.06); }
.callout.warn .callout-title { color: var(--crimson); }
.callout.tip { border-left-color: var(--jade); background: rgba(74, 139, 111, 0.05); }
.callout.tip .callout-title { color: var(--jade); }

.pull-quote {
    font-family: var(--serif);
    font-style: italic;
    font-size: 26px;
    line-height: 1.4;
    color: var(--bone);
    padding: 24px 0 24px 28px;
    margin: 32px 0;
    border-left: 3px solid var(--amber);
}

table.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}
table.spec-table th, table.spec-table td {
    padding: 12px 16px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
table.spec-table th {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--amber);
    text-transform: uppercase;
    background: rgba(232, 168, 56, 0.04);
    font-weight: 500;
}
table.spec-table td {
    font-family: var(--serif-cn);
    color: var(--bone-2);
    line-height: 1.65;
}
table.spec-table tr:hover td { background: rgba(232, 168, 56, 0.03); }

.kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    margin: 24px 0;
}
.kv-cell {
    padding: 20px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.kv-cell .k {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--steel-2);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.kv-cell .v {
    font-family: var(--serif);
    font-style: italic;
    font-size: 28px;
    color: var(--amber);
    line-height: 1;
}
.kv-cell .v small {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--steel-2);
    font-style: normal;
    margin-left: 6px;
    letter-spacing: 0.1em;
}

/* Self-quiz block */
.quiz-block {
    margin: 48px 0;
    padding: 32px;
    border: 1px solid var(--line);
    background: rgba(244, 241, 234, 0.02);
}
.quiz-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: 24px;
    color: var(--amber);
    margin-bottom: 16px;
}
.quiz-block ol { padding-left: 24px; }
.quiz-block li {
    padding: 8px 0;
    font-size: 15px;
    color: var(--bone-2);
    border-bottom: 1px dashed var(--line-2);
}
.quiz-block li:last-child { border: none; }

/* SVG diagrams */
.diagram-wrap {
    margin: 32px 0;
    border: 1px solid var(--line);
    background: rgba(244, 241, 234, 0.015);
    padding: 32px;
}
.diagram-wrap svg {
    width: 100%;
    height: auto;
    display: block;
}
.diagram-cap {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--steel-2);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 16px;
    text-align: center;
}

/* Page nav (prev/next) */
.page-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.page-nav a {
    padding: 28px 32px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--bone);
    transition: all 0.3s;
    background: rgba(244, 241, 234, 0.015);
}
.page-nav a:hover {
    border-color: var(--amber);
    background: rgba(232, 168, 56, 0.04);
}
.page-nav .dir {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--amber);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.page-nav .pn-title {
    font-family: var(--serif);
    font-size: 28px;
    line-height: 1.1;
}
.page-nav .pn-title .italic { font-style: italic; color: var(--amber); }
.page-nav a.next { text-align: right; }

/* Footer */
footer.skybound-footer {
    padding: 80px 48px 48px;
    background: #07090d;
    border-top: 1px solid var(--line);
}
.footer-content {
    max-width: 1400px;
    margin: 0 auto 64px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
}
.footer-brand-text {
    font-family: var(--serif);
    font-style: italic;
    font-size: 36px;
    color: var(--amber);
    margin-bottom: 16px;
    font-weight: 500;
}
.footer-tagline {
    font-family: var(--serif-cn);
    font-size: 14px;
    color: var(--steel-2);
    line-height: 1.8;
    max-width: 380px;
}
.footer-col-title {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--amber);
    margin-bottom: 24px;
    text-transform: uppercase;
}
.footer-links { list-style: none; }
.footer-links li { padding: 8px 0; }
.footer-links a {
    color: var(--steel-2);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--amber); }
.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--steel-2);
    letter-spacing: 0.12em;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 1024px) {
    nav.skybound-nav { padding: 16px 24px; }
    .nav-links { gap: 16px; }
    .page-hero { padding: 130px 24px 60px; }
    .doc-layout { grid-template-columns: 1fr; padding: 48px 24px 80px; gap: 40px; }
    .toc { position: static; border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 20px; }
    .page-nav { padding: 0 24px 60px; grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}
/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--amber);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}
.mobile-menu-btn:hover { border-color: var(--amber); background: rgba(232, 168, 56, 0.05); }

@media (max-width: 640px) {
    .mobile-menu-btn { display: block; }
    .nav-links {
        position: fixed;
        top: 62px;
        left: 0; right: 0; height: 100vh;
        background: rgba(10, 14, 20, 0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 60px;
        gap: 24px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s;
        z-index: 90;
        border-top: 1px solid var(--line);
    }
    .nav-links.mobile-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-links a { font-size: 16px; padding: 12px 24px; }
    
    .footer-content { grid-template-columns: 1fr; gap: 40px; }
    .page-nav a.next { text-align: left; }
}
/* Realistic Cockpit Annunciator Style for Q&A Link */
.nav-links a[href="qa.html"] {
    display: inline-flex;
    align-items: center;
    background: #0f0f11;
    border: 1px solid #222;
    border-bottom-color: #0a0a0a;
    border-top-color: #333;
    border-radius: 4px;
    padding: 2px 10px;
    margin-top: -2px;
    color: rgba(232, 168, 56, 0.7);
    font-weight: 600;
    letter-spacing: 0.15em;
    opacity: 1;
    text-shadow: 0 0 4px rgba(232, 168, 56, 0.3);
    box-shadow: inset 0 2px 3px rgba(255,255,255,0.04), inset 0 -2px 3px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.nav-links a[href="qa.html"]::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(rgba(255,255,255,0.05), transparent);
    pointer-events: none;
}

.nav-links a[href="qa.html"]:hover,
.nav-links a[href="qa.html"].active {
    color: #ffe099;
    background: #1a160d;
    border-color: #7a5417;
    border-bottom-color: #4a320c;
    border-top-color: #9c6c1d;
    text-shadow: 0 0 8px rgba(255, 196, 77, 0.9), 0 0 16px rgba(255, 196, 77, 0.6);
    box-shadow: inset 0 2px 3px rgba(255,255,255,0.1), inset 0 -2px 3px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.6), 0 0 12px rgba(232, 168, 56, 0.25);
    transform: translateY(-1px);
}
