@CHARSET "UTF-8";

:root {
    /* Brand & Core Palette - Elegant Deep Athletic Navy */
    --color-primary: #0e2a47;          /* Elegant Deep Midnight Navy */
    --color-primary-light: #1a3d66;    /* Rich Navy Slate */
    --color-primary-dark: #091a30;     /* Deep Midnight Shadow */
    --color-primary-text: #ffffff;
    
    /* Accent Palette - Refined Dark Navy Blue */
    --color-accent: #163b65;           /* Refined Dark Navy Blue */
    --color-accent-hover: #0c2540;
    --color-accent-light: #e8f0f8;     /* Soft Navy Tint 50 */
    --color-accent-subtle: #d6e4f2;    /* Navy Tint 100 */
    --color-accent-gradient: linear-gradient(135deg, #0e2a47 0%, #1a4473 100%);
    
    /* Vibrant Target & Status Colors */
    --color-gold: #f59e0b;             /* Archery Gold */
    --color-gold-hover: #d97706;
    --color-gold-light: #fffbeb;       /* Amber 50 */
    --color-gold-text: #92400e;
    --color-gold-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    
    --color-red: #f43f5e;              /* Target Red / Coral Rose */
    --color-red-hover: #e11d48;
    --color-red-light: #fff1f2;        /* Rose 50 */
    --color-red-gradient: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    
    --color-green: #10b981;            /* Mint Emerald Live */
    --color-green-hover: #059669;
    --color-green-light: #a7f3d0;      /* Emerald 200 */
    --color-green-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);

    --color-orange: #f97316;           /* Athletic High-Visibility Orange */
    --color-orange-hover: #ea580c;
    --color-orange-light: #ffedd5;     /* Light orange hover tint */
    --color-orange-subtle: #fff7ed;    /* Orange 50 */
    --color-orange-text: #7c2d12;
    --color-orange-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 55%, #fb923c 100%);

    /* Surfaces & Backgrounds - Refined Cool Navy Tone */
    --color-bg-page: #f0f4f8;          /* Fresh soft blue-tinted background */
    --color-bg-card: #ffffff;          /* Pure white card surface */
    --color-bg-subtle: #e6eff7;        /* Soft navy-tinted input/chip surface */
    --color-bg-muted: #d8e4f0;         /* Slate/Blue 200 */
    --color-nav-bg: linear-gradient(135deg, #091b33 0%, #10335e 55%, #0b2240 100%);

    /* Text & Typography - High Legibility Deep Navy */
    --color-text: #0a192f;             /* Crisp Deep Midnight for optimal legibility */
    --color-text-secondary: #2d4560;   /* Slate/Blue 600 */
    --color-text-muted: #5b7592;       /* Slate/Blue 500 */
    --color-text-inverse: #ffffff;

    /* Delicate Borders */
    --color-border: #d6e0ea;           /* Soft Blue-Gray Border */
    --color-border-dark: #b8cad8;      /* Medium Border */
    --color-border-focus: #163b65;     /* Dark Navy Blue Focus */

    /* Delicate Micro-Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

    /* Delicate Border Radii */
    --radius-xs: 3px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;

    /* Delicate, Compact Typography Scale */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --font-size-xs: 0.6875rem;   /* 11px */
    --font-size-sm: 0.75rem;     /* 12px */
    --font-size-base: 0.8125rem; /* 13px */
    --font-size-md: 0.875rem;    /* 14px */
    --font-size-lg: 1rem;        /* 16px */
    --font-size-xl: 1.125rem;    /* 18px */
    --font-size-2xl: 1.375rem;   /* 22px */

    /* Transitions */
    --transition-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 220ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Delicate Compact Touch metrics */
    --touch-target-min: 30px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-page);
    color: var(--color-text);
    position: relative;
    font-size: var(--font-size-base);
    font-family: var(--font-sans);
    line-height: 1.45;
    margin: 0;
    padding: 6px 10px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--color-accent);
    transition: color var(--transition-fast);
}

