/* ==========================================================================
   Cheap Tyre Analysis Tool — Redesigned
   "Are Cheap Tyres Worth It?" - BEM naming: .cta-*
   Full-width card-grid layout with radar chart centrepiece
   ========================================================================== */

/* Smooth scroll for anchor links */
html:has(.article-header-card) {
    scroll-behavior: smooth;
}

/* --- Max-width constraint for ultra-wide screens --- */
.tool-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Hide the wrapper's H1 and description — integrated into header card --- */
.tool-container > h1,
.tool-container > h1 + p {
    display: none;
}

/* --- Intro paragraph (below header card, before sections) --- */
.cta-intro {
    line-height: 1.7;
    color: #333;
    margin-bottom: 0.5rem;
}

.cta-intro__image {
    float: right;
    width: auto;
    max-height: 165px;
    max-width: min(36%, 240px);
    border-radius: 10px;
    margin: 0 0 0.35rem 1rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    object-fit: cover;
}

/* --- Hero headline callout (below intro) --- */
.cta-hero__headline {
    line-height: 1.55;
    color: #1e293b;
    margin: 0 0 1.5rem;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border-left: 4px solid var(--tyre-reviews-blue, #0db1e7);
    border-radius: 0 8px 8px 0;
}

.cta-hero__headline strong {
    color: #dc2626;
    font-size: 1.15em;
    font-weight: 800;
}

/* ==========================================================================
   Intro paragraphs — bold key numbers
   ========================================================================== */

/* Grid legend (shared between radar section and legacy) */
.cta-grid-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #555;
    font-weight: 500;
    margin-top: 0.75rem;
}

