/* GCMS Documentation — Shared Styles (manual + technology) */

:root {
    --bg: #0a0e14;
    --panel-bg: #0d1117;
    --title: #00afff;
    --label: #808080;
    --dim: #585858;
    --good: #5fff00;
    --warn: #ffaf00;
    --alarm: #ff0000;
    --text: #c8d0d8;
    --border: #1a2030;
    --glow: rgba(0, 175, 255, 0.15);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
*::-webkit-scrollbar:horizontal { height: 0; display: none; }
[id] { scroll-margin-top: 56px; }
.target-highlight {
    border-left: 2px solid var(--title);
    padding-left: 10px;
    margin-left: -12px;
    background: rgba(0, 175, 255, 0.06);
    animation: target-fade 3s ease-out 1s forwards;
}
.target-highlight-bg {
    border-left: 2px solid rgba(0, 175, 255, 0.3);
    padding-left: 10px;
    margin-left: -12px;
    background: rgba(0, 175, 255, 0.04);
    animation: target-bg-fade 3s ease-out 1s forwards;
}
@keyframes target-fade {
    to { border-left-color: transparent; background: transparent; }
}
@keyframes target-bg-fade {
    to { border-left-color: transparent; background: transparent; }
}
/* ESA photo figures in documentation */
.doc-photo {
    position: relative;
    margin: 20px 0;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 4px;
    overflow: hidden;
    line-height: 0;
}
.doc-photo img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: saturate(0.35) brightness(0.55) contrast(1.2) sepia(0.4) hue-rotate(170deg);
}
.doc-photo-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    pointer-events: none;
}
.doc-photo-overlay::before {
    content: "";
    position: absolute;
    left: 0; right: 0; height: 30px;
    background: linear-gradient(to bottom, transparent, rgba(0,175,255,0.1) 40%, transparent);
    animation: docScanSweep 5s linear infinite;
}
@keyframes docScanSweep {
    0%   { top: -30px; }
    100% { top: 100%; }
}
.doc-photo-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 6px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    font-size: 10px;
    line-height: 1.4;
    color: var(--label);
}
.doc-photo-caption .credit {
    color: var(--title);
    opacity: 0.5;
    float: right;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
}
.header {
    background: linear-gradient(180deg, #0d1420, #0a0e14);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header h1 {
    color: var(--title);
    font-size: 18px;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(0, 175, 255, 0.3);
}
.header a {
    color: var(--label);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1px;
}
.header a:hover { color: var(--title); }
.header .sep { color: var(--dim); margin: 0 4px; }
.header .current { color: var(--text); font-size: 12px; letter-spacing: 1px; }

.manual {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}
.manual-title {
    color: var(--title);
    font-size: 22px;
    letter-spacing: 3px;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(0, 175, 255, 0.2);
}
.manual-subtitle {
    color: var(--dim);
    font-size: 12px;
    margin-bottom: 40px;
}

.toc {
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 40px;
}
.toc-title {
    color: var(--title);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.toc ol {
    list-style: none;
    counter-reset: toc;
}
.toc ol li { counter-increment: toc; margin: 4px 0; }
.toc ol li::before {
    content: counter(toc, decimal-leading-zero) ".";
    color: var(--dim);
    margin-right: 8px;
}
.toc a {
    color: var(--text);
    text-decoration: none;
}
.toc a:hover { color: var(--title); }

.section a {
    color: var(--title);
    text-decoration: none;
    border-bottom: 1px dotted var(--border);
}
.section a:hover {
    border-bottom-color: var(--title);
}

.section {
    margin-bottom: 48px;
}
.section h2 {
    color: var(--title);
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 20px;
}
.section h3 {
    color: var(--text);
    font-size: 13px;
    letter-spacing: 1px;
    margin-top: 24px;
    margin-bottom: 12px;
}
.section h3::before {
    content: "\25B8 ";
    color: var(--title);
}
.section p {
    margin-bottom: 12px;
    color: var(--text);
}

pre {
    background: #080c12;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 4px;
    padding: 12px 16px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 12px;
    line-height: 1.6;
}
code {
    background: #080c12;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--good);
}
pre code {
    background: none;
    padding: 0;
}

/* QD syntax highlighting */
.qd-comment { color: var(--dim); font-style: italic; }
.qd-string { color: var(--warn); }
.qd-keyword { color: #c678dd; font-weight: 700; }
.qd-number { color: var(--good); }
.qd-call { color: var(--title); }
.qd-arrow { color: #c678dd; }
.qd-directive { color: var(--label); font-style: italic; }

/* Tables — matches .hud-table from style.css */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 12px;
}
th {
    text-align: left;
    color: var(--label);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    padding: 4px 8px;
}
td {
    border-bottom: 1px solid var(--border);
    padding: 4px 8px;
    vertical-align: top;
}
tr:last-child td { border-bottom: none; }
td code { color: var(--warn); }

ul, ol {
    margin: 8px 0 12px 20px;
}
li { margin: 4px 0; }

.note {
    background: rgba(0, 175, 255, 0.05);
    border-left: 3px solid var(--title);
    padding: 10px 16px;
    margin: 16px 0;
    font-size: 12px;
}
.warn-box {
    background: rgba(255, 175, 0, 0.05);
    border-left: 3px solid var(--warn);
    padding: 10px 16px;
    margin: 16px 0;
    font-size: 12px;
}

.hl { color: var(--title); }
.good { color: var(--good); }
.warn { color: var(--warn); }
.alarm { color: var(--alarm); }
.dim { color: var(--dim); }

.back-top {
    display: block;
    text-align: right;
    color: var(--dim);
    text-decoration: none;
    font-size: 11px;
    margin-top: 8px;
}
.back-top:hover { color: var(--title); }

/* Expandable tutorial sections (matches technology.html deep-dive style) */
details.tutorial {
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 6px;
    margin: 16px 0;
    overflow: hidden;
}
details.tutorial summary {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--title);
    user-select: none;
    list-style: none;
}
details.tutorial summary::-webkit-details-marker { display: none; }
details.tutorial summary::before {
    content: "\25B6  ";
    font-size: 9px;
    vertical-align: 1px;
}
details.tutorial[open] summary::before {
    content: "\25BC  ";
}
details.tutorial .tutorial-body {
    padding: 4px 16px 16px;
    border-top: 1px solid var(--border);
}
details.tutorial .tutorial-body p {
    margin-bottom: 10px;
    font-size: 12px;
}
details.tutorial .tutorial-body h4 {
    color: var(--title);
    font-size: 12px;
    letter-spacing: 0.5px;
    margin: 16px 0 8px 0;
}

.doc-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--dim);
    font-size: 11px;
}
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    margin-top: 48px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 175, 255, 0.03) 100%);
}
.footer-content { max-width: 720px; }
.footer-title {
    font-size: 11px; font-weight: 700; color: var(--title);
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px;
}
.site-footer p { font-size: 12px; color: var(--label); line-height: 1.7; margin-bottom: 8px; }
.site-footer .footer-dim { color: var(--dim); font-size: 11px; }
.footer-links a { color: var(--title); text-decoration: none; border-bottom: 1px dotted var(--title); }
.footer-links a:hover { color: var(--good); border-bottom-color: var(--good); }