a:visited {
    color: var(--color-accent);
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.athlete-link {
    color: var(--color-accent, #163b65);
    text-decoration: none;
    font-weight: 600;
    transition: color 120ms ease;
}

.athlete-link:hover {
    color: var(--color-accent-hover, #0c2540);
    text-decoration: underline;
}

.nation-link {
    color: var(--color-text, #1e293b);
    text-decoration: none;
}

.nation-link:hover {
    color: var(--color-accent, #163b65);
    text-decoration: underline;
}

.nation-code-link {
    color: var(--color-accent, #163b65);
    text-decoration: none;
    font-weight: 700;
}

.nation-code-link:hover {
    color: var(--color-accent-hover, #0c2540);
    text-decoration: underline;
}

/* =========================================================
   RESPONSIVE NAVIGATION COMPONENT (MODERN MULTI-LINE & FLEX)
   ========================================================= */

#menuDiv, .nav-container {
    background: var(--color-nav-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 2px solid var(--color-accent, #163b65);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.18), 0 2px 4px -2px rgba(15, 23, 42, 0.1);
    padding: clamp(3px, 0.8vw, 6px) clamp(4px, 1vw, 8px);
    margin-bottom: 0.4rem;
    position: relative;
    font-size: clamp(0.75rem, 1.1vw, var(--font-size-base, 14px));
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-top-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(3px, 0.6vw, 6px);
    width: 100%;
}

.menu-live-row,
#LiveRow {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.menu-live-row.d-none,
#LiveRow.d-none,
#LiveRow:empty {
    display: none !important;
}

#GoogleAdsenseHor {
    display: none;
    margin: 0;
}

#DynMenu, .menu-actions-bar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(3px, 0.6vw, 6px);
    margin: 0;
    flex-shrink: 0;
}

#menu, .menu-nav-bar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(3px, 0.6vw, 6px);
    margin: 0;
    flex: 1 1 auto;
}

#menu > div, .menu-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(2px, 0.5vw, 5px);
    margin: 0;
}

/* Shared Button Styles - Delicate, Compact & Vibrant */
.menu-btn,
.fadeButton,
#Home,
#YouTube,
#liveMatch,
#NewContent,
#DirectMatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-target-min);
    padding: 4px 11px;
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    user-select: none;
    line-height: 1.2;
    box-shadow: var(--shadow-xs);
    vertical-align: middle;
    flex-shrink: 0;
    white-space: nowrap;
}

.menu-btn:hover,
.fadeButton:hover,
#Home:hover,
#YouTube:hover,
#liveMatch:hover,
#NewContent:hover,
#DirectMatch:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.menu-btn:active,
.fadeButton:active,
#Home:active,
#YouTube:active,
#liveMatch:active,
#NewContent:active,
#DirectMatch:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

/* Home Action Button - High-Visibility Athletic Orange */
#Home, .menu-btn-home {
    background: var(--color-orange-gradient, linear-gradient(135deg, #ea580c 0%, #f97316 55%, #fb923c 100%));
    color: #ffffff !important;
    border: 1px solid #fdba74;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    font-weight: 700;
    letter-spacing: 0.015em;
    padding: clamp(3px, 0.6vw, 5px) clamp(6px, 1vw, 11px);
    border-radius: var(--radius-sm);
    min-height: var(--touch-target-min);
    font-size: clamp(0.75rem, 1vw, var(--font-size-sm, 13px));
    width: fit-content;
    max-width: fit-content;
    flex: 0 0 auto;
}
#Home:hover, .menu-btn-home:hover {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 60%, #f97316 100%);
    border-color: #ffedd5;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

.menu-home-logo {
    height: 18px;
    width: auto;
    max-width: 52px;
    display: block;
    object-fit: contain;
}

/* Live Match Pulse Button - Green as for Subheading Style on Dedicated Row */
#liveMatch, .menu-btn-live {
    background: var(--color-green-light, #a7f3d0);
    color: #064e3b !important;
    border: 1px solid var(--color-green, #10b981);
    border-bottom: 2px solid var(--color-green-hover, #059669);
    text-shadow: none;
    font-weight: 700;
    width: 100%;
    justify-content: center;
    text-align: center;
    letter-spacing: 0.02em;
    padding: 4px 12px;
    animation: pulse-live-green 2s infinite ease-in-out;
}
#liveMatch:hover, .menu-btn-live:hover {
    background: #d1fae5;
    border-color: #059669;
    color: #022c22 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

@keyframes pulse-live-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* YouTube Button */
#YouTube, .menu-btn-danger {
    background: var(--color-red-gradient);
    color: #ffffff !important;
    border-color: #e11d48;
}
#YouTube:hover, .menu-btn-danger:hover {
    background: #be123c;
    border-color: #9f1239;
    color: #ffffff !important;
}

/* New Content Alert Button */
#NewContent, .menu-btn-warning {
    background: var(--color-gold-gradient);
    color: #78350f !important;
    font-weight: 700;
    border-color: #f59e0b;
}
#NewContent:hover, .menu-btn-warning:hover {
    background: #d97706;
    color: #ffffff !important;
    border-color: #b45309;
}

/* Direct Match Button */
#DirectMatch {
    display: none;
    background: var(--color-accent);
    color: #ffffff !important;
    border-color: var(--color-accent);
}
#DirectMatch:hover {
    background: var(--color-accent-hover);
    color: #ffffff !important;
}

