﻿/* ============================================================
   library.css — EW2027 Library page (card grid)
   Uses ew-theme.css tokens.
   ============================================================ */

.lib-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.lib-head {
    margin-bottom: 1.75rem;
}

.lib-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 0.25rem;
}

.lib-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}

/* responsive card grid: 1 / 2 / 3 columns */
.lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.lib-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
    position: relative;
    overflow: hidden;
}

a.lib-card:hover {
    transform: translateY(-3px);
    border-color: var(--ew-front-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.lib-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lib-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.lib-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    color: var(--ew-front-hover);
}

    .lib-icon svg {
        width: 100%;
        height: 100%;
    }

.lib-lock {
    display: inline-flex;
    color: var(--text-muted);
}

.lib-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lib-soon-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--surface-alt);
    padding: 2px 8px;
    border-radius: 20px;
}

.lib-card-text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
}

/* coming-soon cards: dimmed, not clickable */
.lib-card.is-soon {
    opacity: 0.6;
    cursor: default;
}

    .lib-card.is-soon:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--border);
    }

/* locked cards keep a subtle accent so they read as premium */
.lib-card.is-locked .lib-icon {
    color: var(--text-muted);
}

@media (max-width: 700px) {
    .lib-grid {
        grid-template-columns: 1fr;
    }
}
