/* SurfContext — Project-specific styles
   Layered on top of surf-ui.css (shared component library).
   Only add styles here that are unique to surfcontext.org. */

/* === Nav GitHub icon (surfcontext-specific) === */
.nav-github {
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: color 150ms ease;
}

.nav-github:hover { color: var(--text); }
.nav-github svg { width: 20px; height: 20px; fill: currentColor; }

/* === Hero extras === */
.hero-grid {
    max-width: 800px;
    margin: 0 auto;
}

.hero-code {
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}

.hero-compat {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.hero-compat strong { color: #22c55e; }

/* === Fragmentation section === */
.fragmentation-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.fragmentation-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    transition: border-color 200ms ease;
}

.fragmentation-card:hover { border-color: var(--border-light); }

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

.fragmentation-dot-red {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.fragmentation-dot-green {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.fragmentation-platform {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 2px;
}

.fragmentation-file {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.fragmentation-solution { margin-top: 8px; }

.fragmentation-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.fragmentation-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.fragmentation-divider-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fragmentation-answer {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid #22c55e;
    border-radius: var(--radius);
    padding: 20px 24px;
    max-width: 480px;
    margin: 0 auto;
}

.fragmentation-answer .fragmentation-platform {
    font-size: 1.0625rem;
    color: #22c55e;
}

.fragmentation-answer .fragmentation-file { font-size: 0.875rem; }

/* === Step cards (override surf-ui flex-row to column for multi-child layout) === */
.step-card {
    flex-direction: column;
}

/* === Card step numbers === */
.card-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.card-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.card-icon {
    color: var(--accent);
    margin-bottom: 14px;
    font-size: 1.5rem;
}

/* === Spec page (layout + TOC handled by inline styles in spec.html) === */
/* Only keep spec-table styles here — layout/sidebar/toc/content fully in template */

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 0.875rem;
}

.spec-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.8125rem;
}

.spec-table td {
    padding: 10px 14px;
    border: 1px solid var(--border);
}

.v3-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* === Discovery steps (horizontal pipeline on landing) === */
.discovery-steps {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.discovery-step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.discovery-step code { font-size: 0.8125rem; font-weight: 600; }

.discovery-step span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.discovery-arrow {
    font-size: 1.25rem;
    color: var(--text-muted);
    padding: 0 6px;
    flex-shrink: 0;
}

/* === Discovery list (vertical, whats-new page) === */
.discovery-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
}

.discovery-list-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 200ms ease;
}

.discovery-list-item:hover { border-color: var(--border-light); }

.discovery-list-body { flex: 1; min-width: 0; }

.discovery-list-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.discovery-list-top code { font-weight: 700; font-size: 0.9375rem; }

.discovery-tokens {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.discovery-list-body > p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* === Doc type labels === */
.doc-type-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.doc-type-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* === Superset mapping list === */
.superset-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto;
}

.superset-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 200ms ease;
}

.superset-item:hover { border-color: var(--border-light); }

.superset-label {
    font-weight: 700;
    font-size: 0.875rem;
    min-width: 140px;
    flex-shrink: 0;
}

.superset-arrow {
    color: var(--text-muted);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.superset-target {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* === Step card row (title + badge) === */
.step-card-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

/* === Stats grid variants === */
.stats-grid-6 { grid-template-columns: repeat(6, 1fr); }

/* === Capability grid variants === */
.capability-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* === CTA section === */
.cta-section {
    border-top: 1px solid var(--border);
    text-align: center;
}

.cta-section .section-headline { margin-bottom: 16px; }

.cta-section .section-subtitle {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-content {
    max-width: 560px;
    margin: 0 auto;
}

/* === Tool cards === */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-card h3 { font-weight: 700; font-size: 1.0625rem; }
.tool-card p { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.6; }

/* === Download / Getting Started forms === */
.download-form { max-width: 640px; }

.stack-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stack-btn {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
    font-family: inherit;
}

.stack-btn:hover {
    border-color: var(--border-light);
    color: var(--text);
}

.stack-btn.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* === Callout (spec page) === */
.callout {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.callout-info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--text);
}

.callout-info strong { color: var(--accent); }

/* === Platform table (landing page) === */
.platform-table-wrap {
    max-width: 720px;
    margin: 0 auto;
    overflow-x: auto;
}

/* === Responsive overrides === */
@media (max-width: 768px) {
    .nav-github {
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }

    /* Fragmentation */
    .fragmentation-grid { grid-template-columns: 1fr; gap: 8px; }
    .fragmentation-answer { max-width: 100%; }

    /* Stats 6-col → 3-col */
    .stats-grid-6 { grid-template-columns: repeat(3, 1fr); }

    /* Capability 3-col → 1-col */
    .capability-grid-3 { grid-template-columns: 1fr; }

    /* Discovery steps vertical */
    .discovery-steps { flex-direction: column; align-items: stretch; }
    .discovery-arrow { transform: rotate(90deg); text-align: center; padding: 4px 0; }

    /* Superset */
    .superset-item { flex-wrap: wrap; gap: 8px; }
    .superset-label { min-width: auto; }
    .discovery-tokens { margin-left: 0; }
}
