/* UniLab doc — typography + landing hero on top of Furo */

:root {
    --ul-hero-bg: linear-gradient(135deg, #eff6ff 0%, #ede9fe 50%, #fef3c7 100%);
    --ul-hero-border: rgba(99, 102, 241, 0.18);
    --ul-hero-text-shadow: none;
    --ul-card-hover: 0 8px 24px rgba(37, 99, 235, 0.10);
}

/* Dark theme overrides — Furo uses body[data-theme="dark"] for explicit
   dark mode and the prefers-color-scheme media query for auto (when
   data-theme="auto"). We mirror both. */
body[data-theme="dark"] {
    --ul-hero-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
    --ul-hero-border: rgba(96, 165, 250, 0.25);
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) {
        --ul-hero-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
        --ul-hero-border: rgba(96, 165, 250, 0.25);
    }
}

/* ---------- Language switcher ---------- */
.language-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-background-border);
}

.language-switcher__label,
.landing-language-picker__label {
    color: var(--color-foreground-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.language-switcher__select,
.landing-language-picker__select {
    min-width: 10rem;
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    background: var(--color-background-primary);
    color: var(--color-foreground-primary);
    font: inherit;
    line-height: 1.4;
    padding: 0.45rem 2rem 0.45rem 0.7rem;
}

.language-switcher__select:focus,
.landing-language-picker__select:focus {
    border-color: var(--color-brand-primary);
    outline: 2px solid color-mix(in srgb, var(--color-brand-primary) 28%, transparent);
    outline-offset: 2px;
}

.landing-language-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.1rem;
}

.landing-language-picker__select {
    min-width: 13rem;
    background: var(--color-background-primary);
}

/* ---------- Landing hero ---------- */
.landing-hero {
    background: var(--ul-hero-bg);
    border: 1px solid var(--ul-hero-border);
    border-radius: 16px;
    padding: 2.4rem 2rem 2rem 2rem;
    margin: 0 0 2rem 0;
}

.landing-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0.3rem 0 0.5rem 0;
    background: var(--ul-hero-h1-gradient, linear-gradient(90deg, #1e40af, #6d28d9, #be185d));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body[data-theme="dark"] {
    --ul-hero-h1-gradient: linear-gradient(90deg, #93c5fd, #c4b5fd, #fbcfe8);
}
@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) {
        --ul-hero-h1-gradient: linear-gradient(90deg, #93c5fd, #c4b5fd, #fbcfe8);
    }
}

.landing-hero h3 {
    font-weight: 500;
    margin-top: 0;
    color: var(--color-foreground-secondary);
    line-height: 1.4;
}

.landing-hero p {
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 56rem;
}

.landing-badge {
    display: inline-block !important;
    margin: 0 4px 8px 0 !important;
    vertical-align: middle;
}

/* ---------- Card polish ---------- */
.sd-card {
    margin-bottom: 0.6rem;
    border: 1px solid var(--color-background-border);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.sd-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ul-card-hover);
    border-color: var(--color-brand-primary);
}

.sd-card-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ---------- Typography ---------- */
.highlight pre {
    line-height: 1.55;
    font-size: 0.9em;
    border-radius: 8px;
}

h1, h2, h3, h4 {
    letter-spacing: -0.015em;
}

h2 {
    margin-top: 2.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--color-background-border);
}

/* ---------- Tables in cards ---------- */
.sd-card table {
    margin: 0;
    font-size: 0.9em;
}

.sd-card th, .sd-card td {
    padding: 4px 8px;
}

/* ---------- Inline kbd ---------- */
kbd {
    background: var(--color-background-secondary);
    border: 1px solid var(--color-foreground-border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.85em;
    font-family: var(--font-stack--monospace);
}

/* ---------- Mermaid diagrams ---------- */
.mermaid {
    text-align: center;
    background: var(--color-background-secondary);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

/* ---------- Feature list (changelog teaser) ---------- */
.feature-list ul {
    list-style: none;
    padding-left: 0;
}
.feature-list li {
    padding: 0.5rem 0.8rem;
    margin: 0.4rem 0;
    background: var(--color-background-secondary);
    border-left: 3px solid var(--color-brand-primary);
    border-radius: 0 6px 6px 0;
}

/* ---------- Buttons ---------- */
.sd-btn {
    margin: 0.3rem 0.3rem 0.3rem 0;
}

/* ---------- Sidebar caption ---------- */
.sidebar-tree .caption {
    color: var(--color-brand-primary);
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 1rem;
}

/* ---------- Sidebar language switcher ---------- */
.sidebar-lang-switcher {
    padding: 0.4rem 0.8rem;
    margin: 0 0 0.2rem 0;
}
.sidebar-lang-switcher__select {
    width: 100%;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid var(--color-foreground-border);
    border-radius: 6px;
    background: var(--color-background-secondary);
    color: var(--color-foreground-primary);
    cursor: pointer;
    appearance: auto;
}
.sidebar-lang-switcher__select:hover {
    border-color: var(--color-brand-primary);
}

/* Hide old body-injected language switcher */
.language-switcher { display: none !important; }
.landing-language-picker { display: none !important; }
