/* ============================================================
   cricplayin.com - Paper-and-Ink Rummy Editorial Stylesheet
   Source Serif 4 (editorial) + DM Sans (UI/body)
   Palette: Ivy green primary, Oak accent, Parchment canvas
   ============================================================ */

:root {
  --primary: #1E5A3A;
  --primary-2: #174A2F;
  --primary-3: #246B47;
  --accent: #944A00;
  --accent-2: #7F4000;
  --background: #FBF6EC;
  --surface: #FFFFFF;
  --surface-2: #F1E8D5;
  --surface-3: #E8DCBF;
  --text: #1A1714;
  --text-2: #2E2A24;
  --muted: #5C4F3F;
  --muted-2: #6E5D49;
  --border: #D8C9A8;
  --border-2: #C2B08B;
  --rule: #8A6B3A;
  --shadow-card: 0 1px 0 rgba(26,23,20,0.04), 0 6px 18px rgba(26,23,20,0.06);
  --radius-outer: 8px;
  --radius-inner: 4px;
  --rule-line: 2px solid var(--rule);
  --rule-line-thin: 1px solid var(--border);
  --maxw: 1200px;
  --maxw-narrow: 760px;
  --serif: "Source Serif 4", "Source Serif Pro", "Georgia", "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  --header-h: 76px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-width: 320px;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ----- layout primitives ----- */
.container { width: min(100%, var(--maxw)); margin: 0 auto; padding: 0 20px; }
.container-narrow { width: min(100%, var(--maxw-narrow)); margin: 0 auto; padding: 0 20px; }

.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;
}

.skip-link {
  position: absolute; left: 0; top: 0;
  transform: translateX(-100vw);
  background: var(--primary); color: var(--surface);
  padding: 10px 14px; border-radius: 0 0 var(--radius-outer) var(--radius-outer);
  font-weight: 600;
  max-width: 100vw;
}
.skip-link:focus { transform: translateX(0); left: 0; z-index: 9999; }

/* ----- typography ----- */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.15; }
h3 { font-size: clamp(20px, 2.1vw, 24px); font-weight: 600; line-height: 1.25; }
h4 { font-size: clamp(17px, 1.6vw, 19px); font-weight: 600; line-height: 1.35; }

p { margin: 0 0 16px; }
p + p { margin-top: 0; }

.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
}
.eyebrow.ink { color: var(--primary); }
.eyebrow.muted { color: var(--muted); }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.dek {
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.55;
  color: var(--text-2);
  font-weight: 400;
}

