:root {
  color-scheme: light;
  --ink: #101933;
  --muted: #52617a;
  --line: #e2e8f2;
  --paper: #fff;
  --blue: #2443d8;
  --blue-dark: #1933b4;
  --soft: #edf1ff;
  --navy: #101d44;
  --radius: 20px;
}
* { box-sizing: border-box }
body { margin: 0; background: #f5f7fb; color: var(--ink); font: 16px/1.5 system-ui, sans-serif }
button, input { font: inherit }
button { min-height: 44px; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; background: var(--soft); color: var(--blue-dark); font-weight: 680; cursor: pointer }
button:hover { background: #e0e7ff }
button.primary, .tabs button[aria-pressed=true] { background: var(--blue); color: white }
button.primary:hover, .tabs button[aria-pressed=true]:hover { background: var(--blue-dark) }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #536dff; outline-offset: 3px }
button.secondary { background: white; border-color: var(--line); color: var(--ink) }
button.secondary:hover { background: #f0f3f8 }
.site-header { background: white; border-bottom: 1px solid var(--line) }
.header-inner, main { width: min(100% - 48px, 1140px); margin-inline: auto }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px }
.brand { display: flex; align-items: center; gap: 10px; font-size: 26px; letter-spacing: -.06em; white-space: nowrap }
.brand span { border-left: 1px solid var(--line); padding-left: 10px; color: var(--blue); font-size: 20px; letter-spacing: -.04em }
nav, .tabs, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px }
nav button { background: transparent; color: var(--muted) }
nav button[aria-pressed=true] { background: var(--soft); color: var(--blue-dark) }
main { padding-block: 24px }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px }
.tabs button { background: white; border-color: var(--line); color: var(--muted); font-size: .9rem }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 276px; padding: 26px 32px; border-radius: 24px; background: var(--navy); color: white }
.photo { position: absolute; z-index: -2; inset: 0 0 0 49%; background: url(reference.png) no-repeat right -58px / auto 835px; opacity: .73 }
.hero::after { position: absolute; z-index: -1; content: ''; inset: 0; background: linear-gradient(90deg, #101d44 31%, #101d44da 53%, #101d4430 100%) }
.eyebrow { font-size: .84rem; letter-spacing: .10em; text-transform: uppercase; font-weight: 750; color: #b7c8ff }
h1, h2, h3, p { margin: 0 }
h1 { margin-top: 3px; font-size: clamp(2.15rem, 5vw, 3.5rem); line-height: 1.1; letter-spacing: -.06em }
h2 { font-size: clamp(1.25rem, 3vw, 1.62rem); letter-spacing: -.035em; line-height: 1.2 }
h3 { font-size: .95rem }
.hero p { margin-top: 4px; color: #e7eeff }
.hero-bottom { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 14px }
.score { font-size: clamp(2.5rem, 7vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums }
.hero-bottom p { margin: 0; padding-left: 17px; border-left: 1px solid #aebfe58a }
.muted { color: var(--muted) }
.grid { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(0, 1fr); align-items: start; gap: 18px; margin-top: 18px }
.card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px }
.intro { margin-top: 7px; margin-bottom: 17px }
.slot { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: center; gap: 14px; padding: 14px; margin-top: 9px; border: 1px solid var(--line); border-radius: 13px }
.slot.open-slot { border-color: #b8c5fa; background: #f5f7ff }
.slot strong { display: block; font-size: 1.02rem }
.slot p { margin-top: 3px; overflow-wrap: anywhere }
.slot .actions { justify-content: flex-end }
.pill { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border-radius: 100px; background: #e4f6ed; color: #145c42; font-size: .875rem; font-weight: 650 }
.pending { background: #fff0d6; color: #704806 }
.match-controls { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line) }
.side-group + .side-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line) }
.teamlist { display: grid; gap: 8px; margin: 12px 0 }
.member { display: flex; align-items: center; gap: 9px; overflow-wrap: anywhere }
.avatar { display: grid; flex: 0 0 30px; place-items: center; min-height: 30px; border-radius: 50%; background: var(--soft); color: var(--blue-dark); font-size: .78rem; font-weight: 750 }
#rivals { display: grid; gap: 8px; margin-top: 12px }
#rivals p { font-size: .9rem; color: var(--muted) }
.tablewrap { overflow: auto; margin-top: 12px }
table { border-collapse: collapse; width: 100%; text-align: left; font-variant-numeric: tabular-nums }
th, td { padding: 12px; border-bottom: 1px solid var(--line) }
th[scope=col] { font-size: .86rem; color: var(--muted) }
tr.my-team { background: var(--soft); font-weight: 700 }
td:last-child { font-weight: 750 }
dialog { border: 1px solid var(--line); border-radius: 18px; width: min(100% - 32px, 480px); max-height: calc(100dvh - 24px); overflow: auto; padding: 24px; color: inherit }
dialog::backdrop { background: #091840a0 }
dialog .actions { justify-content: flex-end; margin-top: 18px }
dialog button { min-height: 46px }
label { display: grid; gap: 6px; margin: 12px 0; font-weight: 620 }
input { width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid #aebbd4; border-radius: 8px; color: var(--ink); background: white }
#hint { margin-top: 12px }
#form-error { margin-top: 8px; color: #a11632 }
#notice:not(:empty) { position: sticky; bottom: 12px; z-index: 1; margin: 12px 0; padding: 12px 16px; border: 1px solid #bce3d0; border-radius: 12px; background: #e8f8ef; color: #17553c }
footer { margin: 24px 0 4px; color: var(--muted); font-size: .875rem }
[hidden] { display: none !important }
@media (max-width: 740px) {
  .header-inner, main { width: calc(100% - 28px) }
  .header-inner { display: grid; gap: 6px; padding-block: 12px 8px }
  nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px }
  nav button { padding-inline: 5px; font-size: .83rem }
  .grid { grid-template-columns: 1fr; gap: 12px }
  .hero { min-height: 220px; padding: 21px }
  .photo { inset-inline-start: 32%; opacity: .46 }
  .hero::after { background: linear-gradient(90deg, #101d44 7%, #101d44b5 65%, #101d4460 100%) }
  main { padding-block: 15px }
  .card { padding: 15px }
}
@media (max-width: 440px) {
  .bar { align-items: stretch }
  .tabs { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px }
  .tabs button { padding-inline: 4px }
  .slot { grid-template-columns: 1fr; gap: 7px; padding: 11px }
  .slot .actions { justify-content: flex-start }
  .slot .primary { flex: 1 }
  .hero-bottom { gap: 10px }
  .hero-bottom p { padding-left: 10px; font-size: .9rem }
  th, td { padding: 8px }
}
.account-button { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.demo-info { padding: 10px 12px; border-radius: 9px; background: var(--soft); color: var(--blue-dark); font-size: .9rem }
.field-error { margin-top: 8px; color: #a11632 }
@media (max-width: 740px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2 }
  .account-button { grid-column: 2; grid-row: 1; max-width: 140px }
}
.team-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line) }
.team-section h3 { margin-bottom: 10px; font-size: 1.12rem }
.team-actions { margin-top: 10px }
.team-actions select { min-height: 44px; max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 9px; font: inherit }
.team-toggle { display: flex; align-items: center; gap: 10px }
.team-toggle input { width: 22px; min-height: 22px; accent-color: var(--blue) }
.member-names { margin-block: 4px; padding-inline-start: 20px }
.recruitment-slots { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,290px),1fr)); gap: 8px }
#team-content .slot .team-actions { margin-top: 0 }
button:disabled { opacity: .65; cursor: wait }
@media (max-width: 740px) { .header-inner nav { grid-template-columns: repeat(4,minmax(0,1fr)) } }
.lineup-tabs { margin-top: 12px }
#team-dialog select { width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; font: inherit }
.lineup-tally { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 18px; padding: 11px 14px; border-radius: 12px; background: var(--soft); margin-bottom: 12px }
.lineup-tally strong { color: var(--blue-dark); font-size: 1.12rem }
.result-link { display: inline-block; margin: 4px 0 8px; color: var(--blue-dark); font-weight: 650 }
.shared-duels { margin-bottom: 20px }
.duel-card { display: grid; gap: 5px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px }
.duel-card .pill { justify-self: start }
.duel-card input { margin-top: 8px }
.duel-score { justify-self: start; padding: 3px 12px; border-radius: 8px; background: var(--soft); color: var(--blue-dark); font-size: 1.55rem; font-variant-numeric: tabular-nums }
.duel-formats { margin-bottom: 5px }
.header-actions { display: flex; align-items: center; gap: 8px }
.notifications { position: relative }
.notification-trigger { position: relative; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); cursor: pointer; list-style: none }
.notification-trigger::-webkit-details-marker { display: none }
.notification-trigger:hover, .notifications[open] .notification-trigger { background: var(--soft) }
.notification-trigger:focus-visible { outline: 3px solid #536dff; outline-offset: 3px }
.bell-icon { position: relative; width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 8px 8px 3px 3px }
.bell-icon::after { position: absolute; inset: auto 4px -5px; height: 2px; border-radius: 2px; background: currentColor; content: '' }
.notification-badge { position: absolute; top: -6px; right: -5px; display: grid; min-width: 20px; min-height: 20px; padding: 0 3px; place-items: center; border: 2px solid white; border-radius: 20px; background: #c92745; color: white; font-size: .68rem; font-weight: 750 }
.notification-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 4; width: min(340px, calc(100vw - 28px)); max-height: 65vh; overflow: auto; box-shadow: 0 14px 35px #0e193326 }
.notification-panel h2 { margin-bottom: 12px }
.notification-item { display: grid; gap: 3px; width: 100%; margin-top: 6px; text-align: left; background: white; border-color: var(--line); color: var(--ink) }
.notification-item span { font-size: .875rem; font-weight: 500 }
[data-notification-target] { scroll-margin-top: 20px }
@media (max-width: 740px) {
  .header-actions { grid-column: 2; grid-row: 1; position: relative }
  .notifications { position: static }
}
@media (max-width: 390px) {
  .account-button { max-width: 125px; padding-inline: 8px }
}
.notification-example { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px }
.profile-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px }
.profile-resume { margin-top: 12px }
.profile-extras { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px }
.profile-extras > summary { cursor: pointer; font-weight: 650 }
.profile-records { margin: 12px 0 0; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px }
.profile-records legend { font-weight: 650 }
.profile-records p { font-size: .88rem }
.profile-identity { display: flex; align-items: center; gap: 12px; margin: 16px 0; overflow-wrap: anywhere }
.profile-avatar, .account-avatar { display: grid; flex-shrink: 0; place-items: center; overflow: hidden; border-radius: 50%; background: var(--soft); color: var(--blue-dark); font-weight: 750 }
.profile-avatar { width: 62px; height: 62px; font-size: 1.25rem }
.account-avatar { width: 25px; height: 25px; font-size: .7rem }
.profile-avatar img, .account-avatar img { width: 100%; height: 100%; object-fit: cover }
.account-button { display: inline-flex; align-items: center; gap: 6px }
.account-name { min-width: 0; overflow: hidden; text-overflow: ellipsis }
.profile-performance { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 12px; margin: 0 0 14px; padding: 12px; border-radius: 10px; background: var(--soft) }
.profile-performance dt { color: var(--ink) }
.profile-performance dd { margin: 0; color: var(--blue-dark); font-weight: 700; font-variant-numeric: tabular-nums }
@media (max-width: 390px) { .profile-records .profile-fields { grid-template-columns: 1fr } }
.season-hero { margin-bottom: 18px }
.season-grid { margin-bottom: 20px }
.season-actions { margin-top: 12px }
.season-legacy { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 12px }
.season-legacy > summary,.season-races > summary { cursor: pointer; font-weight: 650 }
.season-legacy .shared-duels { margin-top: 14px }
.season-race-form { min-width: 0; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; padding: 8px 12px }
.season-race-form legend { font-weight: 650 }
.season-races { margin-block: 4px }
#season-ranking { overflow-x: auto }
.season-hero h1 { max-width: 13em }
.season-hero .season-intro { max-width: 54ch; margin-top: 12px; line-height: 1.55 }
.season-hero .season-dates { margin-top: 13px; font-size: .9rem; font-weight: 650 }
@media (max-width: 740px) { .season-hero .season-intro { max-width: 48ch } }
.distance-list { display: grid; gap: 7px }
.distance-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 57px; padding: 6px 9px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: white }
.distance-row.is-selected { border-color: #9caeff; background: var(--soft) }
.distance-stepper { flex: 0 0 auto; display: grid; grid-template-columns: 44px 25px 44px; align-items: center; gap: 4px; text-align: center }
.distance-control { min-width: 44px; padding-inline: 0; background: var(--blue); color: white; font-size: 1.15rem }
.distance-control:hover { background: var(--blue-dark) }
.distance-control:disabled { background: #e8ebf3; color: #64708a; opacity: 1; cursor: default }
.distance-count { font-weight: 750; font-variant-numeric: tabular-nums }
.distance-total { margin-top: 12px; color: var(--blue-dark); font-size: 1.15rem; font-weight: 750 }
.distance-recap { min-height: 1.35em }
.season-offers-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; color: white; font-weight: 720; text-underline-offset: 4px }
.season-offers { margin-block: 24px; scroll-margin-top: 16px }
.offers-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,245px),1fr)); gap: 14px; margin-top: 12px }
.offer-card { display: flex; flex-direction: column; gap: 11px }
.offer-card h3 { font-size: 1.12rem }
.offer-price { color: var(--blue-dark); font-size: 1.65rem; font-weight: 750 }
.offer-price span { display: block; color: var(--muted); font-size: .88rem; font-weight: 550 }
.offer-examples { font-weight: 650; font-variant-numeric: tabular-nums }
.offer-status { margin-top: auto; color: var(--muted); font-size: .88rem; font-weight: 650 }
.offer-action { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; color: var(--blue-dark); font-weight: 720; text-underline-offset: 4px }