/* Secondary Action Buttons (Players Info, Kiosk) */
.menu-btn-secondary,
#menu input[type="button"] {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}
.menu-btn-secondary:hover,
#menu input[type="button"]:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #38bdf8;
    color: #ffffff;
}

/* Menu Toggle Button (= symbol / Hamburger) */
.menu-toggle-btn,
#MenuToggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(3px, 0.6vw, 5px) clamp(6px, 0.8vw, 8px);
    background: #ffffff;
    color: var(--color-primary, #0e2a47);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    min-height: var(--touch-target-min);
    min-width: 36px;
    width: fit-content;
    max-width: fit-content;
    flex: 0 0 auto;
    margin-left: auto;
    transition: all var(--transition-fast);
}

.menu-toggle-btn:hover,
#MenuToggle:hover,
.menu-toggle-btn:focus,
#MenuToggle:focus {
    background: #f8fafc;
    border-color: #38bdf8;
    color: #06152b;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}

.menu-toggle-btn.active,
#MenuToggle.active,
.menu-toggle-btn[aria-expanded="true"],
#MenuToggle[aria-expanded="true"] {
    background: var(--color-accent-light, #e8f0f8);
    border-color: var(--color-accent, #163b65);
    color: var(--color-accent, #163b65);
}

.menu-toggle-svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* Auto-Update Toggle Switch / Label */
.menu-toggle-label,
#DynMenu .text-nowrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.menu-toggle-label:hover,
#DynMenu .text-nowrap:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

#AutoUpdate {
    cursor: pointer;
    margin: 0;
    accent-color: #38bdf8;
}

/* Responsive Modern Select Dropdowns - High-Visibility Light Background Controls */
#menu select,
.menu-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230e2a47' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 7px center;
    background-size: 11px 11px;
    padding: clamp(3px, 0.6vw, 5px) clamp(18px, 2vw, 22px) clamp(3px, 0.6vw, 5px) clamp(6px, 0.8vw, 9px);
    min-height: var(--touch-target-min);
    font-family: var(--font-sans);
    font-size: clamp(0.72rem, 0.95vw, var(--font-size-sm, 13px));
    font-weight: 600;
    color: var(--color-primary, #0e2a47);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    white-space: nowrap;
}

#menu select:hover,
.menu-select:hover {
    border-color: #38bdf8;
    background-color: #f8fafc;
    color: #06152b;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.25);
}

#menu select:focus,
.menu-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
    outline: none;
    background-color: #ffffff;
    color: #06152b;
}

#menu select option,
.menu-select option {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text, #0a192f);
    background-color: #ffffff;
    padding: 4px 8px;
}

#menu select option[value=""],
.menu-select option[value=""] {
    color: var(--color-accent, #163b65);
    font-weight: bold;
}

/* Layout Containers */
#MainContainer {
    display: flex;
    width: 100%;
    gap: 12px;
    align-items: flex-start;
    margin-top: 0;
}

#MainPage {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    margin-top: 0;
}

