/* ============================================
   FieldStation42 — Mid-Century Modern Theme
   Palette: Teal, Warm Orange, Amber, Cream, Walnut
   ============================================ */

:root {
    --teal:        #22d3ee;
    --teal-dark:   #0e9bb5;
    --teal-light:  #67e8f9;
    --orange:      #d946a8;
    --orange-dark: #a8358a;
    --amber:       #a78bfa;
    --cream:       #e8d5ff;
    --cream-dark:  #d4b8ee;
    --cream-darker:#b89dcc;
    --brown:       #3b1d6b;
    --brown-dark:  #0f0520;
    --brown-light: #5b2d96;
    --text:        #e8d5ff;
    --text-muted:  #b39ddb;
    --white:       #1a0a30;

    --font-display: 'Orbitron', 'DM Serif Display', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;
    --font-mono:    'VT323', 'DM Mono', monospace;

    --radius:       6px;
    --radius-lg:    12px;
    --shadow:       0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg:    0 6px 24px rgba(0, 0, 0, 0.5);

    --max-width:    1140px;
    --docs-width:   780px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: #15082a;
    color: var(--text);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--orange); }

/* ---- Header ---- */
.site-header {
    background: var(--brown-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(44, 26, 14, 0.25);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-mark {
    background: var(--orange);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.logo-mark.small { width: 28px; height: 28px; font-size: 0.8rem; }

.logo-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--cream);
    letter-spacing: 0.01em;
}

.logo-text em {
    font-style: normal;
    color: var(--amber);
}

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: var(--cream-darker);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.02em;
}

.nav-link:hover, .nav-link.active {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}

.nav-github {
    margin-left: 0.5rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
}

.nav-github:hover {
    background: rgba(255,255,255,0.15);
    color: var(--amber);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--cream);
    border-radius: 2px;
    transition: transform 0.3s;
}

/* ---- Hero (Landing Page) ---- */
.hero {
    background: var(--brown-dark);
    color: var(--cream);
    padding: 6rem 2rem 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(61,143,163,0.25) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 15% 80%, rgba(224,122,58,0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* Decorative organic shape inspired by the reference image */
.hero::after {
    content: '';
    position: absolute;
    right: -80px;
    top: -60px;
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(240,180,41,0.08) 0%, transparent 70%);
    border-radius: 50% 30% 70% 40%;
    pointer-events: none;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--amber);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    color: var(--cream);
    margin-bottom: 1.25rem;
}

.hero-title em {
    font-style: italic;
    color: var(--amber);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--cream-darker);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--orange);
    color: var(--white);
}
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--cream);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover { background: rgba(255,255,255,0.18); color: var(--white); }

.btn-patreon {
    background: #FF424D;
    color: var(--white);
    border: 1px solid transparent;
}
.btn-patreon:hover { background: #e03040; color: var(--white); }

/* Hero visual / screen mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tv-frame {
    background: #2e1a52;
    border-radius: 16px;
    padding: 16px 16px 40px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(167,139,250,0.2);
    width: 100%;
    max-width: 420px;
    position: relative;
}

.tv-screen {
    background: #0a0a0a;
    border-radius: 8px;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-screen-content {
    text-align: center;
    padding: 1.5rem;
    transition: opacity 0.1s ease;
}

.tv-screen-content.switching {
    animation: tv-static 0.35s steps(1) forwards;
}

@keyframes tv-static {
    0%   { opacity: 1; }
    15%  { opacity: 0.05; filter: brightness(3) contrast(8); }
    30%  { opacity: 0.4; filter: brightness(0.2); }
    50%  { opacity: 0.05; filter: brightness(4) contrast(6); }
    70%  { opacity: 0.3; filter: brightness(0.1); }
    85%  { opacity: 0.6; filter: brightness(1.5); }
    100% { opacity: 1; filter: none; }
}

.tv-channel {
    font-family: var(--font-mono);
    color: var(--amber);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.tv-now-playing {
    font-family: var(--font-display);
    color: var(--teal-light);
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.tv-show-time {
    font-family: var(--font-mono);
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* Scanline effect */
.tv-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.08) 2px,
        rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
}