/* Eventask Cup */
:root {
  color-scheme: dark;
  --ink: #edf2ff;
  --muted: #aab8cb;
  --line: #35435c;
  --paper: #172235;
  --blue: #7dd3fc;
  --blue-dark: #67bfea;
  --soft: #29374f;
  --navy: #101725;
  --radius: 14px;
}
body { background: #0c1525; }
.site-header { background: #101a2b; }
.brand { align-items: baseline; color: var(--ink); text-decoration: none; }
.brand strong { font-weight: 900; }
.brand span.brand-task, .brand span.brand-dot { border: 0; padding: 0; font-size: inherit; letter-spacing: inherit; }
.brand span.brand-task { color: #7692ff; }
.brand span.brand-dot { color: #7dd3fc; }
.brand span.brand-coupe { color: #7dd3fc; font-size: .73em; letter-spacing: .045em; text-transform: uppercase; }
nav button[aria-pressed=true] { color: var(--blue); }
button.secondary, .tabs button { background: var(--paper); color: var(--ink); }
button.secondary:hover, button:hover { background: #34425a; }
button.primary, .tabs button[aria-pressed=true] { color: #102738; }
button { color: var(--ink); }
a { color: var(--blue); }
.season-hero { padding: clamp(24px, 5vw, 56px); border: 1px solid #536781; }
.season-hero::after { background: linear-gradient(90deg, #0c1424 10%, #0c1424f0 45%, #0c142458 100%); }
.season-hero h1 { max-width: 24ch; font-size: clamp(2.25rem, 5vw, 4.65rem); line-height: .99; text-wrap: balance; }
.season-hero .eyebrow, .season-hero .hero-example { color: var(--blue); }
.hero .season-intro { margin-top: 20px; max-width: 54ch; }
.hero .hero-example { margin-top: 14px; font-weight: 750; }
.season-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 20px; }
.season-hero-actions .season-offers-link { margin: 0; background: var(--blue); color: #102738; }
.podium-rewards { margin-block: 0 16px; padding-left: 1.6em; }
.podium-rewards li { padding: 5px 0; }
.podium-rewards li::marker { color: var(--blue); font-weight: 800; }
.ranking-category { margin: 22px 0; }
.ranking-category h3 { margin-bottom: 8px; color: var(--blue); }
dialog, input, select, textarea { background: #121e31; color: var(--ink); border-color: var(--line); }
.notification-panel, .notification-item, .season-pick, .team-section, .duel-card, .offer-card { color: var(--ink); background: var(--paper); }
[hidden] { display: none !important; }
@media (max-width: 680px) {
  .season-hero .photo { inset: 0; opacity: .48; }
  .season-hero::after { background: linear-gradient(90deg, #0c1424d9, #0c142466); }
  .season-hero .season-intro { max-width: 34ch; }
}
#team-dialog select, .distance-row, .slot.open-slot { background: var(--paper); }
.distance-control { color: #102738; }
#profile-sex { display: block; min-height: 44px; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.season-hero-actions .season-offers-link { padding-inline: 16px; border-radius: 8px; text-decoration: none; }
.season-hero .photo {
  inset: 0;
  background: url(coupe-night-race.webp) no-repeat center 42% / cover;
  opacity: .9;
}
.season-hero::after {
  background: linear-gradient(90deg, #0c1424 7%, #0c1424e8 37%, #0c14244d 75%, #0c142421);
}
@media (max-width: 680px) {
  .season-hero .photo { background-position: 70% center; }
  .season-hero::after { background: linear-gradient(90deg, #0c1424ed, #0c142498); }
}

@media (max-width: 740px) {
  .brand {
    grid-area: 1 / 1;
    justify-self: start;
    align-items: center;
    min-height: 44px;
    gap: clamp(5px, 1.5vw, 8px);
    font-size: clamp(20px, 5.2vw, 25px);
    line-height: 1;
  }
  .brand span.brand-coupe {
    padding-inline-start: clamp(5px, 1.5vw, 8px);
    font-size: .66em;
  }
}
@media (max-width: 390px) {
  .header-actions { gap: 5px; }
  .account-button { max-width: 107px; font-size: .8rem; }
}

.season-hero h2.hero-example { font-size: 1.12rem; }
.season-hero .season-benefit { max-width: 54ch; }

.home-details { margin-block: 10px; padding-block: 13px; }
.home-details > summary { cursor: pointer; font-weight: 720; }
.home-details .season-benefit { max-width: 65ch; margin-top: 10px; }
#season-duel-content > :last-child { margin-bottom: 0; }
#runner-sex { display: block; min-height: 44px; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
#runner-switch, #runner-legacy { margin-top: 8px; }

@media (min-width: 900px) {
  .offers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .offer-card > button:last-child { margin-top: auto; }
}

.candidate-performance { margin-top: 8px; }
.candidate-performance > summary { cursor: pointer; color: var(--blue); font-weight: 650; }
.candidate-performance .profile-performance { margin-top: 6px; }

.partner-band {
  margin-top: 30px;
  padding: clamp(14px, 3vw, 24px) 14px;
  border-block: 1px solid var(--line);
}
.partner-band h2 { margin: 0 0 14px; text-align: center; font-size: clamp(1.05rem, 2.5vw, 1.4rem); }
.partner-logos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  gap: clamp(12px, 3vw, 28px);
  max-width: 700px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.partner-logos li { display: grid; place-items: center; min-width: 0; width: 100%; }
.partner-logos img {
  display: block;
  width: min(100%, 112px);
  height: 100px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.25);
}
.partner-colrace { mix-blend-mode: screen; }
.partner-colrace img { filter: grayscale(1) invert(1) brightness(2.35) contrast(1.5); }
@media (max-width: 520px) {
  .partner-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 270px; }
  .partner-logos img { height: 84px; }
}
