/* ==========================================================================
   Caxias Combat — páginas internas (usa os tokens e componentes de main.css)
   ========================================================================== */

ol { margin: 0; padding: 0; list-style: none; }
.page { padding-top: var(--header-h); min-height: 70vh; outline: none; }
.header--page { background: rgba(8, 8, 8, 0.96); }
.nav__list a[aria-current='page'] { color: var(--white); border-color: var(--accent); }
.section--tight { padding-block: clamp(32px, 5vw, 64px); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.9rem; margin: 12px 0 20px; }
.link { color: var(--white); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.subtitle { font: 700 1.6rem/1.1 var(--font-display); text-transform: uppercase; margin: 32px 0 14px; }
.subtitle--lg { font-size: 2rem; margin-top: 0; }
.subtitle:first-child { margin-top: 0; }
p + p { margin-top: 12px; }

/* ---------- Cabeçalho de página ---------- */
.page-hero { padding-block: clamp(48px, 7vw, 96px) clamp(24px, 3vw, 40px); background: var(--graphite); border-bottom: 1px solid var(--line); }
.page-hero__title { font: 800 clamp(2.6rem, 6vw, 4.6rem)/0.95 var(--font-display); text-transform: uppercase; margin-top: 14px; }

/* ---------- Estados ---------- */
.page-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-block: 96px; color: var(--muted); gap: 12px; }
.state { text-align: center; padding: clamp(40px, 6vw, 72px) 16px; max-width: 520px; margin: 0 auto; }
.state__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font: 600 1.1rem var(--font-body); }
.state__title { font: 700 1.8rem/1.1 var(--font-display); text-transform: uppercase; margin-top: 18px; }
.state__text { color: var(--muted); margin-top: 10px; }
.state__action { margin-top: 24px; }
.spinner { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--white); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[aria-busy='true'] { opacity: .55; transition: opacity .2s; }
.demo-notice { border-left: 2px solid var(--accent); background: var(--graphite); color: var(--muted); font-size: 0.85rem; padding: 10px 14px; margin: 0 0 24px; }
.demo-notice strong { color: var(--white); }
.badge { display: inline-block; padding: 5px 10px; font: 600 0.7rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); }
.badge--accent { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------- Abas e alternadores ---------- */
.tabs-bar { background: var(--black); border-bottom: 1px solid var(--line); position: sticky; top: var(--header-h); z-index: 20; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__item { flex: none; padding: 18px 18px; font: 600 0.8rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.tabs__item:hover { color: var(--white); }
.tabs__item.is-active { color: var(--white); border-color: var(--accent); }
.segmented { display: inline-flex; border: 1px solid var(--line); margin-bottom: 24px; }
.segmented__item { background: none; border: 0; color: var(--muted); padding: 12px 22px; font: 600 0.8rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.segmented__item.is-active { background: var(--white); color: var(--black); }

/* ---------- Filtros ---------- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; align-items: end; margin-bottom: 24px; }
.filters[hidden], [hidden] { display: none !important; }
.filters--inline { grid-template-columns: minmax(220px, 360px); margin-bottom: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field__label { font: 600 0.7rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field__control { width: 100%; min-height: 46px; padding: 0 14px; background: var(--graphite); color: var(--white); border: 1px solid var(--line); border-radius: 2px; font: 400 0.95rem var(--font-body); }
.field__control:focus-visible { outline: 2px solid var(--white); outline-offset: 1px; }
select.field__control { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field__control option { background: var(--graphite); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.toolbar .segmented { margin-bottom: 0; }
.filters--brackets { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---------- Evento ---------- */
.event-head { position: relative; overflow: hidden; background: var(--graphite); }
.event-head__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.event-head__shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--black) 0%, rgba(8,8,8,.7) 55%, rgba(8,8,8,.45) 100%); }
.event-head__inner { position: relative; padding-block: clamp(48px, 7vw, 96px) clamp(28px, 4vw, 48px); }
.event-head__inner .eyebrow a:hover { text-decoration: underline; }
.event-head__title { font: 800 clamp(2.2rem, 5.5vw, 4.6rem)/0.98 var(--font-display); text-transform: uppercase; margin-top: 14px; max-width: 18ch; }
.event-head__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; color: var(--muted); margin-top: 18px; }
.event-head__cta { margin-top: 28px; }
.event-body { padding-block: clamp(32px, 5vw, 64px) clamp(64px, 8vw, 112px); }
.info-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .info-grid { grid-template-columns: minmax(0, 1fr); } }
.edital { min-width: 0; }
.info-aside { display: grid; gap: 20px; position: sticky; top: calc(var(--header-h) + 72px); }
@media (max-width: 900px) { .info-aside { position: static; } }
.aside-card { background: var(--graphite); border: 1px solid var(--line); padding: 22px; }
.aside-card__title { font: 700 1.3rem var(--font-display); text-transform: uppercase; margin-bottom: 12px; }
.aside-card__line { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }
.aside-card__action { margin-top: 18px; }
.aside-card__action .btn { width: 100%; text-align: center; }

