/* Shared chrome for homepage landing + closed previews A/B. Tokens only (AP-15). */

body:is(.home-preview, .home-landing) {
    --hn-accent: var(--egeok-color-action-accent);
    --hn-accent-hover: var(--egeok-color-action-accent-hover);
    --hn-text: var(--egeok-color-text-primary);
    --hn-muted: var(--egeok-color-text-muted);
    --hn-hf-accent: var(--egeok-color-action-accent);
    --hn-hf-muted: var(--egeok-color-text-muted);
}

body.home-preview .hn-preview-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    margin: 0 0 1.5rem;
    padding: 0.55rem 0.85rem;
    background: var(--egeok-color-bg-muted);
    border: 1px solid var(--egeok-color-border-default);
    border-radius: var(--egeok-radius-md);
    font-size: 0.8125rem;
    line-height: 1.3;
}

body.home-preview .hn-preview-switch__label {
    font-weight: 700;
    color: var(--egeok-color-text-primary);
    margin-right: 0.25rem;
}

body.home-preview .hn-preview-switch a {
    color: var(--egeok-color-text-secondary);
    text-decoration: none;
    font-weight: 500;
}

body.home-preview .hn-preview-switch a:hover,
body.home-preview .hn-preview-switch a:focus-visible {
    color: var(--egeok-color-action-accent);
    text-decoration: underline;
}

body.home-preview .hn-preview-switch a[aria-current="page"] {
    color: var(--egeok-color-text-primary);
    font-weight: 700;
    text-decoration: none;
}

body.home-preview .hn-preview-switch__sep {
    color: var(--egeok-color-border-default);
}

body:is(.home-preview, .home-landing) .hn-lms__pitch--preview,
body:is(.home-preview, .home-landing) .hn-lms__pitch--landing {
    margin-bottom: 1.5rem;
}

body:is(.home-preview, .home-landing) .hn-lms__pitch-lead {
    margin: 0;
    max-width: 38rem;
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    font-weight: 400;
    line-height: 1.5;
    color: var(--egeok-color-text-muted);
}

body:is(.home-preview, .home-landing) .hn-section-heading {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 600;
    font-style: normal;
    letter-spacing: -0.02em;
    color: var(--egeok-color-text-primary);
}

body:is(.home-preview, .home-landing) .hn-tiles-section {
    margin-bottom: var(--hn-section-gap);
}

body:is(.home-preview, .home-landing) .hn-tiles-section .hn-tiles--gh {
    margin-bottom: 0;
}

body:is(.home-preview, .home-landing) .home-techno-news__heading,
body:is(.home-preview, .home-landing) .home-techno-news__heading-text {
    font-style: normal;
}

body:is(.home-preview, .home-landing) .hn-tile--math {
    --hn-tile-accent: var(--egeok-color-text-secondary);
    --hn-tile-accent-soft: var(--egeok-color-bg-muted);
}

@media (max-width: 639px) {
    body.home-preview .hn-preview-switch {
        margin-bottom: 1.15rem;
        padding: 0.5rem 0.7rem;
    }
}
