/* ═══════════════════════════════════════════════════════════════════════════
   VibeBullish Architecture Docs
   Theme: Direction A — dark-first, signal green accent, Instrument Sans / IBM Plex Mono
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    /* Core palette — Direction A (web app globals.css), 2026-09-30 */
    --bg:           #080B14;
    --bg-card:      rgba(255, 255, 255, 0.04);
    --bg-elevated:  rgba(255, 255, 255, 0.05);
    --bg-tint:      rgba(255, 255, 255, 0.08);

    --border:        rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    --divider:       rgba(255, 255, 255, 0.06);

    --text-primary:    rgba(255, 255, 255, 0.85);
    --text-secondary:  rgba(255, 255, 255, 0.60);
    --text-tertiary:   rgba(255, 255, 255, 0.40);
    --text-quaternary: rgba(255, 255, 255, 0.25);
    --text-faint:      rgba(255, 255, 255, 0.20);

    /* Semantic — signal green is the one accent */
    --accent:        #00E5A0;
    --accent-hover:  #00C896;
    --accent-tint:   rgba(0, 229, 160, 0.06);
    --accent-border: rgba(0, 229, 160, 0.25);
    --positive: #00E5A0;
    --negative: #FF4560;
    --neutral:  #5B8DEF;
    --warning:  #FFB800;

    /* Gradients */
    --grad-accent: linear-gradient(135deg, #00C896, #00E5A0);
    --grad-bar:    linear-gradient(180deg, #00E5A0, #00C896);
    --grad-glow:   radial-gradient(circle, rgba(0, 229, 160, 0.15), transparent 70%);

    /* Spacing */
    --s-xs: 4px;
    --s-sm: 8px;
    --s-md: 16px;
    --s-lg: 24px;
    --s-xl: 32px;
    --s-2xl: 48px;

    /* Radius — Direction A: card 12, hero 16, button 10; 8 stays for pills */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-btn: 10px;

    /* Font */
    --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Layout */
    --sidebar-width: 240px;
    --content-max-width: 960px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    line-height: 1.6;
}

/* ── Ambient background orbs ──────────────────────────────────────────────── */

.ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(0, 229, 160, 0.10);
    top: -150px;
    right: -100px;
    animation: drift 20s ease-in-out infinite alternate;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(0, 200, 150, 0.06);
    bottom: -100px;
    left: -100px;
    animation: drift 25s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(30px, -20px); }
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(8, 11, 20, 0.95);
    border-right: 1px solid var(--border);
    padding: var(--s-lg);
    display: flex;
    flex-direction: column;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow-y: auto;
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, var(--neutral) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--s-xs);
}

.sidebar-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(0, 229, 160, 0.12);
    border: 1px solid rgba(0, 229, 160, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: var(--s-xl);
}

.sidebar-section {
    margin-bottom: var(--s-lg);
}

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--s-sm);
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: var(--s-sm);
    padding: var(--s-sm) var(--s-md);
    border-radius: var(--r-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    letter-spacing: -0.01em;
}

.sidebar-nav a:hover {
    background: var(--bg-tint);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: rgba(0, 229, 160, 0.12);
    color: var(--accent);
    font-weight: 600;
}

.sidebar-nav .nav-icon {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-nav a.active .nav-icon {
    opacity: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: var(--s-lg);
    border-top: 1px solid var(--border);
    font-size: 0.7rem;
    color: var(--text-quaternary);
    font-family: var(--font-mono);
    line-height: 1.8;
}

/* ── Mobile hamburger ─────────────────────────────────────────────────────── */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(8, 11, 20, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 0 var(--s-md);
    align-items: center;
    justify-content: space-between;
    z-index: 101;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, var(--neutral) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hamburger {
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: transform 0.2s;
}

/* ── Content area ─────────────────────────────────────────────────────────── */

.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    padding: var(--s-2xl) var(--s-xl);
}

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

/* ── Page header ──────────────────────────────────────────────────────────── */

.page-header {
    margin-bottom: var(--s-2xl);
    padding-bottom: var(--s-lg);
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--s-sm);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 640px;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-lg);
    margin-bottom: var(--s-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeUp 0.5s ease-out both;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-lg);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-tint);
    padding: 2px 10px;
    border-radius: 20px;
}