.tv-knob-row {
    position: absolute;
    bottom: 10px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.tv-knob {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #6b4fa0, #2e1a52);
    border: 1px solid rgba(167,139,250,0.25);
}

/* ---- Feature Strip ---- */
.features {
    background: var(--cream-dark);
    padding: 4rem 2rem;
    border-top: 3px solid var(--cream-darker);
    border-bottom: 3px solid var(--cream-darker);
}

.features-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.feature-card {
    padding: 1.75rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--teal);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-card:nth-child(2) { border-top-color: var(--orange); }
.feature-card:nth-child(3) { border-top-color: var(--amber); }

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.3rem;
}

.feature-card:nth-child(2) .feature-icon { background: var(--orange); }
.feature-card:nth-child(3) .feature-icon { background: var(--amber); color: var(--brown-dark); }

.feature-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---- Getting Started Strip ---- */
.quickstart {
    background: var(--teal-dark);
    color: var(--cream);
    padding: 4rem 2rem;
}

.quickstart-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.quickstart-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--cream);
    margin-bottom: 0.75rem;
}

.quickstart-subtitle {
    color: var(--teal-light);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.steps-row {
    display: flex;
    gap: 1px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.step {
    flex: 1;
    padding: 1.5rem 1.25rem;
    background: rgba(255,255,255,0.06);
    text-align: center;
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.step:hover { background: rgba(255,255,255,0.12); }

.step-num {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--amber);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cream);
    letter-spacing: 0.02em;
}

/* ---- News / Articles ---- */
.news-section {
    padding: 4rem 2rem;
}

.news-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--cream-darker);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--teal-dark);
}

.section-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--teal);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--teal);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.news-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.news-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.news-title a { color: inherit; }
.news-title a:hover { color: var(--teal-dark); }

.news-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- Setup Step Cards ---- */
.setup-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.setup-step {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--teal);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}

.setup-step:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.setup-step:nth-child(2) { border-left-color: var(--orange); }
.setup-step:nth-child(3) { border-left-color: var(--amber); }
.setup-step:nth-child(4) { border-left-color: var(--teal-light); }
.setup-step:nth-child(5) { border-left-color: var(--brown-light); }

.setup-step-num {
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1;
    color: var(--teal);
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.setup-step:nth-child(2) .setup-step-num { color: var(--orange); }
.setup-step:nth-child(3) .setup-step-num { color: var(--amber); }
.setup-step:nth-child(4) .setup-step-num { color: var(--teal-light); }
.setup-step:nth-child(5) .setup-step-num { color: var(--brown-light); }

.setup-step-text {
    flex: 1;
}

.setup-step-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.setup-step-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .setup-step { padding: 1rem 1.25rem; gap: 1rem; }
}

/* ---- Doc Index Cards ---- */
.doc-index {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.doc-index-item {
    display: block;
    padding: 1.25rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--teal);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}

.doc-index-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.doc-index-item:nth-child(2) { border-left-color: var(--orange); }
.doc-index-item:nth-child(3) { border-left-color: var(--amber); }
.doc-index-item:nth-child(4) { border-left-color: var(--teal-light); }
.doc-index-item:nth-child(5) { border-left-color: var(--brown-light); }
.doc-index-item:nth-child(6) { border-left-color: var(--teal); }
.doc-index-item:nth-child(7) { border-left-color: var(--orange); }
.doc-index-item:nth-child(8) { border-left-color: var(--amber); }
.doc-index-item:nth-child(9) { border-left-color: var(--teal-light); }
.doc-index-item:nth-child(10) { border-left-color: var(--brown-light); }

.doc-index-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.doc-index-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---- Docs Layout ---- */
.docs-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    align-items: start;
}

