/* ==========================================================================
   Nearest Plug — shared components
   Header, navigation, footer, buttons, form controls, chips, badges, cards,
   page heroes, notices and loading / empty / error states.
   ========================================================================== */

/* ---- Icons -------------------------------------------------------------- */

.icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

.icon--sm {
    width: 1rem;
    height: 1rem;
}

.icon--lg {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-tile {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-text);
}

.icon-tile .icon {
    width: 22px;
    height: 22px;
}

.on-dark .icon-tile,
.icon-tile--dark {
    background: rgba(183, 243, 74, 0.12);
    color: var(--accent);
}

/* ==========================================================================
   Header + navigation
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8, 17, 13, 0.94);
    color: var(--text-on-dark);
    border-bottom: 1px solid var(--border-on-dark);
}

@supports (backdrop-filter: blur(1px)) {
    .site-header {
        background: rgba(8, 17, 13, 0.86);
        backdrop-filter: saturate(150%) blur(14px);
    }
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #fff;
    font-size: 1.1875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
    border-radius: 8px;
}

.brand__mark {
    width: 34px;
    height: 34px;
}

.brand__name span {
    color: var(--accent);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin-inline-start: auto;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    padding: 0;
}

.site-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding-inline: 12px;
    border-radius: var(--r-control);
    color: var(--text-on-dark-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--t-fast), background-color var(--t-fast);
}

.site-nav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.site-nav__link[aria-current] {
    color: #fff;
}

.site-nav__link[aria-current]::after {
    content: "";
    position: absolute;
    inset-inline: 12px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-inline-start: auto;
    padding: 0;
    border: 1px solid var(--border-on-dark);
    border-radius: var(--r-control);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.nav-toggle__bars {
    position: relative;
    width: 18px;
    height: 12px;
}

.nav-toggle__bars span {
    position: absolute;
    inset-inline: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--t-base), opacity var(--t-fast), top var(--t-base);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5px; }
.nav-toggle__bars span:nth-child(3) { top: 10px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
    top: 5px;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
    top: 5px;
    transform: rotate(-45deg);
}

@media (max-width: 900px) {
    /* Without JavaScript the navigation simply wraps under the logo. */
    html:not(.js) .site-header__inner {
        flex-wrap: wrap;
        padding-block: var(--sp-3);
    }

    html:not(.js) .site-nav {
        width: 100%;
        flex-wrap: wrap;
    }

    html:not(.js) .site-nav__list {
        flex-wrap: wrap;
    }

    .js .nav-toggle {
        display: inline-flex;
    }

    .js .site-nav {
        position: absolute;
        top: 100%;
        inset-inline: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-3);
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        padding: var(--sp-3) var(--gutter) var(--sp-5);
        background: var(--ink-950);
        border-bottom: 1px solid var(--border-on-dark);
        box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.6);
    }

    .js .site-header[data-nav-open="true"] .site-nav {
        display: flex;
        animation: nav-reveal 180ms var(--ease);
    }

    .js .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .js .site-nav__link {
        min-height: 48px;
        padding-inline: 14px;
        font-size: 1rem;
    }

    .js .site-nav__link[aria-current] {
        background: rgba(183, 243, 74, 0.1);
    }

    .js .site-nav__link[aria-current]::after {
        inset-inline: 0 auto;
        top: 12px;
        bottom: 12px;
        width: 3px;
        height: auto;
    }

    .js .site-nav .btn {
        min-height: 48px;
    }
}

@keyframes nav-reveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   Buttons + links
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--r-input);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--t-fast), border-color var(--t-fast),
        color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.btn:active {
    transform: translateY(1px);
}

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn--primary {
    background: var(--accent);
    color: var(--ink-950);
}

.btn--primary:hover {
    background: var(--accent-strong);
    box-shadow: 0 8px 24px -10px rgba(168, 232, 63, 0.7);
}

.btn--dark {
    background: var(--ink-900);
    color: #fff;
}

.btn--dark:hover {
    background: var(--ink-700);
}

.btn--outline {
    border-color: var(--border-strong);
    background: var(--surface);
    color: var(--text);
}

.btn--outline:hover {
    border-color: var(--text-muted);
    background: var(--bg-alt);
}