/* ── Hero metrics ─────────────────────────────────────────────────────────── */

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-lg) var(--s-xl);
    margin-bottom: var(--s-xl);
}

/* Stat cells sitting under a rule, not cards. A top rule (rather than a
   divider between cells) survives the 4 -> 2 -> 1 column collapse without
   stranding a border at a wrapped row's left edge. */
.metric-card {
    padding: var(--s-md) 0 0;
    border-top: 1px solid var(--border);
    animation: fadeUp 0.5s ease-out both;
}

.metric-card:nth-child(1) { animation-delay: 0.05s; }
.metric-card:nth-child(2) { animation-delay: 0.1s; }
.metric-card:nth-child(3) { animation-delay: 0.15s; }
.metric-card:nth-child(4) { animation-delay: 0.2s; }

/* The primary stat is marked by its rule, not by a tinted panel. */
.metric-card.hero {
    border-top-color: rgba(0, 229, 160, 0.5);
}

.metric-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--s-sm);
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.metric-sub {
    font-size: 0.75rem;
    color: var(--text-quaternary);
    margin-top: var(--s-xs);
    font-family: var(--font-mono);
}

/* ── Section headings ─────────────────────────────────────────────────────── */

h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--s-md);
}

h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: var(--s-sm);
}

section {
    margin-bottom: var(--s-xl);
}

section > p {
    color: var(--text-secondary);
    margin-bottom: var(--s-md);
    line-height: 1.7;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    padding: 0 0 var(--s-sm) 0;
    border-bottom: 1px solid var(--border);
}

.data-table th.r { text-align: right; }

.data-table td {
    padding: var(--s-sm) var(--s-sm) var(--s-sm) 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    vertical-align: top;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .r {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.data-table .mono {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.data-table td.desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ── Code blocks ──────────────────────────────────────────────────────────── */

pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-lg);
    overflow-x: auto;
    margin-bottom: var(--s-md);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

code {
    font-family: var(--font-mono);
    font-size: 0.82em;
    background: var(--bg-tint);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--neutral);
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
}

.code-comment { color: var(--text-quaternary); }
.code-keyword { color: var(--accent); }
.code-string { color: var(--positive); }
.code-type { color: var(--neutral); }
.code-number { color: var(--warning); }
.code-field { color: var(--text-primary); }

/* ── Status badges ────────────────────────────────────────────────────────── */

.status {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    white-space: nowrap;
}

.status-done {
    color: var(--positive);
    background: rgba(182, 255, 206, 0.1);
    border: 1px solid rgba(182, 255, 206, 0.2);
}

.status-progress {
    color: var(--neutral);
    background: rgba(91, 141, 239, 0.12);
    border: 1px solid rgba(91, 141, 239, 0.2);
}

.status-designing {
    color: var(--warning);
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-planned {
    color: var(--text-secondary);
    background: var(--bg-tint);
    border: 1px solid var(--border);
}

/* ── Architecture boxes ───────────────────────────────────────────────────── */

.arch-diagram {
    display: flex;
    flex-direction: column;
    gap: var(--s-lg);
    margin-bottom: var(--s-xl);
}

.arch-row {
    display: flex;
    gap: var(--s-md);
    justify-content: center;
    flex-wrap: wrap;
}

.arch-box {
    background: none;
    border: 1px solid var(--border);
    border-radius: 0;
    padding: var(--s-lg);
    min-width: 200px;
    max-width: 280px;
    flex: 1;
    text-align: center;
    position: relative;
    transition: border-color 0.3s, background 0.3s;
}

.arch-box:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.arch-box.accent {
    border-color: rgba(0, 229, 160, 0.3);
}

.arch-box.go { border-top: 3px solid #00ADD8; }
.arch-box.python { border-top: 3px solid #3776AB; }
.arch-box.nextjs { border-top: 3px solid #fff; }
.arch-box.swift { border-top: 3px solid #F05138; }
.arch-box.postgres { border-top: 3px solid #336791; }
.arch-box.static { border-top: 3px solid var(--accent); }

.arch-box-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: var(--s-xs);
    letter-spacing: -0.01em;
}

.arch-box-tech {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-bottom: var(--s-sm);
}

.arch-box-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.arch-box-list {
    list-style: none;
    text-align: left;
    margin-top: var(--s-sm);
}

.arch-box-list li {
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 2px 0;
    padding-left: var(--s-md);
    position: relative;
}

.arch-box-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

/* ── Connection arrows ────────────────────────────────────────────────────── */

.arch-connector {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 32px;
    position: relative;
}

.arch-connector::before {
    content: "";
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 229, 160, 0.4), rgba(0, 229, 160, 0.15));
}

.arch-connector::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(0, 229, 160, 0.4);
    border-bottom: 2px solid rgba(0, 229, 160, 0.4);
    transform: rotate(45deg);
    margin-bottom: -4px;
}

.arch-connector-h {
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.arch-connector-h::before {
    content: "";
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 229, 160, 0.4), rgba(0, 229, 160, 0.15));
}

.arch-connector-h::after {
    content: "";
    position: absolute;
    right: 0;
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(0, 229, 160, 0.3);
    border-bottom: 2px solid rgba(0, 229, 160, 0.3);
    transform: rotate(-45deg);
    margin-right: -2px;
}

.arch-connector-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-quaternary);
    position: absolute;
    white-space: nowrap;
}