.docs-sidebar {
    position: sticky;
    top: 88px;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-heading {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--cream-darker);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li { margin: 0; }

.sidebar-nav a {
    display: block;
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: color 0.15s, background 0.15s;
    border-left: 2px solid transparent;
}

.sidebar-nav a:hover {
    color: var(--teal-dark);
    background: var(--cream-dark);
}

.sidebar-nav a.active {
    color: var(--teal-dark);
    background: var(--cream-dark);
    border-left-color: var(--teal);
    font-weight: 500;
}

/* ---- Docs Content ---- */
.docs-content {
    min-width: 0;
}

.docs-content h1 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    color: var(--brown-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.docs-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--teal-dark);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--cream-darker);
}

.docs-content h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.docs-content p { margin-bottom: 1rem; }

.docs-content ul, .docs-content ol {
    margin: 0 0 1rem 1.5rem;
}

.docs-content li { margin-bottom: 0.3rem; }

.docs-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--cream-dark);
    color: var(--brown-dark);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    border: 1px solid var(--cream-darker);
}

.docs-content pre {
    background: var(--brown-dark);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.25rem 0;
    box-shadow: var(--shadow);
}

.docs-content pre code {
    background: none;
    border: none;
    color: var(--cream);
    font-size: 0.875rem;
    padding: 0;
}

.docs-content blockquote {
    border-left: 4px solid var(--teal);
    padding: 0.75rem 1.25rem;
    background: rgba(61,143,163,0.08);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.25rem 0;
    color: var(--text-muted);
}

.docs-content a {
    color: var(--teal-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.95rem;
}

.docs-content th,
.docs-content td {
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(167, 139, 250, 0.15);
    text-align: left;
    vertical-align: top;
}

.docs-content th {
    background: rgba(167, 139, 250, 0.08);
    font-weight: 600;
    color: var(--cream);
}

.docs-content .doc-index-item {
    text-decoration: none;
}

/* Callout boxes */
.callout {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin: 1.25rem 0;
    font-size: 0.95rem;
}

.callout-note {
    background: rgba(61,143,163,0.1);
    border-left: 4px solid var(--teal);
}

.callout-warning {
    background: rgba(224,122,58,0.1);
    border-left: 4px solid var(--orange);
}

.callout-tip {
    background: rgba(240,180,41,0.12);
    border-left: 4px solid var(--amber);
}

/* Doc nav prev/next */
.doc-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--cream-darker);
}

.doc-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    flex: 1;
    max-width: 280px;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid var(--cream-darker);
}

.doc-nav-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.doc-nav-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.doc-nav-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--teal-dark);
}

.doc-nav-next { text-align: right; margin-left: auto; }

/* ---- Page header band ---- */
.page-header {
    background: var(--brown-dark);
    color: var(--cream);
    padding: 3rem 2rem 2.5rem;
    border-bottom: 4px solid var(--teal);
}

.page-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.page-header-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 0.5rem;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    color: var(--cream);
    line-height: 1.2;
}

.page-header p {
    color: var(--cream-darker);
    margin-top: 0.5rem;
    font-size: 1.05rem;
}

/* ---- Site Search Bar ---- */
.site-search {
    background: var(--brown);
    padding: 2.5rem 2rem;
}

.site-search-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-search-label {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--cream);
    flex-shrink: 0;
}

.site-search-form {
    display: flex;
    flex: 1;
    min-width: 240px;
    gap: 0.5rem;
}

.site-search-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(247,239,224,0.25);
    border-radius: var(--radius);
    background: rgba(247,239,224,0.1);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.site-search-input::placeholder { color: rgba(247,239,224,0.45); }
.site-search-input:focus { outline: none; border-color: var(--amber); background: rgba(247,239,224,0.15); }

.site-search-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    background: var(--amber);
    color: var(--brown-dark);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.site-search-btn:hover { background: var(--orange); color: var(--white); }

@media (max-width: 640px) {
    .site-search-inner { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .site-search-label { text-align: center; }
}

/* ---- Footer ---- */
.site-footer {
    background: var(--brown-dark);
    color: var(--cream-darker);
    padding: 2.5rem 2rem;
    margin-top: auto;
    border-top: 4px solid var(--teal);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--cream);
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    margin-left: auto;
}

