/* brand/home.css — Homepage [tmg_home] layout + early home sections (Wave 3 split; cascade slice 355-868) */
/* -------------------------------------------------------------------------- */
/* Homepage shortcode [tmg_home] — Captain-approved mockup layout             */
/* -------------------------------------------------------------------------- */
.tmg-home {
    --tmg-home-max: 1240px;
    --tmg-home-radius: 16px;
    --tmg-home-border: #243038;
    --tmg-home-line: #1e2a30;
    box-sizing: border-box;
    color: var(--tmg-mist);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    line-height: 1.5;
    margin: 0 auto;
    max-width: var(--tmg-home-max);
    overflow-x: clip;
    padding: 16px 24px 48px;
    width: 100%;
}

html[data-theme="light"] .tmg-home,
body.tmg-theme-light .tmg-home {
    --tmg-home-border: #c5d0d4;
    --tmg-home-line: #d5dee2;
}

.tmg-home *,
.tmg-home *::before,
.tmg-home *::after {
    box-sizing: border-box;
}

.tmg-home a {
    color: var(--tmg-teal);
    text-decoration: none;
}

.tmg-home-badge {
    background: rgba(46, 196, 182, .15);
    border: 1px solid rgba(46, 196, 182, .35);
    border-radius: 6px;
    color: var(--tmg-teal);
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 10px;
    padding: 4px 8px;
    text-transform: uppercase;
}

.tmg-home-btn {
    align-items: center;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    padding: 10px 16px;
    transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}

.tmg-home-btn:hover {
    transform: translateY(-1px);
}

.tmg-home-btn-primary {
    background: var(--tmg-teal);
    box-shadow: 0 8px 24px rgba(46, 196, 182, .25);
    color: #062 !important;
}

.tmg-home-btn-primary:hover,
.tmg-home-btn-primary:focus-visible {
    background: var(--tmg-teal-deep);
    box-shadow: 0 0 24px rgba(46, 196, 182, .45);
    color: #fff !important;
}

.tmg-home-btn-ghost {
    background: transparent;
    border: 1px solid #2a3a40;
    color: var(--tmg-mist) !important;
}

.tmg-home-btn-ghost:hover,
.tmg-home-btn-ghost:focus-visible {
    border-color: var(--tmg-teal);
    color: var(--tmg-teal) !important;
}

/* Hero */
.tmg-home-hero {
    padding: 40px 0 28px;
}

.tmg-home-hero--compact {
    padding: 20px 0 12px;
}

.tmg-home-hero-grid {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: 1.1fr .9fr;
}

.tmg-home-hero-grid--lobby {
    grid-template-columns: 1fr;
    max-width: 720px;
}

.tmg-home-hero-copy h1 {
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -.02em;
    line-height: 1.05;
    margin: 0 0 12px;
}

.tmg-home-hero-copy p {
    color: var(--tmg-muted);
    margin: 0 0 22px;
    max-width: 42ch;
}

