/* ===== TRANSFER HUB 2.0 ===== */

.transfer-hub-page {
    max-width: 1320px;
    margin: 0 auto 80px;
    padding: 0 18px;
}

/* ===== BREADCRUMB ===== */

.th-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.th-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
    transition: color .2s;
}

.th-breadcrumb a:hover {
    color: var(--primary-soft);
}

.th-breadcrumb [aria-current="page"] {
    color: var(--text);
}

/* ===== HERO ===== */

.th-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 30px;
    align-items: stretch;
    padding: 38px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 12% 0%, rgba(56, 189, 248, .22), transparent 42%),
        radial-gradient(circle at 100% 100%, rgba(168, 85, 247, .14), transparent 45%),
        linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(2, 6, 23, .94));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.th-hero-intro {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
}

.th-kicker {
    color: var(--primary-soft);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 900;
    font-size: 13px;
    margin: 0 0 8px;
}

.th-hero h1 {
    font-size: clamp(34px, 4vw, 50px);
    margin: 0;
    letter-spacing: -1.5px;
}

.th-hero-sub {
    color: var(--muted);
    font-size: 16px;
    max-width: 520px;
    margin: 12px 0 0;
}

.th-demo-banner {
    margin-top: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(250, 204, 21, .1);
    border: 1px solid rgba(250, 204, 21, .28);
}

.th-demo-tag {
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(250, 204, 21, .22);
    color: #fde68a;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .6px;
    line-height: 1.6;
}

.th-demo-banner p {
    margin: 0;
    color: #fde68a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

/* ===== SEARCH ===== */

.th-search-row {
    margin-top: 22px;
    position: relative;
}

.th-search-row input {
    width: 100%;
    box-sizing: border-box;
    padding: 15px 18px 15px 46px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .06);
    color: white;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: .2s;
}

.th-search-row input::placeholder {
    color: var(--muted);
}

.th-search-row input:focus {
    border-color: var(--primary-soft);
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .18);
}

.th-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}

.th-search-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid currentColor;
    border-radius: 50%;
    width: 12px;
    height: 12px;
}

.th-search-icon::after {
    content: "";
    position: absolute;
    left: 11px;
    top: 11px;
    width: 7px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
    border-radius: 2px;
}

/* ===== HERO STAT ROW ===== */

.th-stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.th-stat-skeleton {
    height: 66px;
    border-radius: 16px;
}

.th-stat-item {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    min-width: 0;
}

.th-stat-item strong {
    display: block;
    font-size: 18px;
    letter-spacing: -.3px;
}

.th-stat-item span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-top: 3px;
}

.th-stat-item.th-stat-live strong {
    color: #86efac;
    display: flex;
    align-items: center;
    gap: 6px;
}

.th-stat-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .25);
    flex-shrink: 0;
    animation: thPulse 1.8s ease-in-out infinite;
}

@keyframes thPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* ===== CREDIBILITY GUIDE ===== */

.th-credibility-guide {
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

.th-credibility-guide summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--primary-soft);
    list-style: none;
}

.th-credibility-guide summary::-webkit-details-marker {
    display: none;
}

.th-credibility-guide summary::before {
    content: "▸ ";
}

.th-credibility-guide[open] summary::before {
    content: "▾ ";
}

.th-credibility-legend {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
}

.th-credibility-legend-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.th-credibility-legend-row p {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
}

/* ===== FEATURED PANEL ===== */

.th-hero-feature {
    display: flex;
    min-width: 0;
}

.th-feature-skeleton {
    flex: 1;
    min-height: 300px;
    border-radius: 26px;
}

.th-feature-card {
    display: block;
    flex: 1;
    border-radius: 26px;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    transition: transform .22s ease, border-color .22s ease;
    cursor: pointer;
}

.th-feature-card:hover,
.th-feature-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, .4);
}

.th-feature-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 22px 0;
}

.th-feature-clubs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 20px 22px;
}

.th-feature-club {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.th-feature-club span {
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.th-feature-arrow {
    color: var(--primary-soft);
    flex-shrink: 0;
    width: 26px;
    height: 26px;
}

.th-feature-body {
    padding: 4px 24px 24px;
}

.th-feature-player {
    font-size: 26px;
    margin: 0 0 8px;
    line-height: 1.15;
    letter-spacing: -.5px;
    text-align: center;
}

.th-feature-summary {
    color: var(--muted);
    margin: 0 0 14px;
    line-height: 1.6;
    text-align: center;
}

.th-feature-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
}

.th-feature-empty,
.th-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    min-height: 220px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .04);
    border: 1px dashed var(--border);
    padding: 24px;
}