.footer-links a {
    color: var(--cream-darker);
    font-size: 0.9rem;
    transition: color 0.15s;
}

.footer-links a:hover { color: var(--amber); }

.footer-copy {
    width: 100%;
    font-size: 0.82rem;
    color: rgba(247,239,224,0.4);
    margin-top: 0.5rem;
}

.footer-copy a { color: rgba(247,239,224,0.6); }
.footer-copy a:hover { color: var(--amber); }

/* ---- Heading anchors ---- */
.docs-content h1,
.docs-content h2,
.docs-content h3 {
    position: relative;
}

.heading-anchor {
    display: inline-flex;
    align-items: center;
    margin-left: 0.4rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    text-decoration: none;
    vertical-align: middle;
}

.docs-content h1:hover .heading-anchor,
.docs-content h2:hover .heading-anchor,
.docs-content h3:hover .heading-anchor {
    opacity: 1;
}

.heading-anchor:hover { color: var(--teal); }

.heading-anchor.copied { color: var(--teal); opacity: 1; }

/* ---- Retro theme overrides ---- */

/* --white is used for card backgrounds (dark) but also for button/logo text */
.btn-primary,
.btn-secondary,
.btn-patreon,
.logo-mark,
.site-search-btn {
    color: #f0e6ff;
}

/* Card text on dark --white backgrounds */
.feature-desc,
.news-summary,
.setup-step-desc,
.doc-index-desc {
    color: var(--text-muted);
}

.feature-title,
.news-title a,
.setup-step-title,
.doc-index-title {
    color: var(--text);
}

/* Hero grid overlay */
.hero::before {
    background:
        linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px),
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(167, 139, 250, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 15% 80%, rgba(217, 70, 168, 0.15) 0%, transparent 50%);
    background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%;
}

/* Gradient accent on hero title italic */
.hero-title em {
    background: linear-gradient(135deg, #d946a8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: normal;
}

/* Quickstart strip */
.quickstart {
    background: #1a0a30;
    border-top: 1px solid rgba(34, 211, 238, 0.2);
    border-bottom: 1px solid rgba(34, 211, 238, 0.2);
}

.quickstart-subtitle {
    color: var(--teal-light);
}

/* Inline code */
.docs-content code {
    font-size: 1rem;
    color: var(--teal);
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.25);
}

/* Code blocks */
.docs-content pre {
    background: #080212;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.docs-content pre code {
    font-size: 1.1rem;
    color: #c8f0f8;
    line-height: 1.6;
}

/* VT323 renders larger - tighten mono label sizes */
.hero-eyebrow    { font-size: 1rem;   letter-spacing: 0.1em; }
.tv-channel      { font-size: 1rem; }
.tv-show-time    { font-size: 0.9rem; }
.news-date       { font-size: 0.9rem; }
.sidebar-heading { font-size: 0.85rem; }
.doc-nav-label   { font-size: 0.85rem; }

/* Orbitron is tighter than DM Serif - open up headings */
.hero-title      { letter-spacing: -0.02em; }
.docs-content h1 { letter-spacing: -0.01em; }
.docs-content h2 { letter-spacing: -0.01em; }



/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-visual { order: -1; }
    .tv-frame { max-width: 300px; }
    .features-inner { grid-template-columns: 1fr; }
    .docs-layout { grid-template-columns: 1fr; }
    .docs-sidebar { position: static; order: 1; }
    .docs-content { order: 0; }
    .steps-row { flex-direction: column; gap: 1px; }
}

@media (max-width: 640px) {
    .site-nav { display: none; }
    .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--brown-dark); padding: 1rem; gap: 0.25rem; border-top: 1px solid rgba(255,255,255,0.1); }
    .nav-toggle { display: flex; }
    .header-inner { position: relative; }
    .footer-links { margin-left: 0; }
    .doc-nav { flex-direction: column; }
    .doc-nav-link { max-width: 100%; }
}
