/* Page-specific subset of index_4.css for templates/tournament_collection.html. */

:root {
  color-scheme: light;
  --forest: #073527;
  --forest-2: #0d4a38;
  --ink: #081d18;
  --muted: #6d6a61;
  --paper: #f7f3e9;
  --paper-2: #fffdf7;
  --line: rgba(8, 29, 24, 0.14);
  --line-strong: rgba(8, 29, 24, 0.28);
  --green-chip: #eef6e6;
  --blue-chip: #edf4fb;
  --brass: #c59b4b;
  --amber: #d89a00;
  --red: #b94431;
  --shadow: 0 16px 42px rgba(38, 31, 18, 0.11);
  --radius: 7px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 3%, rgba(197, 155, 75, 0.15), transparent 22%),
    linear-gradient(90deg, rgba(8, 29, 24, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(8, 29, 24, 0.03) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 72px 72px, 72px 72px, auto;
  font-size: 14px;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v4-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(18px, 3vw, 52px);
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 233, 0.88);
  padding: 8px clamp(16px, 2.2vw, 30px);
  backdrop-filter: blur(18px);
}

.v4-brand,
.v4-nav,
.v4-actions {
  display: flex;
  align-items: center;
}

.v4-brand {
  gap: 12px;
  color: var(--forest);
  font-size: clamp(1.1rem, 1.65vw, 1.34rem);
}

.v4-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: #f5ddb0;
  background: var(--forest);
  box-shadow: 0 12px 22px rgba(7, 53, 39, 0.18);
}

.v4-brand-mark svg {
  width: 31px;
  height: 31px;
  stroke-width: 1.35;
}

.v4-nav {
  justify-content: center;
  gap: clamp(18px, 3vw, 48px);
}

.v4-nav a,
.v4-actions > span {
  min-height: 34px;
  color: #111f1b;
  font-size: 0.84rem;
  font-weight: 820;
}

.v4-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 3px 13px;
}

.v4-nav a::after {
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 3px;
  background: var(--forest);
  content: "";
  opacity: 0;
}

.v4-nav a.active::after {
  opacity: 1;
}

.v4-nav svg,
.v4-actions svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.85;
}

.v4-actions {
  gap: 14px;
}

.v4-actions .v4-my-tournaments,
.v4-actions .v4-auth-trigger {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.9);
  color: var(--forest);
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 860;
  line-height: 1;
  text-decoration: none;
}

.v4-actions .v4-auth-trigger {
  border-color: rgba(7, 53, 39, 0.3);
  background: var(--forest);
  color: #fff9ea;
}

.v4-actions .v4-my-tournaments.active {
  border-color: rgba(7, 53, 39, 0.34);
  background: rgba(238, 246, 230, 0.92);
}

.v4-actions .v4-my-tournaments svg,
.v4-actions .v4-auth-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.v4-language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  min-height: 34px;
}


.v4-language-toggle a {
  min-height: 26px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 0 4px;
  color: rgba(8, 29, 24, 0.52);
  font-size: 0.84rem;
  font-weight: 880;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}


.v4-language-toggle a.active {
  color: var(--forest);
}

.v4-language-toggle span {
  color: rgba(8, 29, 24, 0.35);
  font-weight: 760;
}

.v4-chip {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  border: 1px solid rgba(7, 53, 39, 0.14);
  border-radius: 5px;
  background: var(--green-chip);
  padding: 2px 7px;
  color: #0b2d22;
  font-size: 0.66rem;
  font-weight: 840;
}

.v4-chip.blue {
  background: var(--blue-chip);
  color: #15314f;
}

.v4-chip.muted {
  background: rgba(8, 29, 24, 0.045);
  color: rgba(8, 29, 24, 0.52);
}

.v4-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.v4-detail-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.v4-detail-breadcrumb span:last-child {
  color: var(--forest);
}

@media (max-width: 1180px) {
  .v4-topbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .v4-nav,
  .v4-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  body {
    font-size: 13px;
  }

  .v4-topbar {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    padding: 9px 10px;
  }

  .v4-brand {
    grid-column: 1;
  }

  .v4-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .v4-actions .v4-my-tournaments,
  .v4-actions .v4-auth-trigger {
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.78rem;
  }

  .v4-actions .v4-my-tournaments svg,
  .v4-actions .v4-auth-trigger svg {
    display: none;
  }

  .v4-nav {
    grid-column: 1 / -1;
  }

  .v4-nav,
  .v4-actions {
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: visible;
  }

  .v4-chip.rating {
    background: rgba(7, 53, 39, 0.1);
    color: #0b2d22;
  }

  .v4-chip.rating.blue {
    background: var(--blue-chip);
    color: #15314f;
  }
}

@media (max-width: 760px) {

  .v4-detail-breadcrumb {
    padding-top: 2px;
    font-size: 0.74rem;
  }
}


.v4-collection-hero > p {
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}


.v4-collection-table td a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: rgba(7, 53, 39, 0.28);
  text-underline-offset: 3px;
}

.v4-collection-page {
  width: min(1500px, calc(100% - 56px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.v4-collection-hero {
  margin: 12px 0 20px;
}

.v4-collection-hero > p {
  color: var(--muted);
}

.v4-collection-hero h1 {
  margin: 0;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.v4-collection-hero > span {
  display: block;
  max-width: 880px;
  margin-top: 7px;
  color: var(--muted);
}

.v4-collection-hero > div {
  margin-top: 13px;
  color: var(--ink);
  font-size: 0.85rem;
}

.v4-collection-table {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.74);
  box-shadow: var(--shadow);
}

.v4-collection-table table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.v4-collection-table th,
.v4-collection-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 15px;
  text-align: left;
  vertical-align: top;
}

.v4-collection-table th {
  background: rgba(255, 253, 247, 0.95);
  font-size: 0.78rem;
}

.v4-collection-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.v4-collection-table tr.past {
  background: rgba(8, 29, 24, 0.025);
}

.v4-collection-table .v4-collection-section th {
  border-top: 2px solid rgba(7, 53, 39, 0.18);
  background: rgba(220, 231, 207, 0.52);
  color: var(--forest);
  font-size: 0.84rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.v4-collection-table .v4-collection-section th span {
  display: inline-flex;
  min-width: 24px;
  justify-content: center;
  margin-left: 5px;
  border-radius: 999px;
  background: rgba(7, 53, 39, 0.1);
  padding: 2px 7px;
}

@media (max-width: 720px) {

  .v4-collection-page {
    width: min(100% - 28px, 1500px);
  }
}
