[data-page="tournament-rules"] {
  display: block;
  min-height: 100vh;
}

.tournament-rules-page {
  min-height: 100vh;
  color: var(--ps-text-primary, #fff);
  background: var(--ps-bg-base, #0a0a0a);
}

.tournament-rules-container {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

.tournament-rules-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--ps-border, #262626);
  background: var(--ps-bg-surface, #171717);
}

.tournament-rules-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.tournament-rules-back {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 0;
  border-radius: calc(var(--radius, 0.75rem) - 2px);
  color: var(--ps-text-primary, #fff);
  background: transparent;
  transition: color 150ms ease, background-color 150ms ease;
}

.tournament-rules-back:hover {
  background: var(--ps-bg-hover, #262626);
}

.tournament-rules-back:focus-visible {
  outline: 2px solid var(--ps-primary, #22c55e);
  outline-offset: 2px;
}

.tournament-rules-back svg {
  width: 1.25rem;
  height: 1.25rem;
}

.tournament-rules-header h1,
.tournament-rules-header p,
.tournament-rules-intro h2,
.tournament-rules-intro p,
.tournament-rules-summary h2,
.tournament-rules-notice h2,
.tournament-rules-notice p,
.tournament-rules-contact p {
  margin: 0;
}

.tournament-rules-header h1 {
  color: var(--ps-text-primary, #fff);
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
}

.tournament-rules-header p {
  color: var(--ps-text-muted, #737373);
  font-size: 0.75rem;
  line-height: 1rem;
}

.tournament-rules-content {
  padding-top: 1.5rem;
  padding-bottom: 0;
}

.tournament-rules-intro {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
}

.tournament-rules-intro__icon {
  display: flex;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
}

.tournament-rules-intro__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.tournament-rules-intro h2 {
  margin-bottom: 0.5rem;
  color: var(--ps-text-primary, #fff);
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
}

.tournament-rules-intro p {
  color: var(--ps-text-muted, #737373);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.tournament-rules-intro .tournament-rules-intro__updated {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.tournament-rules-summary {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--ps-border, #262626);
  border-radius: 0.75rem;
  background: var(--ps-bg-surface, #171717);
}

.tournament-rules-summary h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--ps-text-primary, #fff);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  text-transform: none;
}

.tournament-rules-summary h2 svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ps-primary, #22c55e);
}

.tournament-rules-summary__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.tournament-rules-summary__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ps-text-muted, #737373);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.tournament-rules-summary__item svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: #22c55e;
}

.tournament-rules-sections {
  display: grid;
  gap: 1.5rem;
}

.tournament-rule-card {
  overflow: hidden;
  border: 1px solid var(--ps-border, #262626);
  border-radius: 0.75rem;
  background: var(--ps-bg-surface, #171717);
  scroll-margin-top: 6rem;
}

.tournament-rule-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--ps-border, #262626);
  background: var(--ps-bg-elevated, #1f1f1f);
}

.tournament-rule-card__icon {
  display: flex;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: var(--ps-primary, #22c55e);
  background: rgba(34, 197, 94, 0.1);
}

.theme-light .tournament-rule-card__icon {
  background: rgba(22, 163, 74, 0.1);
}

.tournament-rule-card__icon svg {
  width: 1rem;
  height: 1rem;
}

.tournament-rule-card__header h2 {
  margin: 0;
  color: var(--ps-text-primary, #fff);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  text-transform: none;
}

.tournament-rule-card__body {
  padding: 1rem;
}

.tournament-rule-card__body ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tournament-rule-card__body li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--ps-text-muted, #737373);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.tournament-rule-card__body li + li {
  margin-top: 0.5rem;
}

.tournament-rule-card__bullet {
  margin-top: 0.25rem;
  color: #22c55e;
}

.tournament-rule-card__body .tournament-rule-card__subitem {
  display: block;
  margin-left: 1rem;
}

.tournament-rules-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid var(--ps-border, #262626);
  border-radius: 0.75rem;
  background: var(--ps-bg-elevated, #1f1f1f);
}

.tournament-rules-notice > svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  margin-top: 0.125rem;
  color: #f59e0b;
}

.tournament-rules-notice h2 {
  margin-bottom: 0.25rem;
  color: var(--ps-text-primary, #fff);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  text-transform: none;
}

.tournament-rules-notice p,
.tournament-rules-contact {
  color: var(--ps-text-muted, #737373);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.tournament-rules-contact {
  margin-top: 1.5rem;
  text-align: center;
}

.tournament-rules-contact a {
  color: var(--ps-primary, #22c55e);
}

.tournament-rules-contact a:hover {
  text-decoration: underline;
}

.tournament-rules-bottom-space {
  height: 5rem;
}

@media (min-width: 640px) {
  .tournament-rules-summary__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
