/* ===== RULES PAGE ===== */

/* HEADER */
.rules-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 15, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(46, 204, 64, 0.12);
}

.rules-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-spade {
  font-size: 1.5rem;
  color: var(--green-accent);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--cream);
  letter-spacing: -0.01em;
}

.rules-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.rules-nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.rules-nav a:hover { color: var(--cream); }

.nav-cta {
  padding: 0.45rem 1.25rem;
  background: var(--green-accent);
  color: var(--bg-dark) !important;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--green-glow); }

/* MAIN */
.rules-main {
  padding-top: 70px;
}

/* HERO */
.rules-hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.rules-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(46, 204, 64, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(212, 160, 23, 0.04) 0%, transparent 40%);
  pointer-events: none;
}

.rules-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--green-accent);
  margin-bottom: 1rem;
}

.rules-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--cream);
  margin-bottom: 1.25rem;
}

.rules-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* TOC */
.rules-toc {
  background: var(--bg-felt);
  border-top: 1px solid rgba(46, 204, 64, 0.08);
  border-bottom: 1px solid rgba(46, 204, 64, 0.08);
  padding: 1rem 2rem;
  position: sticky;
  top: 70px;
  z-index: 90;
}

.toc-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.toc-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.toc-link:hover { color: var(--green-accent); }

/* SECTIONS */
.rules-section {
  padding: 5rem 2rem;
  background: var(--bg-dark);
}

.rules-section.alt-bg {
  background: var(--bg-felt);
  border-top: 1px solid rgba(46, 204, 64, 0.08);
  border-bottom: 1px solid rgba(46, 204, 64, 0.08);
}

.section-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 3rem;
  align-items: start;
}

.section-label {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: rgba(46, 204, 64, 0.08);
  line-height: 1;
  padding-top: 0.5rem;
}

.section-body h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* DECK SECTION */
.deck-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.deck-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.deck-stack {
  position: relative;
  width: 160px;
}

.stack-card {
  position: absolute;
  left: 0;
  width: 160px;
  height: 72px;
  background: var(--bg-card);
  border: 1px solid rgba(46, 204, 64, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--cream);
}

.stack-card.rank-56 { top: 0; z-index: 1; }
.stack-card.rank-52 { top: 18px; left: 10px; z-index: 2; background: var(--bg-card); border-color: rgba(46, 204, 64, 0.15); }
.stack-card.rank-4 { top: 36px; left: 20px; z-index: 3; border-color: rgba(212, 160, 23, 0.3); color: var(--gold); }
.stack-card.rank-4.top { background: rgba(212, 160, 23, 0.08); }

.deck-caption {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

.rule-block {
  margin-bottom: 1.75rem;
}

.rule-block h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.rule-block p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.rank-table {
  margin-top: 0.5rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0;
  font-size: 0.9rem;
  color: var(--cream);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.rank-row.muted {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 0.25rem;
  border-bottom: none;
}

.rank-icon {
  font-size: 1rem;
  color: var(--gold);
}

.rank-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* KITTY SECTION */
.kitty-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.kitty-step {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(46, 204, 64, 0.12);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
}

.kitty-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.kitty-step h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.kitty-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.kitty-arrow {
  font-size: 1.5rem;
  color: rgba(46, 204, 64, 0.3);
  padding-top: 2.2rem;
}

.kitty-note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(212, 160, 23, 0.05);
  border: 1px solid rgba(212, 160, 23, 0.2);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.note-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.kitty-note p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* PLAYING SECTION */
.play-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.play-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(46, 204, 64, 0.1);
  border-radius: 14px;
  padding: 1.5rem;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(46, 204, 64, 0.1);
  border: 1px solid rgba(46, 204, 64, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--green-accent);
}

.step-content h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.step-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.trump-call {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: rgba(46, 204, 64, 0.04);
  border: 1px solid rgba(46, 204, 64, 0.15);
  border-radius: 14px;
  padding: 1.5rem;
}

.call-icon {
  flex-shrink: 0;
  font-size: 2.2rem;
  color: var(--green-accent);
  line-height: 1;
}

.call-text h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.call-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* SCORING SECTION */
.score-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.score-table {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(46, 204, 64, 0.12);
  border-radius: 14px;
  overflow: hidden;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.score-row.head {
  font-weight: 700;
  color: var(--cream);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(46, 204, 64, 0.05);
  border-bottom: 1px solid rgba(46, 204, 64, 0.12);
}

.score-row.alt { background: rgba(255,255,255,0.01); }

.pts {
  font-weight: 600;
  color: var(--green-accent);
  white-space: nowrap;
}

.score-block {
  margin-bottom: 1.5rem;
}

.score-block h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.score-block p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.score-example {
  background: rgba(212, 160, 23, 0.05);
  border: 1px solid rgba(212, 160, 23, 0.15);
  border-radius: 12px;
  padding: 1.25rem;
}

.score-example h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.score-example p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* JOINING SECTION */
.join-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.join-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(46, 204, 64, 0.1);
  border-radius: 14px;
  padding: 1.5rem;
}

.join-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(212, 160, 23, 0.1);
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--gold);
}

.join-body h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.join-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.code-sample {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.no-account-note {
  text-align: center;
  padding: 1.25rem;
  border: 1px dashed rgba(46, 204, 64, 0.15);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* CTA */
.rules-cta {
  padding: 6rem 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(46, 204, 64, 0.07) 0%, transparent 60%),
    var(--bg-dark);
  border-top: 1px solid rgba(46, 204, 64, 0.08);
}

.cta-inner { max-width: 500px; margin: 0 auto; }

.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.cta-inner p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.cta-btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--green-accent);
  color: var(--bg-dark);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.cta-btn:hover {
  background: var(--green-glow);
  transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .section-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .section-label { font-size: 2.5rem; }
  .deck-layout { grid-template-columns: 1fr; gap: 2rem; }
  .score-layout { grid-template-columns: 1fr; gap: 2rem; }
  .kitty-flow { grid-template-columns: 1fr; gap: 0.75rem; }
  .kitty-arrow { display: none; }
}

@media (max-width: 700px) {
  .rules-nav a:not(.nav-cta) { display: none; }
  .play-steps { grid-template-columns: 1fr; }
  .join-steps { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .rules-header { padding: 0.85rem 1.25rem; }
  .rules-hero { padding: 4rem 1.25rem 2rem; }
  .rules-section { padding: 3.5rem 1.25rem; }
  .rules-cta { padding: 4rem 1.25rem; }
  .toc-inner { gap: 1.25rem; }
  .join-step, .play-step { padding: 1rem; }
}