.btn--ghost-light {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.btn--ghost-light:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.btn--sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: var(--fs-sm);
    border-radius: var(--r-control);
}

.btn--lg {
    min-height: 52px;
    padding: 0 24px;
    font-size: var(--fs-base);
}

.btn--block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-text);
    font-weight: 600;
    text-decoration: none;
}

.link-arrow .icon {
    width: 1.1em;
    height: 1.1em;
    transition: transform var(--t-fast);
}

.link-arrow:hover {
    text-decoration: underline;
}

.link-arrow:hover .icon {
    transform: translateX(3px);
}

[dir="rtl"] .link-arrow .icon {
    transform: scaleX(-1);
}

.on-dark .link-arrow {
    color: var(--accent);
}

.text-link {
    color: var(--accent-text);
    font-weight: 600;
}

/* ==========================================================================
   Form controls
   ========================================================================== */

.field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.field__label {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.search-field > .icon {
    position: absolute;
    inset-inline-start: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.input,
.search-field input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-input);
    background: var(--surface);
    color: var(--text);
    font-size: var(--fs-base);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.search-field input {
    padding-inline-start: 44px;
}

.input::placeholder,
.search-field input::placeholder {
    color: #7c8883;
}

.input:hover,
.search-field input:hover {
    border-color: var(--text-muted);
}

.input:focus-visible,
.search-field input:focus-visible,
.select:focus-visible {
    outline: none;
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 3px rgba(63, 111, 13, 0.25);
}

.select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 40px 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-input);
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6c66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
    color: var(--text);
    font-size: var(--fs-base);
    appearance: none;
    cursor: pointer;
}

[dir="rtl"] .select {
    padding: 0 14px 0 40px;
    background-position: left 14px center;
}

/* ==========================================================================
   Filter chips
   ========================================================================== */

.chip-group {
    display: grid;
    gap: var(--sp-2);
    min-width: 0;
}

.chip-group__label {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    min-width: 0;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--text);
    font-size: var(--fs-sm);
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.chip:hover {
    border-color: var(--border-strong);
    background: var(--bg-alt);
}

.chip[aria-pressed="true"] {
    border-color: var(--ink-900);
    background: var(--ink-900);
    color: #fff;
}

.chip__count {
    min-width: 24px;
    padding: 1px 7px;
    border-radius: var(--r-pill);
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.chip[aria-pressed="true"] .chip__count {
    background: var(--accent);
    color: var(--ink-950);
}

.chip__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--dot, var(--status-unknown));
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.chip--on-dark {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-on-dark);
}

.chip--on-dark:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 720px) {
    .chip-row--scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        padding-bottom: 2px;
        -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
        mask-image: linear-gradient(90deg, #000 85%, transparent);
    }

    .chip-row--scroll::-webkit-scrollbar {
        display: none;
    }

    .chip-row--scroll > * {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .chip-row--scroll > :last-child {
        margin-inline-end: 32px;
    }
}

/* ==========================================================================
   Status pills, verification + listing badges, tags
   ========================================================================== */

.pill,
.badge,
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 2px 10px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot);
    flex-shrink: 0;
}

