/* ==========================================================================
   REVVARO — /cars  (the car library)
   Rides on style.css for the header, footer, buttons and design tokens.
   Everything here is namespaced .lib-* so it can't leak into other pages.
   ========================================================================== */

.lib-page { background: #fff; }

.lib-main {
    padding: calc(var(--header-height, 80px) + 34px) 0 70px;
    background:
        radial-gradient(1100px 420px at 50% -8%, rgba(0,90,156,.07), transparent 62%),
        linear-gradient(180deg, #F7FAFC 0%, #FFFFFF 340px);
}

/* ---------- breadcrumb ---------- */
.lib-crumb {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 14px;
}
.lib-crumb a { color: var(--color-primary, #005A9C); }
.lib-crumb a:hover { text-decoration: underline; }
.lib-crumb strong { color: #4A5568; font-weight: 700; }
.lib-crumb span { margin: 0 7px; }

/* ---------- page head ---------- */
.lib-h1 {
    font-family: var(--font-heading, 'Lato', sans-serif);
    font-size: clamp(30px, 4.6vw, 46px);
    font-weight: 900;
    letter-spacing: -.028em;
    line-height: 1.1;
    color: var(--color-text-heading, #1A202C);
    margin: 0 0 14px;
}
.lib-lede {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 16px;
    line-height: 1.68;
    color: var(--color-text-body, #4A5568);
    max-width: 660px;
    margin: 0 0 32px;
}

/* ---------- filter ---------- */
.lib-filter {
    position: relative;
    max-width: 340px;
    margin: 0 0 24px;
}
.lib-filter i {
    position: absolute;
    left: 15px; top: 50%; transform: translateY(-50%);
    color: #A0AEC0; font-size: 14px; pointer-events: none;
}
.lib-filter input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 15px;
    color: var(--color-text-heading, #1A202C);
    background: #fff;
    border: 1px solid var(--color-border, #E2E8F0);
    border-radius: 10px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.lib-filter input:focus {
    border-color: var(--color-primary, #005A9C);
    box-shadow: 0 0 0 3px rgba(0,90,156,.12);
}
.lib-none {
    font-family: var(--font-body, 'Roboto', sans-serif);
    color: #718096; font-size: 15px; padding: 20px 2px;
}

/* ---------- card grids (makes & models) ---------- */
.lib-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
}
.lib-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px 44px 20px 22px;
    background: #fff;
    border: 1px solid var(--color-border, #E2E8F0);
    border-radius: 14px;
    color: inherit;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.lib-card:hover {
    transform: translateY(-2px);
    border-color: #CBD9E6;
    box-shadow: 0 14px 30px -16px rgba(16,24,40,.28);
    color: inherit;
}
.lib-card-title {
    font-family: var(--font-heading, 'Lato', sans-serif);
    font-size: 19px; font-weight: 900; letter-spacing: -.018em;
    color: var(--color-text-heading, #1A202C);
    line-height: 1.2;
}
.lib-card-meta {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 13.5px; color: #718096;
}
.lib-card-score {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 13px; color: #718096; margin-top: 4px;
}
.lib-card-score strong {
    font-family: var(--font-heading, 'Lato', sans-serif);
    font-size: 15px; font-weight: 900;
    color: var(--bc, #005A9C); margin-right: 5px;
}
.lib-chev {
    position: absolute;
    right: 18px; top: 50%; transform: translateY(-50%);
    font-size: 13px; color: #CBD5E0;
    transition: transform .16s ease, color .16s ease;
}
.lib-card:hover .lib-chev,
.lib-year:hover .lib-chev { color: var(--color-primary, #005A9C); transform: translateY(-50%) translateX(3px); }

/* ---------- year rows (the deepest level before the detail page) ---------- */
.lib-years { display: flex; flex-direction: column; gap: 12px; }
.lib-year {
    position: relative;
    display: grid;
    grid-template-columns: 92px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 18px 46px 18px 20px;
    background: #fff;
    border: 1px solid var(--color-border, #E2E8F0);
    border-left: 4px solid var(--bc, #005A9C);
    border-radius: 14px;
    color: inherit;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.lib-year:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -16px rgba(16,24,40,.28);
    color: inherit;
}
.lib-year-num {
    font-family: var(--font-heading, 'Lato', sans-serif);
    font-size: 30px; font-weight: 900; letter-spacing: -.035em;
    color: var(--color-text-heading, #1A202C);
    line-height: 1;
}
.lib-year-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lib-year-name {
    font-family: var(--font-heading, 'Lato', sans-serif);
    font-size: 16px; font-weight: 800; letter-spacing: -.012em;
    color: var(--color-text-heading, #1A202C);
}
.lib-year-meta {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 12.5px; color: #94A3B8;
}
.lib-trims { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-trim {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 11.5px; font-weight: 500;
    color: #4A5568; background: #F1F5F9;
    border: 1px solid #E2E8F0;
    padding: 3px 9px; border-radius: 999px;
    white-space: nowrap;
}
.lib-year-score { text-align: right; display: flex; flex-direction: column; gap: 1px; }
.lib-year-score strong {
    font-family: var(--font-heading, 'Lato', sans-serif);
    font-size: 25px; font-weight: 900; letter-spacing: -.03em;
    color: var(--bc, #005A9C); line-height: 1.1;
}
.lib-year-band {
    font-family: var(--font-heading, 'Lato', sans-serif);
    font-size: 12px; font-weight: 800; color: var(--bc, #005A9C);
}

/* ---------- empty state & closing CTA ---------- */
.lib-empty {
    text-align: center;
    padding: 56px 24px;
    background: #F7FAFC;
    border: 1px solid var(--color-border, #E2E8F0);
    border-radius: 16px;
}
.lib-empty i { font-size: 38px; color: #CBD5E0; margin-bottom: 16px; display: block; }
.lib-empty h2 { font-size: 22px; font-weight: 900; margin: 0 0 8px; }
.lib-empty p {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 15px; color: #718096; max-width: 420px; margin: 0 auto 22px; line-height: 1.6;
}

.lib-cta {
    background: #F7FAFC;
    border: 1px solid var(--color-border, #E2E8F0);
    border-radius: 16px;
    padding: 34px 28px;
    text-align: center;
    margin: 46px 0 26px;
}
.lib-cta h2 {
    font-family: var(--font-heading, 'Lato', sans-serif);
    font-size: clamp(20px, 2.8vw, 26px); font-weight: 900;
    letter-spacing: -.02em; margin: 0 0 10px;
}
.lib-cta p {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 15px; line-height: 1.65; color: #4A5568;
    max-width: 540px; margin: 0 auto 22px;
}

.lib-disclaimer {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 12.5px; line-height: 1.6; color: #94A3B8; max-width: 760px;
}

.lib-page .hidden { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
    .lib-main { padding-top: calc(var(--header-height, 80px) + 22px); }
    .lib-grid { grid-template-columns: 1fr; gap: 12px; }
    .lib-filter { max-width: 100%; }

    /* The year row drops the fixed number column and stacks, so long model
       names and trim chips have the full width instead of squeezing. */
    .lib-year {
        grid-template-columns: 1fr auto;
        gap: 6px 14px;
        padding: 16px 40px 16px 16px;
    }
    .lib-year-num { grid-column: 1; font-size: 24px; }
    .lib-year-score { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
    .lib-year-body { grid-column: 1; }
    .lib-year-score strong { font-size: 21px; }
}

/* A single-vehicle sample is flagged rather than dressed up. The muted amber
   reads as "note", not "error" — the page is still useful, it just shouldn't
   be mistaken for a large sample. */
.lib-thin { color: #B7791F; font-weight: 500; }