.byline {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.dateline {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dropcap::first-letter {
  font-family: var(--serif);
  font-size: 4.5em;
  float: left;
  line-height: 0.85;
  padding: 6px 12px 0 0;
  color: var(--primary);
  font-weight: 700;
}

.rule {
  height: 0;
  border: 0;
  border-top: var(--rule-line);
  margin: 28px 0;
}
.rule.thin { border-top: var(--rule-line-thin); margin: 18px 0; }
.rule.ivory { border-top: 1px solid rgba(255,255,255,0.18); }

/* ----- buttons / CTAs ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
  min-height: 44px;
  max-width: 100%;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); }

.btn-accent {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-ghost:hover { background: var(--primary); color: var(--surface); }

.btn-ink {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}
.btn-ink:hover { background: var(--text-2); border-color: var(--text-2); }

.btn-lg { padding: 16px 28px; font-size: 16px; min-height: 52px; }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }

/* ----- sticky header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(251, 246, 236, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--rule-line-thin);
}
.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 0 20px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand-mark:hover { text-decoration: none; }
.brand-mark .brand-glyph {
  display: inline-flex;
  width: 36px; height: 36px;
  background: var(--primary);
  color: var(--surface);
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  border-radius: 4px;
  border: 1px solid var(--primary-2);
}
.brand-mark .brand-glyph .cp-mark { font-style: italic; }
.brand-mark .brand-tag {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1;
}
.brand-mark-stack { display: flex; flex-direction: column; line-height: 1.05; }

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
}
.main-nav a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }
.main-nav a.is-active { color: var(--primary); border-bottom-color: var(--primary); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-cta-ghost {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid var(--primary);
  white-space: nowrap;
}
.header-cta-ghost:hover { background: var(--primary); color: var(--surface); text-decoration: none; }

.header-cta {
  background: var(--primary);
  color: var(--surface);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 18px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--primary);
}
.header-cta:hover { background: var(--primary-2); border-color: var(--primary-2); text-decoration: none; }

.hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border-2);
  padding: 8px 10px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: var(--rule-line);
  z-index: 199;
  padding: 16px 20px 24px;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  transform: translateY(-110%);
  transition: transform 220ms ease;
}
.mobile-drawer.is-open { transform: translateY(0); }
.mobile-drawer[aria-hidden="false"] { display: block; }
.mobile-drawer ul { list-style: none; padding: 0; margin: 0 0 16px; }
.mobile-drawer li { border-bottom: 1px solid var(--border); }
.mobile-drawer a {
  display: block;
  padding: 14px 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.mobile-drawer a:hover { color: var(--accent); }
.mobile-drawer .drawer-cta {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.menu-open { overflow: hidden; }

/* ----- section rule strip ----- */
.rule-strip {
  background: var(--surface-2);
  border-bottom: var(--rule-line-thin);
  padding: 10px 0;
  overflow: hidden;
  max-width: 100vw;
  position: relative;
}
.rule-strip-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 0 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100%;
  min-width: 0;
}
.rule-strip-inner > * {
  flex: 0 0 auto;
  min-width: 0;
}
.rule-strip-inner span { flex: 0 0 auto; min-width: 0; }
.rule-strip-inner .strip-sep { color: var(--border-2); }
.rule-strip-inner .strip-accent { color: var(--accent); }

/* ----- hero (editorial split) ----- */
.hero {
  padding: 56px 0 36px;
  position: relative;
  background: linear-gradient(180deg, var(--background) 0%, var(--surface-2) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: start;
}
.hero-ticket {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hero-headline {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--text);
  margin: 0;
}
.hero-headline em {
  font-style: italic;
  color: var(--primary);
  font-weight: 700;
}
.hero-dek {
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 56ch;
  margin: 0;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: var(--rule-line-thin);
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-meta-item .hm-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta-item .hm-value {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.hero-cover {
  position: relative;
  margin: 0;
}
.hero-cover-frame {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 14px 14px 18px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.hero-cover-frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--border);
  pointer-events: none;
}
.hero-cover-frame img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.hero-cover-caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

/* ----- format rail ----- */
.format-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.format-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-outer);
  padding: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: border-color 160ms ease, transform 160ms ease;
}
.format-card:hover { border-color: var(--primary); transform: translateY(-1px); text-decoration: none; }
.format-card-thumb {
  width: 84px; height: 64px;
  overflow: hidden;
  border-radius: var(--radius-inner);
  border: 1px solid var(--border);
}
.format-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.format-card-body .fc-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}
.format-card-body .fc-blurb {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 6px;
}
.format-card-body .fc-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fc-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}
.fc-chip.accent { background: rgba(176, 93, 0, 0.08); border-color: rgba(176, 93, 0, 0.32); color: var(--accent-2); }
.fc-chip.ink { background: rgba(30, 90, 58, 0.08); border-color: rgba(30, 90, 58, 0.32); color: var(--primary); }

/* ----- section index rail (sticky) ----- */
.section-index {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: rgba(241, 232, 213, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--rule-line-thin);
  padding: 10px 0;
  transition: padding 200ms ease, background 200ms ease;
}
.section-index-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-index-inner::-webkit-scrollbar { display: none; }
.section-index-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 8px;
  flex: 0 0 auto;
}
.section-index a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-inner);
  border: 1px solid transparent;
  white-space: nowrap;
  flex: 0 0 auto;
}
.section-index a:hover { color: var(--accent); border-color: var(--border-2); }
.section-index a.is-active { color: var(--primary); background: var(--surface); border-color: var(--border-2); }

