:root {
  color-scheme: dark;
  --bg: #071a0e;
  --bg-soft: #0d2716;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f7f4e9;
  --muted: #b6c3b7;
  --gold: #f5c542;
  --gold-strong: #fbbf24;
  --green: #65d68a;
  --red: #fb7185;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(63, 132, 81, 0.45), transparent 42rem),
    linear-gradient(180deg, #0b2414, var(--bg) 34rem);
  line-height: 1.65;
}

a { color: var(--gold); text-underline-offset: 0.2em; }
a:hover { color: #ffe17c; }
img { max-width: 100%; height: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 26, 14, 0.9);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.brand span { color: var(--gold); }

.nav-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 700; }
.nav-links a:hover { color: var(--text); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { color: #111; background: var(--gold-strong); }
.button-primary:hover { color: #111; background: #ffd65a; }
.button-secondary { color: var(--text); background: var(--panel); border-color: var(--border); }
.button-secondary:hover { color: var(--text); background: var(--panel-strong); }

.container { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }
.hero { padding: clamp(4rem, 10vw, 8rem) 0 4rem; text-align: center; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; font-weight: 900; }
.hero h1, .article h1 {
  font-family: Georgia, "Times New Roman", serif;
  margin: 0.6rem auto 1rem;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero h1 { max-width: 900px; font-size: clamp(3rem, 9vw, 6.5rem); }
.article h1 { font-size: clamp(2.4rem, 7vw, 4.7rem); }
.lead { max-width: 760px; margin: 0 auto; font-size: clamp(1.05rem, 2.3vw, 1.35rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 2rem; }

.section { padding: 4rem 0; }
.section h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.8rem; }
.section-intro { max-width: 720px; color: var(--muted); margin: 0 0 2rem; }

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 22px;
  padding: 1.4rem;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.16);
}
.card h3 { margin: 0 0 0.45rem; font-size: 1.18rem; }
.card p { margin: 0; color: var(--muted); }
.card a { font-weight: 800; }

.rule-number { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; color: #111; background: var(--gold); font-weight: 900; }

.callout { border-left: 4px solid var(--gold); padding: 1rem 1.2rem; background: rgba(245, 197, 66, 0.08); border-radius: 0 14px 14px 0; }
.callout.warning { border-color: var(--red); background: rgba(251, 113, 133, 0.08); }
.callout.success { border-color: var(--green); background: rgba(101, 214, 138, 0.08); }

.article { width: min(820px, calc(100% - 2rem)); margin: 0 auto; padding: 4rem 0; }
.article .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
.article h2 { margin-top: 2.6rem; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; line-height: 1.2; }
.article h3 { margin-top: 1.8rem; }
.article p, .article li { color: #d6ded6; }
.article table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; }
.article th, .article td { border: 1px solid var(--border); padding: 0.7rem; text-align: left; vertical-align: top; }
.article th { background: var(--panel-strong); }
.breadcrumbs { color: var(--muted); font-size: 0.9rem; }

.footer { border-top: 1px solid var(--border); margin-top: 4rem; padding: 2.5rem 0; color: var(--muted); }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

.puzzle-board { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.card-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
.playing-card { width: min(120px, 25vw); border-radius: 12px; box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.choice-grid { display: grid; gap: 0.75rem; }
.choice-button { width: 100%; text-align: left; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; cursor: pointer; font: inherit; }
.choice-button:hover, .choice-button:focus-visible { border-color: var(--gold); background: var(--panel-strong); }
.choice-button[disabled] { cursor: default; opacity: 0.82; }

@media (max-width: 780px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-links a:not(.button) { display: none; }
  .hero { padding-top: 3.4rem; }
}
