:root {
  --bg: #f8f5ee;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #5f6c7b;
  --brand: #14532d;
  --brand-dark: #0f3f24;
  --accent: #b91c1c;
  --accent-soft: #fee2e2;
  --gold: #b7791f;
  --green-soft: #e8f5ec;
  --border: #d9d3c7;
  --shadow: 0 18px 45px rgba(31, 41, 51, 0.10);
  --radius: 18px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 999;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
}

.skip-link:focus {
  left: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 245, 238, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.brand-text {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-name {
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-tagline {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.top-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 750;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus,
.top-nav .active {
  background: var(--green-soft);
  color: var(--brand-dark);
}

main {
  display: block;
}

.hero-badugi {
  background:
    radial-gradient(circle at top left, rgba(185, 28, 28, 0.16), transparent 36%),
    linear-gradient(135deg, #fffaf0 0%, #eef8f1 100%);
  border-bottom: 1px solid var(--border);
}

.hero-deuce-seven {
  background:
    radial-gradient(circle at top left, rgba(30, 64, 175, 0.16), transparent 36%),
    linear-gradient(135deg, #eff6ff 0%, #f8fafc 52%, #eef2ff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-badeucey {
  background:
    radial-gradient(circle at top left, rgba(126, 34, 206, 0.16), transparent 36%),
    linear-gradient(135deg, #faf5ff 0%, #fff7ed 52%, #fefce8 100%);
  border-bottom: 1px solid var(--border);
}

.hero-badacey {
  background:
    radial-gradient(circle at top left, rgba(13, 148, 136, 0.16), transparent 36%),
    linear-gradient(135deg, #ecfeff 0%, #f0fdf4 52%, #fff7ed 100%);
  border-bottom: 1px solid var(--border);
}

.hero-nl-deuce-seven {
  background:
    radial-gradient(circle at top left, rgba(15, 23, 42, 0.20), transparent 36%),
    linear-gradient(135deg, #f8fafc 0%, #e0f2fe 52%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
}

.hero-archie {
  background:
    radial-gradient(circle at top left, rgba(202, 138, 4, 0.18), transparent 36%),
    linear-gradient(135deg, #fffbeb 0%, #fef3c7 48%, #f0fdf4 100%);
  border-bottom: 1px solid var(--border);
}

.hero-dramaha {
  background:
    radial-gradient(circle at top left, rgba(194, 65, 12, 0.16), transparent 36%),
    linear-gradient(135deg, #fff7ed 0%, #fffbeb 52%, #ecfdf5 100%);
  border-bottom: 1px solid var(--border);
}

.hero-omaha-eight {
  background:
    radial-gradient(circle at top left, rgba(22, 101, 52, 0.16), transparent 36%),
    linear-gradient(135deg, #f0fdf4 0%, #eff6ff 52%, #fff7ed 100%);
  border-bottom: 1px solid var(--border);
}

.hero-big-o {
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.16), transparent 36%),
    linear-gradient(135deg, #f5f3ff 0%, #eff6ff 52%, #fff7ed 100%);
  border-bottom: 1px solid var(--border);
}

.hero-stud {
  background:
    radial-gradient(circle at top left, rgba(120, 53, 15, 0.16), transparent 36%),
    linear-gradient(135deg, #fff7ed 0%, #fefce8 52%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
}

.hero-stud-eight {
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.16), transparent 36%),
    linear-gradient(135deg, #ecfeff 0%, #f0fdf4 52%, #fff7ed 100%);
  border-bottom: 1px solid var(--border);
}

.hero-razz {
  background:
    radial-gradient(circle at top left, rgba(190, 18, 60, 0.16), transparent 36%),
    linear-gradient(135deg, #fff1f2 0%, #f8fafc 52%, #eef2ff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-games {
  background:
    radial-gradient(circle at top left, rgba(20, 83, 45, 0.16), transparent 36%),
    linear-gradient(135deg, #f0fdf4 0%, #fff7ed 52%, #eff6ff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-beginner {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 36%),
    linear-gradient(135deg, #eff6ff 0%, #f0fdf4 52%, #fff7ed 100%);
  border-bottom: 1px solid var(--border);
}

.hero-glossary {
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.14), transparent 36%),
    linear-gradient(135deg, #eef2ff 0%, #f0fdf4 52%, #fff7ed 100%);
  border-bottom: 1px solid var(--border);
}

.hero-home {
  background:
    radial-gradient(circle at top left, rgba(20, 83, 45, 0.18), transparent 36%),
    linear-gradient(135deg, #f0fdf4 0%, #fff7ed 52%, #eff6ff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-contact {
  background:
    radial-gradient(circle at top left, rgba(185, 28, 28, 0.14), transparent 36%),
    linear-gradient(135deg, #fff7ed 0%, #f0fdf4 52%, #eff6ff 100%);
  border-bottom: 1px solid var(--border);
}

.contact-form-wrap {
  margin-top: 1rem;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-form label {
  color: var(--brand-dark);
  font-weight: 850;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(20, 83, 45, 0.18);
  border-color: var(--brand);
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 700;
}

.checkbox-line input {
  width: auto;
  min-height: auto;
  margin-top: 0.35rem;
}

.contact-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: fit-content;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 83, 45, 0.18);
}

.contact-form button:hover,
.contact-form button:focus {
  background: var(--brand-dark);
}

.form-note {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 3.2rem 0 2.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.9rem;
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.15rem, 7vw, 4.6rem);
  letter-spacing: -0.055em;
}

.hero-subtitle {
  max-width: 760px;
  margin: 0 0 1rem;
  color: var(--brand-dark);
  font-size: clamp(1.2rem, 3.6vw, 1.85rem);
  line-height: 1.28;
  font-weight: 820;
  font-style: italic;
  letter-spacing: -0.025em;
}

.hero-copy {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(20, 83, 45, 0.18);
}

.button:hover,
.button:focus {
  background: var(--brand-dark);
  color: #fff;
}

.button.secondary {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: none;
}

.button.secondary:hover,
.button.secondary:focus {
  background: var(--green-soft);
  color: var(--brand-dark);
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

.mini-label {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 1rem;
}

.card-row.compact {
  gap: 0.32rem;
  margin: 0.6rem 0 0.5rem;
}

.playing-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.15rem;
  aspect-ratio: 2.5 / 3.5;
  border-radius: 0.45rem;
  border: 1px solid #c7c7c7;
  background: #fff;
  box-shadow: 0 6px 14px rgba(31, 41, 51, 0.12);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.playing-card.small {
  width: 2.35rem;
  border-radius: 0.36rem;
  font-size: 0.92rem;
  box-shadow: 0 4px 10px rgba(31, 41, 51, 0.10);
}

.club,
.spade {
  color: #111827;
}

.diamond,
.heart {
  color: #b91c1c;
}

.hero-card p:last-child {
  margin-bottom: 0;
}

.page-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(245px, 0.26fr);
  gap: 1.5rem;
  align-items: start;
}

.content-stack {
  display: grid;
  gap: 1.15rem;
}

.section-card,
.side-card,
.cta-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(31, 41, 51, 0.06);
}

.section-card {
  padding: clamp(1.05rem, 3vw, 1.55rem);
}

.section-card h2 {
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  letter-spacing: -0.035em;
}

.section-card h3 {
  margin-top: 1.2rem;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.section-card p,
.section-card li {
  color: var(--ink);
}

.section-card p:first-of-type {
  margin-top: 0;
}

.section-card p:last-child,
.section-card ul:last-child,
.section-card ol:last-child {
  margin-bottom: 0;
}

.quick-box {
  padding: 1rem;
  border: 1px solid #b7e0c2;
  border-radius: 16px;
  background: var(--green-soft);
}

.quick-box strong {
  color: var(--brand-dark);
}

.rule-list,
.mistake-list,
.strategy-list {
  display: grid;
  gap: 0.7rem;
  padding-left: 1.2rem;
}

.callout {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 5px solid var(--accent);
  border-radius: 14px;
  background: #fff7ed;
}

.callout p {
  margin: 0;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.example-hand {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdf8;
}

.example-hand h3 {
  margin-top: 0;
  font-size: 1rem;
}

.example-hand .card-row {
  margin-bottom: 0.65rem;
}

.example-hand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.related-link {
  display: block;
  min-height: 100%;
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--ink);
  text-decoration: none;
}

.related-link strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--brand-dark);
}

.related-link span {
  color: var(--muted);
  font-size: 0.94rem;
}

.related-link:hover,
.related-link:focus {
  border-color: var(--brand);
  background: var(--green-soft);
  color: var(--ink);
}

.sidebar {
  position: static;
  top: auto;
  display: grid;
  gap: 1rem;
}

.side-card {
  padding: 1rem;
}

.side-card h2 {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.toc-list,
.side-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.toc-list a,
.side-links a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

.toc-list a:hover,
.toc-list a:focus,
.side-links a:hover,
.side-links a:focus {
  background: var(--green-soft);
  color: var(--brand-dark);
}

.fast-reminder p {
  margin: 0 0 0.4rem;
}

.fast-reminder p:last-child {
  margin-bottom: 0;
}

.cta-card {
  padding: clamp(1.1rem, 3vw, 1.5rem);
  background:
    radial-gradient(circle at bottom right, rgba(185, 28, 28, 0.14), transparent 42%),
    var(--brand-dark);
  color: #fff;
}

.cta-card h2,
.cta-card p {
  color: #fff;
}

.cta-card .button {
  border-color: #fff;
  background: #fff;
  color: var(--brand-dark);
  box-shadow: none;
}

.cta-card .button:hover,
.cta-card .button:focus {
  background: var(--green-soft);
  color: var(--brand-dark);
}

details {
  border-top: 1px solid var(--border);
  padding: 0.9rem 0;
}

details:first-of-type {
  border-top: 0;
}

summary {
  cursor: pointer;
  font-weight: 850;
  color: var(--brand-dark);
}

details p {
  margin-bottom: 0;
  color: var(--ink);
}

.site-footer {
  background: #132019;
  color: #f8f5ee;
  border-top: 4px solid var(--gold);
}

.site-footer .fine-print {
  display: block;
  width: 100%;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.footer-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.footer-brand h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.footer-brand p {
  max-width: 620px;
  color: #d8e3dc;
}

.footer-tagline {
  font-weight: 850;
  color: #fff;
}

.footer-link-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.footer-link-group h3 {
  margin: 0 0 0.45rem;
  color: #fff;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-link-group a {
  display: block;
  color: #f8f5ee;
  text-decoration: none;
  font-weight: 700;
  padding: 0.25rem 0;
  font-size: 0.92rem;
}

.footer-link-group a:hover,
.footer-link-group a:focus {
  color: #ffd166;
}

.fine-print {
  grid-column: 1 / -1;
  margin: 0;
  color: #b8c7bf;
  font-size: 0.88rem;
}

@media (max-width: 1000px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.8rem 0;
    gap: 0.7rem;
  }

  .top-nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.1rem;
  }

  .top-nav a {
    white-space: nowrap;
  }
}

@media (max-width: 920px) {
  .footer-inner,
  .footer-link-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .hero-inner,
  .page-wrap {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding-top: 2.4rem;
  }

  .sidebar {
    position: static;
    order: -1;
  }

  .side-card.toc-card {
    display: none;
  }

  .top-nav {
    gap: 0.2rem;
  }

  .top-nav a {
    font-size: 0.84rem;
    padding: 0.42rem 0.5rem;
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 24px, var(--max));
    min-height: 64px;
    padding: 0.7rem 0;
    gap: 0.55rem;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .brand-tagline {
    font-size: 0.74rem;
    white-space: normal;
  }

  .hero-inner,
  .page-wrap,
  .footer-inner {
    width: min(100% - 24px, var(--max));
  }

  .hero-card {
    padding: 0.9rem;
  }

  .playing-card {
    width: 2.72rem;
    font-size: 1rem;
  }

  .playing-card.small {
    width: 2.15rem;
    font-size: 0.84rem;
  }

  .example-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section-card {
    border-radius: 16px;
  }

  .footer-brand {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}