/* ----- section primitive ----- */
.section {
  padding: 64px 0;
}
.section-tight { padding: 40px 0; }
.section-band {
  background: var(--surface-2);
  border-top: var(--rule-line-thin);
  border-bottom: var(--rule-line-thin);
}
.section-paper {
  background: var(--surface);
}

/* ----- card / grid layout primitives ----- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.card-grid > .card,
.card-grid > .loose-card,
.card-grid > .faq-item { margin: 0; }
.card {
  background: var(--surface);
  border: var(--rule-line-thin);
  border-radius: var(--radius-outer);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-card);
}
.card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; line-height: 1.3; color: var(--text); }
.card p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.card h3 a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.loose-card {
  background: var(--surface-2);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-outer);
  padding: 18px 22px;
  margin: 18px 0;
  box-shadow: var(--shadow-card);
}
.loose-card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 19px; line-height: 1.3; color: var(--text); }
.loose-card p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--text-2); }

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: var(--rule-line);
}
.faq-grid .faq-item {
  padding: 18px 0;
  border-bottom: var(--rule-line);
}
.faq-grid .faq-item h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 18px; line-height: 1.35; color: var(--text); }
.faq-grid .faq-item p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--text-2); max-width: 70ch; }

@media (max-width: 599px) {
  .card { padding: 18px 16px; }
  .card-grid { grid-template-columns: 1fr; gap: 14px; }
  .loose-card { padding: 16px 18px; }
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 32px;
  align-items: end;
}
.section-head.single { grid-template-columns: 1fr; }
.section-head .sh-head { display: flex; flex-direction: column; gap: 8px; }
.section-head .sh-head h2 { margin: 0; }
.section-head .sh-aside {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  font-style: italic;
  max-width: 50ch;
}
.section-head .sh-aside p { margin: 0; }

/* ----- chaptered prose ----- */
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.chapter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}
.chapter-number {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.chapter-prose { min-width: 0; }
.chapter-prose p { font-size: 17px; line-height: 1.78; margin-bottom: 18px; color: var(--text); }
.chapter-prose p + h3 { margin-top: 32px; }
.chapter-prose h3 { margin: 0 0 14px; font-family: var(--serif); word-break: break-word; }
.chapter-prose p { overflow-wrap: anywhere; }
.chapter-prose blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--primary);
  background: var(--surface-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
}
.chapter-prose blockquote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}

.callout {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 20px;
  margin: 24px 0;
  position: relative;
}
.callout-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.callout-body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
}

.marginalia {
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.6;
  position: sticky;
  top: calc(var(--header-h) + 60px);
}
.marginalia-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.marginalia ol { padding-left: 18px; margin: 0; }
.marginalia ol li { margin-bottom: 8px; }

/* ----- annotated hand ledger ----- */
.hand-ledger {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 24px;
}
.hand-ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: var(--rule-line-thin);
}
.hand-ledger-head h3 { margin: 0; }
.hand-ledger-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.hand-card {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  padding: 18px 8px 10px;
  position: relative;
  text-align: center;
  border-radius: 6px;
}
.hand-card-rank {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  color: var(--text);
}
.hand-card-suit {
  font-size: 26px;
  line-height: 1;
  margin-top: 6px;
}
.hand-card-tag {
  position: absolute;
  top: -10px; right: -6px;
  width: 22px; height: 22px;
  background: var(--accent);
  color: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.hand-card.joker .hand-card-rank,
.hand-card.joker .hand-card-suit { color: var(--accent); }
.hand-ledger-keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.hand-ledger-keys .key-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
}
.hand-ledger-keys .key-num {
  width: 22px; height: 22px;
  background: var(--accent);
  color: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}