.edital__nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; margin-bottom: 8px; scrollbar-width: none; }
.edital__nav a { flex: none; padding: 8px 14px; border: 1px solid var(--line); color: var(--muted); font: 500 0.78rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.edital__nav a:hover { color: var(--white); border-color: rgba(255,255,255,.4); }
.edital__section { padding-block: 28px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 72px); }
.edital__title { font: 700 1.7rem var(--font-display); text-transform: uppercase; margin-bottom: 14px; }
.edital__section p { color: #d6d6d6; max-width: 70ch; }
.bullets { padding-left: 18px; list-style: disc; color: #d6d6d6; display: grid; gap: 8px; max-width: 70ch; }
.bullets li::marker { color: var(--accent); }
.price-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 14px 0; max-width: 560px; }
.price-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--graphite); }
.price-list strong { font: 700 1.2rem var(--font-display); letter-spacing: .02em; }
.price-list--prize strong { color: var(--white); }

.agenda { display: grid; gap: 0; }
.agenda__item { display: grid; grid-template-columns: 54px 1fr; column-gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.agenda__item:first-child { border-top: 0; }
.agenda__date { font: 700 1rem var(--font-display); text-transform: uppercase; }
.agenda__state { grid-column: 2; font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.agenda__item--done .agenda__label { color: var(--muted); }
.agenda__item--done .agenda__state::before { content: '✓ '; color: var(--white); }

.schedule { border: 1px solid var(--line); }
.schedule__item { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--graphite); }
.schedule__item:first-child { border-top: 0; }
.schedule__time { font: 700 1.6rem/1 var(--font-display); }
.schedule__desc { color: #d6d6d6; overflow-wrap: anywhere; }
@media (max-width: 560px) { .schedule__item { grid-template-columns: 70px 1fr; padding: 14px; } }

.steps { counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 14px; color: #d6d6d6; }
.steps li::before { content: counter(s, decimal-leading-zero); color: var(--accent); font: 600 1rem var(--font-display); }

/* ---------- Tabelas (viram cartões no celular) ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 600 0.72rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table tr.is-match td { background: rgba(179, 32, 42, .22); }
.table tr.is-match td:first-child { box-shadow: inset 3px 0 var(--accent); }
@media (max-width: 640px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack tr { display: block; border: 1px solid var(--line); background: var(--graphite); margin-bottom: 12px; }
  .table--stack td { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: right; }
  .table--stack td:last-child { border-bottom: 0; }
  .table--stack td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; text-align: left; }
}

.group { margin-bottom: 24px; border: 1px solid var(--line); background: var(--graphite); }
.group__title { font: 700 1.2rem var(--font-display); text-transform: uppercase; padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.group__count { color: var(--muted); font-family: var(--font-body); font-size: .85rem; }
.group__list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.group__list li:first-child { border-top: 0; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.pager__info { color: var(--muted); font-size: .85rem; }

/* ---------- Chaves ---------- */
.bracket-card { background: var(--graphite); border: 1px solid var(--line); padding: 22px 24px; margin-bottom: 20px; }
.bracket-card__title { font: 700 clamp(1.3rem, 3vw, 1.9rem)/1.1 var(--font-display); text-transform: uppercase; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 14px; }
.facts li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); font: 600 .72rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.facts strong { color: var(--white); font: 600 .95rem var(--font-body); letter-spacing: 0; }
.bracket { display: flex; gap: 48px; overflow-x: auto; padding: 24px; background: var(--graphite); border: 1px solid var(--line); scroll-snap-type: x proximity; }
.bracket:focus-visible { outline: 2px solid var(--white); }
.bracket__round { flex: none; width: 280px; display: flex; flex-direction: column; scroll-snap-align: start; }
.bracket__round-title { align-self: flex-start; font: 600 .72rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 7px 12px; margin-bottom: 16px; }
.bracket__fights { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 16px; }
.fight { position: relative; background: var(--dark); border: 1px solid var(--line); }
.bracket__round:not(:last-child) .fight::after { content: ''; position: absolute; left: 100%; top: 50%; width: 48px; border-top: 1px solid rgba(255,255,255,.22); }
.bracket__round:not(:first-child) .fight::before { content: ''; position: absolute; right: 100%; top: 50%; width: 0; }
.fight--bye { background: transparent; border-style: dashed; }
.fight--in-progress { border-color: var(--accent); }
.fight__head { display: flex; justify-content: space-between; padding: 6px 12px; font: 600 .68rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.fight--in-progress .fight__status { color: var(--white); }
.fight__note { padding: 6px 12px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }
.slot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 54px; }
.slot + .slot { border-top: 1px solid var(--line); }
.slot__avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--black); border: 1px solid var(--line); font: 600 .72rem var(--font-body); color: var(--muted); }
.slot__text { display: grid; min-width: 0; }
.slot__name { font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot__team { font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.is-winner { background: rgba(255,255,255,.06); }
.slot.is-winner .slot__avatar { background: var(--white); color: var(--black); border-color: var(--white); }
.slot.is-loser { opacity: .55; }
.slot--bye, .slot--pending { color: var(--muted); }
.slot--bye .slot__name, .slot--pending .slot__name { font-weight: 500; font-style: italic; }
@media (max-width: 640px) { .bracket { gap: 36px; padding: 16px; } .bracket__round { width: 78vw; } .bracket__round:not(:last-child) .fight::after { width: 36px; } }

.standings { margin-top: 24px; }
.podium { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.podium__row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; background: var(--graphite); }
.podium__name { font-weight: 600; }
.podium__team { color: var(--muted); font-size: .85rem; text-align: right; }
.medal { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 700 .85rem var(--font-body); color: var(--black); background: #8a8a8a; }
.medal--1 { background: #d9d9d9; } .medal--2 { background: #a8a8a8; } .medal--3 { background: #7a7a7a; color: var(--white); }
@media (max-width: 560px) { .podium__row { grid-template-columns: 38px 1fr; } .podium__team { grid-column: 2; text-align: left; } }

/* ---------- Resultados / listas ---------- */
.result-list { display: grid; gap: 16px; }
.result-card { border: 1px solid var(--line); background: var(--graphite); }
.result-card__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--dark); }
.result-card__head h3 { font: 700 1.15rem var(--font-display); text-transform: uppercase; }
.result-card__head span { color: var(--muted); font-size: .8rem; }
.result-card .podium { border: 0; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--graphite); border: 1px solid var(--line); }
.rows { border-top: 1px solid var(--line); }
.rows__item { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rows__title { font: 700 1.7rem var(--font-display); text-transform: uppercase; margin-top: 8px; }
.rows__actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }


/* ---- Edital (HTML do Portal, já saneado), mapa e checagem ---- */
.rich { max-width: 72ch; color: #d6d6d6; }
.rich > * + * { margin-top: 12px; }
.rich h3, .rich h4 { font: 700 1.15rem var(--font-display); text-transform: uppercase; color: var(--white); margin-top: 20px; }
.rich ul, .rich ol { padding-left: 1.3em; }
.rich ul { list-style: disc; }
.rich ol { list-style: decimal; }
.rich a { color: var(--white); text-decoration: underline; }
.rich table { border-collapse: collapse; width: 100%; }
.rich th, .rich td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.rich--note { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); background: var(--graphite); }
.map { margin-top: 16px; border: 1px solid var(--line); width: 100%; height: clamp(240px, 45vw, 420px); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.agenda__item--current .agenda__state { color: var(--white); font-weight: 600; }
.check-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .85rem; margin-bottom: 18px; }
.check-legend strong { color: var(--white); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; flex: none; }
.dot--ok { background: #35b36b; box-shadow: 0 0 0 3px rgba(53, 179, 107, .18); }
.dot--pending { background: var(--accent); box-shadow: 0 0 0 3px rgba(179, 32, 42, .22); }
.check-class { font: 700 1.25rem var(--font-display); text-transform: uppercase; margin: 28px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.athlete { display: flex; align-items: center; gap: 10px; min-width: 0; }
.athlete__team { color: var(--muted); font-size: .8rem; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.athlete__logo { width: 16px; height: 16px; object-fit: contain; }
.filters--check { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