.th-feature-empty h3,
.th-empty-state h3 {
    margin: 4px 0 0;
}

.th-feature-empty p,
.th-empty-state p {
    margin: 0;
    color: var(--muted);
    max-width: 340px;
}

.th-empty-icon {
    font-size: 34px;
    color: var(--muted);
    width: 34px;
    height: 34px;
}

.th-empty-state {
    grid-column: 1 / -1;
    padding: 60px 24px;
}

.th-error-state {
    border-style: solid;
    border-color: rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .06);
}

.th-retry-button {
    margin-top: 4px;
}

.th-empty-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.th-empty-actions a {
    color: var(--primary-soft);
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
}

.th-empty-actions a:hover {
    text-decoration: underline;
}

/* ===== CLUB LOGO (with CSS-only fallback initial) =====
   data-initial renders via ::before so a broken/missing crest never leaves
   an empty box — the image just sits on top until it errors and removes
   itself, revealing the initial underneath. No dynamic HTML re-injection
   needed on error. */

.th-logo {
    position: relative;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
    color: var(--muted);
    font-weight: 900;
    overflow: hidden;
}

.th-logo::before {
    content: attr(data-initial);
}

.th-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16%;
    background: rgba(255, 255, 255, .04);
}

.th-logo-sm {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 12px;
}

.th-logo-lg {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    font-size: 18px;
}

.th-logo-xl {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    font-size: 22px;
}

/* ===== STATUS BADGES ===== */

.th-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}

.th-status-badge .icon {
    width: 12px;
    height: 12px;
}

