/* ============================================================================
   /testimonials — "Testimonials from the chair"

   The page has its own visual world, and it is scoped to .tc-page for the same
   reason /zetai is scoped to .zt-page: the shared _Layout renders its header and
   footer in the same document, so nothing here may touch :root, body or bare
   element selectors.

   The world is the arena, seen from the umpire's chair: the hero is a lit court
   in the dark, the wall of quotes below it is the white reading surface. Every
   structural device on the page carries information — the hairlines in the
   scoreboard strip separate figures, the rule inside a card separates the words
   from their provenance. Nothing is drawn for decoration.

   Type is Archivo (arena signage, tabular figures) + Literata (the quotes read
   as testimony, so they are set in a serif). Both are loaded by the view only.
   ========================================================================= */

.tc-page {
    /* --- Arena (dark sections) --- */
    --tc-arena: #05161F;
    --tc-arena-2: #0A2534;
    --tc-court: #0B3F55;
    --tc-line: #E2F4FC;
    --tc-blue: #189FD8;
    --tc-sky: #56C1E1;
    --tc-amber: #F6A21E;

    /* --- Paper (light sections) --- */
    --tc-paper: #FFFFFF;
    --tc-mist: #F2F6F9;
    --tc-edge: #DCE5EB;
    --tc-edge-2: #BDCBD6;
    --tc-ink: #14202A;
    --tc-ink-2: #33414D;
    --tc-ink-3: #556370;

    --tc-sans: "Archivo", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --tc-serif: "Literata", Georgia, "Times New Roman", serif;

    --tc-r: 14px;
    --tc-r-sm: 10px;
    --tc-shell: 1180px;
    --tc-gutter: clamp(1.25rem, 5vw, 3rem);

    /* ease-out-quart */
    --tc-ease: cubic-bezier(0.165, 0.84, 0.44, 1);

    /* Semantic layers. Nothing on this page needs more than three. */
    --tc-z-court: 0;
    --tc-z-content: 2;
    --tc-z-sticky: 5;

    font-family: var(--tc-sans);
    color: var(--tc-ink);
    overflow-x: clip;
}

    .tc-page *,
    .tc-page *::before,
    .tc-page *::after {
        box-sizing: border-box;
    }

    .tc-page :focus-visible {
        outline: 2px solid var(--tc-blue);
        outline-offset: 3px;
        border-radius: 4px;
    }

.tc-shell {
    max-width: var(--tc-shell);
    margin-inline: auto;
    padding-inline: var(--tc-gutter);
}

/* ============================================================== HERO == */

.tc-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: radial-gradient(125% 85% at 50% -10%, #12455E 0%, #0A2534 45%, #05161F 100%);
    color: #fff;
    padding-block: clamp(4rem, 9vw, 7.5rem) clamp(2rem, 4vw, 3.5rem);
}

/* Floodlight falloff. Without it the court's own lines run straight through the
   scoreboard's dividers and the two grids fight each other. */
.tc-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(5, 22, 31, 0) 0%, rgba(5, 22, 31, 0.72) 45%, rgba(5, 22, 31, 0.92) 100%);
}

/* The court sits behind everything, sized to the section, never scrollable. */
.tc-court {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: var(--tc-z-court);
    width: min(1120px, 86%);
    height: auto;
    opacity: 0.95;
    pointer-events: none;
}

    .tc-court .tc-court-mat {
        fill: rgba(13, 74, 100, 0.5);
        stroke: none;
    }

    .tc-court .tc-court-line {
        fill: none;
        stroke: var(--tc-line);
        stroke-opacity: 0.32;
        stroke-width: 5;
    }

    .tc-court .tc-court-net {
        stroke-opacity: 0.6;
        stroke-width: 7;
    }

/* A landscape court inside a portrait hero shrinks to a smudge. Below the
   tablet breakpoint the court turns end-on instead, which fills the space and
   still reads as a court. */
@media (max-width: 720px) {
    .tc-court {
        rotate: 90deg;
        width: min(880px, 88vh);
        opacity: 0.85;
    }
}

.tc-hero-inner {
    position: relative;
    z-index: var(--tc-z-content);
    text-align: center;
}

.tc-h1 {
    font-family: var(--tc-sans);
    font-weight: 700;
    font-size: clamp(2.35rem, 6vw, 4.75rem);
    line-height: 1.02;
    letter-spacing: -0.032em;
    text-wrap: balance;
    margin: 0;
    color: #fff;
}

.tc-lede {
    max-width: 60ch;
    margin: clamp(1.1rem, 2.4vw, 1.6rem) auto 0;
    font-family: var(--tc-serif);
    font-size: clamp(1.02rem, 1.5vw, 1.2rem);
    line-height: 1.72;
    color: rgba(233, 242, 247, 0.86);
    text-wrap: pretty;
}

/* --- Scoreboard strip: the numbers, set like a board under the court --- */

.tc-board {
    position: relative;
    z-index: var(--tc-z-content);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    max-width: var(--tc-shell);
    margin: clamp(3rem, 7vw, 5rem) auto 0;
    padding-inline: var(--tc-gutter);
    border-top: 1px solid rgba(226, 244, 252, 0.18);
}

