:root {
  --navy: #09243a;
  --navy-soft: #123b57;
  --cream: #f7f0dd;
  --paper: #fffdf7;
  --orange: #f58208;
  --orange-light: #fff0d7;
  --red: #ce211c;
  --green: #337333;
  --ink: #14283a;
  --muted: #607080;
  --line: rgba(9,36,58,.14);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 50;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--navy);
  color: white;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 4px solid var(--cream);
  background: var(--navy);
  color: white;
}

.header-inner {
  width: min(1200px, calc(100% - 40px));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.045em;
}

.brand b,
.footer-brand b { color: #ffc15c; }

.brand-ball {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: var(--orange);
  color: var(--navy);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 15px;
  border-radius: 999px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a.is-active {
  background: rgba(255,255,255,.12);
  color: white;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.back-link:hover { background: rgba(255,255,255,.1); }

.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: white;
}

.page-hero::after {
  position: absolute;
  top: -145px;
  right: -75px;
  width: 390px;
  height: 390px;
  border: 2px solid rgba(255,255,255,.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 35px rgba(255,255,255,.035),
    0 0 0 72px rgba(255,255,255,.025);
  content: "";
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 40px));
  min-height: 245px;
  margin: auto;
  padding: 42px 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
}

h1,
h2,
h3,
p { margin-top: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: #ffcf83;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.eyebrow-dot {
  width: 9px;
  height: 9px;
  border: 2px solid #ffd278;
  border-radius: 50%;
  background: var(--orange);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(40px,6vw,68px);
  line-height: 1.04;
  letter-spacing: -.065em;
}

.page-hero h1 span { color: #ffbd58; }

.connection-note {
  width: min(1200px,calc(100% - 40px));
  margin: 20px auto 0;
  padding: 13px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #f1d39c;
  border-radius: 13px;
  background: #fff8e9;
  color: #62491f;
}

.connection-note.is-live {
  border-color: #bfdbbf;
  background: #eef8ed;
  color: #285e2b;
}

.connection-note.is-error {
  border-color: #efc0bc;
  background: #fff0ee;
  color: #8d2b25;
}

.note-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f2c76e;
  color: #493513;
  font-size: 13px;
  font-weight: 800;
}

.connection-note p {
  margin: 1px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.section {
  width: min(1200px,calc(100% - 40px));
  margin: auto;
}

.bracket-section { padding: 45px 0 52px; }

.results-section {
  padding: 46px 0 68px;
  border-top: 1px solid rgba(9,36,58,.12);
}

.section-heading {
  margin-bottom: 23px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-kicker {
  margin: 0 0 7px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(25px,3vw,36px);
  line-height: 1.15;
  letter-spacing: -.05em;
}

.section-description {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bracket-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.bracket-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border: 1px solid #c7d0d5;
  border-radius: 50%;
  background: white;
}

.legend-dot--active {
  border-color: var(--orange);
  background: var(--orange);
}

.side-labels {
  margin: 0 0 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-align: center;
}

.bracket-scroll {
  overflow-x: auto;
  padding: 4px 3px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,253,247,.7);
  scrollbar-color: #bd9870 #eee5d2;
}

.bracket-canvas {
  min-width: 1250px;
  width: 100%;
  padding: 16px;
}

.round-labels,
.bracket-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(150px,1fr));
  column-gap: 10px;
}

.round-labels {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
  text-align: center;
}

/* 8 ilk tur maçı; sonraki turlar iki maç arasına ortalanır. */
.bracket-grid {
  position: relative;
  grid-template-rows: repeat(8,78px);
  row-gap: 13px;
  isolation: isolate;
}

