/* /tournament/ only. Colours come from the theme's tokens (DesignSystem.md § Tokens); nothing defines its own. */
.t-hero .lede { font-size: 20px; color: var(--dim); max-width: 680px; margin: 0 0 28px; }
.t-note { color: var(--dim); margin: 0 0 20px; }
.t-quarters { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.t-quarters li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 22px; }
.t-vs { font-weight: 700; font-size: 20px; }
.t-vs em, .t-fight h3 em { font-style: normal; color: var(--dim); font-weight: 400; }
.t-when { font-family: var(--mono); font-size: 14px; color: var(--violet); white-space: nowrap; }
.t-fights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.t-fight { padding: 22px 24px; }
.t-meta { font-family: var(--mono); font-size: 13px; color: var(--violet); margin: 0 0 6px; }
.t-fight h3 { font-size: 24px; margin: 0 0 8px; }
.t-result { color: var(--green); margin: 0 0 14px; }
.t-votes { list-style: none; padding: 0; margin: 0 0 14px; }
.t-votes li { padding: 10px 0; border-top: 1px solid var(--edge); }
.t-ai { font-family: var(--mono); font-size: 13px; color: var(--violet); margin-right: 6px; }
.t-votes strong { font-weight: 700; color: var(--dim); }
.t-votes strong.t-won { color: var(--text); }
.t-votes q { display: block; color: var(--dim); font-size: 15px; margin-top: 4px; }
.t-fine { font-size: 14px; color: var(--dim); }
@media (max-width: 760px) { .t-quarters, .t-fights { grid-template-columns: 1fr; } }

/* The bracket: two halves (round 1 → quarters → semi) meeting at the final. --g is the gap the connectors cross. */
.tb { --g: 22px; display: flex; align-items: stretch; gap: var(--g); margin: 32px 0 12px; }
.tb-half { flex: 3; display: flex; gap: var(--g); }
.tb-right { flex-direction: row-reverse; }
.tb-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tb-pair, .tb-single { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; position: relative; padding: 4px 0; }
.tb-pair::after { content: ""; position: absolute; top: 25%; bottom: 25%; right: calc(var(--g) / -2); width: calc(var(--g) / 2); border: 2px solid var(--edge); border-left: 0; border-radius: 0 6px 6px 0; }
.tb-right .tb-pair::after { right: auto; left: calc(var(--g) / -2); border: 2px solid var(--edge); border-right: 0; border-radius: 6px 0 0 6px; }
.tb-col + .tb-col .tb-match::before, .tb-single::after { content: ""; position: absolute; top: 50%; width: calc(var(--g) / 2); border-top: 2px solid var(--edge); }
.tb-col + .tb-col .tb-match::before { left: calc(var(--g) / -2 - 1px); }
.tb-right .tb-col + .tb-col .tb-match::before { left: auto; right: calc(var(--g) / -2 - 1px); }
.tb-single::after { right: calc(var(--g) * -1); width: var(--g); }
.tb-right .tb-single::after { right: auto; left: calc(var(--g) * -1); }
.tb-final { flex: 1.15; display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; }
.tb-final-label { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--violet); text-align: center; margin: 0; }
.tb-champ { text-align: center; margin: 4px 0 0; padding: 12px; border: 2px dashed var(--edge); border-radius: 12px; }
.tb-champ span { display: block; font-family: var(--mono); font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
.tb-champ strong { font-size: 22px; }

.tb-match { position: relative; display: block; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 6px 0; transition: border-color .15s, transform .15s; }
.tb-match:hover, .tb-match:focus-visible { border-color: var(--violet); transform: translateY(-1px); outline: none; }
.tb-match.is-later { opacity: .75; }
.tb-tag { position: absolute; top: -9px; left: 8px; font-family: var(--mono); font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 6px; background: var(--ink); border: 1px solid var(--violet); color: var(--violet); white-space: nowrap; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; }
.is-won .tb-tag { border-color: var(--green); color: var(--green); }
.is-leads .tb-tag { border-color: var(--green); color: var(--green); }
.tb-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 10px; font-size: 14px; line-height: 1.2; color: var(--text); }
.tb-name { min-width: 0; overflow-wrap: anywhere; }
.tb-score { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.tb-row.is-won { font-weight: 700; background: color-mix(in srgb, var(--green) 12%, transparent); }
.tb-row.is-won .tb-score { color: var(--green); }
.tb-row.is-leads { font-weight: 700; }
.tb-row.is-leads .tb-score { color: var(--green); }
.tb-row.is-out { color: var(--dim); }
.tb-hint { color: var(--dim); font-size: 15px; margin: 0 0 28px; }

/* The popup */
.tb-dialog { width: min(560px, calc(100% - 24px)); max-height: 92vh; overflow: auto; padding: 26px 24px; color: var(--text);
  background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); }
.tb-dialog::backdrop { background: color-mix(in srgb, var(--ink) 80%, transparent); }
.tb-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); font-size: 30px; line-height: 1; cursor: pointer; }
.tb-close:hover { color: var(--text); background: var(--edge); }
.tb-pop-title { font-size: 28px; margin: 0 0 8px; padding-right: 40px; }
.tb-pop-title em { font-style: normal; color: var(--dim); font-weight: 400; }
.tb-play, .tb-video { display: block; width: min(100%, 280px); aspect-ratio: 9 / 16; margin: 6px auto 16px; border-radius: 14px; border: 1px solid var(--edge); background: var(--ink); }
.tb-play { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; color: var(--text); font: inherit; font-weight: 700; font-size: 17px; }
.tb-play small { font-weight: 400; font-size: 13px; color: var(--dim); }
.tb-play:hover { border-color: var(--violet); }
.tb-play-icon { width: 0; height: 0; border-style: solid; border-width: 22px 0 22px 36px; border-color: transparent transparent transparent var(--text); margin-bottom: 6px; }
.tb-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tb-links .btn { padding: 10px 14px; font-size: 15px; }

/* Phones: the two halves stack with the final between them; each half keeps its three rounds side by side. */
@media (max-width: 900px) {
  .tb { --g: 14px; flex-direction: column; }
  .tb-final { order: 0; padding: 4px 18%; }
  .tb-half.tb-left { order: -1; }
  .tb-half.tb-right { order: 1; }
  .tb-single::after { display: none; }
  .tb-row { font-size: 12.5px; padding: 4px 7px; }
  .tb-score { font-size: 12px; }
  .tb-play, .tb-video { width: min(100%, 230px); }
  .tb-links .btn { padding: 8px 11px; font-size: 14px; }
  .tb-tag { font-size: 9px; }
}