.tmg-home-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Spark graphic slot — 720×640 art is the only hero type; ~120px clear bottom for CTAs. */
.tmg-hero-spark-slot {
    display: block;
    margin: 12px 0 0;
    max-width: 100%;
    min-height: 120px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.tmg-hero-spark-picture {
    display: block;
    width: 100%;
}

.tmg-hero-spark-img {
    display: block;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    object-position: top center;
    width: 100%;
}

.tmg-home-hero--compact .tmg-hero-spark-img {
    max-height: 280px;
}

.tmg-home-hero--compact .tmg-hero-spark-cta {
    min-height: 96px;
    padding: 12px 10px 10px;
}

/* Live CTAs overlay the reserved clear bottom of the Spark art. */
.tmg-hero-spark-cta {
    bottom: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-end;
    left: 0;
    min-height: 120px;
    padding: 16px 12px 14px;
    position: absolute;
    right: 0;
    z-index: 2;
}

.tmg-hero-spark-cta .tmg-home-hero-cta {
    gap: 10px;
}

.tmg-hero-spark-cta .tmg-home-btn.tmg-btn-secondary {
    background: transparent;
    border: 1px solid rgba(46, 196, 182, .55);
    color: var(--tmg-mist, #E8EEF0) !important;
    margin-top: 0;
    padding: 10px 16px;
}

.tmg-hero-spark-cta .tmg-home-btn.tmg-btn-secondary:hover,
.tmg-hero-spark-cta .tmg-home-btn.tmg-btn-secondary:focus-visible {
    border-color: var(--tmg-teal, #2EC4B6);
    color: var(--tmg-teal, #2EC4B6) !important;
}

/* Logged-out Sign up / Log in — second CTA row matching Enter Ladder / Preview Cup. */
.tmg-home-hero-auth-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 720px) {
    .tmg-hero-spark-cta .tmg-home-hero-cta,
    .tmg-hero-spark-cta .tmg-home-hero-auth-cta {
        flex-direction: column;
        align-items: stretch;
    }
    .tmg-hero-spark-cta .tmg-home-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Hot Off The Press featured card (upper right). */
.tmg-hot-press-card {
    isolation: isolate;
}

.tmg-hot-press-thumb {
    background-color: var(--tmg-ink, #0a0c0e);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.tmg-hot-press-mark {
    left: 10px;
    padding: 4px;
    pointer-events: none;
    position: absolute;
    top: 10px;
    z-index: 2;
}

.tmg-hot-press-mark-img {
    display: block;
    height: auto;
    max-height: 110px;
    max-width: min(48%, 220px);
    object-fit: contain;
    width: auto;
}

.tmg-hot-press-mark-fallback {
    background: rgba(46, 196, 182, .18);
    border: 1px solid rgba(46, 196, 182, .45);
    border-radius: 6px;
    color: var(--tmg-teal);
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    padding: 5px 9px;
    text-transform: uppercase;
}

.tmg-hot-press-title,
.tmg-home-hero-card:not(.tmg-home-hero-cup) h2 {
    color: #E8EEF0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
}

.tmg-home-hero-card:not(.tmg-home-hero-cup) .tmg-home-meta {
    color: rgba(232, 238, 240, .82) !important;
}

.tmg-home-hero-card .tmg-home-badge {
    color: var(--tmg-teal);
}

.tmg-hot-press-empty {
    cursor: default;
    pointer-events: none;
}

.tmg-home-hero-card {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border);
    border-radius: var(--tmg-home-radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
    color: inherit !important;
    display: block;
    min-height: 280px;
    overflow: hidden;
    position: relative;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.tmg-home-hero-card:hover,
.tmg-home-hero-card:focus-visible {
    border-color: rgba(46, 196, 182, .5);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .45), 0 0 40px rgba(46, 196, 182, .15);
    color: inherit !important;
    transform: translateY(-4px);
}

.tmg-home-hero-art {
    background-color: var(--tmg-ink, #0a0c0e);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.tmg-home-hero-card:hover .tmg-home-hero-art {
    transform: scale(1.06);
}

.tmg-home-hero-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    padding: 22px;
    position: relative;
    z-index: 1;
}

.tmg-home-hero-card h2 {
    font-size: 22px;
    margin: 0 0 6px;
}

.tmg-home-meta {
    color: var(--tmg-muted);
    font-size: 13px;
}


/* Preview Cup surface belongs to home.css; keep it on the live cup root. */
.tmg-home-hero-cup,
.tmg-home-hero-card.tmg-home-hero-cup {
    background: var(--tmg-cup-bg);
    border-color: var(--tmg-cup-border);
    color: var(--tmg-cup-fg) !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 240px;
    text-decoration: none !important;
}

.tmg-home-hero-cup .tmg-home-hero-card-body {
    color: var(--tmg-cup-fg);
    gap: 8px;
}

.tmg-home-hero-cup-rounds {
    color: var(--tmg-cup-muted, var(--tmg-muted, #A8BCC4));
    font-size: 13px;
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    width: 100%;
}

.tmg-home-hero-cup-rounds li {
    border-bottom: 1px solid var(--tmg-cup-line, var(--tmg-home-line, rgba(255, 255, 255, .08)));
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.tmg-home-hero-cup-rounds li:last-child {
    border: 0;
}

.tmg-home-cup-cta {
    color: var(--tmg-cup-cta, var(--tmg-teal, #00C9B1));
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    margin-top: 10px;
    text-decoration: none;
}

a.tmg-home-cup-cta:hover,
a.tmg-home-cup-cta:focus-visible {
    color: var(--tmg-cup-cta, var(--tmg-teal, #00C9B1));
    text-decoration: underline;
}

/* Light cup: element-level vars plus literal pale paint avoid inherited-token misses. */
html[data-theme="light"] .tmg-home-hero-cup,
html[data-theme="light"] .tmg-home-hero-card.tmg-home-hero-cup,
html.tmg-theme-light .tmg-home-hero-cup,
html.tmg-theme-light .tmg-home-hero-card.tmg-home-hero-cup,
body.tmg-theme-light .tmg-home-hero-cup,
body.tmg-theme-light .tmg-home-hero-card.tmg-home-hero-cup {
    --tmg-cup-bg: linear-gradient(145deg, #E8EEF0 0%, #D5DEE2 70%);
    --tmg-cup-fg: #0B1214;
    --tmg-cup-muted: #3A4A50;
    --tmg-cup-badge: #007A6E;
    --tmg-cup-cta: #007A6E;
    --tmg-cup-line: rgba(11, 18, 20, .12);
    --tmg-cup-border: rgba(0, 122, 110, .35);
    /* One shorthand + !important clears prior background:* image layers. */
    background: radial-gradient(circle at 70% 30%, rgba(0, 201, 177, .18), transparent 55%), linear-gradient(145deg, #E8EEF0 0%, #D5DEE2 70%) !important;
    border-color: rgba(0, 122, 110, .35) !important;
    color: #0B1214 !important;
}

html[data-theme="light"] .tmg-home-hero-cup .tmg-home-hero-card-body,
html.tmg-theme-light .tmg-home-hero-cup .tmg-home-hero-card-body,
body.tmg-theme-light .tmg-home-hero-cup .tmg-home-hero-card-body {
    color: #0B1214 !important;
}

html[data-theme="light"] .tmg-home-hero-cup h2,
html.tmg-theme-light .tmg-home-hero-cup h2,
body.tmg-theme-light .tmg-home-hero-cup h2,
html[data-theme="light"] .tmg-home-hero-card.tmg-home-hero-cup h2,
html.tmg-theme-light .tmg-home-hero-card.tmg-home-hero-cup h2,
body.tmg-theme-light .tmg-home-hero-card.tmg-home-hero-cup h2 {
    color: #0B1214 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .tmg-home-hero-cup .tmg-home-meta,
html.tmg-theme-light .tmg-home-hero-cup .tmg-home-meta,
body.tmg-theme-light .tmg-home-hero-cup .tmg-home-meta,
html[data-theme="light"] .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-meta,
html.tmg-theme-light .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-meta,
body.tmg-theme-light .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-meta {
    color: #3A4A50 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .tmg-home-hero-cup .tmg-home-badge,
html.tmg-theme-light .tmg-home-hero-cup .tmg-home-badge,
body.tmg-theme-light .tmg-home-hero-cup .tmg-home-badge,
html[data-theme="light"] .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-badge,
html.tmg-theme-light .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-badge,
body.tmg-theme-light .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-badge,
html[data-theme="light"] .tmg-home-cup-cta,
html.tmg-theme-light .tmg-home-cup-cta,
body.tmg-theme-light .tmg-home-cup-cta {
    color: #007A6E !important;
}

html[data-theme="light"] .tmg-home-hero-cup-rounds,
html.tmg-theme-light .tmg-home-hero-cup-rounds,
body.tmg-theme-light .tmg-home-hero-cup-rounds,
html[data-theme="light"] .tmg-home-hero-cup-rounds li,
html.tmg-theme-light .tmg-home-hero-cup-rounds li,
body.tmg-theme-light .tmg-home-hero-cup-rounds li {
    border-color: rgba(11, 18, 20, .12) !important;
    color: #3A4A50 !important;
}

/* Dark cup: keep the dark gradient and light text even when classes drive the theme. */
html[data-theme="dark"] .tmg-home-hero-cup,
html[data-theme="dark"] .tmg-home-hero-card.tmg-home-hero-cup,
html.tmg-theme-dark .tmg-home-hero-cup,
html.tmg-theme-dark .tmg-home-hero-card.tmg-home-hero-cup,
body.tmg-theme-dark .tmg-home-hero-cup,
body.tmg-theme-dark .tmg-home-hero-card.tmg-home-hero-cup {
    --tmg-cup-bg: linear-gradient(145deg, #142026 0%, #0a1014 70%);
    --tmg-cup-fg: #E8EEF0;
    --tmg-cup-muted: #A8BCC4;
    --tmg-cup-badge: #00C9B1;
    --tmg-cup-cta: #00C9B1;
    --tmg-cup-line: rgba(255, 255, 255, .08);
    --tmg-cup-border: rgba(0, 201, 177, .28);
    background: radial-gradient(circle at 70% 30%, rgba(0, 201, 177, .22), transparent 55%), linear-gradient(145deg, #142026 0%, #0a1014 70%) !important;
    border-color: rgba(0, 201, 177, .28) !important;
    color: #E8EEF0 !important;
}

html[data-theme="dark"] .tmg-home-hero-cup .tmg-home-hero-card-body,
html.tmg-theme-dark .tmg-home-hero-cup .tmg-home-hero-card-body,
body.tmg-theme-dark .tmg-home-hero-cup .tmg-home-hero-card-body,
html[data-theme="dark"] .tmg-home-hero-cup h2,
html.tmg-theme-dark .tmg-home-hero-cup h2,
body.tmg-theme-dark .tmg-home-hero-cup h2,
html[data-theme="dark"] .tmg-home-hero-card.tmg-home-hero-cup h2,
html.tmg-theme-dark .tmg-home-hero-card.tmg-home-hero-cup h2,
body.tmg-theme-dark .tmg-home-hero-card.tmg-home-hero-cup h2 {
    color: #E8EEF0 !important;
}

html[data-theme="dark"] .tmg-home-hero-cup .tmg-home-meta,
html.tmg-theme-dark .tmg-home-hero-cup .tmg-home-meta,
body.tmg-theme-dark .tmg-home-hero-cup .tmg-home-meta,
html[data-theme="dark"] .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-meta,
html.tmg-theme-dark .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-meta,
body.tmg-theme-dark .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-meta {
    color: #A8BCC4 !important;
}

html[data-theme="dark"] .tmg-home-hero-cup .tmg-home-badge,
html.tmg-theme-dark .tmg-home-hero-cup .tmg-home-badge,
body.tmg-theme-dark .tmg-home-hero-cup .tmg-home-badge,
html[data-theme="dark"] .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-badge,
html.tmg-theme-dark .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-badge,
body.tmg-theme-dark .tmg-home-hero-card.tmg-home-hero-cup .tmg-home-badge,
html[data-theme="dark"] .tmg-home-cup-cta,
html.tmg-theme-dark .tmg-home-cup-cta,
body.tmg-theme-dark .tmg-home-cup-cta {
    color: #00C9B1 !important;
}

/* Sections */
.tmg-home-section {
    padding: 48px 0 0;
}

.tmg-home-section-head {
    align-items: end;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tmg-home-section-head h3 {
    color: var(--tmg-mist, #E4F4F2);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0;
}

.tmg-home-section-head a {
    font-size: 13px;
    font-weight: 600;
}

/* Ladders preview — single standings card (submit match removed 1.8.61) */
.tmg-home-comp {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, 1fr);
}

.tmg-home-comp--single {
    grid-template-columns: 1fr;
    max-width: none;
}

.tmg-home-ladder-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.tmg-home-ladder-chips button.tmg-news-chip {
    appearance: none;
    background: transparent;
    border: 1.5px solid var(--tmg-teal, #00C9B1);
    border-radius: 999px;
    color: var(--tmg-mist, #E8EEF0);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .03em;
    line-height: 1.2;
    padding: .45rem .95rem;
}

.tmg-home-ladder-chips button.tmg-news-chip:hover,
.tmg-home-ladder-chips button.tmg-news-chip:focus-visible {
    background: rgba(0, 201, 177, .16);
    outline: none;
}

.tmg-home-ladder-chips button.tmg-news-chip.is-active,
.tmg-home-ladder-chips button.tmg-news-chip[aria-selected="true"] {
    background: var(--tmg-teal, #00C9B1);
    border-color: var(--tmg-teal, #00C9B1);
    color: #0B1214;
}

.tmg-home-ladder-panel[hidden] {
    display: none !important;
}

.tmg-home-ladder-panel:not([hidden]) {
    display: block;
}

.tmg-home-elo-label {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    margin-right: 2px;
    text-transform: uppercase;
}

.tmg-home-ladder-empty {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tmg-home-ladder-enter {
    font-size: 12px;
    font-weight: 700;
}

.tmg-home-section-head .tmg-home-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 14px;
}

.tmg-home-comp-cta {
    margin: 14px 0 0;
}

.tmg-home-comp-cta .tmg-home-btn {
    margin-right: 8px;
}

.tmg-home-cup-cta-btn {
    margin-top: 14px;
}

/* Compact live bracket card (no full [tmg_tournament] dump on home) */
.tmg-home-bracket-card {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-cup-border, var(--tmg-home-border));
    border-radius: var(--tmg-home-radius);
    padding: 18px 20px;
}

.tmg-home-bracket-title {
    font-size: 18px;
    letter-spacing: -.01em;
    margin: 4px 0 6px;
}

.tmg-home-bracket-rounds {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.tmg-home-bracket-rounds li {
    align-items: center;
    border-bottom: 1px solid var(--tmg-home-line, var(--tmg-border));
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.tmg-home-bracket-rounds li:last-child {
    border-bottom: 0;
}

.tmg-home-bracket-round-name {
    font-size: 13px;
    font-weight: 600;
}

.tmg-home-bracket-round-status {
    color: var(--tmg-teal);
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.tmg-activity-more {
    margin-top: 14px;
}

.tmg-home-comp-card {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border);
    border-radius: var(--tmg-home-radius);
    color: inherit !important;
    display: block;
    padding: 18px;
    transition: transform .22s, border-color .22s, box-shadow .22s;
}

.tmg-home-comp-card:hover,
.tmg-home-comp-card:focus-visible {
    border-color: rgba(46, 196, 182, .45);
    box-shadow: 0 0 28px rgba(46, 196, 182, .12);
    color: inherit !important;
    transform: translateY(-3px);
}

.tmg-home-comp-card h4 {
    font-size: 15px;
    margin: 0 0 8px;
}

.tmg-home-comp-card ul {
    color: var(--tmg-muted);
    font-size: 13px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tmg-home-comp-card li {
    border-bottom: 1px solid var(--tmg-home-line);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
}

.tmg-home-comp-card li:last-child {
    border: 0;
}

.tmg-home-elo {
    color: var(--tmg-teal);
    font-weight: 700;
}

/* News & Reviews — chips match /news/; desk reuses news.css overlay under .tmg-news-front */
.tmg-home-news-chips {
    margin: 0 0 14px;
}

.tmg-home-news-desk.tmg-news-front {
    box-sizing: border-box;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    width: 100%;
}

.tmg-home-news {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
}

.tmg-home-news.tmg-card-grid--2x2,
.tmg-home-news.tmg-card-grid--2x3 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
}

.tmg-home-article {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border);
    border-radius: var(--tmg-home-radius);
    color: inherit !important;
    cursor: pointer;
    display: block;
    isolation: isolate;
    min-height: 180px;
    overflow: hidden;
    position: relative;
    transition: border-color .3s, box-shadow .3s;
}

.tmg-home-article-featured {
    grid-row: span 2;
    min-height: 380px;
}

.tmg-home-article-wide {
    grid-column: 2 / span 2;
}

.tmg-home-article-thumb {
    background-position: center;
    background-size: cover;
    inset: 0;
    position: absolute;
    transition: transform .45s ease, filter .3s;
}

.tmg-home-article-a .tmg-home-article-placeholder,
.tmg-home-article-a .tmg-home-article-thumb.tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #234, #0b1214 60%),
        radial-gradient(circle at 70% 30%, rgba(46, 196, 182, .5), transparent 45%);
}

.tmg-home-article-b .tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #2a2030, #0b1214 65%),
        radial-gradient(circle at 40% 40%, rgba(232, 93, 76, .35), transparent 40%);
}

.tmg-home-article-c .tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #203040, #0b1214 60%),
        radial-gradient(circle at 60% 60%, rgba(46, 196, 182, .3), transparent 45%);
}

.tmg-home-article-d .tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #1a2830, #0b1214 70%),
        radial-gradient(circle at 20% 80%, rgba(26, 155, 142, .4), transparent 40%);
}

.tmg-home-article-shade {
    background: linear-gradient(180deg, transparent 30%, rgba(11, 18, 20, .92));
    inset: 0;
    position: absolute;
    transition: opacity .3s;
}

.tmg-home-article-overlay {
    background: rgba(46, 196, 182, 0);
    inset: 0;
    pointer-events: none;
    position: absolute;
    transition: background .3s;
}

.tmg-home-article-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    padding: 18px;
    position: relative;
    z-index: 2;
}

.tmg-home-article-tag {
    color: var(--tmg-teal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

/* Overlay sits on dark shade — keep high-contrast light type in both themes. */
.tmg-home-article-content {
    color: #E8EEF0;
}

.tmg-home-article h4 {
    color: #E8EEF0 !important;
    font-size: 16px;
    margin: 0 0 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
    transition: color .2s;
}

.tmg-home-article-featured h4 {
    font-size: 26px;
    line-height: 1.15;
}

.tmg-home-article-by {
    color: rgba(232, 238, 240, .82) !important;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

html[data-theme="light"] .tmg-home-article-shade,
body.tmg-theme-light .tmg-home-article-shade {
    background: linear-gradient(180deg, transparent 22%, rgba(11, 18, 20, .88));
}

.tmg-home-article:hover,
.tmg-home-article:focus-visible {
    border-color: rgba(46, 196, 182, .55);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4), 0 0 32px rgba(46, 196, 182, .18);
    color: inherit !important;
}

.tmg-home-article:hover .tmg-home-article-thumb,
.tmg-home-article:focus-visible .tmg-home-article-thumb {
    filter: brightness(1.08);
    transform: scale(1.08);
}

.tmg-home-article:hover .tmg-home-article-overlay,
.tmg-home-article:focus-visible .tmg-home-article-overlay {
    background: rgba(46, 196, 182, .12);
}

.tmg-home-article:hover h4,
.tmg-home-article:focus-visible h4 {
    color: var(--tmg-teal);
}

.tmg-home-article:hover .tmg-home-article-shade,
.tmg-home-article:focus-visible .tmg-home-article-shade {
    opacity: .85;
}

.tmg-home-preview .tmg-tournament {
    margin-top: .5rem;
}

/* W4d — #preview tournament header uses cup surface tokens (light + dark). */
.tmg-home-preview .tmg-tournament {
    border-color: var(--tmg-cup-border, var(--tmg-border));
}

.tmg-home-preview .tmg-tournament-header {
    border-bottom-color: var(--tmg-cup-line, var(--tmg-border));
}

.tmg-home-preview .tmg-tournament-title,
.tmg-home-preview .tmg-tournament-header h2,
.tmg-home-preview .tmg-tournament-header h3 {
    color: var(--tmg-cup-fg, var(--tmg-mist));
}

.tmg-home-preview .tmg-tournament-meta,
.tmg-home-preview .tmg-tournament-notes {
    color: var(--tmg-cup-muted, var(--tmg-muted));
}

.tmg-home-preview .tmg-home-badge,
.tmg-home-preview .tmg-tournament-header .tmg-badge {
    color: var(--tmg-cup-badge, var(--tmg-teal));
}

html[data-theme="light"] .tmg-home-preview .tmg-tournament,
body.tmg-theme-light .tmg-home-preview .tmg-tournament {
    background: var(--tmg-panel);
    border-color: var(--tmg-cup-border);
    color: var(--tmg-cup-fg);
}

html[data-theme="light"] .tmg-home-preview .tmg-tournament-title,
body.tmg-theme-light .tmg-home-preview .tmg-tournament-title,
html[data-theme="light"] .tmg-home-preview .tmg-tournament-header h2,
body.tmg-theme-light .tmg-home-preview .tmg-tournament-header h2 {
    color: var(--tmg-cup-fg) !important;
}

html[data-theme="light"] .tmg-home-preview .tmg-tournament-meta,
body.tmg-theme-light .tmg-home-preview .tmg-tournament-meta {
    color: var(--tmg-cup-muted) !important;
}

@media (max-width: 900px) {
    .tmg-home-hero-grid,
    .tmg-home-comp,
    .tmg-home-news {
        grid-template-columns: 1fr;
    }

    .tmg-home-comp--single {
        max-width: none;
    }

    .tmg-home-section-head {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .tmg-home-article-featured {
        grid-row: auto;
        min-height: 260px;
    }

    .tmg-home-article-wide {
        grid-column: auto;
    }
}


/* -------------------------------------------------------------------------- */
/* 1.8.65 — Synth Potato uniform feed tiles (home desk) + match strip + auth  */
/* -------------------------------------------------------------------------- */

.tmg-home-desk-kicker {
    color: var(--tmg-teal, #00C9B1);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

/* 3-col Synth feed grid — NOT 2×2 / square / mixed hero */
.tmg-home-feed.tmg-card-grid {
    display: grid;
    gap: 16px 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    min-width: 0;
    width: 100%;
}

.tmg-home-feed > article.tmg-card.tmg-card--feed,
.tmg-home .tmg-home-feed article.tmg-card.tmg-card--feed {
    background: var(--tmg-panel, #142026);
    border: 1px solid #2a2d33;
    border-radius: 20px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 100%;
}

.tmg-home-feed article.tmg-card.tmg-card--feed:hover,
.tmg-home-feed article.tmg-card.tmg-card--feed:focus-within {
    border-color: rgba(46, 196, 182, .5);
    box-shadow: 0 0 24px rgba(46, 196, 182, .12);
    transform: translateY(-2px);
}

/* Flush 16:9 image — 0 gap to body; no padded media inset / slash */
.tmg-home-feed .tmg-card--feed .tmg-card__media {
    aspect-ratio: 16 / 9;
    background: #0a0c0e;
    border-radius: 0;
    display: block;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 100%;
}

.tmg-home-feed .tmg-card--feed .tmg-card__media > img,
.tmg-home-feed .tmg-card--feed .tmg-card__media-placeholder {
    aspect-ratio: 16 / 9;
    border-radius: 0;
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.tmg-home-feed .tmg-card--feed .tmg-card__slash {
    display: none !important;
}

.tmg-home-feed .tmg-card--feed .tmg-score {
    border-radius: 8px;
    font-size: 12px;
    padding: 5px 9px;
    right: 10px;
    top: 10px;
}

.tmg-home-feed .tmg-card--feed .tmg-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
}

.tmg-home-feed .tmg-card--feed .tmg-card__by {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.tmg-home-feed .tmg-card--feed .tmg-card__date {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    margin: 0;
}

.tmg-home-feed .tmg-card--feed .tmg-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 4px 0 2px;
    padding: 0;
}

.tmg-home-feed .tmg-card--feed .tmg-card__chips li {
    margin: 0;
    padding: 0;
}

.tmg-home-feed .tmg-card--feed .tmg-card__chips .tmg-type-badge,
.tmg-home-feed .tmg-card--feed .tmg-card__chips a.tmg-type-badge {
    border-radius: 6px;
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    line-height: 1.2;
    padding: 4px 8px;
    text-decoration: none;
    text-transform: uppercase;
}

.tmg-home-feed .tmg-card--feed .tmg-card__chips .tmg-card__chip:not(.tmg-card__chip--type) a,
.tmg-home-feed .tmg-card--feed .tmg-card__chips .tmg-card__chip:not(.tmg-card__chip--type) {
    border: 1px solid #2a2d33;
    border-radius: 6px;
    color: var(--tmg-muted, #A8BCC4);
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 4px 8px;
    text-decoration: none;
    text-transform: uppercase;
}

.tmg-home-feed .tmg-card--feed .tmg-card__title {
    -webkit-box-orient: vertical;
    display: -webkit-box;
    font-size: 1.15rem;
    font-weight: 900;
    -webkit-line-clamp: 3;
    letter-spacing: -.015em;
    line-height: 1.2;
    margin: 4px 0 0;
    overflow: hidden;
}

.tmg-home-feed .tmg-card--feed .tmg-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.tmg-home-feed .tmg-card--feed:hover .tmg-card__title,
.tmg-home-feed .tmg-card--feed:focus-within .tmg-card__title {
    color: var(--tmg-teal, #00C9B1) !important;
}

/* Home no longer emits .tmg-card-grid--2x2 / .tmg-card--square (retired 1.8.65). */

/* Match-only thin strip */
.tmg-home-match-strip {
    padding-top: 48px;
}

/* 1.8.68 — Ladders + Live & upcoming share one Competition panel. */
.tmg-home-competition-grid {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tmg-home-competition-grid--solo,
.tmg-home-competition-grid:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
}

.tmg-home-competition-col {
    min-width: 0;
}

.tmg-home-competition-col--matches {
    display: flex;
    flex-direction: column;
}

.tmg-home-col-head {
    align-items: end;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tmg-home-col-head h4 {
    color: var(--tmg-mist, #E4F4F2);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0;
}

.tmg-home-col-head .tmg-home-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 14px;
}

.tmg-home-competition .tmg-home-match-list {
    flex: 1;
    margin: 0;
}

.tmg-home-competition-col--matches .tmg-home-match-row {
    grid-template-columns: auto minmax(0, 1fr);
}

.tmg-home-competition-col--matches .tmg-home-match-title {
    white-space: normal;
}

.tmg-home-competition-col--matches .tmg-home-match-when {
    grid-column: 2;
}

.tmg-home-competition .tmg-home-comp-card:hover,
.tmg-home-competition .tmg-home-comp-card:focus-visible {
    transform: none;
}

@media (max-width: 900px) {
    .tmg-home-competition-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.tmg-home-match-list {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-home-border, #243038);
    border-radius: 14px;
    list-style: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.tmg-home-match-item {
    border-bottom: 1px solid var(--tmg-home-line, #1e2a30);
    margin: 0;
}

.tmg-home-match-item:last-child {
    border-bottom: 0;
}

.tmg-home-match-row {
    align-items: center;
    color: inherit !important;
    display: grid;
    gap: 10px 16px;
    grid-template-columns: auto 1fr auto;
    padding: 10px 14px;
    text-decoration: none !important;
}

.tmg-home-match-row:hover,
.tmg-home-match-row:focus-visible {
    background: rgba(46, 196, 182, .06);
}

.tmg-home-match-type {
    background: rgba(46, 196, 182, .12);
    border: 1px solid rgba(46, 196, 182, .35);
    border-radius: 999px;
    color: var(--tmg-teal, #00C9B1);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 3px 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tmg-home-match-title {
    font-size: 13px;
    font-weight: 650;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tmg-home-match-when {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 12px;
    white-space: nowrap;
}

/* Logged-out auth band */
.tmg-home-auth-band {
    padding-top: 20px;
}

.tmg-home-auth-band-inner {
    align-items: center;
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-home-border, #243038);
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    justify-content: space-between;
    padding: 18px 20px;
}

.tmg-home-auth-band-copy {
    color: var(--tmg-muted, #A8BCC4);
    flex: 1 1 220px;
    font-size: 14px;
    margin: 0;
}

.tmg-home-auth-band-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

html[data-theme="light"] .tmg-home-feed article.tmg-card.tmg-card--feed,
body.tmg-theme-light .tmg-home-feed article.tmg-card.tmg-card--feed {
    background: #FFFFFF;
    border-color: #c5d0d4;
}

html[data-theme="light"] .tmg-home-feed .tmg-card--feed .tmg-card__title,
body.tmg-theme-light .tmg-home-feed .tmg-card--feed .tmg-card__title,
html[data-theme="light"] .tmg-home-feed .tmg-card--feed .tmg-card__by,
body.tmg-theme-light .tmg-home-feed .tmg-card--feed .tmg-card__by {
    color: #0B1214 !important;
}

html[data-theme="light"] .tmg-home-match-list,
body.tmg-theme-light .tmg-home-match-list,
html[data-theme="light"] .tmg-home-auth-band-inner,
body.tmg-theme-light .tmg-home-auth-band-inner {
    background: #FFFFFF;
    border-color: #c5d0d4;
}

@media (max-width: 1000px) {
    .tmg-home-feed.tmg-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .tmg-home {
        padding: 16px var(--tmg-page-inset, 18px) 32px;
    }

    .tmg-home-section,
    .tmg-home-match-strip {
        padding-top: 32px;
    }

    .tmg-home-feed.tmg-card-grid {
        gap: 17px;
        grid-template-columns: 1fr;
    }

    .tmg-home-feed .tmg-card--feed .tmg-card__body {
        padding: 16px;
    }

    .tmg-home-feed .tmg-card--feed .tmg-card__title {
        font-size: 1.1rem;
        -webkit-line-clamp: 3;
    }

    .tmg-home-match-row {
        grid-template-columns: auto 1fr;
    }

    .tmg-home-match-when {
        grid-column: 2;
    }

    .tmg-home-auth-band-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .tmg-home-auth-band-cta {
        width: 100%;
    }

    .tmg-home-auth-band-cta .tmg-home-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .tmg-home-hero--compact .tmg-hero-spark-img {
        max-height: 220px;
    }
}

@media (max-width: 390px) {
    .tmg-home {
        padding-left: var(--tmg-page-inset, 18px);
        padding-right: var(--tmg-page-inset, 18px);
    }
}

/* -------------------------------------------------------------------------- */
/* 1.8.66 — Banner lobby: Spark art + action rail. Auth lives here only.     */
/* -------------------------------------------------------------------------- */

html:not([data-theme="light"]):not(.tmg-theme-light) .tmg-home {
    --tmg-teal: #48C4B0;
    --tmg-muted: #A8B4BA;
    --tmg-mist: #E4F4F2;
    --tmg-home-border: #2a2d33;
    --tmg-home-radius: 20px;
}

/* Theme "Home" title is not a second hero. */
body:has(.tmg-home) .wp-block-post-title,
body:has(.tmg-home) h1.wp-block-post-title,
body:has(.tmg-home) .entry-title {
    display: none !important;
}

.tmg-home-banner {
    padding: 0;
}

.tmg-home-banner-panel {
    background: #0E1418;
    border: 1px solid #2a2d33;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    max-height: 340px;
    min-height: 300px;
    overflow: hidden;
    width: 100%;
}

.tmg-home-banner-art {
    min-height: 300px;
    min-width: 0;
    overflow: hidden;
}

.tmg-home-banner .tmg-hero-spark-slot,
.tmg-home-banner .tmg-hero-spark-picture {
    height: 100%;
    margin: 0;
    min-height: 0;
}

.tmg-home-banner .tmg-hero-spark-img {
    display: block;
    height: 100%;
    max-height: 340px;
    min-height: 300px;
    object-fit: cover;
    object-position: top center;
    width: 100%;
}

.tmg-home-banner-rail {
    align-items: stretch;
    border-left: 1px solid #2a2d33;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    padding: 24px;
}

.tmg-home-banner-rail .tmg-home-btn {
    width: 100%;
}

.tmg-home-banner-rail .tmg-home-btn-primary {
    background: #48C4B0;
    box-shadow: none;
    color: #0A0C0E !important;
}

.tmg-home-banner-rail .tmg-home-btn-primary:hover,
.tmg-home-banner-rail .tmg-home-btn-primary:focus-visible {
    background: #3ab3a0;
    color: #0A0C0E !important;
}

.tmg-home-banner-rail .tmg-home-btn-ghost {
    background: transparent;
    border: 1px solid #2a2d33;
    color: #E4F4F2 !important;
}

.tmg-home-banner-rail .tmg-home-btn-ghost:hover,
.tmg-home-banner-rail .tmg-home-btn-ghost:focus-visible {
    border-color: #48C4B0;
    color: #48C4B0 !important;
}

.tmg-home-banner-rail .tmg-home-btn-outline {
    background: transparent;
    border: 1px solid #48C4B0;
    color: #48C4B0 !important;
}

.tmg-home-banner-rail .tmg-home-btn-outline:hover,
.tmg-home-banner-rail .tmg-home-btn-outline:focus-visible {
    background: rgba(72, 196, 176, .12);
    color: #E4F4F2 !important;
}

.tmg-home-banner-rule {
    border: 0;
    border-top: 1px solid #2a2d33;
    height: 0;
    margin: 2px 0;
    width: 100%;
}

.tmg-home-banner-auth {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.tmg-home-section-head a,
.tmg-home-section-head a.tmg-home-btn {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #48C4B0 !important;
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    transform: none;
}

.tmg-home-bracket-card {
    padding: 18px;
}

.tmg-home-bracket-rounds li {
    gap: 8px;
    padding: 8px 0;
}

/* Stack the banner below the desktop grid lock (spec grid is ≥960). */
@media (max-width: 959px) {
    .tmg-home-banner-panel {
        grid-template-columns: 1fr;
        max-height: none;
        min-height: 0;
    }

    .tmg-home-banner-art,
    .tmg-home-banner .tmg-hero-spark-img {
        height: 220px;
        max-height: 220px;
        min-height: 0;
    }

    .tmg-home-banner-rail {
        border-left: 0;
        border-top: 1px solid #2a2d33;
    }
}

@media (max-width: 720px) {
    .tmg-home-banner-art,
    .tmg-home-banner .tmg-hero-spark-img {
        height: 200px;
        max-height: 200px;
    }

    .tmg-home-banner-rail {
        gap: 10px;
        padding: 16px;
    }
}