/* ── Signal flow diagram ──────────────────────────────────────────────────── */

.flow-layer {
    margin-bottom: var(--s-xl);
}

.flow-layer-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--s-sm);
}

.flow-boxes {
    display: block;
}

/* Rows, not cards: name in a fixed left column, detail flowing right,
   separated by hairlines. The layer heading already names the category, so
   the per-category accent bars carried no information and were removed —
   the .data/.quant/.llm/.signal/.consumer classes remain in the markup. */
.flow-box {
    display: grid;
    grid-template-columns: minmax(150px, 210px) 1fr;
    gap: var(--s-md);
    padding: var(--s-md) 0;
    border-bottom: 1px solid var(--border);
}

.flow-box:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.flow-box-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.flow-box-detail {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .flow-box {
        grid-template-columns: 1fr;
        gap: var(--s-xs);
    }
}

/* ── Timeline ─────────────────────────────────────────────────────────────── */

.timeline {
    position: relative;
    padding-left: var(--s-xl);
}

.timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), rgba(0, 229, 160, 0.1));
}

.timeline-item {
    position: relative;
    margin-bottom: var(--s-xl);
    animation: fadeUp 0.5s ease-out both;
}

.timeline-item:nth-child(1) { animation-delay: 0.05s; }
.timeline-item:nth-child(2) { animation-delay: 0.1s; }
.timeline-item:nth-child(3) { animation-delay: 0.15s; }
.timeline-item:nth-child(4) { animation-delay: 0.2s; }
.timeline-item:nth-child(5) { animation-delay: 0.25s; }
.timeline-item:nth-child(6) { animation-delay: 0.3s; }
.timeline-item:nth-child(7) { animation-delay: 0.35s; }

.timeline-dot {
    position: absolute;
    left: -25px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

.timeline-dot.done {
    background: var(--positive);
    border-color: var(--positive);
}

.timeline-dot.progress {
    background: var(--neutral);
    border-color: var(--neutral);
    box-shadow: 0 0 8px rgba(91, 141, 239, 0.5);
}

.timeline-dot.designing {
    background: var(--warning);
    border-color: var(--warning);
}

.timeline-phase {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-lg);
}

.timeline-phase-header {
    display: flex;
    align-items: center;
    gap: var(--s-md);
    margin-bottom: var(--s-sm);
    flex-wrap: wrap;
}

.timeline-phase-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.timeline-phase-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.timeline-phase-goal {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--s-md);
    line-height: 1.5;
}

.timeline-deliverables {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-xs) var(--s-md);
}

.timeline-deliverables li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-left: var(--s-md);
    position: relative;
    line-height: 1.6;
}

.timeline-deliverables li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

/* ── Decision flow ────────────────────────────────────────────────────────── */

.decision-flow {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: var(--s-lg);
}

.decision-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-md) var(--s-lg);
    display: flex;
    align-items: center;
    gap: var(--s-md);
    position: relative;
}

.decision-step:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 2px;
    height: 4px;
    background: rgba(0, 229, 160, 0.3);
}

