/* Showpaini.com-aligned tokens (Astra live site) */
:root {
  --text: #373737;
  --heading: #383838;
  --muted: #666666;
  --mute-2: #888888;
  --link: #d11a04;
  --link-hover: #b51104;
  --bg: #ffffff;
  --bg-soft: #f3f3f3;
  --bg-row: #fafafa;
  --line: #d1d1d1;
  --line-soft: #e5e5e5;
  --ink: #222222;
  --ink-2: #444444;
  --ok: #15803d;
  --radius: 4px;
  --content: 810px;
  --site: 1200px;
  --font: "Source Sans Pro", Arial, Helvetica, sans-serif;
  --display: "Archivo Black", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 19px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

.site-header {
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}
.site-header-inner {
  max-width: var(--site);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--heading);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand span { color: var(--link); }
.brand:hover { text-decoration: none; color: var(--heading); }
.fake-nav {
  display: none;
  gap: 1.1rem;
  font-size: 0.95rem;
  color: var(--ink-2);
}
@media (min-width: 800px) {
  .fake-nav { display: flex; }
}

.site-main {
  max-width: var(--site);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3.5rem;
}
.article {
  max-width: var(--content);
  margin: 0 auto;
}

.breadcrumbs {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.breadcrumbs a { color: var(--link); }
.breadcrumbs .sep { margin: 0 0.35rem; color: var(--mute-2); }

.read-time {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.35;
  color: var(--heading);
  margin-bottom: 0.85rem;
}

.intro {
  margin-bottom: 0.75rem;
}
.intro-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
}
.stat {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.stat b { color: var(--heading); font-weight: 700; }

.controls {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  align-items: center;
}
.controls-row + .controls-row { margin-top: 0.55rem; }

.label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  min-width: 5.2rem;
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
}

/* Mobile: scrollable horizontal rows for all chip groups.
   Apply unconditionally with @supports for flexbox to prevent Brave/desktop wrap issues. */
@media (max-width: 767px), (pointer: coarse) {
  .chips {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chips .chip {
    flex-shrink: 0;
    white-space: nowrap;
  }
  /* Stack controls vertically with labels above chips on mobile */
  .controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .controls-row .label {
    min-width: auto;
  }
  .controls-row .chips {
    width: 100%;
  }
}

.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: var(--radius);
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.chip:hover {
  border-color: #b0b0b0;
  color: var(--heading);
}
.chip[aria-pressed="true"] {
  background: var(--link);
  border-color: var(--link);
  color: #fff;
}
.chip[aria-pressed="true"] .count { color: rgba(255, 255, 255, 0.85); }
.chip:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.chip .count {
  font-weight: 600;
  color: #b0b0b0;
  margin-left: 0.2rem;
  font-variant-numeric: tabular-nums;
}
.chip:disabled {
  opacity: 0.45;
  cursor: default;
}

.search-wrap {
  flex: 1;
  min-width: min(100%, 240px);
  position: relative;
}
.search-wrap input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.7rem 0.5rem 2.1rem;
  line-height: 1.3;
}
.search-wrap input::placeholder { color: var(--mute-2); }
.search-wrap input:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 3px rgba(209, 26, 4, 0.12);
}
.search-wrap svg {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--mute-2);
  pointer-events: none;
}

.result-meta {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.result-meta b { color: var(--heading); font-weight: 700; }

.status-line {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  min-height: 1.4em;
}
.status-line[data-error="true"] { color: var(--link); }

.years { display: grid; gap: 0.65rem; }

.year {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.year-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  text-align: left;
  background: var(--bg-soft);
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
}
.year-head:hover { background: #ececec; }
.year-head:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: -2px;
}
.year-badge {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--heading);
  min-width: 3.5rem;
  line-height: 1;
}
.year-sub {
  color: var(--muted);
  font-size: 0.92rem;
}
.year-chev {
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.15s ease;
  font-size: 0.85rem;
}
.year[data-open="true"] .year-chev {
  transform: rotate(180deg);
  color: var(--link);
}

.year-body {
  display: none;
  border-top: 1px solid var(--line);
}
.year[data-open="true"] .year-body { display: block; }

.year-loading,
.year-error {
  padding: 0.9rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.year-error { color: var(--link); }

.event { border-top: 1px solid var(--line-soft); }
.event:first-child { border-top: 0; }

.event-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 0.75rem;
  padding: 0.8rem 0.9rem;
  background: #fff;
}
.event-row:hover { background: var(--bg-row); }

@media (min-width: 720px) {
  .event-row {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr) minmax(0, 1.15fr) auto;
    align-items: center;
  }
}

.event-name {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--heading);
  line-height: 1.3;
}
.event-meta {
  color: var(--ink-2);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.event-loc {
  color: var(--muted);
  font-size: 0.95rem;
}

.ott-btn {
  appearance: none;
  border: 1px solid var(--link);
  background: #fff;
  color: var(--link);
  border-radius: var(--radius);
  padding: 0.42rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  min-height: 2.3rem;
  width: 100%;
}
@media (min-width: 720px) {
  .ott-btn { width: auto; min-width: 8.6rem; }
}
.ott-btn:hover {
  background: rgba(209, 26, 4, 0.06);
  color: var(--link-hover);
  border-color: var(--link-hover);
}
.ott-btn[aria-expanded="true"] {
  background: var(--link);
  border-color: var(--link);
  color: #fff;
}
.ott-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--line);
  color: var(--muted);
  background: #fff;
}
.ott-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.ott-btn .caret {
  transition: transform 0.15s ease;
  font-size: 0.75em;
  opacity: 0.9;
}
.ott-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }

.card {
  display: none;
  padding: 0 0.9rem 0.9rem;
  background: var(--bg-soft);
  border-top: 1px dashed var(--line);
}
.card[data-open="true"] { display: block; }

.card-inner {
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.55rem 0.8rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line-soft);
}
.card-head h3 {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--heading);
  letter-spacing: 0.01em;
}
.card-head span {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.match {
  padding: 0.7rem 0.8rem;
  border-top: 1px solid var(--line-soft);
}
.match:first-child { border-top: 0; }
.match-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--link);
  margin-bottom: 0.1rem;
}
.match-stip {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.match-notes {
  font-size: 0.85rem;
  color: var(--mute-2);
  margin-bottom: 0.15rem;
}
.match-bout {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.35;
}
.match-result {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.match-result .winner { color: var(--ok); font-weight: 700; }

.entrants {
  margin-top: 0.5rem;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.entrants th,
.entrants td {
  text-align: left;
  padding: 0.3rem 0.35rem;
  border-top: 1px solid var(--line-soft);
  vertical-align: top;
}
.entrants th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.entrants td { color: var(--ink-2); }
.entrants td:first-child {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  width: 2.6rem;
  white-space: nowrap;
}

.empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: none;
  font-size: 0.98rem;
}
.empty[data-show="true"] { display: block; }

.footer-note {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
  margin-top: 1rem;
}
.site-footer-inner {
  max-width: var(--site);
  margin: 0 auto;
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer a { margin-right: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip, .ott-btn, .year-chev, .ott-btn .caret { transition: none; }
}