.th-status-rumour { background: rgba(168, 85, 247, .18); color: #d8b4fe; }
.th-status-talks { background: rgba(56, 189, 248, .18); color: #7dd3fc; }
.th-status-advanced_talks { background: rgba(59, 130, 246, .2); color: #93c5fd; }
.th-status-bid_submitted { background: rgba(250, 204, 21, .18); color: #fde68a; }
.th-status-agreement_close { background: rgba(249, 115, 22, .2); color: #fdba74; }
.th-status-here_we_go { background: rgba(34, 211, 238, .2); color: #67e8f9; }
.th-status-confirmed { background: rgba(34, 197, 94, .2); color: #86efac; }
.th-status-loan { background: rgba(45, 212, 191, .2); color: #5eead4; }
.th-status-free_transfer { background: rgba(148, 163, 184, .2); color: #e2e8f0; }
.th-status-contract_renewal { background: rgba(129, 140, 248, .2); color: #c7d2fe; }
.th-status-deal_collapsed { background: rgba(239, 68, 68, .18); color: #fca5a5; }

/* ===== CREDIBILITY TIER BADGES ===== */

.th-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.th-tier-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.th-tier-1 { background: rgba(34, 197, 94, .14); color: #86efac; }
.th-tier-1 .th-tier-dot { background: #22c55e; }
.th-tier-2 { background: rgba(59, 130, 246, .14); color: #93c5fd; }
.th-tier-2 .th-tier-dot { background: #3b82f6; }
.th-tier-3 { background: rgba(250, 204, 21, .14); color: #fde68a; }
.th-tier-3 .th-tier-dot { background: #facc15; }
.th-tier-4 { background: rgba(148, 163, 184, .14); color: #cbd5e1; }
.th-tier-4 .th-tier-dot { background: #94a3b8; }

/* ===== TABS + TOOLBAR ===== */

.th-tabs-bar {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.th-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.th-tab-btn {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    box-shadow: none;
    transition: .2s;
}

.th-tab-btn:hover {
    color: white;
    border-color: rgba(56, 189, 248, .4);
}

.th-tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(59, 130, 246, .3);
}

.th-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
}

.th-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.th-filters select {
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
}

.th-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 800;
}

.th-sort-wrap select {
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
}

.th-reset-btn {
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, .25);
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 12.5px;
    box-shadow: none;
    cursor: pointer;
}

.th-reset-btn:hover {
    background: rgba(239, 68, 68, .2);
}

/* ===== LAYOUT ===== */

.th-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-top: 28px;
    align-items: start;
}

.th-main-col {
    min-width: 0;
}

.th-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.th-section-head h2 {
    margin: 0;
    font-size: 22px;
}

/* ===== FEED GRID / CARDS ===== */

.th-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.th-card {
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    animation: thFadeInUp .4s ease both;
    transition: transform .2s ease, border-color .2s ease;
}

.th-card:hover,
.th-card:focus-visible {
    border-color: rgba(56, 189, 248, .4);
    transform: translateY(-4px);
}

.th-card.th-card-personal {
    border-color: rgba(250, 204, 21, .35);
}

.th-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 18px 0;
}

.th-card-clubs {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
}

.th-card-club {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.th-card-club span {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.th-card-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.th-card-body {
    padding: 0 18px 16px;
    flex: 1;
}

.th-card-body h3 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.3;
}

.th-card-position {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    margin: 0 0 10px;
}

.th-card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.th-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
}

.th-card-fee {
    font-weight: 900;
    font-size: 13px;
}

.th-card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 18px 14px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
}

.th-personal-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(250, 204, 21, .15);
    color: #fde68a;
    font-size: 10.5px;
    font-weight: 900;
    text-transform: uppercase;
}

.th-personal-flag .icon {
    width: 11px;
    height: 11px;
}

.th-save-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 10.5px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s;
}

.th-save-button:hover {
    background: rgba(255, 255, 255, .16);
}

.th-save-button-active {
    background: rgba(34, 197, 94, .18);
    color: var(--success);
    border-color: transparent;
}

/* subtle rhythm across the grid on large screens */
@media (min-width: 1100px) {
    .th-feed-grid .th-card:nth-child(5n+1) {
        grid-column: span 2;
    }
}

@keyframes thFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CONFIRMED DEALS TABLE ===== */

.th-confirmed-table {
    display: grid;
    gap: 10px;
}

.th-confirmed-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 0.8fr 0.9fr;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: .2s;
}

.th-confirmed-row:hover,
.th-confirmed-row:focus-visible {
    background: rgba(59, 130, 246, .1);
    border-color: rgba(56, 189, 248, .3);
}

.th-confirmed-header {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 0.8fr 0.9fr;
    gap: 12px;
    padding: 0 18px 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.th-confirmed-player {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.th-confirmed-player strong {
    font-size: 14.5px;
}

.th-confirmed-player small {
    color: var(--muted);
    font-size: 11.5px;
}

.th-confirmed-clubs {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
}

.th-confirmed-clubs span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.th-confirmed-fee {
    font-weight: 900;
    font-size: 13.5px;
}

.th-confirmed-date {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

/* ===== SIDEBAR ===== */

.th-side-col {
    display: grid;
    gap: 20px;
}

.th-side-card {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.th-side-title {
    margin: 2px 0 4px;
    font-size: 18px;
}

.th-side-caption {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
}

.th-side-list {
    display: grid;
    gap: 10px;
}

.th-watch-row {
    display: block;
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, .04);
    border: 1px solid transparent;
    transition: .2s;
}

.th-watch-row:hover,
.th-watch-row:focus-visible {
    background: rgba(59, 130, 246, .12);
    border-color: rgba(56, 189, 248, .3);
}

.th-watch-row strong {
    display: block;
    font-size: 13.5px;
    line-height: 1.35;
    margin-bottom: 4px;
}

.th-watch-row small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.th-watch-reason {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fde68a;
    font-weight: 800;
}

.th-watch-empty {
    padding: 18px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    border: 1px dashed var(--border);
    text-align: left;
}

.th-watch-empty p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
}

.th-watch-empty .th-empty-actions {
    justify-content: flex-start;
}

/* ===== WINDOW OVERVIEW ===== */

.th-overview-list {
    display: grid;
    gap: 10px;
}

.th-overview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
}

.th-overview-row span:first-child {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
}

.th-overview-row strong {
    font-size: 13px;
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.th-overview-row a {
    color: inherit;
    text-decoration: none;
}

.th-overview-row a:hover {
    color: var(--primary-soft);
}

/* ===== DETAIL PANEL ===== */

.th-detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .7);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 60;
}

.th-detail-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.th-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(560px, 100vw);
    background: var(--bg-soft);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .45);
    z-index: 61;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .28s ease;
}

.th-detail-panel.show {
    transform: translateX(0);
}

.th-detail-panel[hidden] {
    display: block;
    visibility: hidden;
}

.th-detail-close {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    padding: 16px 16px 0;
    background: linear-gradient(180deg, var(--bg-soft) 60%, transparent);
}

.th-detail-close button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .08);
    box-shadow: none;
}

.th-detail-close button:hover {
    background: rgba(255, 255, 255, .16);
}

.th-detail-body {
    padding: 4px 26px 40px;
}

.th-detail-clubs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 10px 0 20px;
}

.th-detail-player {
    text-align: center;
    margin: 0 0 6px;
}

.th-detail-player h2 {
    margin: 0 0 6px;
    font-size: 28px;
    letter-spacing: -.6px;
}

.th-detail-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.th-detail-summary {
    color: var(--muted);
    line-height: 1.65;
    text-align: center;
    margin: 0 0 20px;
}

.th-detail-fact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.th-detail-fact {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
}

.th-detail-fact span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
}

.th-detail-fact strong {
    font-size: 14.5px;
}

.th-detail-section {
    margin-bottom: 26px;
}

.th-detail-section h3 {
    font-size: 15px;
    margin: 0 0 14px;
    color: var(--primary-soft);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ===== TIMELINE ===== */

.th-timeline {
    display: grid;
    gap: 0;
    border-left: 2px solid var(--border);
    margin-left: 6px;
}

.th-timeline-item {
    position: relative;
    padding: 0 0 20px 22px;
}

.th-timeline-item:last-child {
    padding-bottom: 0;
}

.th-timeline-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-soft);
    border: 3px solid var(--bg-soft);
}

.th-timeline-item strong {
    display: block;
    font-size: 13.5px;
}

.th-timeline-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.th-source-list,
.th-related-list {
    display: grid;
    gap: 8px;
}

.th-source-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    margin: 0 6px 6px 0;
}

.th-related-row {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: .2s;
}

.th-related-row:hover {
    border-color: rgba(56, 189, 248, .35);
}

.th-related-row strong {
    display: block;
    font-size: 13.5px;
    margin-bottom: 2px;
}

.th-related-row small {
    color: var(--muted);
    font-size: 11.5px;
}

.th-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.th-detail-links a {
    flex: 1;
    min-width: 140px;
    text-align: center;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--border);
    font-weight: 800;
    font-size: 13px;
    color: var(--text);
}

.th-detail-links a:hover {
    border-color: rgba(56, 189, 248, .4);
    color: var(--primary-soft);
}

/* ===== SHARED TAG CHIP (also used by feed/detail) ===== */

.th-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    background: rgba(59, 130, 246, .12);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, .2);
}