.decision-step-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(0, 229, 160, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.decision-step-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.decision-step-detail {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-left: auto;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.decision-step.gate {
    border-color: rgba(0, 229, 160, 0.25);
    background: linear-gradient(135deg, rgba(0, 229, 160, 0.06), transparent);
}

.decision-step.execute {
    border-color: rgba(182, 255, 206, 0.2);
    background: linear-gradient(135deg, rgba(182, 255, 206, 0.04), transparent);
}

/* ── Deployment map ───────────────────────────────────────────────────────── */

.deploy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-md);
    margin-bottom: var(--s-xl);
}

.deploy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--s-lg);
    animation: fadeUp 0.5s ease-out both;
}

.deploy-card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: var(--s-xs);
}

.deploy-card-url {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: var(--s-md);
}

.deploy-service {
    display: flex;
    align-items: center;
    gap: var(--s-sm);
    padding: var(--s-sm) 0;
    border-bottom: 1px solid var(--border);
}

.deploy-service:last-child {
    border-bottom: none;
}

.deploy-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.deploy-dot.go { background: #00ADD8; }
.deploy-dot.python { background: #3776AB; }
.deploy-dot.nextjs { background: #fff; }
.deploy-dot.static { background: var(--accent); }

.deploy-service-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.deploy-service-detail {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-left: auto;
    font-family: var(--font-mono);
}

/* ── Grids ────────────────────────────────────────────────────────────────── */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--s-md);
}

/* ── Lists ────────────────────────────────────────────────────────────────── */

ul.bullet-list {
    list-style: none;
    margin-bottom: var(--s-md);
}

ul.bullet-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 0 4px var(--s-md);
    position: relative;
    line-height: 1.6;
}

ul.bullet-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

/* ── Misc ─────────────────────────────────────────────────────────────────── */

.text-positive { color: var(--positive); }
.text-negative { color: var(--negative); }
.text-accent { color: var(--accent); }
.text-neutral { color: var(--neutral); }
.text-warning { color: var(--warning); }
.text-dim { color: var(--text-tertiary); }

.mt-sm { margin-top: var(--s-sm); }
.mt-md { margin-top: var(--s-md); }
.mt-lg { margin-top: var(--s-lg); }
.mb-sm { margin-bottom: var(--s-sm); }
.mb-md { margin-bottom: var(--s-md); }
.mb-lg { margin-bottom: var(--s-lg); }

.nowrap { white-space: nowrap; }

strong { color: var(--text-primary); font-weight: 600; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--s-xl) 0;
}

/* ── Entrance animation ───────────────────────────────────────────────────── */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .hero-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .timeline-deliverables {
        grid-template-columns: 1fr;
    }

    .deploy-grid {
        grid-template-columns: 1fr;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .arch-row {
        flex-direction: column;
        align-items: center;
    }

    .arch-box {
        max-width: 100%;
        width: 100%;
    }

    .arch-connector-h {
        display: none;
    }

    .flow-boxes {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    .content {
        margin-left: 0;
        padding: calc(56px + var(--s-lg)) var(--s-md) var(--s-lg);
    }

    .page-title {
        font-size: 1.4rem;
    }

    .metric-value {
        font-size: 1.4rem;
    }

    .hero-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .decision-step {
        flex-wrap: wrap;
    }

    .decision-step-detail {
        margin-left: calc(28px + var(--s-md));
        white-space: normal;
    }

    pre {
        font-size: 0.72rem;
        padding: var(--s-md);
    }
}

@media (max-width: 480px) {
    .hero-metrics {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Markdown pages — generated by scripts/build-docs.mjs from allowlisted .md
   Scoped entirely under .markdown-body; adds no rules to existing selectors.
   ═══════════════════════════════════════════════════════════════════════════ */

.markdown-body {
    max-width: var(--content-max-width);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
}

.markdown-body > *:first-child { margin-top: 0; }

.markdown-body h1 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 var(--s-md);
    color: #fff;
}

.markdown-body h2 {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: var(--s-2xl) 0 var(--s-md);
    padding-bottom: var(--s-sm);
    border-bottom: 1px solid var(--divider);
    color: #fff;
}

.markdown-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin: var(--s-xl) 0 var(--s-sm);
    color: var(--text-primary);
}

.markdown-body h4 {
    font-size: 14px;
    font-weight: 600;
    margin: var(--s-lg) 0 var(--s-xs);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.markdown-body p { margin: 0 0 var(--s-md); }

.markdown-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 229, 160, 0.3);
}
.markdown-body a:hover { border-bottom-color: var(--accent); }