.bracket-connectors {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.bracket-path {
  fill: none;
  stroke: rgba(9,36,58,.26);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.bracket-match {
  z-index: 1;
  min-width: 0;
  align-self: center;
  padding: 9px 10px;
  border: 1px solid rgba(9,36,58,.15);
  border-radius: 11px;
  background: var(--paper);
  box-shadow: 2px 2px 0 rgba(9,36,58,.07);
}

.bracket-match.is-complete {
  border-color: rgba(51,115,51,.4);
  background: #f1f8ee;
}

.bracket-match.is-advancing {
  border-color: rgba(245,130,8,.55);
  box-shadow: 0 0 0 2px rgba(245,130,8,.1);
}

.bracket-match.is-final {
  border-color: var(--orange);
  background: #fff4dc;
}

.bracket-match__meta {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.bracket-match__teams {
  display: grid;
  gap: 4px;
}

.bracket-team {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: var(--ink);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.25;
}

.bracket-team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-team.is-winner .bracket-team-name { color: var(--green); }

.bracket-score {
  min-width: 18px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bracket-team.is-winner .bracket-score { color: var(--green); }

.bracket-schedule {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}

.bracket-schedule__item {
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.bracket-schedule__item p {
  margin: 0;
  display: grid;
  gap: 2px;
}

.bracket-schedule__item strong { color: var(--navy); }

.bracket-schedule__item p span { color: var(--muted); font-weight: 700; }

.schedule-number {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--orange-light);
  color: #805000;
  font-size: 8px;
  font-weight: 900;
}

.trophy-mark {
  display: block;
  margin: 2px auto 0;
  color: #c27a10;
  font-size: 17px;
  text-align: center;
}

.scroll-hint {
  display: none;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.results-count {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.result-round {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 3px 3px 0 rgba(9,36,58,.06);
}

.result-round__heading {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--navy);
  color: white;
}

.result-round__heading h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
}

.result-round__heading span {
  color: #ffd17d;
  font-size: 8px;
  font-weight: 800;
}

.result-list { padding: 3px 13px; }

.result-round--roundOf16 { grid-column: 1 / -1; }

.result-list--roundOf16 {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  column-gap: 20px;
}

.result-match {
  padding: 11px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(9,36,58,.08);
}

.result-match:last-child { border-bottom: 0; }

.result-match__meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.result-court-tag {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--orange-light);
  color: #805000;
}

.result-match__teams {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.result-team {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
}

.result-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-team.is-winner {
  color: var(--green);
  font-weight: 900;
}

.result-team em {
  margin-left: auto;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
}

.result-score {
  min-width: 56px;
  padding: 7px 8px;
  border: 1px solid #eadfc9;
  border-radius: 9px;
  background: #fffaf0;
  color: #8c7754;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.result-score.has-score {
  border-color: #b6d4b3;
  background: #edf7eb;
  color: var(--green);
}

.result-empty {
  padding: 14px 0;
  color: var(--muted);
  font-size: 9px;
}

.site-footer {
  min-height: 72px;
  padding: 20px max(20px,calc((100% - 1200px)/2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--navy);
  color: rgba(255,255,255,.7);
}

.footer-brand {
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.site-footer p {
  margin: 0;
  font-size: 9px;
}

.back-to-top {
  color: white;
  text-decoration: none;
  font-size: 9px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .bracket-schedule { grid-template-columns: 1fr; }

  .header-inner {
    width: calc(100% - 28px);
    min-height: 66px;
    gap: 8px;
  }

  .brand {
    min-width: auto;
    font-size: 14px;
  }

  .brand-ball {
    width: 28px;
    height: 28px;
  }

  .main-nav { gap: 0; }

  .main-nav a {
    padding: 8px;
    font-size: 9px;
  }

  .back-link {
    padding: 8px 9px;
    font-size: 0;
  }

  .back-link span { font-size: 15px; }

  .hero-inner {
    width: calc(100% - 32px);
    min-height: 0;
    padding: 35px 0 28px;
    display: block;
  }

  .connection-note,
  .section {
    width: calc(100% - 28px);
  }

  .bracket-section,
  .results-section {
    padding: 35px 0 43px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .bracket-legend { justify-content: flex-start; }

  .side-labels { font-size: 8px; }

  .bracket-canvas { min-width: 1220px; }

  .scroll-hint { display: block; }

  .results-grid { grid-template-columns: 1fr; }

  .result-list--roundOf16 { grid-template-columns: 1fr; }

  .site-footer {
    padding: 18px 14px;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Logo ve fallback */
.brand-logo {
  display: block;
  width: 145px;
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.brand-fallback {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

/* Mobil ve tablet header */
@media (max-width: 820px) {
  .header-inner {
    width: calc(100% - 28px);
    min-height: 0;
    padding: 10px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand back"
      "nav nav";
    align-items: center;
    gap: 10px 8px;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
    font-size: 14px;
  }

  .brand-logo {
    width: 130px;
    max-height: 36px;
  }

  .main-nav {
    grid-area: nav;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .main-nav a {
    min-width: 0;
    min-height: 40px;
    padding: 8px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .18);
    text-align: center;
    white-space: nowrap;
    font-size: 10px;
  }

  .back-link {
    grid-area: back;
    padding: 8px 10px;
    font-size: 10px;
    white-space: nowrap;
  }

  .back-link span {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .header-inner {
    width: calc(100% - 20px);
  }

  .main-nav {
    gap: 5px;
  }

  .main-nav a {
    padding: 7px 3px;
    font-size: 9px;
  }

  .brand-logo {
    width: 112px;
  }

  .back-link {
    padding: 7px 8px;
    font-size: 9px;
  }
}