.hand-ledger-keys .key-text strong { font-family: var(--serif); color: var(--text); display: block; margin-bottom: 2px; }

/* ----- format comparison rail ----- */
.format-tabs {
  background: var(--surface);
  border: 1px solid var(--border);
}
.format-tabs-list {
  display: flex;
  border-bottom: var(--rule-line-thin);
  background: var(--surface-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.format-tabs-list::-webkit-scrollbar { display: none; }
.format-tab {
  flex: 0 0 auto;
  padding: 14px 22px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.format-tab:hover { color: var(--text); background: rgba(255,255,255,0.5); }
.format-tab[aria-selected="true"] {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--surface);
}
.format-panel {
  display: none;
  padding: 28px;
}
.format-panel.is-active { display: block; }
.format-panel h3 { margin-bottom: 12px; }
.format-panel-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.format-panel-meta dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.format-panel-meta dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.format-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 28px;
  font-size: 14px;
}
.format-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.format-table th, .format-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
}
.format-table thead th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 600;
}
.format-table tbody td:first-child {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text);
}

/* ----- usability photo-notes (zig-zag) ----- */
.photo-notes {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.photo-note {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
}
.photo-note.flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.photo-note.flip .photo-note-media { order: 2; }
.photo-note.flip .photo-note-body { order: 1; }

.photo-note-media {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px;
}
.photo-note-media img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}
.photo-note-media figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}
.photo-note-body h3 { margin-bottom: 10px; }
.photo-note-body p { font-size: 16px; line-height: 1.7; color: var(--text-2); margin-bottom: 12px; }
.photo-note-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.photo-note-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.55;
}
.photo-note-list li:first-child { border-top: 0; }
.photo-note-list .pn-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ----- strategy bounds (two-column ledger) ----- */
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.strategy-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.strategy-tile h3 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0;
}
.strategy-tile p { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0; }
.strategy-tile .st-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
}

.pull-quote {
  background: var(--surface-2);
  border-top: var(--rule-line);
  border-bottom: var(--rule-line);
  padding: 32px 28px;
  margin: 28px 0;
  text-align: center;
}
.pull-quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--text);
  max-width: 60ch;
  margin-inline: auto;
}
.pull-quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}

/* ----- newsroom lede grid ----- */
.newsroom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px;
}
.newsroom-featured {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.newsroom-featured img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.newsroom-featured h3 { margin: 0; font-size: clamp(22px, 2.2vw, 28px); }
.newsroom-featured p { color: var(--text-2); font-size: 15px; line-height: 1.6; margin: 0; }
.newsroom-featured .meta-row {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: var(--rule-line-thin);
  padding-top: 12px;
  margin-top: 4px;
}
.newsroom-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.newsroom-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: start;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.newsroom-card:first-child { border-top: 0; padding-top: 0; }
.newsroom-card img {
  width: 92px; height: 92px;
  object-fit: cover;
}
.newsroom-card h4 { font-size: 16px; line-height: 1.3; margin: 0 0 4px; }
.newsroom-card .meta-row {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ----- bento strategy pillars ----- */
.bento-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}
.bento-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bento-cell.tall { grid-row: span 2; }
.bento-cell.image img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
}
.bento-cell h3 { margin: 0; font-size: 22px; }
.bento-cell h4 { margin: 0; font-size: 16px; }
.bento-cell p { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0; }
.bento-cell .stat {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.bento-cell .stat-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ----- brand editorial card ----- */
.brand-card {
  background: var(--surface);
  border: var(--rule-line);
  padding: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: center;
}
.brand-card-body h3 { font-size: clamp(24px, 2.4vw, 30px); margin-bottom: 12px; }
.brand-card-body p { font-size: 16px; line-height: 1.7; color: var(--text-2); margin-bottom: 14px; }
.brand-card-media img {
  width: 100%;
  aspect-ratio: 5/3;
  object-fit: cover;
  border: 1px solid var(--border);
}
.brand-card-media figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}