.markdown-body strong { color: #fff; font-weight: 600; }
.markdown-body em { color: var(--text-secondary); }

.markdown-body ul,
.markdown-body ol { margin: 0 0 var(--s-md); padding-left: var(--s-lg); }
.markdown-body li { margin-bottom: var(--s-xs); }
.markdown-body li > ul,
.markdown-body li > ol { margin-top: var(--s-xs); margin-bottom: var(--s-xs); }

/* GitHub-style task lists */
.markdown-body li:has(> input[type="checkbox"]) { list-style: none; margin-left: -18px; }
.markdown-body input[type="checkbox"] {
    appearance: none;
    width: 13px;
    height: 13px;
    margin-right: var(--s-sm);
    vertical-align: baseline;
    border: 1px solid var(--text-quaternary);
    border-radius: 3px;
    background: var(--bg-card);
}
.markdown-body input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.markdown-body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    padding: 2px 5px;
    border-radius: var(--r-sm);
    background: var(--bg-tint);
    color: var(--neutral);
}

.markdown-body pre {
    margin: 0 0 var(--s-md);
    padding: var(--s-md);
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: rgba(10, 10, 15, 0.6);
}
.markdown-body pre code {
    padding: 0;
    background: none;
    color: var(--text-primary);
    font-size: 12.5px;
    line-height: 1.6;
}

.markdown-body blockquote {
    margin: 0 0 var(--s-md);
    padding: var(--s-sm) var(--s-md);
    border-left: 2px solid var(--accent);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    background: var(--bg-card);
    color: var(--text-secondary);
}
.markdown-body blockquote > *:last-child { margin-bottom: 0; }

.markdown-body table {
    width: 100%;
    margin: 0 0 var(--s-md);
    border-collapse: collapse;
    font-size: 13.5px;
}
.markdown-body th {
    padding: var(--s-sm) var(--s-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11px;
    border-bottom: 1px solid var(--divider);
}
.markdown-body td {
    padding: var(--s-sm) var(--s-md);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.markdown-body tr:last-child td { border-bottom: none; }

.markdown-body hr {
    margin: var(--s-2xl) 0;
    border: none;
    border-top: 1px solid var(--divider);
}

/* Wide content must scroll inside itself, not push the page sideways. */
.markdown-body pre { max-width: 100%; }
.markdown-body .table-scroll {
    margin: 0 0 var(--s-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.markdown-body .table-scroll table { margin-bottom: 0; min-width: 480px; }

.generated-note {
    margin-top: var(--s-2xl);
    padding-top: var(--s-md);
    border-top: 1px solid var(--border);
    color: var(--text-quaternary);
    font-size: 12px;
    font-family: var(--font-mono);
}
.generated-note code { color: var(--text-tertiary); }

@media (max-width: 640px) {
    .markdown-body { font-size: 14.5px; }
    .markdown-body h1 { font-size: 25px; }
    .markdown-body h2 { font-size: 19px; }
}

/* Hand-written pages: a wide data table scrolls inside its own card on a
   phone instead of being clipped or pushing the page sideways. */
.card:has(> .data-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 640px) {
    .card > .data-table { min-width: 520px; }
}

/* How It Works hero (Lab destination, 2026-09-30) */
.hero-eyebrow { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 1.6px; color: var(--accent); margin-bottom: var(--s-sm); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-sm); margin-top: var(--s-md); }
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; padding: 12px 22px; border-radius: var(--r-btn); font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); }
.btn-secondary { border: 1px solid var(--border-strong); color: var(--text-primary); }
.btn-secondary:hover { background: var(--bg-elevated); color: var(--text-primary); }
/* Fragment targets for the old /lab anchors, plus the two real targets the
   redirect can land on; the fixed mobile header is 56px. */
.anchor-target {
    display: block;
    height: 0;
    visibility: hidden;
}
@media (max-width: 768px) {
    .anchor-target,
    #method,
    #scoreboard {
        scroll-margin-top: 72px;
    }
}
