/* =========================================================
   EVCompareHub Compare Portal
   Suggested path: /ev/compare-portal.css
   ========================================================= */

.compare-portal-page {
    background: #ffffff !important;
    color: #111827;
}

.portal-main {
    padding: 0 0 28px;
}

.portal-shell {
    max-width: 1320px;
        margin-top: 16px;
}

.portal-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    color: #667085;
    font-size: 13px;
}

.portal-breadcrumb a:hover {
    color: var(--green);
}

.portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 14px;
}

.portal-hero-copy,
.portal-hero-card,
.portal-section,
.portal-editorial-block {
    background: #ffffff;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    box-shadow: 0 0 1px rgba(0,0,0,.10);
}

.portal-hero-copy {
    padding: 22px 24px;
}

.portal-eyebrow {
    margin: 0 0 6px;
    font-size: 0.8rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .08em;
    color: var(--green);
}

.portal-hero h1 {
    margin: 0;
    font-size: 2.15rem;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.035em;
    color: #1f2937;
}

.portal-hero p {
    margin: 10px 0 0;
    max-width: 820px;
    font-size: 15px;
    line-height: 1.7;
    color: #5f6368;
}

.portal-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.portal-primary-btn,
.portal-secondary-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.portal-primary-btn {
    background: var(--green);
    color: #ffffff !important;
    border: 1px solid var(--green);
}

.portal-secondary-btn {
    background: #ffffff;
    color: var(--green-dark) !important;
    border: 1px solid #cde7dd;
}

.portal-hero-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #f4fbf7 0%, #ffffff 100%);
}

.portal-hero-card strong {
    font-size: 2.4rem;
    line-height: 1;
    font-weight: 900;
    color: var(--green-dark);
}

.portal-hero-card span {
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
}

.portal-hero-card p {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #667085;
}

.portal-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
}

.portal-quick-links a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border-radius: 999px;
    background: #f5f7fb;
    border: 1px solid #e7ebf0;
    color: #1f2937;
    font-size: 13px;
    font-weight: 800;
}

.portal-quick-links a:hover {
    background: #eef8f4;
    border-color: #cde7dd;
    color: var(--green-dark);
}

.portal-section {
    padding: 16px;
    margin-bottom: 14px;
}

.portal-budget-section {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.portal-budget-section > .portal-section-head {
    padding: 16px;
    margin-bottom: 14px;
    background: #ffffff;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    box-shadow: 0 0 1px rgba(0,0,0,.10);
}

.portal-budget-section .portal-section {
    padding: 16px;
}

.portal-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 12px;
}

.portal-section-head h2 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #1f2937;
}

.portal-section-head p {
    margin: 6px 0 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
}

.portal-pair-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.portal-pair-card {
    min-width: 0;
    display: block;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 0 1px rgba(0,0,0,.08);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.portal-pair-card:hover {
    transform: translateY(-1px);
    border-color: #cde7dd;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .06);
}

.portal-pair-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.portal-pair-tag,
.portal-pair-score {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}

.portal-pair-tag {
    background: var(--green-soft);
    color: var(--green-dark);
}

.portal-pair-score {
    background: #f3f4f6;
    color: #334155;
}

.portal-pair-images {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.portal-car-shot {
    min-width: 0;
    height: 110px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #fafcfc;
}

.portal-car-shot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(0.85);
}

.portal-vs {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid #d9dde3;
    background: rgba(255,255,255,.96);
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    z-index: 2;
}

.portal-pair-card h3 {
    margin: 0 0 8px;
    min-height: 48px;
    font-size: 1.08rem;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #111827;
}

.portal-pair-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.portal-pair-meta span {
    min-width: 0;
    padding: 7px 8px;
    border-radius: 8px;
    background: #f8fafb;
    border: 1px solid #edf0f2;
    color: #1f2937;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
    text-align: center;
}

.portal-pair-card p {
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.55;
}

.portal-editorial-block {
    padding: 20px 22px;
    margin-top: 20px;
}

.portal-editorial-block h2 {
    margin: 0 0 10px;
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 900;
    color: #1f2937;
}

.portal-editorial-block p {
    margin: 0;
    max-width: 980px;
    color: #5f6368;
    font-size: 14px;
    line-height: 1.75;
}

.portal-editorial-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.portal-editorial-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f5f7fb;
    color: #1f2937;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.portal-editorial-links a:hover {
    background: #eef8f4;
    color: var(--green-dark);
}