.cta-grid-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.cta-grid-legend__item::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.cta-grid-legend__item--excellent::before { background: linear-gradient(135deg, #c8e6c9, #e8f5e9); box-shadow: inset 0 0 0 1px #a5d6a7; }
.cta-grid-legend__item--good::before     { background: linear-gradient(135deg, #ffe082, #fff8e1); box-shadow: inset 0 0 0 1px #ffcc02; }
.cta-grid-legend__item--poor::before     { background: linear-gradient(135deg, #ef9a9a, #fce4ec); box-shadow: inset 0 0 0 1px #e57373; }

/* ==========================================================================
   Sections — full-width with dividers and more breathing room
   ========================================================================== */
.cta-section {
    margin-bottom: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.cta-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

/* Scroll offset for anchored sections */
.cta-section[id] {
    scroll-margin-top: 1rem;
}

.cta-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
}

.cta-section h2 i {
    color: var(--tyre-reviews-blue, #0db1e7);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.cta-section__intro {
    line-height: 1.7;
    color: #444;
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   Impact Simulator
   ========================================================================== */
.cta-impact__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
    gap: 1rem;
    align-items: start;
}

.cta-impact__simulator {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 45%), linear-gradient(145deg, #f8fcff 0%, #ffffff 60%);
    border: 1px solid #dbe8f0;
    border-radius: 14px;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.06);
}

.cta-impact__simulator::before {
    content: '';
    position: absolute;
    right: -70px;
    top: -70px;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    pointer-events: none;
}

.cta-impact__simulator--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: #f8fafc;
}

.cta-impact__simulator--empty p {
    margin: 0;
    color: #475569;
}

.cta-impact__controls {
    position: relative;
    z-index: 1;
}

.cta-impact__scene {
    margin: 0 0 0.5rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.5;
}

.cta-impact__speed-label {
    display: block;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.cta-impact__speed-readout {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.45rem;
    color: #334155;
}

.cta-impact__speed-readout strong {
    font-size: 1.15rem;
    color: #0f172a;
}

.cta-impact__speed-range {
    width: 100%;
    accent-color: #0ea5e9;
}

.cta-impact__hint {
    margin: 0.5rem 0 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.45;
}

.cta-impact__timeline-wrap {
    margin-top: 1rem;
}

.cta-impact__start-label {
    color: #334155;
    font-weight: 600;
    font-size: 0.87rem;
    margin-bottom: 0.35rem;
}

.cta-impact__legend {
    display: flex;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.cta-impact__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.75);
    padding: 0.18rem 0.4rem;
    border-radius: 999px;
    max-width: 100%;
    white-space: normal;
    line-height: 1.3;
}

.cta-impact__legend-item i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    flex-shrink: 0;
}

.cta-impact__legend-item--premium i {
    background: #0ea5e9;
}

.cta-impact__legend-item--budget i {
    background: #ef4444;
}

.cta-impact__timeline {
    position: relative;
    height: 76px;
    border-radius: 10px;
    background: linear-gradient(180deg, #223047 0%, #334155 100%);
    border: 1px solid #1f2937;
    overflow: visible;
}

.cta-impact__timeline::before {
    content: '';
    position: absolute;
    inset: 50% 14px auto 14px;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0 16px, transparent 16px 30px);
    transform: translateY(-50%);
}

.cta-impact__gap-band {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.16), rgba(248, 113, 113, 0.25));
}

.cta-impact__marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px solid #fff;
}

.cta-impact__marker--premium {
    border-color: #0ea5e9;
}

.cta-impact__marker--budget {
    border-color: #ef4444;
}

.cta-impact__event-label {
    margin: 1rem 0 0.35rem;
    color: #1e293b;
    font-weight: 600;
}

.cta-impact__still-moving {
    margin: 0;
    line-height: 1.6;
    color: #1f2937;
}

.cta-impact__still-moving strong {
    color: #b91c1c;
}

.cta-impact__metrics {
    margin-top: 0.9rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.cta-impact__metric {
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cta-impact__metric strong {
    font-size: 1.08rem;
    color: #0f172a;
    line-height: 1.2;
}

.cta-impact__metric small {
    color: #64748b;
    font-weight: 600;
}

.cta-impact__metric-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    font-weight: 700;
}

.cta-impact__narrative {
    margin: 0.85rem 0 0;
    line-height: 1.65;
    color: #334155;
}

.cta-impact__data-note {
    margin: 0.6rem 0 0;
    color: #64748b;
    font-size: 0.85rem;
}

.cta-impact__cards {
    display: grid;
    gap: 0.8rem;
}

.cta-impact-card {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0.95rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.cta-impact-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    color: #0f172a;
}

.cta-impact-card h3 i {
    margin-right: 0.35rem;
}

.cta-impact-card p {
    margin: 0;
    line-height: 1.55;
    color: #334155;
}

.cta-impact-card small {
    display: block;
    margin-top: 0.45rem;
    color: #64748b;
    line-height: 1.45;
}

.cta-impact-card--value {
    border-top: 3px solid #0ea5e9;
}

.cta-impact-card--odds {
    border-top: 3px solid #f59e0b;
}

.cta-impact-card--reviews {
    border-top: 3px solid #10b981;
}

/* ==========================================================================
   Chart Card Grids
   ========================================================================== */
.cta-chart-grid--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.cta-chart-grid--3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.cta-chart-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s ease;
}

.cta-chart-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.cta-chart-card--full {
    grid-column: 1 / -1;
}

/* ==========================================================================
   Chart Descriptions
   ========================================================================== */
.cta-learn-more {
    margin-top: 0.7rem;
}

.cta-learn-more p {
    line-height: 1.65;
    color: #5a6169;
    margin: 0;
}

/* ==========================================================================
   Callout Box (full-width)
   ========================================================================== */
.cta-callout {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.cta-callout--warning {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.cta-callout__icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    color: #e65100;
}

.cta-callout__content {
    line-height: 1.65;
    color: #333;
}

.cta-callout__content strong {
    color: #c62828;
}

/* ==========================================================================
   Review Count Badges
   ========================================================================== */
.cta-review-counts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.cta-review-counts__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.5rem;
    border-radius: 8px;
    text-align: center;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-review-counts__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.cta-review-counts__count {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
    color: inherit;
}

.cta-review-counts__label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
    opacity: 0.9;
    font-weight: 600;
    color: inherit;
}

/* ==========================================================================
   Verdict — Card grid
   ========================================================================== */
.cta-verdict h2 {
    margin-bottom: 1.25rem;
}

.cta-verdict-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cta-verdict__card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border-top: 4px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-verdict__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.cta-verdict__card--safety {
    border-top-color: #d32f2f;
}

.cta-verdict__card--safety h3 i { color: #d32f2f; }

.cta-verdict__card--value {
    border-top-color: #f57f17;
}

.cta-verdict__card--value h3 i { color: #f57f17; }

.cta-verdict__card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.5rem;
}

.cta-verdict__card h3 i {
    font-size: 1.1rem;
    margin-right: 0.4rem;
}

.cta-verdict__card p {
    margin: 0;
    line-height: 1.7;
    color: #444;
}

.cta-verdict__bottom-line {
    background: linear-gradient(135deg, #e3f7fc 0%, #f0f9ff 100%);
    border: 1px solid rgba(13, 177, 231, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(13, 177, 231, 0.08);
}

.cta-verdict__bottom-line h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0a9bcc;
    margin: 0 0 0.5rem;
}

.cta-verdict__bottom-line h3 i {
    color: var(--tyre-reviews-blue, #0db1e7);
    margin-right: 0.4rem;
}

.cta-verdict__bottom-line p {
    margin: 0;
    line-height: 1.7;
    color: #333;
}

/* ==========================================================================
   Methodology — Collapsible
   ========================================================================== */
.cta-methodology-details summary {
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: #333;
    padding: 0.5rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px dashed #ccc;
}

.cta-methodology-details[open] summary {
    border-bottom-color: var(--tyre-reviews-blue, #0db1e7);
    border-bottom-style: solid;
}

.cta-methodology-details summary::-webkit-details-marker {
    display: none;
}

.cta-methodology-details summary::before {
    content: '+';
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--tyre-reviews-blue, #0db1e7);
    margin-right: 0.5rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f7fc;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.cta-methodology-details[open] summary::before {
    content: '\2212';
    background: var(--tyre-reviews-blue, #0db1e7);
    color: #fff;
}

.cta-methodology-details .cta-methodology-body {
    padding: 0.5rem 0 0;
    line-height: 1.7;
    color: #444;
}

.cta-methodology-details .cta-methodology-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    margin: 1rem 0 0.3rem;
}

.cta-methodology-details .cta-methodology-body p {
    margin: 0 0 0.75rem;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.cta-faq__item {
    margin-bottom: 0.5rem;
    border: 1px solid #e0e4e8;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.cta-faq__item:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

.cta-faq__item[open] {
    border-color: var(--tyre-reviews-blue, #0db1e7);
    box-shadow: 0 3px 12px rgba(13, 177, 231, 0.08);
}

.cta-faq__question {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    background: #f8fafb;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease;
}

.cta-faq__question::-webkit-details-marker {
    display: none;
}

.cta-faq__question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--tyre-reviews-blue, #0db1e7);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f7fc;
}

.cta-faq__item[open] .cta-faq__question {
    background: #fff;
    border-bottom: 1px solid #e8f7fc;
}

.cta-faq__item[open] .cta-faq__question::after {
    content: '\2212';
    background: var(--tyre-reviews-blue, #0db1e7);
    color: #fff;
}

.cta-faq__question:hover {
    background: #eef6f9;
}

.cta-faq__answer {
    padding: 1rem 1.25rem;
    line-height: 1.7;
    color: #444;
}

.cta-faq__answer p {
    margin: 0;
}

/* --- Override bar chart counter for this tool --- */
.cta-section .css-bar-chart__name::before,
.cta-chart-card .css-bar-chart__name::before {
    content: none;
}

/* --- Bar chart tweaks for this tool --- */
.cta-section .css-bar-chart,
.cta-chart-card .css-bar-chart {
    margin-top: 0.5rem;
}

.cta-section .css-bar-chart__name,
.cta-chart-card .css-bar-chart__name {
    font-weight: 600;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .cta-chart-grid--3col {
        grid-template-columns: 1fr 1fr;
    }

    .cta-impact__layout {
        grid-template-columns: 1fr;
    }

    .cta-impact__cards {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }
}

@media (max-width: 768px) {

    .cta-hero__headline {
        font-size: 0.9rem;
    }

    .cta-intro__image {
        float: none;
        display: block;
        margin: 0 auto 0.75rem;
        max-width: 100%;
        max-height: 180px;
    }

    .cta-chart-grid--2col,
    .cta-chart-grid--3col {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .cta-verdict-grid {
        grid-template-columns: 1fr;
    }

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

    .cta-section {
        margin-bottom: 1.5rem;
        padding-top: 1.5rem;
    }

    .cta-review-counts {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .cta-review-counts__count {
        font-size: 1.2rem;
    }

    .cta-callout {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cta-impact__simulator {
        padding: 0.95rem;
    }

    .cta-impact__speed-readout strong {
        font-size: 1.05rem;
    }

    .cta-impact__metrics {
        grid-template-columns: 1fr;
    }

    .cta-impact__timeline {
        height: 66px;
    }

    .cta-impact__legend {
        gap: 0.45rem 0.65rem;
    }

    .cta-impact__legend-item {
        font-size: 0.76rem;
    }

    .cta-impact__cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cta-review-counts {
        grid-template-columns: 1fr 1fr;
    }

}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
    .article-header-card__nav { display: none; }
    .cta-section { page-break-inside: avoid; }
    .cta-grid__cell--excellent,
    .cta-grid__cell--good,
    .cta-grid__cell--poor { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cta-learn-more { display: block; }
}