.tc-board-cell {
    padding: clamp(1.1rem, 2.2vw, 1.6rem) clamp(0.75rem, 1.6vw, 1.25rem);
    border-left: 1px solid rgba(226, 244, 252, 0.14);
}

    .tc-board-cell:first-child {
        border-left: 0;
        padding-left: 0;
    }

.tc-board-figure {
    display: block;
    font-weight: 700;
    font-size: clamp(1.65rem, 3.4vw, 2.75rem);
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.tc-board-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(226, 244, 252, 0.76);
}

/* On a phone the strip is two-up; the left-hand divider would land mid-row. */
@media (max-width: 640px) {
    .tc-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .tc-board-cell {
        border-left: 0;
        border-top: 1px solid rgba(226, 244, 252, 0.12);
        padding-inline: 0;
    }

        .tc-board-cell:nth-child(2n) {
            padding-left: 1rem;
            border-left: 1px solid rgba(226, 244, 252, 0.12);
        }

        .tc-board-cell:nth-child(-n + 2) {
            border-top: 0;
        }

        /* Five figures don't divide by two — the last one takes the whole row
           rather than leaving a hole beside it. */
        .tc-board-cell:last-child:nth-child(odd) {
            grid-column: 1 / -1;
        }
}

/* ============================================================== WALL == */

.tc-wall {
    background: var(--tc-mist);
    padding-block: clamp(3rem, 6.5vw, 5rem) clamp(3.5rem, 7vw, 5.5rem);
}

.tc-wall-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.tc-h2 {
    font-weight: 700;
    font-size: clamp(1.75rem, 3.2vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -0.028em;
    text-wrap: balance;
    margin: 0;
    color: var(--tc-ink);
}

.tc-wall-note {
    max-width: 46ch;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--tc-ink-3);
}

/* --- Filters --- */

.tc-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--tc-edge);
}

.tc-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border: 1px solid var(--tc-edge-2);
    border-radius: 999px;
    background: var(--tc-paper);
    font-family: var(--tc-sans);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--tc-ink-2);
    cursor: pointer;
    transition: background-color 0.18s var(--tc-ease), border-color 0.18s var(--tc-ease), color 0.18s var(--tc-ease);
}

    .tc-chip:hover {
        border-color: var(--tc-ink-3);
    }

    .tc-chip .tc-chip-n {
        font-size: 0.78rem;
        font-variant-numeric: tabular-nums;
        color: var(--tc-ink-3);
    }

    .tc-chip[aria-pressed="true"] {
        background: var(--tc-arena-2);
        border-color: var(--tc-arena-2);
        color: #fff;
    }

        .tc-chip[aria-pressed="true"] .tc-chip-n {
            color: var(--tc-sky);
        }

.tc-search {
    position: relative;
    flex: 1 1 15rem;
    min-width: 12rem;
    margin-left: auto;
}

    .tc-search svg {
        position: absolute;
        left: 0.85rem;
        top: 50%;
        translate: 0 -50%;
        color: var(--tc-ink-3);
        pointer-events: none;
    }

    .tc-search input {
        width: 100%;
        padding: 0.6rem 2.5rem 0.6rem 2.4rem;
        border: 1px solid var(--tc-edge-2);
        border-radius: 999px;
        background: var(--tc-paper);
        font-family: var(--tc-sans);
        font-size: 0.9rem;
        color: var(--tc-ink);
        transition: border-color 0.18s var(--tc-ease);
    }

        .tc-search input::placeholder {
            color: var(--tc-ink-3);
            opacity: 1;
        }

        .tc-search input:focus {
            border-color: var(--tc-blue);
        }

.tc-search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    translate: 0 -50%;
    display: none;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--tc-mist);
    color: var(--tc-ink-2);
    cursor: pointer;
}

    .tc-search-clear.is-on {
        display: grid;
    }

.tc-count {
    margin: 1.1rem 0 clamp(1.25rem, 2.5vw, 1.75rem);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    color: var(--tc-ink-3);
}

    .tc-count b {
        font-weight: 600;
        color: var(--tc-ink);
    }

/* --- The grid of quotes --- */

.tc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
    grid-auto-flow: row dense;
    gap: clamp(0.85rem, 1.5vw, 1.25rem);
    align-items: start;
}

.tc-card {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
    padding: clamp(1.15rem, 2vw, 1.6rem);
    background: var(--tc-paper);
    border: 1px solid var(--tc-edge);
    border-radius: var(--tc-r);
    transition: border-color 0.2s var(--tc-ease), box-shadow 0.2s var(--tc-ease);
}

    .tc-card:hover,
    .tc-card:focus-within {
        border-color: var(--tc-edge-2);
        box-shadow: 0 10px 28px -18px rgba(10, 37, 52, 0.5);
    }

    .tc-card[hidden] {
        display: none;
    }

/* The longest notes, and the portraits with enough text beside them, take the
   double-width slot. Breaking the uniform grid rhythm is the point; see
   TestimonialVoice.IsWide for which cards qualify and why. */