.pill--working { --dot: var(--status-working); background: #e7f8ee; color: #166534; }
.pill--busy { --dot: var(--status-busy); background: #fef3d7; color: #854d0e; }
.pill--maintenance { --dot: var(--status-maintenance); background: #ffedd5; color: #9a3412; }
.pill--offline { --dot: var(--status-offline); background: #fde8e8; color: #991b1b; }
.pill--closed { --dot: var(--status-closed); background: #eceeed; color: #4b5550; }
.pill--unknown { --dot: var(--status-unknown); background: #eef2f6; color: #475569; }

.badge .icon {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.badge--verified { background: #e7f8ee; color: #166534; border-color: #c6ecd4; }
.badge--community { background: #fef3d7; color: #854d0e; border-color: #f5e1a8; }
.badge--unverified { background: #f3f5f8; color: #475569; border-color: #dfe5ec; }

.badge--charger { background: var(--accent-soft); color: var(--accent-text); border-color: #d9efb1; }
.badge--possible { background: transparent; color: #475569; border-color: var(--border-strong); }

/* Outlined badges need light text on dark panels and page heroes. */
.on-dark .badge--possible,
.page-hero .badge--possible {
    color: var(--text-on-dark);
    border-color: rgba(255, 255, 255, 0.28);
}

.tag {
    background: var(--surface-muted);
    color: var(--text-muted);
}

.tag--outline {
    background: transparent;
    border-color: var(--border);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.value-unknown {
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Typography helpers
   ========================================================================== */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--sp-3);
    color: var(--accent-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.on-dark .eyebrow,
.page-hero .eyebrow {
    color: var(--accent);
}

.lead {
    color: var(--text-muted);
    font-size: var(--fs-md);
    line-height: 1.65;
}

.on-dark .lead {
    color: var(--text-on-dark-muted);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-5);
    margin-bottom: clamp(24px, 3.5vw, 40px);
}

.section-head__title {
    max-width: 24ch;
    font-size: var(--fs-2xl);
    letter-spacing: -0.03em;
}

.section-head__lead {
    max-width: 62ch;
    margin-top: var(--sp-3);
    color: var(--text-muted);
    font-size: var(--fs-base);
}

.on-dark .section-head__lead {
    color: var(--text-on-dark-muted);
}

@media (max-width: 720px) {
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   Page hero (inner pages)
   ========================================================================== */

.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(40px, 6vw, 72px) clamp(56px, 7vw, 96px);
    background: var(--ink-950);
    color: var(--text-on-dark);
}

.page-hero::before,
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.page-hero::before {
    background:
        radial-gradient(640px 320px at 88% -10%, rgba(183, 243, 74, 0.12), transparent 70%),
        radial-gradient(520px 320px at 0% 120%, rgba(52, 211, 153, 0.09), transparent 70%);
}

.page-hero::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 90% at 80% 0%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 90% at 80% 0%, #000 20%, transparent 75%);
}

.page-hero h1 {
    max-width: 20ch;
    font-size: var(--fs-3xl);
    letter-spacing: -0.035em;
}

.page-hero h1 span {
    color: var(--accent);
}

.page-hero__lead {
    max-width: 62ch;
    margin-top: var(--sp-4);
    color: var(--text-on-dark-muted);
    font-size: var(--fs-md);
}

.page-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2) var(--sp-4);
    margin-top: var(--sp-5);
    color: var(--text-on-dark-muted);
    font-size: var(--fs-sm);
}

.page-hero__meta .icon {
    color: var(--accent);
}

.page-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.page-hero--compact {
    padding-block: clamp(32px, 5vw, 56px) clamp(64px, 8vw, 96px);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 0;
    list-style: none;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.breadcrumb li + li::before {
    content: "/";
    color: var(--border-strong);
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--text);
    text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
    max-width: 40ch;
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero .breadcrumb ol,
.on-dark .breadcrumb ol {
    color: var(--text-on-dark-muted);
}

.page-hero .breadcrumb li + li::before {
    color: rgba(255, 255, 255, 0.3);
}

.page-hero .breadcrumb a:hover,
.page-hero .breadcrumb [aria-current="page"] {
    color: #fff;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background: var(--surface);
}

.card--pad {
    padding: clamp(20px, 2.5vw, 28px);
}

.card--hover {
    transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}

.card--hover:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* A card whose title link covers the whole card. */
.card-link {
    color: inherit;
    text-decoration: none;
}

.card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.card-link:focus-visible {
    outline: none;
}

.card:has(.card-link:focus-visible) {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.card-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

/* ==========================================================================
   Definition / specification lists
   ========================================================================== */

.spec-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--sp-6);
    margin: 0;
    border-top: 1px solid var(--border);
}

.spec-list__item {
    display: grid;
    gap: 4px;
    align-content: start;
    min-width: 0;
    padding-block: var(--sp-4);
    border-bottom: 1px solid var(--border);
}

.spec-list dt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.spec-list dt .icon {
    width: 16px;
    height: 16px;
}

.spec-list dd {
    margin: 0;
    font-size: var(--fs-base);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.spec-list dd small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: 500;
}

@media (max-width: 560px) {
    .spec-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Notices
   ========================================================================== */

.notice {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-4) 18px;
    border: 1px solid var(--border);
    border-radius: var(--r-input);
    background: var(--bg-alt);
    color: var(--text);
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.notice > .icon {
    margin-top: 1px;
    color: var(--accent-text);
}

.notice strong {
    font-weight: 700;
}

.notice--warning {
    border-color: #f2dfae;
    background: #fff9eb;
}

.notice--warning > .icon {
    color: #a16207;
}

.notice--dark {
    border-color: var(--border-on-dark);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-on-dark-muted);
}

.notice--dark > .icon {
    color: var(--accent);
}

/* ==========================================================================
   Loading, empty and error states
   ========================================================================== */

.state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-7) var(--sp-5);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-card);
    background: var(--surface);
    text-align: center;
}

.state__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--surface-muted);
    color: var(--text-muted);
}

.state__icon .icon {
    width: 24px;
    height: 24px;
}

.state--error {
    border-style: solid;
    border-color: #f3c9c9;
}

.state--error .state__icon {
    background: #fde8e8;
    color: #991b1b;
}

.state__title {
    font-size: var(--fs-lg);
    letter-spacing: -0.01em;
}

.state__text {
    max-width: 48ch;
    color: var(--text-muted);
}

.state__detail {
    max-width: 60ch;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    overflow-wrap: anywhere;
}

.state .btn-row {
    justify-content: center;
    margin-top: var(--sp-2);
}

.state--compact {
    padding: var(--sp-6) var(--sp-4);
}

.skeleton {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, #e9eeeb 25%, #f4f7f5 40%, #e9eeeb 60%);
    background-size: 300% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton--text {
    height: 0.9em;
    margin-block: 0.35em;
}

.skeleton--on-dark {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.12) 40%, rgba(255, 255, 255, 0.06) 60%);
    background-size: 300% 100%;
}

@keyframes skeleton-shimmer {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}

/* ==========================================================================
   Stats
   ========================================================================== */

.stat {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.stat__value {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.stat__label {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: 500;
}

.on-dark .stat__label {
    color: var(--text-on-dark-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    margin-top: auto;
    padding-block: var(--sp-8) var(--sp-5);
    background: var(--ink-950);
    color: var(--text-on-dark-muted);
    font-size: var(--fs-sm);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: var(--sp-6) var(--sp-7);
}

.site-footer__brand p {
    max-width: 34ch;
    margin-top: var(--sp-4);
    line-height: 1.7;
}

.site-footer__heading {
    margin-bottom: var(--sp-4);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer__links {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.site-footer__links a {
    color: var(--text-on-dark-muted);
    text-decoration: none;
    transition: color var(--t-fast);
}

.site-footer__links a:hover {
    color: #fff;
    text-decoration: underline;
}

.coming-soon {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(243, 247, 244, 0.6);
}

.coming-soon__tag {
    padding: 1px 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--r-pill);
    font-size: 0.75rem;
    font-weight: 600;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--sp-3) var(--sp-5);
    margin-top: var(--sp-7);
    padding-top: var(--sp-5);
    border-top: 1px solid var(--border-on-dark);
}

@media (max-width: 960px) {
    .site-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 380px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   EV card (homepage + EV database)
   ========================================================================== */

.ev-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ev-card__media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    padding: 18px 26px 12px;
    background:
        radial-gradient(120% 80% at 50% 100%, rgba(183, 243, 74, 0.16), transparent 60%),
        linear-gradient(160deg, #f6f9f7 0%, #e9efeb 100%);
    border-bottom: 1px solid var(--border);
}

.vehicle-art {
    width: 100%;
    max-width: 260px;
    height: auto;
    fill: none;
    stroke: #8b9a93;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ev-card__market {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.ev-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
}

.ev-card__brand {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ev-card__title {
    margin-top: 4px;
    font-size: var(--fs-xl);
    letter-spacing: -0.025em;
}

.ev-card__meta {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

.ev-card__specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.ev-card__specs dt {
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: 500;
}

.ev-card__specs dd {
    margin: 2px 0 0;
    font-size: var(--fs-base);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.ev-card__specs dd small {
    display: inline-block;
    margin-inline-start: 2px;
    padding: 0 6px;
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: 1px;
}

.ev-card__cta,
.guide-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 18px;
    color: var(--accent-text);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.card--hover:hover .ev-card__cta .icon,
.card--hover:hover .guide-card__cta .icon {
    transform: translateX(3px);
}

.ev-card__cta .icon,
.guide-card__cta .icon {
    transition: transform var(--t-fast);
}

/* ==========================================================================
   Guide card (homepage, guides library, related guides)
   ========================================================================== */

.guide-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.guide-card__media {
    --tint: rgba(183, 243, 74, 0.2);
    position: relative;
    display: grid;
    place-items: center;
    height: 148px;
    overflow: hidden;
    background:
        radial-gradient(90% 120% at 100% 0%, var(--tint), transparent 60%),
        linear-gradient(150deg, var(--ink-800), var(--ink-950));
}

.guide-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(120deg, transparent 20%, #000);
    mask-image: linear-gradient(120deg, transparent 20%, #000);
}

.guide-card__media--buying { --tint: rgba(74, 222, 128, 0.22); }
.guide-card__media--battery { --tint: rgba(52, 211, 153, 0.24); }
.guide-card__media--ownership { --tint: rgba(148, 197, 170, 0.24); }
.guide-card__media--range { --tint: rgba(134, 239, 172, 0.22); }

.guide-card__icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(183, 243, 74, 0.3);
    border-radius: 16px;
    background: rgba(8, 17, 13, 0.6);
    color: var(--accent);
}

.guide-card__icon .icon {
    width: 26px;
    height: 26px;
}

.guide-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
}

.guide-card__category {
    color: var(--accent-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guide-card__title {
    margin-top: 8px;
    font-size: var(--fs-lg);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.guide-card__excerpt {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.guide-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: var(--fs-xs);
}

.guide-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.guide-card--featured {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.guide-card--featured .guide-card__media {
    height: auto;
    min-height: 240px;
}

.guide-card--featured .guide-card__icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
}

.guide-card--featured .guide-card__icon .icon {
    width: 34px;
    height: 34px;
}

.guide-card--featured .guide-card__body {
    padding: clamp(22px, 3vw, 36px);
}

.guide-card--featured .guide-card__title {
    font-size: var(--fs-2xl);
    letter-spacing: -0.03em;
}

.guide-card--featured .guide-card__excerpt {
    font-size: var(--fs-base);
}

@media (max-width: 760px) {
    .guide-card--featured {
        grid-template-columns: 1fr;
    }

    .guide-card--featured .guide-card__media {
        min-height: 160px;
    }
}

/* ==========================================================================
   Shared grids
   ========================================================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: clamp(16px, 2vw, 22px);
}

.card-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1000px) {
    .card-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .card-grid--3 {
        grid-template-columns: 1fr;
    }
}

.skeleton-card {
    display: grid;
    gap: 10px;
    padding: 0 0 22px;
    overflow: hidden;
}

.skeleton-card .skeleton:first-child {
    height: 148px;
    border-radius: 0;
}

.skeleton-card .skeleton:not(:first-child) {
    margin-inline: 22px;
}

/* ==========================================================================
   Long-form text (guides, data and privacy pages)
   ========================================================================== */

.prose {
    max-width: 68ch;
    font-size: 1.0625rem;
    line-height: 1.75;
}

.prose section + section {
    margin-top: clamp(32px, 4vw, 44px);
}

.prose h2 {
    font-size: var(--fs-xl);
    letter-spacing: -0.02em;
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose p {
    margin-top: var(--sp-4);
    color: #2c3a33;
}

.prose ul,
.prose ol {
    margin-top: var(--sp-4);
    padding-inline-start: 1.3em;
    color: #2c3a33;
}

.prose li + li {
    margin-top: 8px;
}

.prose a {
    color: var(--accent-text);
    font-weight: 600;
}

.prose h3 {
    margin-top: var(--sp-5);
    font-size: var(--fs-md);
    letter-spacing: -0.01em;
}

.card-grid .state {
    grid-column: 1 / -1;
}

.site-footer__bottom a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-footer__bottom a:hover {
    color: #fff;
}

/* Data providers list (data & verification page) */
.provider-list {
    display: grid;
    margin-top: var(--sp-4);
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.provider-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-sm);
}

.provider-list li span {
    color: var(--text-muted);
}
