/* Shared shell and tournament components; no generic table/button overrides. */
.site-header .site-logo {margin-right:16px;}
#sidebar>div {background:#fff;}
#sidebar a[aria-current="page"],#sidebar button[data-active="true"] {background:#ecfdf5;color:#065f46;font-weight:600;}
#sidebar a[aria-current="page"]>svg,#sidebar button[data-active="true"]>svg {color:#047857;}
#sidebar a:focus-visible,#sidebar button:focus-visible {outline:2px solid #059669;outline-offset:2px;}
#sidebar>div>div {padding-top:12px;}
#sidebar ul>li>a,#sidebar ul>li>button {min-height:44px;font-size:0.875rem;}
#sidebar .sidebar-group-links a {font-size:0.8125rem;}
.dark #sidebar>div {background:#1f2937;}
.dark #sidebar a[aria-current="page"],.dark #sidebar button[data-active="true"] {background:#064e3b;color:#a7f3d0;}
.dark #sidebar a[aria-current="page"]>svg,.dark #sidebar button[data-active="true"]>svg {color:#6ee7b7;}
@media(min-width:1024px) {
 .site-header .site-logo {width:max-content;min-width:232px;margin-left:8px;margin-right:0;flex-shrink:0;}
 .site-header #topbar-search {min-height:44px;}
}
.featured-heading {font-size:1rem;line-height:1.4;}
.featured-intro {line-height:1.6;}
.featured-card {padding:16px;border-color:#dbe3eb;border-radius:10px;}
.featured-card h3 {font-size:1rem;line-height:1.4;margin:10px 0 8px;}
.featured-card-meta {gap:8px;color:#64748b;}
.featured-card-meta>span {display:inline-flex;align-items:center;padding:3px 7px;border-radius:4px;background:#f1f5f9;font-size:0.6875rem;}
.featured-card-meta>time {font-variant-numeric:tabular-nums;font-size:0.75rem;}
.featured-round {padding:0 0 10px;line-height:1.5;}
.featured-round a {font-size:0.75rem;color:#526175;}
.featured-players {line-height:1.6;margin:8px 0 0;color:#64748b;}
.featured-results {border-color:#e2e8f0;}
.featured-result {padding:10px 0;grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr);gap:8px;line-height:1.5;font-size:0.75rem;}
.featured-result:last-child {border-bottom:0;}
.featured-result strong {color:#047857;font-size:0.8125rem;white-space:nowrap;}
.featured-result strong[data-result="Live"] {color:#dc2626;}
.featured-footer {display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:12px;}
.featured-footer .featured-all {margin:0;font-size:0.75rem;display:inline-flex;align-items:center;min-height:44px;}
.dark .featured-card {border-color:#374151;}
.dark .featured-card-meta>span {background:#334155;color:#cbd5e1;}
.dark .featured-card-meta>time,.dark .featured-round a,.dark .featured-players {color:#9ca3af;}
.dark .featured-results {border-color:#374151;}
.dark .featured-result strong {color:#6ee7b7;}
.dark .featured-result strong[data-result="Live"] {color:#fca5a5;}

.featured-result strong[data-result="½–½"],.featured-result strong[data-result="1/2-1/2"] {color:#64748b;}
.dark .featured-result strong[data-result="½–½"],.dark .featured-result strong[data-result="1/2-1/2"] {color:#9ca3af;}

.dark .site-header .site-logo img {filter:invert(1);}

/* Keep the brand's intrinsic width and let search shrink within the remaining space. */
.site-header {container-type:inline-size;min-height:4.5rem;}
.site-header .site-header-primary {flex:1;min-width:0;}
.site-header .site-logo {flex:none;width:max-content;}
.site-header .site-header-search {flex:0 1 24rem;min-width:0;}
.site-header .site-header-search-field {width:100%;min-width:0;}
.site-header .site-header-controls {flex:none;}
.site-header #toggleSidebarMobile,
.site-header #toggleSidebarMobileSearch,
.site-header #theme-toggle {flex:none;width:44px;height:44px;min-width:44px;padding:10px;}
.site-header #toggleSidebarMobile svg,
.site-header #toggleSidebarMobileSearch svg,
.site-header #theme-toggle svg {width:24px;height:24px;}
@media(min-width:1024px) {
 .site-header .site-logo {min-width:232px;}
}
/* Keep the full brand name accessible when only the logo fits beside controls. */
@container(max-width:22rem) {
 .site-header .site-logo span {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
}
.site-header #tooltip-toggle {max-width:calc(100vw - 24px);}
.site-header #tooltip-toggle.invisible {display:none;}

/* The mobile search lives inside the sidebar; enlarged rem widths must still fit. */
@media(max-width:1023.98px) {
 #sidebar {max-width:100vw;}
}

/* A quiet, shared contact route with a visible address for copying. */
.site-footer{margin:2.5rem 1rem 0;padding:1rem 0 1.5rem;border-top:1px solid #e2e8f0;color:#64748b;font-size:.8125rem;line-height:1.5}
.site-footer-inner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem 1.5rem}
.site-footer-copyright{margin:0}
.site-footer-copyright a{color:inherit;text-decoration:none}
.site-footer-copyright a:hover{text-decoration:underline}
.site-footer-contact{display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.25rem .6rem;min-height:44px;max-width:100%;text-decoration:none}
.site-footer-contact-label{color:#007d68;font-weight:600;text-underline-offset:3px}
.site-footer-email{color:#64748b;overflow-wrap:anywhere;min-width:0}
.site-footer-contact:hover .site-footer-contact-label{text-decoration:underline}
.site-footer a:focus-visible{outline:2px solid #008568;outline-offset:4px;border-radius:3px}
.dark .site-footer{border-color:#374151;color:#9ca3af}
.dark .site-footer-contact-label{color:#78d8bf}
.dark .site-footer-email{color:#9ca3af}
@media(max-width:600px){.site-footer{margin-top:2rem}.site-footer-inner{flex-direction:column;justify-content:center;text-align:center;gap:.25rem}.site-footer-contact{column-gap:.5rem}}

.site-footer-links{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.25rem 1.25rem;max-width:100%;min-width:0}
.site-footer-policy{display:inline-flex;align-items:center;min-height:44px;color:inherit;text-decoration:none;text-underline-offset:3px}
.site-footer-policy:hover{text-decoration:underline}

/* Text-aware navigation uses the drawer before enlarged labels crowd content. */
.site-shell {padding-top:var(--site-header-height,4.5rem);}
#sidebar {padding-top:var(--site-header-height,4.5rem);}
html.compact-navigation #sidebar {display:flex!important;width:min(24rem,100vw);max-width:100vw;}
html.compact-navigation #sidebar.hidden {display:none!important;}
html.compact-navigation #main-content {margin-left:0!important;}
html.compact-navigation #toggleSidebarMobile,
html.compact-navigation #toggleSidebarMobileSearch {display:inline-flex!important;align-items:center;justify-content:center;}
html.compact-navigation .site-header-search {display:none!important;}
html.compact-navigation #sidebar form {display:block!important;}
html.compact-navigation .site-header .site-logo {min-width:0;}

/* Event, section and round read in that order on every featured card. */
.featured-card {container:featured-game-card / inline-size;}
.featured-heading {font-size:1.0625rem;}
.featured-card h3 {margin:.65rem 0 .3rem;overflow-wrap:anywhere;}
.featured-section {font-size:.8125rem;line-height:1.5;color:#64748b;margin:0 0 .7rem;overflow-wrap:anywhere;}
.featured-round {padding:0 0 .65rem;}
.featured-round a {display:inline-flex;align-items:center;gap:.4rem;font-size:.75rem;}
.featured-round[data-state="live"] a {color:#047857;}
.featured-round[data-state="live"] a::before {content:'';width:.45rem;height:.45rem;border-radius:50%;background:currentColor;flex:none;}
.featured-players-label {font-weight:600;}
.featured-result strong[data-result="Live"] {color:#047857;}
.dark .featured-section {color:#9ca3af;}
.dark .featured-round[data-state="live"] a,.dark .featured-result strong[data-result="Live"] {color:#6ee7b7;}
@container featured-game-card (max-width:30rem) {
 .featured-result {grid-template-columns:minmax(0,1fr) auto;gap:.25rem .5rem;padding:.625rem 0;}
 .featured-result>span {display:flex;align-items:baseline;gap:.375rem;text-align:left;min-width:0;}
 .featured-result>span:first-child {grid-column:1;grid-row:1;}
 .featured-result>span:last-child {grid-column:1;grid-row:2;}
 .featured-result>strong {grid-column:2;grid-row:1 / span 2;align-self:center;min-width:2.125rem;}
 .featured-result>span::before {content:'';display:inline-block;flex:0 0 .4375rem;width:.4375rem;height:.4375rem;border:1px solid #64748b;border-radius:50%;background:#fff;}
 .featured-result>span:last-child::before {background:#334155;}
}

.live-playing {font-size:.625rem;}

/* Theme toggle icons driven purely by html.dark from Frame 0 (zero blank-icon flash). */
#theme-toggle-dark-icon,
#theme-toggle-light-icon { display: none; }
html.dark #theme-toggle-dark-icon { display: block; }
html:not(.dark) #theme-toggle-light-icon { display: block; }

/* Reserve width for Sign in -> avatar transition without shifting header controls. */
.auth-header-slot { min-width: 74px; justify-content: flex-end; }