@media (min-width: 900px) {
    .tc-card--feature {
        grid-column: span 2;
    }

        .tc-card--feature .tc-quote {
            font-size: 1.125rem;
        }
}

.tc-card-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.tc-avatar {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    background: var(--tc-mist);
    /* Four of the six portraits the officials sent are already black and white;
       the other two are colour snapshots. Unified rather than left mismatched —
       and it keeps the flag chip as the only colour beside a name. */
    filter: grayscale(1);
}

.tc-mono {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

.tc-mono--1 {
    background: #E1F2FA;
    color: #0B6C93;
}

.tc-mono--2 {
    background: #FDF1DC;
    color: #855504;
}

.tc-mono--3 {
    background: #E2F3EC;
    color: #0E6A48;
}

.tc-mono--4 {
    background: #E8EDF6;
    color: #39497A;
}

.tc-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--tc-ink);
}

.tc-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(20, 32, 42, 0.12);
}

.tc-role {
    margin: 0.28rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--tc-ink-3);
}

.tc-quote {
    margin: 0;
    font-family: var(--tc-serif);
    font-size: 1.0125rem;
    line-height: 1.72;
    color: var(--tc-ink-2);
    text-wrap: pretty;
}

    .tc-quote.is-clamped {
        display: -webkit-box;
        -webkit-line-clamp: 7;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.tc-more {
    align-self: flex-start;
    margin-top: -0.45rem;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--tc-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tc-blue);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

    .tc-more:hover {
        color: #0C7AAA;
    }

/* Provenance. Who said it, at which tournament, on what day — the reason this
   page is worth more than a carousel of unattributed praise. */
.tc-prov {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--tc-edge);
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--tc-ink-3);
}

.tc-prov-event {
    font-weight: 500;
    color: var(--tc-ink-2);
}

.tc-prov-date {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tc-empty {
    padding: clamp(2.5rem, 6vw, 4rem) 1rem;
    text-align: center;
    border: 1px dashed var(--tc-edge-2);
    border-radius: var(--tc-r);
    background: var(--tc-paper);
}

    .tc-empty p {
        margin: 0 0 1rem;
        font-size: 1rem;
        color: var(--tc-ink-2);
    }

    .tc-empty[hidden] {
        display: none;
    }

/* =============================================================== CTA == */

.tc-cta {
    background: radial-gradient(120% 140% at 15% 0%, #12455E 0%, #0A2534 55%, #05161F 100%);
    color: #fff;
    padding-block: clamp(3rem, 7vw, 5rem);
}

.tc-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem 3rem;
}

.tc-cta-text {
    flex: 1 1 30rem;
}

.tc-cta h2 {
    max-width: 21ch;
    margin: 0;
    font-weight: 700;
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.028em;
    text-wrap: balance;
}

.tc-cta p {
    max-width: 52ch;
    margin: 0.85rem 0 0;
    font-family: var(--tc-serif);
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(233, 242, 247, 0.84);
}

.tc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ============================================================ BUTTONS == */

.tc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--tc-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s var(--tc-ease), border-color 0.18s var(--tc-ease), color 0.18s var(--tc-ease);
}

.tc-btn--primary {
    background: var(--tc-blue);
    color: #fff;
}

    .tc-btn--primary:hover {
        background: #118CC1;
        color: #fff;
    }

.tc-btn--ghost {
    background: transparent;
    border-color: rgba(226, 244, 252, 0.34);
    color: #fff;
}

    .tc-btn--ghost:hover {
        border-color: #fff;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
    }

.tc-page .tc-hero :focus-visible,
.tc-page .tc-cta :focus-visible {
    outline-color: var(--tc-sky);
}

/* ============================================================= MOTION == */

/* One orchestrated moment on load: the court draws itself, then the words
   settle onto it. Nothing else on the page animates unprompted. */
@media (prefers-reduced-motion: no-preference) {
    .tc-court .tc-court-line {
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        animation: tc-draw 1.05s var(--tc-ease) forwards;
    }

    .tc-court .tc-court-mat {
        opacity: 0;
        animation: tc-fade 0.9s var(--tc-ease) 0.15s forwards;
    }

    .tc-court-line--1 {
        animation-delay: 0.05s;
    }

    .tc-court-line--2 {
        animation-delay: 0.22s;
    }

    .tc-court-line--3 {
        animation-delay: 0.36s;
    }

    .tc-court-line--4 {
        animation-delay: 0.5s;
    }

    .tc-hero-inner > * {
        opacity: 0;
        animation: tc-rise 0.75s var(--tc-ease) forwards;
    }

    .tc-hero-inner > :nth-child(1) {
        animation-delay: 0.3s;
    }

    .tc-hero-inner > :nth-child(2) {
        animation-delay: 0.42s;
    }

    .tc-hero-inner > :nth-child(3) {
        animation-delay: 0.52s;
    }

    .tc-board {
        opacity: 0;
        animation: tc-rise 0.75s var(--tc-ease) 0.62s forwards;
    }
}

@keyframes tc-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes tc-fade {
    to {
        opacity: 1;
    }
}

@keyframes tc-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tc-page *,
    .tc-page *::before,
    .tc-page *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
