/* The Tournaments page: one row of poster cards per year, like a streaming
 * service's rows (Tony, 2026-10-15). docs/TOURNAMENTS_SECTION.md */

.tyears {
    display: flex; gap: var(--space-2); flex-wrap: wrap;
    margin: var(--space-3) 0;
}
.tyears a {
    padding: .25rem .7rem; border-radius: 999px;
    border: 1px solid var(--border-default); color: var(--text-secondary);
    text-decoration: none; font-weight: 600; font-size: .85rem;
}
.tyears a:hover, .tyears a:focus-visible { border-color: var(--accent-gold); color: var(--text-primary); }

.trow { margin: var(--space-4) 0; scroll-margin-top: 80px; }
.trow__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.trow__title { font-size: 1.35rem; font-weight: 700; margin: 0 0 var(--space-2); }
/* A year's cards fill the width and continue on the next line (Tony,
 * 2026-10-15: "when the tournament cards fill the page… the next posters are
 * placed on the following row underneath"). How many per line follows the
 * screen: two on a phone, more on a tablet or a computer. */
.trow__track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-3);
}
@media (min-width: 600px)  { .trow__track { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
@media (min-width: 1200px) { .trow__track { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }

.tcard {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    text-decoration: none;
    transition: box-shadow .18s ease, border-color .18s ease;
}
.tcard:hover, .tcard:focus-visible, .tcard.is-open {
    border-color: var(--accent-gold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    text-decoration: none;
}
.tcard__poster { width: 100%; height: 100%; object-fit: cover; display: block; }

/* No poster: the home page card's own look, the medal and the name. */
.tcard__plain {
    height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: var(--space-2); padding: var(--space-3); text-align: center;
}
.tcard__plain .module-icon { margin: 0; }
.tcard__name { font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.tcard__edition { color: var(--text-secondary); font-size: .85rem; }

/* What a card says when it is pointed at, or tapped on a phone. */
.tcard__info {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; gap: .45rem;
    padding: var(--space-3);
    background: rgb(14, 18, 28);
    color: #f4f4f5;
    font-size: .78rem; line-height: 1.35;
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transition: opacity .15s ease;
}
@media (hover: hover) {
    .tcard:hover .tcard__info { opacity: 1; visibility: visible; }
}
.tcard:focus-visible .tcard__info,
.tcard.is-open .tcard__info { opacity: 1; visibility: visible; }
.tcard__info h3 { font-size: .95rem; margin: 0; color: #fff; }
.tcard__label { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: .62rem; color: #fbcc03; font-weight: 700; }
.tcard__open {
    margin-top: auto; align-self: flex-start;
    position: sticky; bottom: 0;           /* always in sight on a phone */
    box-shadow: 0 -10px 12px rgb(14, 18, 28);
    padding: .3rem .8rem; border-radius: var(--radius-sm);
    background: #fbcc03; color: #111; font-weight: 700;
}
@media (hover: hover) { .tcard__open { display: none; } }

.tempty { padding: var(--space-5) 0; color: var(--text-secondary); }
