/* Tyre overview page: "All Tests" preview band (form guide)
   The verdict line, record board and sparkline rendered by
   templates/partials/test-summary.php. The /Test-Results/ sub-page itself
   runs on the tf- shell and takes its styles (the ttr- block) from
   tyre-page-v2.css. */

.tr-verdict {
    margin: 0 0 12px;
    padding-left: 10px;
    border-left: 3px solid var(--tyre-reviews-blue, #0db1e7);
    font-size: 0.95rem;
    color: #334155;
}

/* One board holds the whole record: scoreboard band on top,
   the form-guide rows beneath, the view-all link as its footer */
.tr-board {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.tr-record {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #eef2f6;
}

.tr-record__stats {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.tr-record__stat {
    padding: 9px 4px 8px;
    text-align: center;
    min-width: 0;
}

.tr-record__stat + .tr-record__stat {
    border-left: 1px solid #eef2f6;
}

.tr-record__num {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
}

.tr-record__num--wins {
    color: #b7791f;
}

.tr-record__cap {
    display: block;
    margin-top: 1px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.tr-record .tr-sparkline {
    flex: 0 0 220px;
    border-left: 1px solid #eef2f6;
    background: #fbfdfe;
    padding: 6px 10px 4px;
}

.tr-sparkline svg {
    display: block;
    width: 100%;
    height: auto;
}

.tr-sparkline__caption {
    margin: 0;
    font-size: 0.66rem;
    color: #94a3b8;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Strengths/weaknesses as prose: bold lead-ins, comma lists */
.tr-form-analysis {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: #475569;
}

.tr-form-analysis__part {
    margin-right: 14px;
}

.tr-form-analysis__lead {
    font-weight: 700;
}

.tr-form-analysis__lead--strong { color: #14724b; }
.tr-form-analysis__lead--weak   { color: #b3382f; }

/* Form guide rows inside the board, each test a <details> row */
.tr-form__row:first-child {
    border-top: 0;
}

.tr-form__row + .tr-form__row {
    border-top: 1px solid #eef2f6;
}

.tr-form__sum {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    cursor: pointer;
    list-style: none;
}

.tr-form__sum::-webkit-details-marker {
    display: none;
}

.tr-form__sum:hover {
    background: #f8fafc;
}

.tr-form__sum:focus-visible {
    outline: 2px solid var(--tyre-reviews-blue, #0db1e7);
    outline-offset: -2px;
}

/* Position box: the podium carries the colour */
.tr-form__pos {
    flex: 0 0 54px;
    text-align: center;
    padding: 5px 0 4px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
}

.tr-form__row--gold .tr-form__pos   { background: rgba(212, 167, 44, 0.16); color: #a87b00; }
.tr-form__row--silver .tr-form__pos { background: rgba(154, 165, 177, 0.20); color: #5b6672; }
.tr-form__row--bronze .tr-form__pos { background: rgba(176, 141, 87, 0.18); color: #8a6a43; }

.tr-form__p {
    display: block;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1;
}

.tr-form__of {
    display: block;
    margin-top: 1px;
    font-size: 0.62rem;
    font-weight: 600;
    opacity: 0.75;
}

.tr-form__head {
    flex: 1 1 auto;
    min-width: 0;
}

.tr-form__title {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.tr-form__meta {
    display: block;
    margin-top: 1px;
    font-size: 0.74rem;
    color: #64748b;
}

.tr-form__pick {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--tyre-reviews-blue, #0db1e7);
}

.tr-form__chevron {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin: 0 3px 4px 2px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.tr-form__row[open] > .tr-form__sum .tr-form__chevron {
    transform: rotate(-135deg);
    margin-bottom: -2px;
}

.tr-form__body {
    padding: 2px 14px 12px 80px;
}

.tr-form__quote {
    margin: 0 0 8px;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #475569;
}

.tr-form__quote .fa-quote-left {
    color: #cbd5e1;
    font-size: 0.7rem;
    margin-right: 3px;
}

.tr-form__tags {
    margin: 0 0 8px;
    font-size: 0.8rem;
    color: #475569;
}

.tr-form__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 18px;
    margin: 0;
}

.tr-form__read {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1a5fb4;
    text-decoration: none;
}

.tr-form__read:hover {
    text-decoration: underline;
}

.tr-form__winner {
    font-size: 0.78rem;
    color: #64748b;
}

.tr-form__winner .fa-trophy {
    color: #d4a72c;
}

/* Closing link: the board's footer row */
.tr-form-all {
    margin: 0;
    padding: 8px 12px;
    border-top: 1px solid #eef2f6;
    background: #fbfdfe;
    text-align: center;
}

.tr-form-all a {
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.tr-form-all a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .tr-record {
        flex-direction: column;
    }

    .tr-record .tr-sparkline {
        flex: 1 1 auto;
        border-left: 0;
        border-top: 1px solid #eef2f6;
    }

    .tr-record__num {
        font-size: 1.05rem;
    }

    .tr-record__cap {
        font-size: 0.56rem;
        letter-spacing: 0.02em;
    }
}

@media (max-width: 575px) {
    .tr-form__sum {
        gap: 10px;
        padding: 9px 12px;
    }

    .tr-form__pos {
        flex-basis: 46px;
    }

    .tr-form__title {
        font-size: 0.86rem;
    }

    .tr-form__body {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tr-form__chevron {
        transition: none;
    }
}