a.th-tag-chip:hover {
    background: rgba(59, 130, 246, .24);
    color: white;
}

/* ===== INTERACTIVE CARD RESET =====
   Feed cards / rows are real <button> elements (they open the in-page
   detail panel rather than navigate), so undo the global button styling
   from style.css and let the component rules above take over. */

.th-card,
.th-feature-card,
.th-confirmed-row,
.th-watch-row,
.th-related-row {
    text-align: left;
    font-family: inherit;
    width: 100%;
    margin: 0;
}

/* ===== FOCUS STATES ===== */

.th-tab-btn:focus-visible,
.th-reset-btn:focus-visible,
.th-search-row input:focus-visible,
.th-filters select:focus-visible,
.th-sort-wrap select:focus-visible,
.th-card:focus-visible,
.th-confirmed-row:focus-visible,
.th-watch-row:focus-visible,
.th-related-row:focus-visible,
.th-feature-card:focus-visible,
.th-detail-links a:focus-visible,
.th-credibility-guide summary:focus-visible {
    outline: 2px solid var(--primary-soft);
    outline-offset: 2px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1080px) {
    .th-layout {
        grid-template-columns: 1fr;
    }

    .th-side-col {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .th-stat-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .th-hero {
        padding: 26px;
        border-radius: 26px;
    }

    .th-side-col {
        grid-template-columns: 1fr;
    }

    .th-feed-grid {
        grid-template-columns: 1fr;
    }

    .th-feed-grid .th-card:nth-child(5n+1) {
        grid-column: auto;
    }

    .th-confirmed-row,
    .th-confirmed-header {
        grid-template-columns: 1.4fr 1fr 0.8fr;
    }

    .th-confirmed-header > *:nth-child(3),
    .th-confirmed-row > *:nth-child(3) {
        display: none;
    }

    .th-detail-panel {
        width: 100vw;
    }

    .th-detail-fact-grid {
        grid-template-columns: 1fr;
    }

    .th-section-head {
        flex-wrap: wrap;
    }

    .th-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .th-sort-wrap {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .th-breadcrumb {
        font-size: 12px;
    }

    .th-hero h1 {
        font-size: 30px;
    }

    .th-stat-row {
        grid-template-columns: 1fr;
    }

    .th-tabs {
        gap: 6px;
    }

    .th-tab-btn {
        padding: 9px 13px;
        font-size: 12px;
    }

    .th-confirmed-row,
    .th-confirmed-header {
        grid-template-columns: 1fr 1fr;
    }

    .th-confirmed-header span:nth-child(2),
    .th-confirmed-row .th-confirmed-clubs {
        display: none;
    }
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    .th-card,
    .th-feature-card,
    .th-detail-panel,
    .th-detail-backdrop,
    .th-stat-live-dot {
        animation: none !important;
        transition: none !important;
    }
}
