/* ai-assisted with OCA/OpenAI Model with human supervision */

:root {
  --bg: #edf1f7;
  --panel: #ffffff;
  --text: #0b1b3a;
  --muted: #52627c;
  --line: #d7deeb;
  --accent: #c60c30;
  --accent-dark: #071a3a;
  --danger: #8e1028;
  --gold: #f4b538;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: #071a3a;
  border-bottom: 4px solid var(--accent);
  color: white;
}
.brand { color: white; font-weight: 700; font-size: 1.1rem; }
nav { display: flex; gap: 12px; flex-wrap: wrap; flex: 1; }
nav a, .user-chip a { color: white; }
.user-chip { font-size: .9rem; }
.ai2-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1100px;
  margin: 14px auto -6px;
  padding: 8px 14px;
  border: 1px solid #dce2ec;
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 5px 16px rgba(7, 26, 58, .07);
}
.ai2-ribbon img { width: 48px; height: 36px; object-fit: contain; mix-blend-mode: multiply; }
.ai2-ribbon p { display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; margin: 0; font-size: .84rem; }
.ai2-ribbon strong { color: var(--accent); }
.ai2-ribbon span { color: var(--muted); }
.page { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.hero, .panel, .match-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(310px, .9fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 20px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7, 26, 58, .98), rgba(11, 42, 88, .91)),
    linear-gradient(90deg, #071a3a, #c60c30);
  color: white;
  border: 0;
}
.hero h1 {
  margin: 0;
  font-size: 3rem;
  line-height: 1;
}
.hero p { max-width: 620px; }
.hero-copy { padding: 12px; }
.hero-quote { margin: 22px 0; padding-left: 16px; border-left: 4px solid var(--gold); }
.hero-quote blockquote { margin: 0; font-size: 1.18rem; font-weight: 700; line-height: 1.4; }
.hero-quote figcaption { margin-top: 8px; color: #dce5f4; font-size: .86rem; }
.hero-tldr {
  font-weight: 650;
  line-height: 1.45;
}
.hero .button { background: var(--gold); color: var(--accent-dark); }
.hero .button.secondary { background: rgba(255, 255, 255, .16); color: white; border: 1px solid rgba(255,255,255,.45); }
.eyebrow {
  margin: 0 0 8px;
  color: inherit;
  opacity: .8;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero-banner { width: 100%; height: 100%; min-height: 340px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); box-shadow: 0 20px 45px rgba(0,0,0,.3); }
.host-strip {
  position: absolute;
  right: 32px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}
.host-strip span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  font-size: .8rem;
  font-weight: 700;
}
.quote-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-bottom: 26px;
}
.quote-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.quote-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
  box-shadow: 0 10px 28px rgba(7, 26, 58, .08);
}
.quote-card blockquote {
  margin: 0;
  font-size: 1.62rem;
  line-height: 1.18;
  font-weight: 750;
  color: var(--accent-dark);
}
.quote-card figcaption {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  color: var(--muted);
  font-size: .95rem;
}
.quote-card figcaption span {
  color: var(--accent-dark);
  font-weight: 750;
}
.quote-card figcaption small {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.page-title h1 { margin: 0 0 6px; }
.match-list { display: grid; gap: 10px; }
.match-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.match-card { align-items: stretch; }
.match-main { min-width: 0; }
.match-title { font-size: 1.05rem; }
.match-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--muted);
  font-size: .92rem;
}
.match-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 7px;
}
.match-result {
  display: grid;
  gap: 6px;
  justify-items: end;
  align-content: center;
  min-width: 150px;
}
.score-row { align-items: stretch; }
.score-box {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  min-width: 150px;
}
.muted, .empty { color: var(--muted); }
.status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  color: var(--muted);
}
.status-live { border-color: #b54708; color: #b54708; background: #fff4e5; }
.status-completed { border-color: #2f7a5a; color: #14523b; background: #e8f5ed; }
.status-scheduled { background: #f8fafc; }
.score { font-weight: 700; white-space: nowrap; }
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-tabs a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: white;
  color: var(--text);
}
.filter-tabs a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.filter-tabs span {
  margin-left: 5px;
  color: inherit;
  opacity: .75;
}
table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--line); }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid var(--line); }
tr.current { background: #fff1f3; }
.standings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.standings-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.standings-card h2 {
  margin: 0;
  padding: 14px 16px;
  background: #102820;
  color: white;
  font-size: 1.05rem;
}
.standings-table-wrap { overflow-x: auto; }
.standings-table {
  border: 0;
  font-size: .92rem;
}
.standings-table th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
}
.standings-table th:not(:nth-child(2)),
.standings-table td:not(:nth-child(2)) {
  text-align: center;
  white-space: nowrap;
}
.standings-table tr:nth-child(-n+2) {
  background: #f1f8f6;
}
.bracket-shell {
  overflow-x: auto;
  padding: 8px 0 18px;
}
.bracket-board {
  --slot-h: 108px;
  --gap: 34px;
  --box-w: 136px;
  display: grid;
  grid-template-columns: repeat(9, var(--box-w));
  gap: 34px;
  align-items: start;
  min-width: 1500px;
  position: relative;
}
.bracket-board::before {
  content: "";
  position: absolute;
  left: 70px;
  right: 70px;
  top: 160px;
  bottom: 96px;
  background:
    linear-gradient(#c8d2df, #c8d2df) 50% 0 / 1px 100% no-repeat,
    repeating-linear-gradient(
      to bottom,
      transparent 0 69px,
      rgba(200, 210, 223, .9) 69px 70px,
      transparent 70px 142px
    );
  pointer-events: none;
  opacity: .7;
}
.bracket-column {
  display: grid;
  grid-auto-rows: var(--slot-h);
  gap: var(--gap);
  align-content: start;
  min-width: var(--box-w);
  position: relative;
  z-index: 1;
}
.bracket-column::after {
  content: "";
  position: absolute;
  top: 90px;
  bottom: 20px;
  width: 1px;
  background: #d4dce7;
  opacity: .85;
}
.round-1::after,
.round-2::after,
.round-3::after,
.round-4::after { right: -18px; }
.round-6::after,
.round-7::after,
.round-8::after,
.round-9::after { left: -18px; }
.finals-column::after { display: none; }
.round-2 { padding-top: 72px; }
.round-3 { padding-top: 144px; }
.round-4 { padding-top: 216px; }
.round-5 { padding-top: 178px; }
.round-6 { padding-top: 216px; }
.round-7 { padding-top: 144px; }
.round-8 { padding-top: 72px; }
.round-9 { padding-top: 0; }
.bracket-column h2 {
  margin: 0;
  min-height: 34px;
  font-size: .78rem;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}
.bracket-match {
  position: relative;
  background: #fdfefe;
  border: 1px solid #bac7d6;
  border-radius: 6px;
  padding: 6px;
  min-height: 88px;
  display: grid;
  gap: 4px;
  box-shadow: 0 1px 0 rgba(16, 40, 32, .04);
}
.round-1 .bracket-match::after,
.round-2 .bracket-match::after,
.round-3 .bracket-match::after,
.round-4 .bracket-match::after {
  content: "";
  position: absolute;
  right: -35px;
  top: 50%;
  width: 34px;
  height: 1px;
  background: #d4dce7;
}
.round-6 .bracket-match::before,
.round-7 .bracket-match::before,
.round-8 .bracket-match::before,
.round-9 .bracket-match::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 50%;
  width: 34px;
  height: 1px;
  background: #d4dce7;
}
.bracket-match.completed {
  border-color: rgba(20, 108, 95, .58);
}
.bracket-match-head,
.bracket-team,
.bracket-status {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
}
.bracket-match-head {
  color: #53647a;
  font-size: .68rem;
  line-height: 1;
}
.bracket-team {
  border: 1px solid #c8d2df;
  border-radius: 4px;
  padding: 4px 5px;
  background: white;
  font-size: .74rem;
  min-height: 24px;
}
.bracket-team span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bracket-team small {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 650;
  line-height: 1.05;
}
.bracket-team.winner {
  background: #fff1f3;
  border-color: rgba(198, 12, 48, .55);
  color: var(--accent-dark);
  font-weight: 800;
}
.bracket-status {
  align-items: center;
  color: var(--muted);
  font-size: .66rem;
}
.bracket-status .status {
  padding: 2px 6px;
  font-size: .66rem;
}
.finals-column {
  grid-auto-rows: 112px;
}
.finals-column .bracket-match {
  min-height: 100px;
}
button, .button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 9px 12px;
  cursor: pointer;
  display: inline-block;
}
button:hover, .button:hover { background: var(--accent-dark); text-decoration: none; }
.secondary { background: #475467; }
input, select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  max-width: 100%;
}
label { display: grid; gap: 6px; margin: 10px 0; }
.actions, .prediction-form, .filters, .inline-form, .admin-result {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.alert { padding: 12px; border-radius: 6px; margin-bottom: 14px; background: white; border: 1px solid var(--line); }
.alert.error { border-color: var(--danger); color: var(--danger); }
.alert.success { border-color: var(--accent); color: var(--accent-dark); }
.prose { line-height: 1.6; }
.sync-summary { margin-bottom: 18px; }
.sync-summary h2 { margin-top: 0; }
.sync-summary div { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.admin-result { border-top: 1px solid var(--line); padding: 10px 0; }
.admin-result span { min-width: 260px; flex: 1; }
.admin-result input[type="number"] { width: 70px; }
.admin-result input:not([type]), .admin-result input[type="text"] { width: 160px; }
@media (max-width: 760px) {
  .ai2-ribbon { margin: 10px 16px -6px; align-items: flex-start; }
  .ai2-ribbon p { display: block; }
  .ai2-ribbon span { display: block; margin-top: 3px; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.25rem; }
  .host-strip { position: static; justify-content: center; margin-top: 12px; }
  .quote-strip { grid-template-columns: 1fr; }
  .grid.two { grid-template-columns: 1fr; }
  .standings-grid { grid-template-columns: 1fr; }
  .page-title { align-items: flex-start; flex-direction: column; }
  .match-row { align-items: flex-start; flex-direction: column; }
  .match-result { justify-items: start; }
  .score-box { justify-content: flex-start; }
  table { font-size: .9rem; }
  th, td { padding: 8px 6px; }
}
