:root {
  color-scheme: dark;
  --ink: #06140f;
  --ink-soft: #0a1f17;
  --panel: #0f2b20;
  --felt: #154633;
  --cream: #f5f0e5;
  --paper: #e9e2d4;
  --paper-soft: #f4eee2;
  --paper-ink: #13261e;
  --muted: #a8b7af;
  --muted-dark: #52645a;
  --brass: #c2a46a;
  --brass-dark: #765f37;
  --line: rgba(245, 240, 229, .14);
  --line-dark: rgba(19, 38, 30, .15);
  --shadow: 0 28px 80px rgba(0, 0, 0, .28);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; overflow-x: hidden; background: var(--ink); color: var(--cream); font: 400 1rem/1.7 var(--sans); text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .25rem; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: .1875rem solid #f0cb7e; outline-offset: .25rem; border-radius: .35rem; }
::selection { background: var(--brass); color: var(--ink); }

.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 100; padding: .75rem 1rem; transform: translateY(-160%); border-radius: .4rem; background: var(--cream); color: var(--ink); font-weight: 750; text-decoration: none; }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(6, 20, 15, .94); }
.header-inner { width: min(calc(100% - 2rem), 76rem); min-height: 4.5rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { min-height: 3rem; display: inline-flex; align-items: center; gap: .7rem; color: var(--cream); font-size: .8125rem; font-weight: 800; letter-spacing: .22em; text-decoration: none; white-space: nowrap; }
.brand img { width: 2.45rem; height: 2.45rem; }
.menu-toggle { width: 3rem; height: 3rem; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.menu-lines, .menu-lines::before, .menu-lines::after { width: 1.1rem; height: 1px; display: block; position: relative; background: currentColor; transition: transform .22s ease, opacity .22s ease; content: ""; }
.menu-lines::before { position: absolute; transform: translateY(-.35rem); }
.menu-lines::after { position: absolute; transform: translateY(.35rem); }
.menu-toggle[aria-expanded="true"] .menu-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-lines::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-lines::after { transform: rotate(-45deg); }
.site-nav { position: absolute; top: calc(100% + 1px); left: 0; right: 0; display: none; padding: 1rem; border-bottom: 1px solid var(--line); background: #0a1d16; box-shadow: 0 1.5rem 2.5rem rgba(0, 0, 0, .28); }
.site-nav[data-open="true"] { display: grid; }
.site-nav a { min-height: 3rem; display: flex; align-items: center; padding: .25rem .75rem; border-bottom: 1px solid rgba(245, 240, 229, .08); color: #c3cec8; font-size: .9375rem; font-weight: 650; text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--cream); }
.site-nav .nav-play { justify-content: center; margin-top: .6rem; border: 1px solid var(--brass); border-radius: 999px; color: var(--cream); }
.menu-open { overflow: hidden; }

main { overflow: clip; }
.eyebrow { margin: 0 0 1rem; color: var(--brass); font-size: .75rem; font-weight: 800; letter-spacing: .18em; line-height: 1.4; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(3rem, 14vw, 5.5rem); letter-spacing: -.045em; line-height: 1; }
h2 { font-size: clamp(2.25rem, 9vw, 3.8rem); letter-spacing: -.035em; line-height: 1.07; }
h3 { font-size: 1.55rem; line-height: 1.18; }
.lead { max-width: 43rem; margin: 1.5rem 0 0; color: #b4c0ba; font-size: 1.08rem; line-height: 1.65; }
.hero-actions, .article-actions { display: flex; flex-direction: column; align-items: stretch; gap: .75rem; margin-top: 2rem; }
.button { min-height: 3.25rem; display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1.35rem; border: 1px solid transparent; border-radius: 999px; font-size: .9375rem; font-weight: 760; text-decoration: none; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.button.primary { background: var(--cream); color: #10261d; }
.button.secondary { border-color: var(--line); color: var(--cream); }
.button:hover { transform: translateY(-2px); }

.hero { width: min(calc(100% - 2rem), 76rem); margin: 0 auto; padding: 3.75rem 0 4.5rem; display: grid; gap: 3rem; }
.game-table { position: relative; margin: 0; }
.game-table picture { display: block; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid rgba(194, 164, 106, .25); border-radius: 8rem 8rem 1.1rem 1.1rem; background: var(--panel); box-shadow: var(--shadow); }
.game-table img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 50%; }
.game-table::before { position: absolute; z-index: 1; inset: .8rem; border: 1px solid rgba(245, 240, 229, .18); border-radius: 7.3rem 7.3rem .7rem .7rem; content: ""; pointer-events: none; }
.table-note { position: absolute; z-index: 2; right: 1.2rem; bottom: 1.2rem; padding: .65rem .85rem; border: 1px solid rgba(245, 240, 229, .16); border-radius: 999px; background: rgba(6, 20, 15, .86); color: #dfca97; font-size: .7rem; font-weight: 700; letter-spacing: .06em; backdrop-filter: blur(.5rem); }

.section { padding: 5rem max(1rem, calc((100vw - 76rem) / 2)); }
.section.light { background: var(--paper); color: var(--paper-ink); }
.section-heading { max-width: 50rem; margin-bottom: 2.4rem; }
.section-heading > p:last-child { margin: 1.25rem 0 0; color: var(--muted); font-size: 1.05rem; }
.light .section-heading > p:last-child { color: var(--muted-dark); }
.card-grid { display: grid; gap: .85rem; }
.info-card { padding: 1.5rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--panel); }
.light .info-card { border-color: var(--line-dark); background: var(--paper-soft); }
.info-card h3 { font-size: 1.45rem; }
.info-card p { margin: .75rem 0 0; color: var(--muted); }
.light .info-card p { color: var(--muted-dark); }
.info-card a { display: inline-block; margin-top: 1rem; color: #e1ca94; font-weight: 750; }
.light .info-card a { color: #65532e; }
.steps { counter-reset: step; margin: 0; padding: 0; border-top: 1px solid currentColor; border-color: var(--line-dark); list-style: none; }
.steps li { counter-increment: step; padding: 1.65rem 0; border-bottom: 1px solid var(--line-dark); }
.steps li::before { display: block; margin-bottom: .85rem; color: var(--brass-dark); font-size: .72rem; font-weight: 800; letter-spacing: .14em; content: counter(step, decimal-leading-zero); }
.steps strong { display: block; font: 400 1.5rem/1.2 var(--serif); }
.steps span { display: block; margin-top: .6rem; color: var(--muted-dark); }
.faq { max-width: 54rem; }
.faq details { padding: 1.3rem 0; border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 400 1.35rem/1.35 var(--serif); }
.faq details p { color: var(--muted); }

.breadcrumb { width: min(calc(100% - 2rem), 62rem); margin: 0 auto; padding-top: 1.5rem; color: var(--muted); font-size: .78rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb li:not(:last-child)::after { margin-left: .5rem; opacity: .45; content: "/"; }
.article-hero { width: min(calc(100% - 2rem), 62rem); margin: 0 auto; padding: 2.8rem 0 4rem; }
.article-hero h1 { max-width: 14ch; }
.article-hero .lead { max-width: 48rem; }
.article-meta { margin: 1.6rem 0 0; color: #81938a; font-size: .78rem; }
.article-layout { padding: 4rem max(1rem, calc((100vw - 62rem) / 2)) 5.5rem; background: var(--paper); color: var(--paper-ink); }
.article { max-width: 49rem; overflow-wrap: anywhere; }
.article .intro { color: #3f5148; font-size: 1.12rem; line-height: 1.75; }
.article h2 { margin: 3.5rem 0 1.1rem; scroll-margin-top: 6.5rem; }
.article h3 { margin: 2.2rem 0 .7rem; font-size: 1.55rem; }
.article p, .article li { color: #34483e; }
.article strong { color: #172d23; }
.article a { color: #59471f; }
.article ul, .article ol { padding-left: 1.35rem; }
.article li + li { margin-top: .55rem; }
.toc { margin: 0 0 2.8rem; padding: 1.35rem; border: 1px solid var(--line-dark); border-radius: .8rem; background: var(--paper-soft); }
.toc strong { display: block; margin-bottom: .6rem; }
.toc ul { margin: 0; padding-left: 1.2rem; }
.example, .rule-note, .variant-note { margin: 1.8rem 0; padding: 1.3rem 1.35rem; border-left: .25rem solid var(--brass-dark); border-radius: 0 .7rem .7rem 0; background: var(--paper-soft); }
.example p:last-child, .rule-note p:last-child, .variant-note p:last-child { margin-bottom: 0; }
.score-table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; table-layout: fixed; background: var(--paper-soft); font-size: .9rem; }
.score-table th, .score-table td { padding: .7rem .65rem; border-bottom: 1px solid var(--line-dark); text-align: left; vertical-align: top; }
.score-table th { color: #23382e; font-size: .78rem; }
.related { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line-dark); }
.related-grid { display: grid; gap: .65rem; }
.related a { min-height: 3.25rem; display: flex; align-items: center; padding: .8rem 1rem; border: 1px solid var(--line-dark); border-radius: .65rem; font-weight: 700; text-decoration: none; }

footer { width: min(calc(100% - 2rem), 76rem); margin: 0 auto; padding: 3.5rem 0 2.5rem; display: grid; gap: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .8rem 1.25rem; }
.footer-links a:hover { color: var(--cream); }
footer p { margin: 0; }

@media (min-width: 30rem) {
  .hero-actions, .article-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .button { width: auto; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 42rem) {
  .header-inner, .hero, .breadcrumb, .article-hero, footer { width: min(calc(100% - 3rem), 76rem); }
  .breadcrumb, .article-hero { width: min(calc(100% - 3rem), 62rem); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line-dark); }
  .steps li { padding: 1.6rem; border-right: 1px solid var(--line-dark); border-bottom: 0; }
  .steps li:first-child { padding-left: 0; }
  .steps li:last-child { padding-right: 0; border-right: 0; }
  .toc ul { columns: 2; }
  footer { grid-template-columns: 1fr auto; align-items: center; }
  footer p { grid-column: 1 / -1; }
}

@media (min-width: 55rem) {
  .site-header { position: sticky; top: 0; backdrop-filter: blur(.8rem); }
  .header-inner { min-height: 5rem; }
  .menu-toggle { display: none; }
  .site-nav, .site-nav[data-open="true"] { position: static; display: flex; align-items: center; gap: .1rem; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .site-nav a { min-height: 2.7rem; padding: 0 .55rem; border: 0; font-size: .78rem; }
  .site-nav .nav-play { min-height: 2.7rem; margin: 0 0 0 .35rem; padding: 0 .95rem; }
  .menu-open { overflow: auto; }
  .hero { min-height: calc(100svh - 5rem); padding: 4.5rem 0 5rem; grid-template-columns: minmax(0, 1fr) minmax(24rem, .85fr); align-items: center; gap: 4rem; }
  .game-table picture { border-radius: 12rem 12rem 1.2rem 1.2rem; }
  .game-table::before { border-radius: 11.2rem 11.2rem .8rem .8rem; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section { padding-top: 6.5rem; padding-bottom: 6.5rem; }
  .article-hero { padding: 4rem 0 5rem; }
  .article-layout { padding-top: 5rem; padding-bottom: 7rem; }
  footer { grid-template-columns: 1fr auto auto; }
  footer p { grid-column: auto; }
}

@media (min-width: 100rem) {
  .header-inner, .hero, footer { width: min(calc(100% - 6rem), 82rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
