@font-face { font-family: Signika; src: url('../assets/Signika-Regular-webfont.woff') format('woff'); font-display: swap; }
@font-face { font-family: Signika; src: url('../assets/Signika-Bold-webfont.woff') format('woff'); font-weight: 700; font-display: swap; }
:root { color-scheme: light; --blue: #0759a0; --navy: #073b70; --pale: #edf6fd; --yellow: #f6cf32; --ink: #17324d; --muted: #61758a; --line: #ceddea; --green: #14714e; }
* { box-sizing: border-box; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
body { margin: 0; background: #f3f8fc; color: var(--ink); font: 16px/1.45 Signika, Arial, sans-serif; }
.public-shell { width: min(1180px, calc(100% - 32px)); margin: 24px auto 60px; }
.public-header { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(180px, 330px); gap: 22px; align-items: center; padding: 22px 26px; border-radius: 22px; background: linear-gradient(135deg, #fff 20%, var(--pale)); box-shadow: 0 16px 42px rgb(7 59 112 / 12%); }
.club-logo { width: 82px; height: 82px; object-fit: contain; }
.cup-logo { width: 100%; max-height: 100px; object-fit: contain; }
.public-header p { margin: 0 0 3px; color: var(--blue); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.public-header h1 { margin: 0; color: var(--navy); font-size: clamp(27px, 4vw, 44px); line-height: 1.05; }
.public-header span { display: block; margin-top: 8px; color: var(--muted); }
.intro-card,
.public-empty,
.public-section { margin-top: 18px; padding: 24px; border-radius: 18px; background: #fff; box-shadow: 0 12px 34px rgb(7 59 112 / 9%); }
.placement-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.placement-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.placement-rank { font-size: 24px; font-weight: 700; color: var(--navy); }
.placement-row strong, .placement-row small { display: block; overflow-wrap: anywhere; }
.placement-players { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; line-height: 1.3; overflow-wrap: break-word; }
.placement-row small { margin-top: 4px; font-size: 12px; color: var(--muted); }
.placement-row.is-confirmed { color: var(--navy); border-left: 5px solid var(--green); }
.placement-row.podium-place { background: #fffbea; }
@media (max-width: 430px) { .placement-row { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; padding: 12px; } .placement-row .status-pill { grid-column: 2; justify-self: start; } }
.intro-card { display: flex; justify-content: space-between; gap: 20px; align-items: end; border-left: 6px solid var(--yellow); }
.kicker { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
h2, h3 { margin-top: 0; color: var(--navy); }
.intro-card h2 { margin: 2px 0 3px; }
.intro-card p { margin: 0; color: var(--muted); }
.intro-card .public-plan-warning { margin-top: 10px; padding: 9px 11px; border-radius: 8px; background: #fff8d9; color: #684f00; font-size: 13px; }
.intro-card small { color: var(--muted); white-space: nowrap; }
.test-view-notice { display: flex; justify-content: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; border: 1px solid #e8cd70; border-radius: 11px; background: #fff8d9; color: #684f00; font-size: 13px; }
.public-slot-clock { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 20px; align-items: center; margin-top: 14px; padding: 15px 18px; border: 2px solid #8fbddd; border-radius: 15px; background: #fff; box-shadow: 0 9px 25px rgb(7 89 160 / 10%); }
.public-slot-clock > div { display: grid; gap: 1px; }
.public-slot-clock > div > span { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.public-slot-clock > div > strong { color: var(--navy); font-size: 20px; }
.public-slot-clock > div > small, .public-slot-clock > small { color: var(--muted); }
.public-slot-clock > small { grid-column: 1 / -1; }
.public-slot-clock-time { grid-column: 2; grid-row: 1; color: var(--navy); font-size: clamp(34px, 7vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; }
.public-slot-clock.is-running { border-color: var(--blue); box-shadow: inset 5px 0 var(--blue), 0 9px 25px rgb(7 89 160 / 10%); }
.public-slot-clock.is-expired { border-color: #d79489; background: #fff3f1; box-shadow: inset 5px 0 #a5382b, 0 9px 25px rgb(165 56 43 / 8%); }
.public-slot-clock.is-expired .public-slot-clock-time { color: #a5382b; }
.coming-soon { position: relative; overflow: hidden; min-height: 290px; display: grid; place-content: center; justify-items: center; text-align: center; background: radial-gradient(circle at 50% 0, #fff 0, #f2f8fd 70%); }
.coming-soon::before { position: absolute; inset: 0 0 auto; height: 7px; content: ''; background: linear-gradient(90deg, var(--blue), var(--yellow), var(--navy)); }
.coming-soon h2 { max-width: 720px; margin: 8px 0; font-size: clamp(28px, 5vw, 44px); line-height: 1.08; }
.coming-soon p { max-width: 650px; margin: 4px auto 20px; color: var(--muted); font-size: 17px; }
.coming-soon-badge { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; }
.view-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgb(7 59 112 / 7%); }
.view-tabs a { min-height: 42px; padding: 10px 14px; border-radius: 9px; color: var(--blue); font-weight: 700; text-decoration: none; }
.view-tabs a:hover { background: var(--pale); }
.view-tabs a[aria-current="page"] { background: var(--blue); color: #fff; }
.phase-section { position: relative; overflow: hidden; }
.phase-section::before { position: absolute; inset: 0 auto 0 0; width: 6px; content: ''; background: var(--blue); }
.final-phase::before { background: var(--yellow); }
.section-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 15px; }
.section-heading h2 { margin: 2px 0 0; }
.phase-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 20px; font-weight: 700; }
.final-phase .phase-number { background: var(--yellow); color: var(--navy); }
.phase-explanation { margin: -5px 0 15px; color: var(--muted); }
.subsection-heading { margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.subsection-heading h3 { margin: 0; }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.group-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; }
.group-card h3 { margin-bottom: 10px; }
.lot-note { margin: 9px 0 0; color: #885f00; font-size: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 7px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.public-matches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.public-match { padding: 16px; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 13px; }
.public-match.status-in_progress { border-left-color: var(--yellow); background: #fffdf1; }
.public-match.status-completed { border-color: #b9d8ca; border-left-color: var(--green); box-shadow: 0 6px 18px rgb(20 113 78 / 8%); }
.public-match > header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.public-match > header div { display: grid; }
.public-match > header strong { color: var(--navy); font-size: 19px; }
.public-match > header div span { color: var(--muted); font-size: 13px; }
.match-state-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; align-items: center; }
.status-pill { padding: 5px 9px; border-radius: 999px; background: var(--pale); color: var(--blue); font-size: 12px; font-weight: 700; }
.status-completed .status-pill { background: #e8f5ef; color: #0d6342; }
.match-refresh { min-height: 31px; padding: 5px 9px; border: 1px solid #b7cee0; border-radius: 999px; background: #fff; color: var(--blue); font: 700 12px/1 Signika, Arial, sans-serif; cursor: pointer; }
.match-refresh:hover { border-color: var(--blue); background: var(--pale); }
.match-refresh:disabled { cursor: wait; opacity: .65; }
.match-slot-clock { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 9px 11px; border: 1px solid #8fbddd; border-radius: 9px; background: #edf6fd; }
.match-slot-clock > span { display: grid; min-width: 0; line-height: 1.15; }
.match-slot-clock > span small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.match-slot-clock > span strong { color: var(--navy); font-size: 14px; }
.match-slot-clock-time { flex: 0 0 auto; color: var(--navy); font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.match-slot-clock.is-running { border-color: var(--blue); box-shadow: inset 4px 0 var(--blue); }
.match-slot-clock.is-expired { border-color: #d79489; background: #fff3f1; box-shadow: inset 4px 0 #a5382b; }
.match-slot-clock.is-expired .match-slot-clock-time { color: #a5382b; }
.phase { margin: 8px 0; color: var(--muted); font-size: 13px; }
.completed-scoreboard { overflow: hidden; margin-top: 10px; border: 1px solid #cfdee8; border-radius: 10px; background: #fff; }
.scoreboard-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, minmax(46px, 58px)); align-items: stretch; }
.scoreboard-row + .scoreboard-row { border-top: 1px solid #dce7ee; }
.scoreboard-row > span,
.scoreboard-row > strong { display: flex; min-width: 0; min-height: 48px; align-items: center; padding: 9px 10px; }
.scoreboard-head { background: #f4f8fb; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.scoreboard-head > span { min-height: 32px; justify-content: center; padding-top: 7px; padding-bottom: 7px; }
.scoreboard-head > span:first-child { justify-content: flex-start; }
.scoreboard-team { display: flex; flex-wrap: wrap; gap: 4px 8px; overflow-wrap: anywhere; color: var(--ink); }
.scoreboard-team strong { min-width: 0; font-size: 16px; line-height: 1.2; }
.scoreboard-value { justify-content: center; border-left: 1px solid #e4edf3; color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
.scoreboard-match { justify-content: center; border-left: 1px solid #d4e2eb; background: #f4f8fb; color: var(--navy); font-size: 24px; font-variant-numeric: tabular-nums; }
.scoreboard-match.is-sudden-advantage { background:#ddf3e6; color:#0d6342; box-shadow:inset 0 0 0 2px #8ac8a4; }
.scoreboard-row.is-winner { background: #f0faf5; }
.scoreboard-row.is-winner .scoreboard-team strong,
.scoreboard-row.is-winner .scoreboard-match { color: #0d6342; }
.scoreboard-row.is-winner .scoreboard-match { background: #e1f3e9; }
.winner-label { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; background: var(--green); color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .05em; line-height: 1.4; text-transform: uppercase; }
.sudden-death-result { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 8px; padding: 8px 11px; border-radius: 8px; background: #fff9db; color: #735600; font-size: 12px; }
.sudden-death-result strong { overflow-wrap: anywhere; }
.sudden-death-result.is-live { background:#eaf7ef; color:#0d6342; }

@media (max-width: 760px) {
  .public-shell { width: min(100% - 20px, 620px); margin-top: 10px; }
  .public-header { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 17px; border-radius: 16px; }
  .club-logo { width: 56px; height: 56px; }
  .cup-logo { grid-column: 1 / -1; max-height: 78px; }
  .public-header p { font-size: 12px; }
  .public-header h1 { font-size: 27px; }
  .intro-card, .public-empty, .public-section { padding: 17px; border-radius: 14px; }
  .intro-card { display: grid; }
  .intro-card small { white-space: normal; }
  .group-grid, .public-matches { grid-template-columns: 1fr; }
  .view-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-tabs a { text-align: center; }
}

@media (max-width: 430px) {
  .public-header { grid-template-columns: 1fr; text-align: center; }
  .club-logo { margin: auto; }
  .scoreboard-row { grid-template-columns: minmax(0, 1fr) repeat(3, 42px); }
  .scoreboard-row > span,
  .scoreboard-row > strong { padding-right: 7px; padding-left: 7px; }
  .scoreboard-team strong { font-size: 14px; }
  .scoreboard-value { font-size: 15px; }
  .scoreboard-match { font-size: 21px; }
  .public-match > header { align-items: center; }
  .match-state-actions { flex: 0 0 auto; max-width: 110px; }
  .public-slot-clock { grid-template-columns: 1fr; text-align: center; }
  .public-slot-clock-time { grid-column: 1; grid-row: auto; }
  .public-slot-clock > small { grid-column: 1; }
}

/* Time blocks and group identity stay legible without relying on colour alone. */
.tone-a { --group-tint: #f2f8fd; --group-accent: #8fbddd; }
.tone-b { --group-tint: #eaf3fa; --group-accent: #0759a0; }
.tone-c { --group-tint: #edf1f6; --group-accent: #073b70; }
.tone-d { --group-tint: #fffbeb; --group-accent: #f6cf32; }
.public-match[class*="tone-"], .group-card[class*="tone-"] { background: var(--group-tint); border-top: 3px solid var(--group-accent); }
.group-badge { display: inline-block; padding: 3px 7px; margin-right: 4px; border-radius: 6px; background: white; color: var(--navy); font-weight: 700; }
.schedule-timeline { display: grid; gap: 24px; }
.time-window { min-width: 0; border-left: 3px solid var(--line); padding-left: 17px; }
.time-window-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; }
.time-window-heading h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; width: 100%; margin: 0; font-size: 27px; font-variant-numeric: tabular-nums; }
.window-time { white-space: nowrap; }
.window-phase { color: var(--navy); font-size: 23px; }
.time-window-heading h3 small { font-size: 14px; font-weight: 400; }
.time-window-heading > span { color: var(--muted); font-size: 13px; }
.schedule-gap { margin: 0; padding: 9px 16px; border-radius: 8px; background: #f7f8fa; color: var(--muted); font-size: 13px; }
.public-match { min-width: 0; scroll-margin-top: 20px; }
.match-feeds { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.view-tabs a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.my-pair-form { display: flex; align-items: end; gap: 12px; padding: 16px; background: var(--pale); border-radius: 12px; }
.my-pair-form > div { flex: 1; min-width: 0; }
.my-pair-form label { display: block; margin-bottom: 6px; font-weight: 700; color: var(--navy); }
.my-pair-form select, .my-pair-form button { min-height: 48px; border-radius: 9px; padding: 11px 14px; font: inherit; }
.my-pair-form select { width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.my-pair-form button { border: 0; background: var(--blue); color: #fff; font-weight: 700; cursor: pointer; }
.my-pair-form :is(select, button):focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.my-pair-note { color: var(--muted); font-size: 14px; margin: 10px 0 24px; }
.my-team-heading { overflow-wrap: anywhere; }
.my-matches-section .public-matches { grid-template-columns: 1fr; }
@media (max-width: 600px) { .my-pair-form { flex-direction: column; align-items: stretch; padding: 12px; } }
@media (max-width: 760px) {
  .time-window { padding-left: 10px; }
  .time-window-heading h3 { font-size: 24px; }
  .public-match { padding: 12px; }
  .public-match > header { gap: 6px; flex-wrap: wrap; }
  .public-match > header strong { font-size: 17px; }
  .public-header { padding: 12px; }
  .intro-card h2 { font-size: 20px; }
}
