:root {
  --bg: #0d0d0c;
  --text: #f3eee6;
  --muted: #c6bbad;
  --faint: #93887a;
  --line: rgba(243, 236, 225, 0.11);
  --panel: rgba(255, 255, 255, 0.025);
  --panel-2: rgba(255, 255, 255, 0.035);
  --primary: #9af10c;
  --primary-dark: #101109;
  --warn: rgba(255, 201, 84, 0.16);
  --danger: rgba(255, 111, 111, 0.16);
  --content: 1180px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(180deg, #0a0a09, #12110f 25%, #0e0e0d);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
select {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--primary);
  color: var(--primary-dark);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 30;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding: 22px 16px 56px;
}

.preview {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.frame {
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 28%);
}

.mock {
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  color: #f7f3ea;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}

.nav a {
  color: #efe8dc;
  opacity: 0.9;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: #ffffff;
}

.hero-banner img {
  width: 100%;
  height: auto;
}

.hero-copy {
  padding: 28px 18px 10px;
  text-align: center;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-copy h1,
.section-title,
.panel h3,
.mini > strong:first-child,
.rule-card__head h3 {
  font-family: "Barlow Condensed", Arial, sans-serif;
}

.hero-copy h1 {
  font-size: clamp(2rem, 3.4vw, 3.35rem);
  line-height: 1;
  color: #fffaf1;
  margin: 0 auto;
  display: inline-block;
  letter-spacing: -0.02em;
}

.hero-copy p,
.panel p,
.lede p,
.mini p,
.foot-copy,
.toggle-item small,
.control-title,
.eyebrow,
.rules-list li,
.rule-card__body p,
.rule-card__body li {
  color: var(--muted);
}

.eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.btn {
  min-height: 46px;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-dark);
}

.btn-secondary {
  color: #fff8f0;
  border: 1px solid rgba(255, 248, 240, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.section {
  padding: 28px 18px 0;
}

.section-title {
  font-size: 2rem;
  line-height: 0.95;
  text-align: center;
  margin-bottom: 18px;
}

.lede,
.panel,
.mini,
.control-box,
.rule-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
}

.lede {
  padding: 20px;
  text-align: center;
}

.lede p {
  max-width: 68ch;
  margin-inline: auto;
}

.controls-grid,
.summary-pair,
.rules-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.controls-grid,
.summary-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-box,
.panel {
  padding: 20px;
  text-align: center;
}

.select-shell,
.select-shell select {
  text-align: left;
}

.select-shell select {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 22, 18, 0.96);
  color: #fffaf1;
  padding: 0 14px;
  font-weight: 700;
  -webkit-text-fill-color: #fffaf1;
}

.select-shell select option {
  color: #111111;
  background: #f3f3f3;
}

.league-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.league-tab {
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #efe8dc;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.league-tab[aria-selected="true"] {
  background: var(--primary);
  color: var(--primary-dark);
  border-color: transparent;
}

.badge-row,
.quick-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.badge,
.quick-row span,
.rule-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.badge--green,
.rule-tag--green {
  color: #0d1406;
  background: var(--primary);
}

.badge--yellow,
.rule-tag--yellow {
  color: #fff4cf;
  background: var(--warn);
}

.badge--red,
.rule-tag--red {
  color: #ffd0d0;
  background: var(--danger);
}

.split-lag {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}

.lag-panel {
  text-align: left;
}

.lag-panel p,
.lag-panel h3,
.lag-panel .eyebrow {
  text-align: left;
}

.toggle-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.toggle-item > span:first-child {
  display: grid;
}

.toggle-item small {
  display: block;
  margin-top: 4px;
  line-height: 1.45;
}

.switch {
  position: relative;
  width: 58px;
  height: 32px;
  flex-shrink: 0;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s ease;
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::after {
  transform: translateX(26px);
  background: #101109;
}

.rules-list,
.rule-card__body ul {
  list-style: none;
  display: grid;
  gap: 10px;
  text-align: left;
}

.rules-list li,
.rule-card__body li {
  position: relative;
  padding-left: 16px;
}

.rules-list li::before,
.rule-card__body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.mini {
  padding: 16px;
}

.mini > strong:first-child {
  display: block;
  margin: 0 0 10px 0;
  color: #f4efe7;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.mini p {
  margin: 0;
  max-width: none;
  font-size: 0.98rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.mini p strong {
  display: inline;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: #fff3e1;
}

.mini--highlight {
  margin-top: 16px;
  background: rgba(154, 241, 12, 0.08);
  border: 1px solid rgba(154, 241, 12, 0.16);
}

.mini--warning,
.mini--notice {
  margin-top: 16px;
}

#houseLagBox,
#lagLeagueNote {
  display: block;
  visibility: visible;
  opacity: 1;
  text-align: left;
}

.rules-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rule-card__head {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rule-card__head h3 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 0.95;
  color: #fffaf1;
}

.rule-card__body {
  padding: 18px;
  display: grid;
  gap: 14px;
  text-align: left;
}

.rule-card__body strong {
  color: #fff3e1;
}

.option-note {
  padding: 14px;
  border-radius: 16px;
  background: rgba(154, 241, 12, 0.08);
  border: 1px solid rgba(154, 241, 12, 0.18);
}

.option-note strong {
  display: block;
  margin-bottom: 8px;
  color: #eef9c7;
}

.footer {
  margin-top: 24px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
}

.footer-left {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.badge-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.badge-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.foot-copy {
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .controls-grid,
  .summary-pair,
  .rules-grid,
  .split-lag {
    grid-template-columns: 1fr;
  }
}

@media (max-width:900px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    flex-wrap: wrap;
  }

  .nav a {
    padding: 6px 0;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 16px 10px 36px;
  }

  .frame {
    padding: 10px;
  }

  .hero-copy {
    padding: 18px 10px 4px;
  }

  .hero-copy h1 {
    font-size: 1.55rem;
    white-space: normal;
  }

  .section {
    padding-inline: 10px;
  }

  .site-header,
  .rule-card__head,
  .footer-left {
    flex-direction: column;
    text-align: center;
  }

  .toggle-item {
    flex-direction: row;
    text-align: left;
  }

  .mini {
    padding: 16px 14px 14px;
  }

  .mini > strong:first-child {
    font-size: 1rem;
  }

  .mini p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}