/* RobustAPI Public — clean, dev-focused design */

/* ── Hero ─────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0f9ff 100%);
    border-bottom: 1px solid #d1fae5;
    padding: 3rem 0 2.5rem;
    margin-bottom: 2rem;
}

.hero .container {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #111827;
}

.hero-subtitle {
    color: #4b5563;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.hero-search {
    display: flex;
    gap: 0.5rem;
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

.hero-search input {
    flex: 1;
    margin-bottom: 0;
}

.hero-search button {
    margin-bottom: 0;
    white-space: nowrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 0.9rem;
}

.hero-stats strong {
    color: #059669;
    font-size: 1.1rem;
}

/* ── Nav ──────────────────────────────────────────── */
.nav-brand {
    text-decoration: none;
}

/* ── Sections ─────────────────────────────────────── */
.section {
    margin-bottom: 2.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin-bottom: 0;
}

.section-header a {
    font-size: 0.9rem;
}

/* ── API card grid ────────────────────────────────── */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.api-card {
    display: block;
    padding: 1rem;
    border-radius: 8px;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.api-card:hover {
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.1);
    text-decoration: none;
    color: inherit;
}

.api-card h4 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.api-card-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 0.3rem;
}

.api-card-auth {
    background: #f3f4f6;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.api-card-category {
    font-size: 0.75rem;
    color: #059669;
}

/* ── Category tags ────────────────────────────────── */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.82rem;
    text-decoration: none;
    transition: background 0.15s;
}

.category-tag:hover {
    background: #d1fae5;
    color: #065f46;
    text-decoration: none;
}

.category-tag span {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* ── Summary cards ────────────────────────────────── */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    padding: 1rem;
    border-radius: 8px;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
}

.card h3 {
    margin-bottom: 0.25rem;
    font-size: 2rem;
}

.card small {
    color: var(--pico-muted-color);
}

/* ── Charts ───────────────────────────────────────── */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.chart-box {
    padding: 1rem;
    border-radius: 8px;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
}

.chart-box h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
}

/* ── Badges ───────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-verified { background: #dbeafe; color: #1e40af; }
.badge-public { background: #d1fae5; color: #065f46; }
.badge-personal { background: #fef3c7; color: #92400e; }
.badge-admin { background: #fee2e2; color: #991b1b; }
.badge-unclear { background: #e5e7eb; color: #374151; }
.badge-missing { background: #e5e7eb; color: #6b7280; }

/* ── Status indicators ────────────────────────────── */
.status-ok { color: #059669; }
.status-warn { color: #d97706; }
.status-err { color: #dc2626; }
.status-unknown { color: #6b7280; }

/* ── Empty states ─────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--pico-muted-color);
}

/* ── Tables ───────────────────────────────────────── */
figure {
    overflow-x: auto;
}

table {
    font-size: 0.9rem;
}

mark {
    font-size: 0.85rem;
}

/* ── Footer ───────────────────────────────────────── */
footer {
    text-align: center;
    padding: 1.5rem 0;
    color: #9ca3af;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    .hero-search {
        flex-direction: column;
    }
    .chart-grid {
        grid-template-columns: 1fr;
    }
    .api-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-stats {
        gap: 1rem;
    }
}

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

/* Run button for examples */
.run-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    margin: 0;
}

.run-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Run output display */
.run-output {
    margin-top: 0.5rem;
}

.run-result {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    padding: 1rem;
}

.run-result.error {
    border-color: #dc2626;
    background: #fee2e2;
}

.run-result .response-body {
    margin-top: 1rem;
}

/* ── Parameter cards ──────────────────────────────── */
.param-card {
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid #6c757d;
    background: var(--pico-card-background-color);
    border-radius: 0 4px 4px 0;
}

.param-card p {
    margin: 0.25rem 0;
}

.param-card small {
    color: #6b7280;
}

.run-result pre {
    background: var(--pico-card-sectioning-background-color);
    padding: 0.75rem;
    border-radius: 8px;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}