#Content {
    width: 100%;
    position: relative;
    margin-top: 0;
}

/* Header & Tournament Title Card */
.firstline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 8px 14px;
    margin-top: 0;
    margin-bottom: 0.6rem;
    gap: 12px;
    width: 100%;
}

#TourTitle {
    font-size: 1em;
    width: 100%;
}

#TourTitle img {
    max-height: 90px;
    max-width: 20vw;
    object-fit: contain;
}

#TourTitle > div {
    margin: 0 0.8rem;
    flex: 1;
    text-align: center;
}

.HomeTitle {
    font-size: clamp(1.2rem, 2.6vw, 2rem);
    text-align: center;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
}

.HomeDates {
    font-size: clamp(0.85rem, 1.6vw, 1.15rem);
    text-align: center;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.Files {
    font-size: var(--font-size-sm);
    text-align: justify;
    width: 100%;
    background-color: var(--color-bg-card);
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
    margin-bottom: 0.6rem;
}

.Files table {
    border: 1px solid var(--color-border);
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: var(--radius-md, 6px);
    overflow: hidden;
}

.Files th {
    padding: 5px 8px;
    text-align: center;
    vertical-align: middle;
    background-color: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.Files td {
    padding: 4px 6px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.Files td.event {
    padding: 4px 8px;
    text-align: left;
    font-weight: 600;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.Files td.center {text-align: center;}
.Files b {font-size: 1.02em; color: var(--color-text);}
.Files div {text-align: justify;}
.Files .lastupdate {font-size: 0.8em; color: var(--color-text-muted);}

.Weather {
    font-size: var(--font-size-sm);
    color: #ffffff;
    width: 100%;
    background: linear-gradient(135deg, #0e2a47 0%, #173f6f 100%);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid #163b65;
    box-shadow: var(--shadow-xs);
    margin-bottom: 0.6rem;
}

.Weather div.WeatherTitle {
    padding: 2px 4px;
    text-align: center;
    font-weight: 700;
    font-size: var(--font-size-md);
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 6px;
}

.Weather div.mainLine {
    padding: 4px 2px;
    text-align: left;
    vertical-align: middle;
    min-width: 10%;
    color: #e0e7ff;
}

.Weather div.mainLine span.mainValue {
    font-weight: 700;
    color: #ffffff;
}

.Weather div.mainLine span.windDir {
    font-weight: 700;
    font-size: 1.5em;
    vertical-align: middle;
}

.Weather div.mainLine.Right {
    text-align: right;
    margin-top: 6px;
}

hr.weather {
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 8px 0;
}

#wWindDir {
    background-image: url(/Common/Images/windArrow.svg);
    opacity: 0;
    width: 0.85em;
    height: 0.85em;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    display: inline-block;
    margin-left: 0.25em;
    vertical-align: middle;
}

.Disclaimer {
    font-size: var(--font-size-sm);
    background-color: var(--color-gold-light);
    color: var(--color-gold-text);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid #fef08a;
    box-shadow: var(--shadow-xs);
    width: 100%;
    margin-bottom: 0.6rem;
}

#DiscImage {float: right; margin-left: 8px;}
#DiscTitle {font-size: 1.02em; margin-bottom: 0.35em; font-weight: 700;}
#DiscUl {margin-block-start: 0; padding-inline-start: 1.15rem;}

#SelectTour {
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem auto;
    border-radius: var(--radius-md, 6px);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--color-border);
}

#SelectTour th {
    padding: 5px 10px;
    border: 1px solid var(--color-border);
    color: var(--color-text-inverse);
    font-weight: 600;
    background-color: var(--color-primary-light);
    font-size: var(--font-size-sm);
}

#SelectTour td {
    border: 1px solid var(--color-border);
    padding: 4px 10px;
    background-color: var(--color-bg-card);
    font-size: var(--font-size-sm);
}

#SelectTour th.SelTour {font-size: 1.25em;}
#SelectTour a {font-weight: 600; color: var(--color-accent);}
#SelectTour a:hover {color: var(--color-accent-hover);}

.Center {text-align: center;}
.d-none {display: none !important;}