/* ----- responsible play banner ----- */
.responsible-banner {
  background: var(--surface-2);
  border-top: var(--rule-line);
  padding: 28px 0;
}
.responsible-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.responsible-grid h3 { font-size: 22px; margin-bottom: 8px; }
.responsible-grid p { font-size: 14px; line-height: 1.6; color: var(--text-2); margin-bottom: 12px; }
.responsible-links {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  font-size: 14px;
}
.responsible-links a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* ----- FAQ ----- */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: var(--rule-line);
}
.faq-item {
  border-bottom: var(--rule-line);
  padding: 0;
}
.faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  padding: 18px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-q::after {
  content: "+";
  font-family: var(--mono);
  font-size: 20px;
  color: var(--accent);
  font-weight: 400;
  transition: transform 200ms ease;
  flex: 0 0 auto;
}
.faq-q[aria-expanded="true"]::after { content: "−"; }
.faq-q:hover { color: var(--accent); }
.faq-q:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.faq-a {
  display: none;
  padding: 0 0 18px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 70ch;
}
.faq-a.is-open { display: block; }

/* ----- footer ----- */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.86);
  padding: 56px 0 24px;
  font-size: 14px;
  line-height: 1.6;
}
.site-footer h4 {
  color: rgba(255,255,255,0.92);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
  margin-bottom: 36px;
}
.footer-brand .footer-mark {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.footer-brand p { color: rgba(255,255,255,0.72); margin: 0 0 16px; max-width: 38ch; }
.footer-brand .footer-rule { height: 1px; background: rgba(255,255,255,0.12); margin: 18px 0; width: 60px; }
.footer-brand .footer-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
}
.footer-col a:hover { color: var(--surface); text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.footer-bottom p { margin: 0; }
.footer-meta-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-meta-list a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-meta-list a:hover { color: #fff; }

.footer-rule-illustration {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-rule-cards {
  display: grid;
  grid-template-columns: repeat(6, 36px);
  gap: 6px;
}
.footer-rule-cards .frc {
  width: 36px; height: 50px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  position: relative;
}
.footer-rule-cards .frc .frc-suit { font-size: 14px; line-height: 1; }
.footer-rule-cards .frc .frc-tag {
  position: absolute;
  top: -6px; right: -6px;
  width: 14px; height: 14px;
  background: var(--accent);
  color: var(--surface);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.footer-rule-text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* ----- mobile sticky CTA ----- */
.mobile-sticky {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background: var(--text);
  color: var(--surface);
  padding: 10px 14px;
  z-index: 180;
  border-top: var(--rule-line);
  box-sizing: border-box;
}
.mobile-sticky-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.mobile-sticky-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  flex: 0 0 auto;
}
.mobile-sticky .btn {
  flex: 1 1 auto;
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mobile-sticky .btn:hover { background: var(--accent-2); border-color: var(--accent-2); }

/* ----- responsive ----- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-head { grid-template-columns: 1fr; gap: 14px; }
  .chapter-grid { grid-template-columns: 1fr; }
  .marginalia { position: static; }
  .newsroom-grid { grid-template-columns: 1fr; }
  .brand-card { grid-template-columns: 1fr; }
  .responsible-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-cell.tall { grid-column: span 2; grid-row: auto; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .main-nav, .header-right .header-cta-ghost { display: none; }
  .hamburger { display: inline-flex; }
  .site-header.is-drawer-open + .mobile-drawer { display: block; }

  .container, .container-narrow, .site-header-inner, .section-index-inner, .rule-strip-inner { padding-left: 16px; padding-right: 16px; }
  .rule-strip-inner { flex-wrap: wrap; gap: 4px 12px; white-space: normal; line-height: 1.4; }
  .rule-strip-inner .strip-sep { display: none; }

  .hero { padding: 32px 0 28px; }
  .section { padding: 40px 0; }
  .section-tight { padding: 28px 0; }
  .section-index { padding: 8px 0; }

  .photo-note, .photo-note.flip { grid-template-columns: 1fr; gap: 16px; }
  .photo-note.flip .photo-note-media { order: 0; }
  .photo-note.flip .photo-note-body { order: 0; }

  .hand-ledger-cards { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-meta-list { justify-content: flex-start; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-cell.tall { grid-column: auto; }
  .responsible-links { grid-template-columns: 1fr; }
  .brand-card { padding: 24px; }
  .pull-quote { padding: 24px 18px; }

  .mobile-sticky { display: block; }
  body { padding-bottom: 72px; }
  .hero-headline { font-size: 34px; line-height: 1.06; }
  .hero-dek { font-size: 17px; }
  .hand-ledger { padding: 18px 14px; }
  .format-panel { padding: 20px 16px; }
  .chapter-prose p { font-size: 16px; }
}

@media (max-width: 430px) {
  .header-right .header-cta { display: none; }
  .site-header-inner { gap: 12px; }
}
@media (max-width: 380px) {
  .hero-headline { font-size: 30px; }
  .footer-rule-cards { grid-template-columns: repeat(6, 28px); }
  .footer-rule-cards .frc { width: 28px; height: 40px; font-size: 11px; }
}

/* ----- print: skip nav, footer, sticky cta ----- */
@media print {
  .site-header, .mobile-drawer, .mobile-sticky, .section-index { display: none !important; }
}

/* ----- accessibility: focus visible everywhere ----- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button { font-family: inherit; }

/* ----- utility helpers ----- */
.text-center { text-align: center; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.flex-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stack-2 > * + * { margin-top: 8px; }
.stack-3 > * + * { margin-top: 12px; }
.stack-4 > * + * { margin-top: 16px; }
.stack-6 > * + * { margin-top: 24px; }
.hidden-mobile { display: initial; }
@media (max-width: 760px) { .hidden-mobile { display: none; } }
.only-mobile { display: none; }
@media (max-width: 760px) { .only-mobile { display: initial; } }

/* ----- section[id] scroll-margin so sticky header doesn't clip anchors ----- */
section[id], div[id] { scroll-margin-top: calc(var(--header-h) + 70px); }

/* ----- gloss component: inline annotated ledger (used inside pages) ----- */
.annotated-figure {
  margin: 24px 0;
  border: 1px solid var(--border);
  padding: 18px;
  background: var(--surface);
}
.annotated-figure img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.annotated-figure figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}

/* ----- image inside prose ----- */
.prose-figure {
  margin: 24px 0;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 12px;
}
.prose-figure img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}
.prose-figure figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  margin-top: 10px;
  padding: 0 4px;
}

.responsive-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 760px) { .responsive-2col { grid-template-columns: 1fr; } }

/* breadcrumb */
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 0 8px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border-2); margin: 0 8px; }

/* Font-swap metric overrides — reduce CLS by matching fallback metrics to webfont */
@font-face {
  font-family: "Source Serif 4 Fallback";
  src: local("Georgia"), local("Times New Roman"), local("Source Serif Pro");
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 28%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "DM Sans Fallback";
  src: local("Segoe UI"), local("Roboto"), local("Helvetica Neue"), local("Arial");
  size-adjust: 100%;
  ascent-override: 97%;
  descent-override: 25%;
  line-gap-override: 0%;
}
.serif, h1, h2, h3, h4, h5, h6, .hero-headline, .band-title, .section-title, .pillar-title {
  font-family: "Source Serif 4", "Source Serif 4 Fallback", "Source Serif Pro", Georgia, "Times New Roman", serif;
}
body, .sans, .nav, .main-nav, button, input, select, textarea, .btn {
  font-family: "DM Sans", "DM Sans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