@media (max-width: 1180px) {
    .portal-hero {
        grid-template-columns: 1fr;
    }

    .portal-pair-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .portal-main {
        padding-bottom: 20px;
    }

    .portal-breadcrumb {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .portal-hero-copy {
        padding: 18px;
    }

    .portal-hero h1 {
        font-size: 1.65rem;
        line-height: 1.12;
    }

    .portal-hero p {
        font-size: 14px;
        line-height: 1.65;
    }

    .portal-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .portal-hero-card {
        padding: 18px;
    }

    .portal-hero-card strong {
        font-size: 2rem;
    }

    .portal-quick-links {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .portal-quick-links a {
        white-space: nowrap;
    }

    .portal-section,
    .portal-budget-section .portal-section,
    .portal-budget-section > .portal-section-head,
    .portal-editorial-block {
        padding: 14px;
    }

    .portal-section-head {
        display: block;
    }

    .portal-section-head h2 {
        font-size: 1.25rem;
    }

    .portal-pair-grid {
        grid-template-columns: 1fr;
    }

    .portal-pair-card {
        padding: 10px;
    }

    .portal-car-shot {
        height: 96px;
    }

    .portal-pair-card h3 {
        min-height: auto;
        font-size: 1.02rem;
    }
}
/* =========================================================
   Compare Portal - Vote mini + clearer card meta
   ========================================================= */

.portal-pair-price-diff {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #334155;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}

.portal-vote-mini {
    margin: 10px 0 8px;
    padding: 10px;
    border: 1px solid #dce8e1;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbf9 0%, #f2f7f4 100%);
}

.portal-vote-mini-head {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.portal-vote-mini-head strong {
    font-size: 1rem;
    line-height: 1;
    font-weight: 900;
    color: #0f172a;
}

.portal-vote-mini-head strong:last-child {
    text-align: right;
}

.portal-vote-mini-head span {
    text-align: center;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
    color: #46685d;
}

.portal-vote-bar {
    position: relative;
    display: flex;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbe5df;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.08);
}

.portal-vote-bar i {
    display: block;
    height: 100%;
}

.portal-vote-a {
    background: linear-gradient(90deg, #3f8f71 0%, #57a884 100%);
}

.portal-vote-b {
    background: linear-gradient(90deg, #7d8795 0%, #596273 100%);
}

.portal-vote-names {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 7px;
}

.portal-vote-names span {
    min-width: 0;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 800;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-vote-names span:last-child {
    text-align: right;
}

.portal-pair-reason {
    margin-top: 8px !important;
    color: #667085;
    font-size: 13px;
    line-height: 1.55;
}

@media (max-width: 767px) {
    .portal-vote-mini {
        padding: 9px;
    }

    .portal-vote-mini-head {
        grid-template-columns: 44px 1fr 44px;
    }

    .portal-vote-mini-head span {
        font-size: 11px;
    }
}
/* =========================================================
   Compare Portal - Real Vote mini
   ========================================================= */

.portal-pair-price-diff {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #334155;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}

.portal-vote-mini {
    margin: 10px 0 8px;
    padding: 10px;
    border: 1px solid #dce8e1;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbf9 0%, #f2f7f4 100%);
}

.portal-vote-title {
    margin-bottom: 8px;
    text-align: center;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 900;
    color: var(--green-dark);
}

.portal-vote-mini-head {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.portal-vote-mini-head strong {
    font-size: 1rem;
    line-height: 1;
    font-weight: 900;
    color: #0f172a;
}

.portal-vote-mini-head strong:last-child {
    text-align: right;
}

.portal-vote-mini-head span {
    text-align: center;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
    color: #46685d;
}

.portal-vote-bar {
    display: flex;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbe5df;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.08);
}

.portal-vote-bar i {
    display: block;
    height: 100%;
}

.portal-vote-a {
    background: linear-gradient(90deg, #3f8f71 0%, #57a884 100%);
}

.portal-vote-b {
    background: linear-gradient(90deg, #7d8795 0%, #596273 100%);
}

.portal-vote-names {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 7px;
}

.portal-vote-names span {
    min-width: 0;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 800;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-vote-names span:last-child {
    text-align: right;
}

.portal-pair-reason {
    margin-top: 8px !important;
    color: #667085;
    font-size: 13px;
    line-height: 1.55;
}
/* =========================================================
   Compare Portal - Arena / Ranking
   ========================================================= */

.portal-arena {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 14px;
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    background:
        radial-gradient(circle at top left, rgba(63, 143, 113, .13), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fbf9 100%);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
}

.portal-arena-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portal-arena-eyebrow {
    display: inline-flex;
    width: fit-content;
    min-height: 24px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
}

.portal-arena-copy h2 {
    margin: 10px 0 6px;
    font-size: 1.75rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.03em;
    color: #111827;
}

.portal-arena-copy p {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.65;
}

.portal-arena-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.portal-arena-actions span {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.portal-arena-card {
    display: block;
    padding: 14px;
    border: 1px solid #dce8e1;
    border-radius: 12px;
    background: #ffffff;
    text-decoration: none;
    color: inherit;
}

.portal-arena-card:hover {
    border-color: #badfce;
    box-shadow: 0 10px 26px rgba(16, 24, 40, .08);
}

.portal-arena-cars {
    display: grid;
    grid-template-columns: 1fr 42px 1fr;
    gap: 10px;
    align-items: center;
}

.portal-arena-cars div {
    min-width: 0;
    text-align: center;
}

.portal-arena-cars img {
    width: 100%;
    height: 135px;
    object-fit: contain;
    display: block;
    margin-bottom: 6px;
    transform: scale(1.08);
}

.portal-arena-cars strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
}

.portal-arena-cars span {
    display: block;
    margin-top: 3px;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
}

.portal-arena-cars em {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.portal-arena-vote {
    display: grid;
    grid-template-columns: 52px 1fr 52px;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.portal-arena-vote strong {
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
}

.portal-arena-vote strong:last-child {
    text-align: right;
}

.portal-leaderboard {
    padding: 16px;
    margin-bottom: 14px;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 0 1px rgba(0,0,0,.10);
}

.portal-leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.portal-rank-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafb;
    color: inherit;
    text-decoration: none;
}

.portal-rank-card:hover {
    background: #eef8f4;
    border-color: #cde7dd;
}

.portal-rank-no {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f07f22;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
}

.portal-rank-body {
    min-width: 0;
}

.portal-rank-body span {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--green-dark);
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
}

.portal-rank-body strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 900;
}

.portal-rank-body small {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
}

@media (max-width: 1180px) {
    .portal-arena {
        grid-template-columns: 1fr;
    }

    .portal-leaderboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .portal-arena {
        padding: 14px;
        border-radius: 8px;
    }

    .portal-arena-copy h2 {
        font-size: 1.35rem;
    }

    .portal-arena-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .portal-arena-cars {
        grid-template-columns: 1fr 34px 1fr;
        gap: 6px;
    }

    .portal-arena-cars img {
        height: 92px;
    }

    .portal-arena-cars em {
        width: 34px;
        height: 34px;
        font-size: 10px;
    }

    .portal-arena-cars strong {
        font-size: 12px;
    }

    .portal-arena-vote {
        grid-template-columns: 44px 1fr 44px;
    }

    .portal-leaderboard {
        padding: 14px;
    }

    .portal-leaderboard-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   Compare Portal - Arena / Ranking Fix
   ========================================================= */

.compare-portal-page img {
    max-width: 100%;
    height: auto;
}

.portal-main {
    width: 100%;
    background: #ffffff;
}

.portal-shell {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12px;
    padding-right: 12px;
}

/* ---------- Featured Arena ---------- */

.portal-arena {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 14px;
    margin: 0 0 14px;
    padding: 16px;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    background:
        radial-gradient(circle at top left, rgba(63, 143, 113, .14), transparent 36%),
        linear-gradient(135deg, #ffffff 0%, #f8fbf9 100%);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
}

.portal-arena-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.portal-arena-eyebrow {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--green-dark);
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .08em;
}

.portal-arena-copy h2 {
    margin: 10px 0 6px;
    font-size: 1.75rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.03em;
    color: #111827;
}

.portal-arena-copy p {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.65;
}

.portal-arena-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.portal-arena-actions span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.portal-arena-card {
    display: block;
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce8e1;
    border-radius: 12px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.portal-arena-card:hover {
    border-color: #badfce;
    box-shadow: 0 10px 26px rgba(16, 24, 40, .08);
}

.portal-arena-cars {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.portal-arena-cars div {
    min-width: 0;
    text-align: center;
}

.portal-arena-cars img {
    width: 100%;
    max-width: 240px;
    height: 130px;
    object-fit: contain;
    display: block;
    margin: 0 auto 6px;
    transform: scale(1.04);
}

.portal-arena-cars strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
}

.portal-arena-cars span {
    display: block;
    margin-top: 3px;
    color: #667085;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 800;
}

.portal-arena-cars em {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.portal-arena-vote {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.portal-arena-vote strong {
    color: #111827;
    font-size: 1rem;
    line-height: 1;
    font-weight: 900;
}

.portal-arena-vote strong:last-child {
    text-align: right;
}

/* ---------- Leaderboard ---------- */

.portal-leaderboard {
    padding: 16px;
    margin: 0 0 14px;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 0 1px rgba(0,0,0,.10);
}

.portal-leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.portal-rank-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafb;
    color: inherit;
    text-decoration: none;
}

.portal-rank-card:hover {
    background: #eef8f4;
    border-color: #cde7dd;
}

.portal-rank-no {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f07f22;
    color: #ffffff;
    font-size: 15px;
    line-height: 1;
    font-weight: 900;
}

.portal-rank-body {
    min-width: 0;
}

.portal-rank-body span {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--green-dark);
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
}

.portal-rank-body strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 900;
}

.portal-rank-body small {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
}

/* ---------- Force card image not to explode ---------- */

.portal-pair-card img,
.portal-car-shot img {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

.portal-pair-card {
    overflow: hidden;
}

/* ---------- Mobile ---------- */

@media (max-width: 1180px) {
    .portal-arena {
        grid-template-columns: 1fr;
    }

    .portal-leaderboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .portal-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .portal-arena {
        padding: 14px;
        border-radius: 8px;
    }

    .portal-arena-copy h2 {
        font-size: 1.35rem;
    }

    .portal-arena-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .portal-arena-cars {
        grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
        gap: 6px;
    }

    .portal-arena-cars img {
        max-width: 150px;
        height: 88px;
        transform: none;
    }

    .portal-arena-cars em {
        width: 34px;
        height: 34px;
        font-size: 10px;
    }

    .portal-arena-cars strong {
        font-size: 12px;
    }

    .portal-arena-vote {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }

    .portal-leaderboard {
        padding: 14px;
    }

    .portal-leaderboard-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   Compare Portal Mobile UX Fix
   ให้เข้ามาแล้วเห็นคู่ compare เร็วขึ้น
   ========================================================= */

@media (max-width: 767px) {

    /* ลดพื้นที่ hero */
    .portal-hero {
        gap: 10px;
        margin-bottom: 10px;
    }

    .portal-hero-copy {
        padding: 18px 16px;
    }

    .portal-eyebrow {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .portal-hero h1 {
        font-size: 1.85rem;
        line-height: 1.12;
        letter-spacing: -0.04em;
    }

    .portal-hero p {
        font-size: 15px;
        line-height: 1.65;
        margin-top: 10px;
    }

    .portal-hero-actions {
        gap: 8px;
        margin-top: 14px;
    }

    .portal-primary-btn,
    .portal-secondary-btn {
        min-height: 48px;
        font-size: 16px;
        border-radius: 14px;
    }

    /* กล่อง 197 รุ่น ให้เตี้ยลง */
    .portal-hero-card {
        padding: 18px 16px;
    }

    .portal-hero-card strong {
        font-size: 2.35rem;
    }

    .portal-hero-card span {
        font-size: 1rem;
        line-height: 1.25;
    }

    .portal-hero-card p {
        font-size: 14px;
        line-height: 1.55;
    }

    /* quick link ให้ไม่กินพื้นที่เยอะ */
    .portal-quick-links {
        gap: 8px;
        margin-bottom: 10px;
        padding-bottom: 4px;
    }

    .portal-quick-links a {
        min-height: 42px;
        padding: 0 16px;
        font-size: 14px;
    }

    /* Arena ให้เด่นขึ้นและเห็นรถก่อน */
    .portal-arena {
        display: flex;
        flex-direction: column;
        padding: 14px;
        gap: 12px;
        margin-bottom: 12px;
    }

    .portal-arena-card {
        order: 1;
        padding: 12px;
        border-radius: 14px;
    }

    .portal-arena-copy {
        order: 2;
    }

    .portal-arena-copy h2 {
        font-size: 1.45rem;
        line-height: 1.18;
        margin: 8px 0 6px;
    }

    .portal-arena-copy p {
        font-size: 14px;
        line-height: 1.55;
    }

    .portal-arena-actions {
        margin-top: 12px;
        gap: 8px;
    }

    .portal-arena-actions .portal-primary-btn {
        min-height: 46px;
        font-size: 15px;
    }

    .portal-arena-actions span {
        min-height: 40px;
        justify-content: center;
        font-size: 14px;
    }

    .portal-arena-cars {
        grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
        gap: 6px;
    }

    .portal-arena-cars img {
        max-width: 155px;
        height: 92px;
        object-fit: contain;
        transform: scale(1.05);
    }

    .portal-arena-cars strong {
        font-size: 12px;
        line-height: 1.25;
        min-height: 32px;
    }

    .portal-arena-cars span {
        font-size: 11px;
    }

    .portal-arena-cars em {
        width: 34px;
        height: 34px;
        font-size: 10px;
    }

    .portal-arena-vote {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 8px;
        margin-top: 12px;
    }

    .portal-arena-vote strong {
        font-size: 14px;
    }
}
@media (max-width: 767px) {
    .portal-hero-actions {
        grid-template-columns: 1fr 1fr;
    }

    .portal-primary-btn,
    .portal-secondary-btn {
        min-height: 44px;
        font-size: 14px;
        padding: 0 10px;
    }
}
@media (max-width: 767px) {
    .portal-hero-card {
        display: none;
    }
}
/* =========================================================
   Compare Portal - Final Mobile Priority Fix
   ========================================================= */

@media (max-width: 767px) {
    .portal-hero {
        margin-bottom: 10px;
    }

    .portal-hero-copy {
        padding: 15px 14px;
    }

    .portal-eyebrow {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .portal-hero h1 {
        font-size: 1.55rem;
        line-height: 1.16;
    }

    .portal-hero p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.55;
    }

    .portal-hero-card {
        display: none;
    }

    .portal-quick-links {
        position: sticky;
        top: 0;
        z-index: 30;
        background: #ffffff;
        margin: 0 -10px 10px;
        padding: 8px 10px;
        border-bottom: 1px solid #edf0f2;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .portal-quick-links a {
        min-height: 36px;
        padding: 0 13px;
        font-size: 13px;
        white-space: nowrap;
    }

    .portal-arena {
        margin-bottom: 12px;
        padding: 12px;
    }

    .portal-arena-card {
        order: 1;
    }

    .portal-arena-copy {
        order: 2;
    }

    .portal-arena-eyebrow {
        font-size: 10px;
        min-height: 22px;
    }

    .portal-arena-copy h2 {
        font-size: 1.28rem;
        line-height: 1.18;
    }

    .portal-arena-copy p {
        font-size: 13px;
        line-height: 1.5;
    }

    .portal-arena-actions .portal-primary-btn {
        min-height: 42px;
        font-size: 14px;
    }

    .portal-arena-cars img {
        height: 82px;
    }

    .portal-section-head h2 {
        font-size: 1.22rem;
        line-height: 1.25;
    }

    .portal-section-head p {
        font-size: 13px;
        line-height: 1.5;
    }
}
/* =========================================================
   Compare Portal - Final UX / SEO Landing Polish
   ========================================================= */

.portal-shell {
    max-width: 1480px;
}

.portal-section,
.portal-leaderboard,
.portal-arena,
.portal-editorial-block,
.portal-hero-copy,
.portal-hero-card {
    border-radius: 14px;
}

.portal-section {
    padding: 0;
    overflow: hidden;
    border: 1px solid #d9dde3;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .035);
}

.portal-section-head {
    margin: 0;
    padding: 16px 18px;
    align-items: center;
    background:
        linear-gradient(90deg, #f0faf5 0%, #ffffff 68%),
        #ffffff;
    border-bottom: 1px solid #e5efe9;
}

.portal-section-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-bottom: 6px;
    padding: 0 8px;
    border-radius: 999px;
    background: #dff5ea;
    color: var(--green-dark);
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portal-section-head h2 {
    position: relative;
    padding-left: 14px;
    font-size: 1.55rem;
    line-height: 1.18;
}

.portal-section-head h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .14em;
    width: 5px;
    height: 1.15em;
    border-radius: 999px;
    background: var(--green);
}

.portal-section-head p {
    max-width: 860px;
}

.portal-section-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #dce8e1;
    color: #46685d;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.portal-pair-grid {
    padding: 14px;
}

.portal-section-more {
    padding: 0 14px 14px;
    text-align: center;
}

.portal-section-more a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f5f7fb;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.portal-section-more a:hover {
    background: #eef8f4;
    border-color: #cde7dd;
    color: var(--green-dark);
}

/* zone ใหญ่ระหว่างหมวด */
.portal-zone-title {
    margin: 18px 0 14px;
    padding: 18px 20px;
    border: 1px solid #cfe4da;
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(63,143,113,.18), transparent 34%),
        linear-gradient(135deg, #f2fbf6 0%, #ffffff 76%);
    box-shadow: 0 8px 22px rgba(16, 24, 40, .045);
}

.portal-zone-title span {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    margin-bottom: 8px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--green-dark);
    border: 1px solid #cde7dd;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portal-zone-title h2 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.025em;
    color: #111827;
}

.portal-zone-title p {
    margin: 8px 0 0;
    max-width: 900px;
    color: #667085;
    font-size: 14px;
    line-height: 1.65;
}

/* Desktop ให้เต็มจอกว่าเดิม */
@media (min-width: 1440px) {
    .portal-pair-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .portal-arena {
        grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    }
}

/* จอ desktop ปกติยังคง 3 columns */
@media (min-width: 1024px) and (max-width: 1439px) {
    .portal-pair-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Budget section ไม่ต้องซ้อนหัวข้อมากเกิน */
.portal-budget-section {
    margin-bottom: 14px;
}

.portal-budget-section > .portal-section-head {
    display: none;
}

/* Mobile */
@media (max-width: 767px) {
    .portal-shell {
        max-width: 100%;
    }

    .portal-section {
        border-radius: 12px;
    }

    .portal-section-head {
        display: block;
        padding: 14px;
    }

    .portal-section-head h2 {
        font-size: 1.25rem;
        line-height: 1.22;
    }

    .portal-section-count {
        margin-top: 10px;
        width: fit-content;
        min-height: 30px;
        font-size: 11px;
    }

    .portal-pair-grid {
        padding: 10px;
        grid-template-columns: 1fr;
    }

    .portal-zone-title {
        margin: 14px 0 10px;
        padding: 15px 14px;
        border-radius: 14px;
    }

    .portal-zone-title h2 {
        font-size: 1.35rem;
    }

    .portal-zone-title p {
        font-size: 13px;
        line-height: 1.55;
    }

    .portal-section-more {
        padding: 0 10px 12px;
    }
}
/* =========================================================
   Compare Portal - Smart Grid Count Fix
   แก้ปัญหา 4 cards แล้วเหลือพื้นที่ว่างบน desktop
   ========================================================= */

@media (min-width: 1180px) {
    .portal-pair-grid.is-four {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .portal-pair-grid.is-three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .portal-pair-grid.is-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 920px;
    }

    .portal-pair-grid.is-one {
        grid-template-columns: minmax(0, 1fr);
        max-width: 460px;
    }
}

/* tablet ใช้ 2 columns เพื่อไม่ให้ card แคบเกิน */
@media (min-width: 768px) and (max-width: 1179px) {
    .portal-pair-grid.is-four,
    .portal-pair-grid.is-three,
    .portal-pair-grid.is-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* mobile เหลือ 1 column เสมอ */
@media (max-width: 767px) {
    .portal-pair-grid.is-four,
    .portal-pair-grid.is-three,
    .portal-pair-grid.is-two,
    .portal-pair-grid.is-one {
        grid-template-columns: 1fr;
        max-width: none;
    }
}
/* =========================================================
   Compare Portal - Landing Internal Links
   ========================================================= */

.portal-landing-links-block {
    margin-top: 18px;
    margin-bottom: 18px;
    background:
        radial-gradient(circle at top left, rgba(63, 143, 113, .10), transparent 34%),
        #ffffff;
}

.portal-landing-link-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.portal-landing-link-group {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fbfcfd;
}

.portal-landing-link-group h3 {
    margin: 0 0 10px;
    color: var(--green-dark);
    font-size: 15px;
    line-height: 1.25;
    font-weight: 900;
}

.portal-landing-link-group .portal-editorial-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
}

.portal-landing-link-group .portal-editorial-links a {
    min-height: 42px;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid #edf0f2;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    font-size: 13px;
    font-weight: 850;
    text-align: center;
}

.portal-landing-link-group .portal-editorial-links a:hover {
    background: #eef8f4;
    border-color: #cde7dd;
    color: var(--green-dark);
}

@media (max-width: 900px) {
    .portal-landing-link-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .portal-landing-links-block {
        margin-top: 14px;
        margin-bottom: 14px;
    }

    .portal-landing-link-group {
        padding: 12px;
    }

    .portal-landing-link-group .portal-editorial-links {
        grid-template-columns: 1fr;
    }

    .portal-landing-link-group .portal-editorial-links a {
        min-height: 44px;
        font-size: 14px;
    }
}
.portal-zone-links {
    margin-top: 18px;
}

.portal-mini-link-block {
    margin-top: 22px;
    margin-bottom: 26px;
}

.portal-mini-link-block h2 {
    margin-bottom: 8px;
}

.portal-mini-link-block p {
    max-width: 820px;
}
/* =========================================================
   Compare Portal - Latest Vote
   ========================================================= */

.portal-latest-vote-section {
    margin-bottom: 14px;
}

.portal-latest-vote-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.portal-latest-vote-card {
    display: block;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 0 1px rgba(0,0,0,.08);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.portal-latest-vote-card:hover {
    transform: translateY(-1px);
    border-color: #cde7dd;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .06);
}

.portal-latest-vote-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.portal-latest-vote-top span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--green-dark);
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
}

.portal-latest-vote-top time {
    color: #667085;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}

.portal-latest-vote-card strong {
    display: block;
    min-height: 42px;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 900;
}

.portal-latest-vote-card strong em {
    color: var(--green-dark);
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.portal-latest-vote-percent {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0 6px;
}

.portal-latest-vote-percent span {
    color: #111827;
    font-size: 13px;
    line-height: 1;
    font-weight: 900;
}

.portal-latest-vote-card small {
    display: block;
    margin-top: 7px;
    color: #667085;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .portal-latest-vote-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .portal-latest-vote-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .portal-latest-vote-card {
        padding: 11px;
    }

    .portal-latest-vote-card strong {
        min-height: auto;
        font-size: 13px;
    }
}