#footer {
    position: relative;
    margin-top: 1rem;
    padding: 8px 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

/* PARTICIPANTS & DATA TABLES - Delicate, Vibrant & Modern */
.Participants {
    border-spacing: 0;
    border-collapse: separate;
    border: 1px solid var(--color-border);
    width: 100%;
    background-color: var(--color-bg-card);
    border-radius: var(--radius-md, 6px);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: var(--font-size-sm);
    margin-bottom: 10px;
}

.Participants td,
.Participants th {
    padding: 5px 8px;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    transition: background-color var(--transition-fast);
}

.Participants th {
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    text-align: left;
    background: var(--color-orange-light, #ffedd5);
    color: var(--color-orange-text, #7c2d12);
    font-size: var(--font-size-xs, 11.5px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-top: 1px solid var(--color-orange, #f97316);
    border-bottom: 2px solid var(--color-orange-hover, #ea580c);
}

.Participants tr:hover td,
table.Participants tr:hover td,
table.Griglia tr:hover td,
.Files table tr:hover td,
.Tabella:not(.SearchInfo) tr:hover td {
    background-color: var(--color-green-light, #a7f3d0);
}

.Files table tbody.FilesMultiRow:hover > tr > td[rowspan],
.Files table tbody.FilesMultiRow > tr:hover > td {
    background-color: var(--color-green-light, #a7f3d0);
}

.Files table tbody.FilesMultiRow:has(> tr > td[rowspan]:hover) > tr:hover > td:not([rowspan]) {
    background-color: var(--color-bg-card);
}

.Participants th.Center {text-align: center;}

.Heading {
    background: linear-gradient(135deg, #0e2a47 0%, #1b497c 100%);
    color: var(--color-text-inverse);
}

/* White margin 10px above every new Heading Title or EventName */
.Participants tr.Heading:not(:first-child) th.Title,
table.Participants tr.Heading:not(:first-child) th.Title,
.Participants tr:not(.Heading) + tr.Heading th.EventName,
table.Participants tr:not(.Heading) + tr.Heading th.EventName {
    border-top: 10px solid #ffffff;
}

.Participants tr.Heading + tr.Heading th,
table.Participants tr.Heading + tr.Heading th {
    border-top: 1px solid var(--color-border, #d6e0ea);
}

.SubHeading th,
tr.SubHeading th,
.Participants tr.Heading th:not(.Title):not(.EventName),
table.Participants tr.Heading th:not(.Title):not(.EventName) {
    background: var(--color-orange-light, #ffedd5);
    color: var(--color-orange-text, #7c2d12);
    font-weight: 700;
    font-size: var(--font-size-xs, 11.5px);
    padding: 5px 8px;
    border-top: 1px solid var(--color-orange, #f97316);
    border-bottom: 2px solid var(--color-orange-hover, #ea580c);
    border-left: 1px solid var(--color-border, #d6e0ea);
    border-right: 1px solid var(--color-border, #d6e0ea);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

th.Title {
    position: relative;
    font-size: 1.15em;
    border-bottom: 1px solid var(--color-border);
    border-top: 2px solid var(--color-accent);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    background: linear-gradient(135deg, #091b33 0%, #123b6b 100%);
    color: #ffffff;
}

th.Title a {color: #ffffff;}

th.EventName,
.Participants th.EventName,
table.Participants th.EventName,
table.Participants tr.Heading th.EventName {
    position: relative;
    font-size: 1.05em;
    border-bottom: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    background: linear-gradient(135deg, #091b33 0%, #123b6b 100%);
    color: #ffffff;
}

th.EventName a,
.Participants th.EventName a,
table.Participants th.EventName a {
    color: #ffffff;
}

th.EventName,
th:has(.linkPdf),
td:has(.linkPdf) {
    position: relative;
}

/* PDF link floating over the cell on the right without altering cell text alignment */
.linkPdf {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    font-size: var(--font-size-xs, 11px);
    font-weight: 500;
    line-height: normal;
    z-index: 2;
}

.linkPdf a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-sm, 4px);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 600;
    transition: all var(--transition-fast, 140ms ease);
}

.linkPdf a:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: #ffffff;
    color: #ffffff !important;
    text-decoration: none !important;
}

.linkPdf img {
    vertical-align: middle;
    height: 14px;
}
.row1 {background-color: var(--color-bg-subtle, #e6eff7) !important;}

.Rank,
.Code {
    font-weight: 700;
    text-align: center;
    width: 24px;
    white-space: nowrap;
}

th.FirstTh {border-left: 1px solid var(--color-border);}
th.LastTh {border-right: 1px solid var(--color-border);}
tr.row td {border: 1px solid var(--color-border);}

th.EventName {
    font-size: 1.05em;
    border-bottom: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border);
}

.piccolo {font-size: 0.85em;}

table.Griglia {
    border-spacing: 0;
    border-collapse: separate;
    width: 100%;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-card);
    border-radius: var(--radius-md, 6px);
    overflow: hidden;
    font-size: var(--font-size-sm);
    box-shadow: var(--shadow-xs);
}

.Griglia th,
table.Griglia th,
table.subGriglia th {
    padding: 5px 8px;
    font-size: var(--font-size-xs, 11px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-orange-text, #7c2d12);
    background: var(--color-orange-light, #ffedd5);
    border-top: 1px solid var(--color-orange, #f97316);
    border-bottom: 2px solid var(--color-orange-hover, #ea580c);
}

.Griglia th:empty,
table.Griglia th:empty,
table.subGriglia th:empty {
    background: transparent;
    border: none;
}
table.Griglia td.Top {border-top: 1px solid var(--color-border-dark);}
table.Griglia td.Bottom {border-bottom: 1px solid var(--color-border-dark);}
table.Griglia td.Left {border-left: 1px solid var(--color-border-dark);}
table.Griglia td.Right {border-right: 1px solid var(--color-border-dark);}
.Bolder {font-weight: 700; text-align: center;}
table.Participants td.Right {text-align: right;}

.ViewRow1 td {background-color: var(--color-bg-subtle);}
.ViewRow td {background-color: var(--color-bg-card);}
td.Null, .ViewRow1 td.Null {background-color: var(--color-bg-page);}
.NumberAlign {text-align: right;}

img.Flag {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xs);
    vertical-align: middle;
}

td.CoFlag {border-right: none; width: 10px;}
td.CoCode {border-right: none; border-left: none; width: 10px;}
td.CoName {border-left: none;}

.Target {width: 1%;}
.ScoreCountry {font-size: 0.85em;}
.ScoreCountry img.Flag {margin-right: 0.35em; margin-left: 0.35em;}

.ScorePhoto img {margin: 0 0.35em; border-radius: var(--radius-xs);}
.ScorePhoto td {font-size: 0.85em; text-align: center; font-weight: 700;}

.ScoreVideo {
    position: relative;
    width: 100%;
    margin-top: 0.8em;
    padding-bottom: 56.25%;
    padding-top: 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ScoreVideo iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ScoreVideoFull {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ScoreVideoFull iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#VideoContent {width: 75%; margin: auto; margin-top: 0.8em;}
#VideoScore {display: none;}

td.Foto {white-space: nowrap; text-align: center;}
td.Foto img {margin: 0 2px;}

.bracket-archer-pic,
.table-archer-pic {
    max-height: 24px;
    width: auto;
    border-radius: var(--radius-sm, 3px);
    vertical-align: middle;
    margin-right: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    display: inline-block;
}

.Running, .Running a, .Running a:visited {color: var(--color-accent);}
.Running a:hover {color: var(--color-accent-hover);}

/* Athletic Grid & Telemetry UI Primitives */
.sport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.sport-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.sport-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--color-border-focus);
}

.sport-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: var(--font-size-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.arrow-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55em;
    height: 1.55em;
    padding: 0 2px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1;
}

.arrow-gold {background: #f59e0b; color: #451a03; box-shadow: 0 1px 2px rgba(245, 158, 11, 0.3);}
.arrow-red {background: #ef4444; color: #ffffff; box-shadow: 0 1px 2px rgba(239, 68, 68, 0.3);}
.arrow-blue {background: #0284c7; color: #ffffff; box-shadow: 0 1px 2px rgba(2, 132, 199, 0.3);}
.arrow-black {background: #1e293b; color: #ffffff;}
.arrow-white {background: #f8fafc; color: #0f172a; border: 1px solid #cbd5e1;}
.arrow-green {background: #10b981; color: #ffffff;}

/* Responsive Breakpoints & Ad Rules */
@media screen and (max-width: 768px) {
    body {
        padding: 4px 6px;
    }

    #menuDiv {
        padding: 5px 8px;
        gap: 4px;
        overflow: visible;
    }

    .menu-top-row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        width: 100%;
        overflow: visible;
    }

    #DynMenu,
    .menu-actions-bar {
        display: inline-flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 5px;
        flex: 0 0 auto;
        min-width: 0;
        margin: 0;
    }

    #Home,
    .menu-btn-home {
        width: fit-content !important;
        max-width: fit-content !important;
        flex: 0 0 auto !important;
    }

    .menu-toggle-btn,
    #MenuToggle {
        display: inline-flex !important;
        width: fit-content !important;
        max-width: fit-content !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
        flex-shrink: 0;
    }

    #menu,
    .menu-nav-bar {
        display: none;
        width: 100%;
        flex: 1 1 100% !important;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        animation: menuSlideDown 0.18s ease-out;
    }

    #menu.menu-open,
    .menu-nav-bar.menu-open {
        display: flex !important;
    }

    .menu-group {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        flex: 1 1 auto;
    }

    @supports (display: contents) {
        .menu-group {
            display: contents;
        }
    }

    #menu select,
    .menu-select {
        flex: 1 1 calc(50% - 4px);
        min-width: 130px;
        max-width: 100%;
        font-size: var(--font-size-xs);
        padding: 5px 22px 5px 8px;
        box-sizing: border-box;
    }

    #menu input[type="button"],
    #menu .menu-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 100px;
        box-sizing: border-box;
    }

    .firstline {
        padding: 8px 10px;
        gap: 8px;
    }

    #TourTitle img {
        max-height: 56px;
        max-width: 20vw;
        object-fit: contain;
    }

    .HomeTitle {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }

    .HomeDates {
        font-size: clamp(0.75rem, 3vw, 0.9rem);
    }

    #VideoContent {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #Home,
    .menu-btn-home {
        width: fit-content !important;
        max-width: fit-content !important;
        flex: 0 0 auto !important;
        padding: 3px 8px !important;
    }

    .menu-toggle-btn,
    #MenuToggle {
        width: fit-content !important;
        max-width: fit-content !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
        padding: 3px 8px !important;
    }

    #menu select,
    .menu-select {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }

    #menu input[type="button"],
    #menu .menu-btn {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
}

@keyframes menuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (min-width: 769px) and (max-width: 1023px) {
    #menu select,
    .menu-select {
        min-width: 120px;
    }
}

#SecondLine {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

#SecondColumn {
    width: 100%;
}

@media screen and (min-width: 800px) {
    #WeatherLine {display: flex; align-items: flex-start; gap: 16px;}
    #SecondLine {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }
    #TrueScheduler {
        flex: 1 1 auto;
        min-width: 0;
    }
    #SecondColumn {
        flex: 0 0 auto;
        width: auto;
        max-width: 50%;
        min-width: 0;
    }
}

@media screen and (min-width: 1024px) {
    #GoogleAdsense {
        display: block;
        flex: 0 0 160px;
        width: 160px;
        position: sticky;
        top: 12px;
    }
}

@media all and (max-width: 1023px) {
    #GoogleAdsense,
    #GoogleAdsense .adsbygoogle {
        display: none !important;
    }

    #GoogleAdsenseHor {
        display: block;
        margin: 4px auto 8px auto;
        text-align: center;
        max-width: 100%;
        overflow: hidden;
    }

    #GoogleAdsenseHor:empty,
    #GoogleAdsenseHor:has(ins[data-ad-status="unfilled"]) {
        display: none !important;
        margin: 0 !important;
    }

    .HomeText img {
        display: block;
        float: none;
        margin-bottom: 1em;
        align-self: center;
    }
}

