/* ─── Content pages (brief 2026-11-16) ─────────────────────────────────────────
   The page under the game, About, and the legal template (Terms, Privacy, Data
   Deletion). Light background, one reading column, cards, the site footer.
   Body class .cg-content comes from inc/content-pages.php. */
:root {
  --cg-bg: #F7F3E8; --cg-card: #FFFDF7; --cg-line: #E0D9C6; --cg-tint: #EFE9D8;
  --cg-ink: #1B2422; --cg-ink2: #3B4744; --cg-ink3: #55615D;
  --cg-green: #1D5143; --cg-green-dk: #0F2F27; --cg-gold: #F0B840; --cg-gold-ink: #1A2B27;
  --cg-foot: #1B322D; --cg-red: #B3261E; --cg-blue: #1F4F96;
  --cg-col: 760px; --cg-gap: 64px; --cg-pad: 16px;
  --cg-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (max-width: 768px) { :root { --cg-gap: 44px; } }

/* Page frame */
body.cg-content { background: var(--cg-bg); --nv-site-bg: var(--cg-bg); }
.cg-content .wrapper, .cg-content .neve-main { background: var(--cg-bg); }
.cg-content .neve-main { font-family: var(--cg-font); color: var(--cg-ink); font-size: 18px; line-height: 1.55; }
.cg-content .neve-main > .container.single-page-container { max-width: calc(var(--cg-col) + 2 * var(--cg-pad)); padding: 0 var(--cg-pad); }
.cg-content .single-page-container > .row { margin: 0; }
.cg-content .single-page-container .nv-single-page-wrap { padding: 0; margin: 0; max-width: 100%; flex-basis: 100%; }
/* Classic theme: WordPress wraps every group block's children in an inner container;
   it must not break the flex/grid layouts of the sections and cards. */
.cg-content .wp-block-group > .wp-block-group__inner-container { display: contents; }
.cg-content .neve-main a { color: var(--cg-green); }
.cg-content .neve-main a:hover { color: var(--cg-green-dk); }
.cg-content .neve-main :where(a, button, summary):focus-visible { outline: 2px solid var(--cg-green); outline-offset: 2px; border-radius: 4px; }
.cg-content .entry-content :where(p, h2, h3, h4, ul, ol, figure, table) { margin: 0; }
.cg-content .entry-content :where(h1, h2, h3) { font-family: var(--cg-font); color: var(--cg-ink); letter-spacing: 0; }
.cg-content .entry-content h2 { font-size: 30px; line-height: 1.2; font-weight: 800; }
.cg-content .entry-content h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }
.cg-content .entry-content :where(p, li) { font-size: inherit; }
.cg-content .nv-content-wrap { padding: 56px 0 72px; }
.cg-content .nv-page-title-wrap { margin: 0; padding: 56px 0 0; }
.cg-content .nv-page-title-wrap + .nv-content-wrap { padding-top: 20px; }
.cg-content .nv-page-title { padding: 0; margin: 0; border: 0; }
.cg-content .nv-page-title h1, .cg-intro h1, .cg-legal-main h1 {
  margin: 0; font-family: var(--cg-font); font-size: 44px; line-height: 1.15; font-weight: 800; letter-spacing: -.5px; color: var(--cg-ink);
}
@media (max-width: 768px) {
  .cg-content .neve-main { font-size: 17px; }
  .cg-content .entry-content h2 { font-size: 24px; }
  .cg-content .entry-content h3 { font-size: 18px; }
  .cg-content .nv-content-wrap { padding: 32px 0 48px; }
  .cg-content .nv-page-title-wrap { padding-top: 32px; }
  .cg-content .nv-page-title-wrap + .nv-content-wrap { padding-top: 14px; }
  .cg-content .nv-page-title h1, .cg-intro h1, .cg-legal-main h1 { font-size: 30px; letter-spacing: -.3px; }
}
.cg-content .cg-d { display: inline; }
.cg-content .cg-m { display: none; }
@media (max-width: 768px) { .cg-content .cg-d { display: none; } .cg-content .cg-m { display: inline; } }

/* No breadcrumb line on the content pages (the mockups have none; Yoast keeps its schema). */
.cg-content .nv-page-title-wrap .nv-page-title > small, .cg-content .nv-page-title-wrap .yoast-breadcrumb, .cg-content .nv--yoast-breadcrumb { display: none; }

/* Sections: one column with a fixed rhythm between them */
.cg-content .entry-content > .cg-sec { display: flex; flex-direction: column; gap: 16px; }
.cg-content .entry-content > .cg-sec:has(.cg-grid) { gap: 20px; }
.cg-content .entry-content > .cg-sec + .cg-sec { margin-top: var(--cg-gap); }
.cg-content .entry-content > :where(.cg-sec, h2, [id]) { scroll-margin-top: 16px; }
.cg-content .entry-content .cg-sec :where(h2 + p) { margin-top: -12px; }
.cg-content .cg-lead { font-size: 20px; color: var(--cg-ink2); }
.cg-content .cg-note, .cg-content .cg-sec .cg-small { font-size: 16px; color: var(--cg-ink2); }
.cg-content .entry-content > .cg-who h2 + p, .cg-content .entry-content .cg-sec h2 + .cg-pull { margin-top: 0; }
@media (max-width: 768px) {
  .cg-content .entry-content > .cg-sec { gap: 12px; }
  .cg-content .entry-content .cg-sec :where(h2 + p) { margin-top: -4px; }
  .cg-content .cg-lead { font-size: 17px; }
}

/* Cards and grids */
.cg-content .cg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cg-content .cg-card, .cg-content .cg-wide, .cg-content .cg-sec .wp-block-table {
  background: var(--cg-card); border: 1px solid var(--cg-line); border-radius: 14px;
}
.cg-content .cg-card { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.cg-content .cg-card p { font-size: 16px; color: var(--cg-ink2); }
.cg-content .cg-wide { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 768px) {
  .cg-content .cg-grid { grid-template-columns: 1fr; gap: 12px; }
  .cg-content .cg-card, .cg-content .cg-wide, .cg-content .cg-sec .wp-block-table { border-radius: 12px; }
  .cg-content .cg-card { padding: 14px 16px; gap: 4px; }
  .cg-content .cg-wide { padding: 14px 12px; gap: 10px; }
}

/* Buttons and links: every one at least 44 px high */
.cg-content .cg-act { margin-top: 6px !important; }
.cg-content .cg-act a, .cg-content a.cg-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 8px;
  background: var(--cg-green); color: #fff !important; text-decoration: none; font-size: 16px; font-weight: 700; line-height: 1.2;
}
.cg-content .cg-act a:hover { background: var(--cg-green-dk); }
.cg-content .cg-act.cg-ghost a, .cg-content .cg-btn-line {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 8px;
  background: transparent; border: 1px solid var(--cg-green); color: var(--cg-green) !important; text-decoration: none;
  font: 700 16px/1.2 var(--cg-font); cursor: pointer;
}
.cg-content .cg-act.cg-ghost a:hover, .cg-content .cg-btn-line:hover { background: rgba(29,81,67,.07); }
.cg-content .cg-more a { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; font-weight: 700; }
.cg-content .cg-links { display: flex; flex-wrap: wrap; column-gap: 24px; font-weight: 700; }
.cg-content .cg-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* ─── Under the game ─── */
/* 1. H1, intro, jump links (printed by the [cribbage_game] shortcode under the table) */
.cg-intro { max-width: calc(var(--cg-col) + 2 * var(--cg-pad)); margin: 0 auto; padding: 56px var(--cg-pad) 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; font-family: var(--cg-font); }
.cg-intro p { margin: 0; font-size: 20px; line-height: 1.55; color: var(--cg-ink2); }
.cg-jump { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.cg-jump a {
  min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 0 18px; box-sizing: border-box;
  border: 1px solid var(--cg-green); border-radius: 999px; color: var(--cg-green) !important; text-decoration: none !important; font-size: 16px; font-weight: 600;
}
.cg-jump a:hover { background: rgba(29,81,67,.07); }
.cg-content .cg-intro + .container .nv-content-wrap { padding-top: var(--cg-gap); }
@media (max-width: 768px) {
  .cg-intro { padding-top: 32px; gap: 12px; }
  .cg-intro p { font-size: 17px; }
  .cg-jump a { font-size: 15px; }
}
@media (max-width: 600px) {
  .cg-jump { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cg-jump a { padding: 0 8px; }
}
/* The shortcode's own paragraph (style + script left behind after the frame moves) */
.cg-content .entry-content > p:first-child:not(:has(> :not(style, script))) { display: none; }

/* 2. Ways to play */
.cg-ways .cg-card .cg-act { margin-top: 6px; }
@media (max-width: 768px) {
  .cg-content .cg-ways { gap: 12px; }
  .cg-content .cg-ways .cg-card { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 0; align-items: center; }
  .cg-content .cg-ways .cg-card h3 { grid-column: 1; font-size: 17px; }
  .cg-content .cg-ways .cg-card p:not(.cg-act) { grid-column: 1; font-size: 15px; }
  .cg-content .cg-ways .cg-card .cg-act { grid-column: 2; grid-row: 1 / span 2; margin: 0 !important; }
  .cg-content .cg-ways .cg-card .cg-act a { padding: 0 14px; font-size: 15px; }
}

/* 3. How to play: numbered steps */
.cg-content .cg-steps { counter-reset: cg-step; }
.cg-content .cg-step { counter-increment: cg-step; }
.cg-content .cg-step::before {
  content: counter(cg-step); width: 34px; height: 34px; border-radius: 50%; background: var(--cg-green); color: #fff;
  font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; flex: none;
}
@media (max-width: 768px) {
  .cg-content .cg-step { display: grid; grid-template-columns: 32px 1fr; column-gap: 14px; row-gap: 2px; align-content: start; }
  .cg-content .cg-step::before { width: 32px; height: 32px; grid-row: 1 / span 9; }
  .cg-content .cg-step > * { grid-column: 2; }
}
/* Tables (deal, pegging points, scoring chart) */
.cg-content .cg-sec .wp-block-table { overflow-x: auto; }
.cg-content .cg-sec .wp-block-table table, .cg-content .cg-sec .wp-block-table tr { background: transparent; }
.cg-content .cg-sec .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.4; border: 0; }
.cg-content .cg-sec .wp-block-table :where(th, td) { padding: 11px 16px; border: 0; text-align: left; vertical-align: top; }
.cg-content .cg-sec .wp-block-table thead { border: 0; }
.cg-content .cg-sec .wp-block-table thead th { background: var(--cg-green); color: #fff; font-weight: 700; }
.cg-content .cg-sec .wp-block-table tbody tr { border-top: 1px solid var(--cg-line); }
.cg-content .cg-sec .wp-block-table tbody td:first-child { font-weight: 600; }
.cg-content .cg-chart tbody td:nth-child(2) { font-weight: 800; }
.cg-content .cg-sec .wp-block-table figcaption { margin: 0; padding: 10px 16px 12px; font-size: 16px; color: var(--cg-ink2); text-align: left; border-top: 1px solid var(--cg-line); }
.cg-content .cg-sec .wp-block-table thead th:first-child { border-top-left-radius: 13px; }
.cg-content .cg-sec .wp-block-table thead th:last-child { border-top-right-radius: 13px; }
@media (max-width: 768px) {
  .cg-content .cg-sec .wp-block-table table { font-size: 15px; }
  .cg-content .cg-sec .wp-block-table :where(th, td) { padding: 9px 10px; }
  .cg-content .cg-sec .wp-block-table figcaption { padding: 9px 10px 10px; font-size: 15px; }
  .cg-content .cg-sec .wp-block-table thead th:first-child { border-top-left-radius: 11px; }
  .cg-content .cg-sec .wp-block-table thead th:last-child { border-top-right-radius: 11px; }
}
.cg-content .cg-chart table { table-layout: auto; }
.cg-content .cg-chart td:nth-child(2), .cg-content .cg-chart th:nth-child(2) { white-space: nowrap; }

/* Pegging example: real card artwork with the running count under each card */
.cg-peg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; }
.cg-peg > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cg-peg .cg-who { font-size: 14px; font-weight: 700; }
.cg-peg .cg-who.you { color: var(--cg-red); }
.cg-peg .cg-who.bot { color: var(--cg-blue); }
.cg-peg img { width: 64px; height: auto; aspect-ratio: 184 / 252; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.18); display: block; }
.cg-peg .cg-run { font-size: 22px; font-weight: 800; line-height: 1.2; }
.cg-peg .cg-pts { font-size: 14px; line-height: 1.3; color: var(--cg-ink3); }
.cg-peg .cg-pts.won { font-weight: 700; color: var(--cg-green); }
@media (max-width: 768px) {
  .cg-peg { gap: 6px; }
  .cg-peg > div { gap: 4px; }
  .cg-peg .cg-who, .cg-peg .cg-pts { font-size: 13px; }
  .cg-peg img { width: 52px; }
  .cg-peg .cg-run { font-size: 20px; }
}

/* 4. Scoring chart: heading row with Print (desktop) / Save as image (phones) */
.cg-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cg-chart-save { display: none !important; width: 100%; min-height: 48px !important; }
@media (max-width: 768px), (pointer: coarse) {
  .cg-chart-print { display: none !important; }
  .cg-chart-save { display: flex !important; }
}

/* 5. Green band with a gold button (Daily Puzzle, About's "Ready to deal a hand") */
.cg-content .entry-content > .cg-band {
  text-align: left;
  background: var(--cg-green); border-radius: 16px; padding: 28px 32px; color: #fff;
  display: grid; grid-template-columns: 1fr auto; column-gap: 24px; row-gap: 4px; align-items: center;
}
.cg-content .cg-band h2 { color: #fff !important; font-size: 24px !important; grid-column: 1; }
.cg-content .cg-band p:not(.cg-act) { grid-column: 1; font-size: 17px; color: #DBE6E2; margin-top: 0 !important; }
.cg-content .cg-band .cg-act { grid-column: 2; grid-row: 1 / span 2; margin: 0 !important; }
.cg-content .cg-band .cg-act a { min-height: 48px; padding: 0 24px; border-radius: 10px; background: var(--cg-gold); color: var(--cg-gold-ink) !important; font-size: 17px; font-weight: 800; }
.cg-content .cg-band .cg-act a:hover { background: #F5C55C; }
@media (max-width: 768px) {
  .cg-content .entry-content > .cg-band { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 20px; border-radius: 14px; }
  .cg-content .cg-band h2 { font-size: 21px !important; line-height: 1.25; }
  .cg-content .cg-band p:not(.cg-act) { font-size: 16px; }
  .cg-content .cg-band .cg-act a { display: flex; justify-content: center; width: 100%; box-sizing: border-box; }
}

/* 6. Strategy: numbered tip cards */
.cg-content ol.cg-tips { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: cg-tip; }
.cg-content ol.cg-tips > li {
  counter-increment: cg-tip; background: var(--cg-card); border: 1px solid var(--cg-line); border-radius: 12px;
  padding: 16px 20px 16px 54px; position: relative; margin: 0;
}
.cg-content ol.cg-tips > li::before { content: counter(cg-tip); position: absolute; left: 20px; top: 14px; font-size: 24px; font-weight: 800; line-height: 1.2; color: var(--cg-green); }
@media (max-width: 768px) {
  .cg-content ol.cg-tips { gap: 10px; }
  .cg-content ol.cg-tips > li { padding: 12px 14px 12px 42px; font-size: 16px; }
  .cg-content ol.cg-tips > li::before { left: 14px; top: 11px; font-size: 21px; }
}

/* 7. Skunk board */
.cg-board { background: var(--cg-card); border: 1px solid var(--cg-line); border-radius: 12px; padding: 20px 24px 14px; display: flex; flex-direction: column; gap: 8px; }
.cg-board-bar { height: 16px; border-radius: 8px; background: #D9D2BD; position: relative; }
.cg-board-bar i { position: absolute; top: -4px; width: 3px; height: 24px; background: #8A5A12; }
.cg-board-bar i.end { right: 0; background: var(--cg-green); }
.cg-board-lbl { height: 22px; position: relative; font-size: 14px; font-weight: 700; color: var(--cg-ink2); white-space: nowrap; line-height: 22px; }
.cg-board-lbl > span { position: absolute; transform: translateX(-50%); }
.cg-board-lbl > span.end { right: 0; transform: none; }
@media (max-width: 768px) {
  .cg-board { padding: 18px 14px 10px; }
  .cg-board-bar { height: 14px; }
  .cg-board-bar i { height: 22px; }
  .cg-board-lbl { font-size: 13px; height: 20px; line-height: 20px; }
}

/* 8. FAQ: <details>, first one open (rendered from the Yoast FAQ block) */
.cg-faq { display: flex; flex-direction: column; gap: 12px; }
.cg-faq-item { background: var(--cg-card); border: 1px solid var(--cg-line); border-radius: 12px; padding: 4px 20px; }
.cg-faq-item summary {
  min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 700; cursor: pointer; list-style: none; padding: 6px 0; box-sizing: border-box;
}
.cg-faq-item summary::-webkit-details-marker { display: none; }
.cg-faq-item summary::after {
  content: ""; flex: none; width: 10px; height: 10px; border-right: 2.5px solid var(--cg-green); border-bottom: 2.5px solid var(--cg-green);
  transform: rotate(45deg) translateY(-3px); transition: transform .15s;
}
.cg-faq-item[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.cg-faq-a { color: var(--cg-ink2); padding: 0 0 14px; }
.cg-faq-a p { margin: 0 !important; }
.cg-faq-a p + p { margin-top: 8px !important; }
@media (max-width: 768px) {
  .cg-faq { gap: 10px; }
  .cg-faq-item { padding: 2px 14px; }
  .cg-faq-item summary, .cg-faq-a { font-size: 16px; }
  .cg-faq-a { padding-bottom: 12px; }
}

/* 9. Who runs Cribbage.com */
.cg-content .entry-content > .cg-who { border-top: 2px solid var(--cg-green); padding-top: 20px; gap: 6px; font-size: 16px; color: var(--cg-ink2); }
.cg-content .cg-who h2 { font-size: 20px !important; }
.cg-content .cg-who .cg-more a { font-size: 16px; }
@media (max-width: 768px) {
  .cg-content .entry-content > .cg-who { padding-top: 16px; gap: 4px; font-size: 15px; }
  .cg-content .cg-who h2 { font-size: 18px !important; }
}

/* 10. Back to the table */
.cg-content .cg-back { display: flex; justify-content: center; margin-top: 48px !important; }
.cg-content .cg-back a {
  min-height: 52px; display: inline-flex; align-items: center; gap: 10px; padding: 0 28px; border-radius: 10px;
  background: var(--cg-green); color: #fff !important; text-decoration: none; font-size: 18px; font-weight: 700;
}
.cg-content .cg-back a::before {
  content: ""; width: 18px; height: 18px; flex: none; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 15V3M4 8l5-5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 15V3M4 8l5-5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cg-content .cg-back a:hover { background: var(--cg-green-dk); }
@media (max-width: 768px) {
  .cg-content .cg-back { margin-top: 44px !important; }
  .cg-content .cg-back a { width: 100%; justify-content: center; font-size: 17px; }
}

/* ─── About ─── */
.cg-content .cg-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cg-content .cg-fact { background: var(--cg-card); border: 1px solid var(--cg-line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.cg-content .cg-fact .cg-fact-n { font-size: 28px; font-weight: 800; line-height: 1.3; color: var(--cg-green); }
.cg-content .cg-fact p:not(.cg-fact-n) { font-size: 15px; line-height: 1.35; color: var(--cg-ink2); }
.cg-content .cg-person { flex-direction: row; gap: 16px; align-items: flex-start; }
.cg-content .cg-person img, .cg-content .cg-person .wp-block-image { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0; }
.cg-content .cg-person .cg-role { font-size: 15px; font-weight: 600; color: var(--cg-green); }
.cg-content .cg-pull { font-size: 22px; line-height: 1.5; font-weight: 500; border-left: 4px solid var(--cg-green); padding-left: 20px; color: var(--cg-ink); }
.cg-content ul.cg-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cg-content ul.cg-ticks > li { display: flex; gap: 12px; margin: 0; }
.cg-content ul.cg-ticks > li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 4px; background: var(--cg-green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 7l3.5 3.5L12 4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 7l3.5 3.5L12 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cg-content .cg-contact .cg-act { margin-top: 4px !important; }
.cg-content .cg-updated { font-size: 15px; color: var(--cg-ink3); }
@media (max-width: 768px) {
  .cg-content .cg-facts { gap: 8px; }
  .cg-content .cg-fact { padding: 10px; border-radius: 10px; }
  .cg-content .cg-fact .cg-fact-n { font-size: 22px; }
  .cg-content .cg-fact p:not(.cg-fact-n) { font-size: 13px; line-height: 1.3; }
  .cg-content .cg-person { gap: 14px; }
  .cg-content .cg-person img, .cg-content .cg-person .wp-block-image { width: 52px; height: 52px; }
  .cg-content .cg-pull { font-size: 19px; padding-left: 14px; }
  .cg-content ul.cg-ticks { gap: 8px; font-size: 16px; }
  .cg-content ul.cg-ticks > li { gap: 10px; }
  .cg-content ul.cg-ticks > li::before { width: 20px; height: 20px; margin-top: 3px; }
  .cg-content .cg-contact .cg-act a { display: flex; justify-content: center; }
  .cg-content .cg-updated { font-size: 15px; }
}

/* Company panel ([cribbage_company]) */
.cg-company { background: var(--cg-tint); border-radius: 14px; padding: 20px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 16px; line-height: 1.5; color: var(--cg-ink); }
.cg-company > div { display: flex; flex-direction: column; }
.cg-company .cg-k { font-size: 15px; font-weight: 700; color: var(--cg-ink3); }
.cg-company .cg-btn-line { justify-self: start; }
.cg-legal-main .cg-company { background: var(--cg-card); border: 1px solid var(--cg-line); }
@media (max-width: 768px) {
  .cg-company { grid-template-columns: 1fr; gap: 10px; padding: 14px 16px; border-radius: 12px; }
  .cg-company .cg-btn-line { justify-self: stretch; }
}

/* ─── Legal template (page-legal.php) ─── */
.cg-legal { max-width: 980px; margin: 0 auto; padding: 56px 0 72px; display: flex; gap: 60px; align-items: flex-start; font-family: var(--cg-font); color: var(--cg-ink); }
.cg-legal-side { width: 240px; flex: none; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.admin-bar .cg-legal-side { top: 56px; }
/* Neve's .wrapper has overflow: hidden, which stops position: sticky; clip keeps the same
   look without creating a scroll container. */
body.cg-legal-page > .wrapper:not(.et-fb-iframe-ancestor) { overflow: clip; }
.cg-legal-main { width: 680px; min-width: 0; font-size: 17px; line-height: 1.6; display: flex; flex-direction: column; gap: 12px; }
.cg-legal-main > * { margin: 0 !important; }
.cg-legal-main h1 { margin-bottom: 0 !important; letter-spacing: -.5px !important; }
.cg-legal-main hr { border: 0; border-top: 1px solid var(--cg-line); height: 0; background: none; margin: 16px 0 !important; }
.cg-legal-main h2 { font-size: 26px !important; line-height: 1.25; margin-top: 28px !important; scroll-margin-top: 16px; }
.cg-legal-main h3 { font-size: 20px !important; margin-top: 8px !important; }
.cg-legal-main ul, .cg-legal-main ol { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.cg-legal-main ul { list-style: disc outside; }
.cg-legal-main ol { list-style: decimal outside; }
.cg-legal-main li { margin: 0; display: list-item; padding-left: 2px; }
.cg-legal-metarow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cg-legal-main .cg-legal-meta, .cg-legal-main .cg-legal-change { font-size: 16px; color: var(--cg-ink2); }
.cg-legal-main .cg-legal-change { font-size: 15px; margin-top: -4px !important; }
.cg-legal-main .cg-short { background: var(--cg-tint); border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; margin-top: 16px !important; }
.cg-legal-main .cg-short h2 { font-size: 22px !important; margin: 0 !important; }
.cg-legal-main .cg-short p { font-size: 15px; color: var(--cg-ink2); }
.cg-toc { display: flex; flex-direction: column; font-size: 15px; }
.cg-toc-h { font-size: 15px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--cg-ink3); padding-bottom: 6px; }
.cg-toc a { min-height: 44px; text-decoration: none; display: flex; align-items: center; color: var(--cg-green); line-height: 1.3; padding: 10px 0; box-sizing: border-box; }
.cg-toc a.is-current { font-weight: 700; }
.cg-toc-inline, .cg-toc-back { display: none !important; }
.cg-related { border-top: 2px solid var(--cg-green); padding-top: 16px; margin-top: 28px !important; display: flex; flex-wrap: wrap; column-gap: 28px; font-weight: 700; }
.cg-related a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 1040px) {
  .cg-legal { padding-left: var(--cg-pad); padding-right: var(--cg-pad); gap: 40px; }
  .cg-legal-side { width: 220px; }
}
@media (max-width: 860px) {
  .cg-legal { display: block; max-width: calc(680px + 2 * var(--cg-pad)); padding-top: 32px; padding-bottom: 48px; }
  .cg-legal-side { display: none; }
  .cg-legal-main { width: auto; gap: 8px; }
  .cg-legal-main h2 { font-size: 22px !important; margin-top: 24px !important; }
  .cg-legal-main .cg-short { padding: 16px; border-radius: 12px; margin-top: 16px !important; }
  .cg-legal-main .cg-short h2 { font-size: 20px !important; }
  .cg-legal-main .cg-short ul { font-size: 16px; }
  .cg-toc-inline { display: flex !important; background: var(--cg-card); border: 1px solid var(--cg-line); border-radius: 12px; padding: 12px 16px; font-size: 16px; margin-top: 16px !important; }
  .cg-toc-inline .cg-toc-h { padding: 4px 0; }
  .cg-toc-inline a { min-height: 44px; border-top: 1px solid var(--cg-line); }
  .cg-toc-back { display: block !important; }
  .cg-toc-back a { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; }
  .cg-related { flex-direction: column; padding-top: 8px; }
}
@media (max-width: 480px) {
  .cg-legal-metarow { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cg-legal-main .cg-print-page { display: none; }
}

/* ─── Site footer (inc/site-footer.php) ─── */
.cf-foot { background: var(--cg-foot); color: #DBE6E2; padding: 40px var(--cg-pad); font-family: var(--cg-font); }
.cf-inner { max-width: var(--cg-col); margin: 0 auto; }
.cg-legal-page .cf-inner { max-width: 980px; }
.cf-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; font-size: 16px; }
.cf-col { display: flex; flex-direction: column; }
.cf-h { font-weight: 800; color: #fff; padding-bottom: 2px; }
.cf-col a { min-height: 44px; display: flex; align-items: center; color: #DBE6E2 !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(219,230,226,.45); }
.cf-col a:hover { color: #fff !important; text-decoration-color: #fff; }
.cf-col a:focus-visible { outline: 2px solid var(--cg-gold); outline-offset: 2px; }
.cf-copy { margin: 28px 0 0; font-size: 15px; color: #C5D3CE; }
@media (max-width: 768px) {
  .cf-foot { padding: 28px var(--cg-pad); }
  .cf-cols { grid-template-columns: 1fr 1fr; gap: 20px 16px; font-size: 15px; }
  .cf-copy { margin-top: 20px; }
}

/* ─── Print ─── */
@media print {
  .header, .ch-bar, .ch-drawer, .cf-foot, #wpadminbar, .gameiframe_parent, .cg-legal-side, .cg-toc-inline, .cg-toc-back,
  .cg-print-page, .cg-related, .cg-chart-print, .cg-chart-save { display: none !important; }
  body.cg-content, .cg-content .wrapper, .cg-content .neve-main { background: #fff !important; }
  .cg-content .cg-sec .wp-block-table thead th { background: none !important; color: #1B2422 !important; border-bottom: 2px solid #1B2422; }
  .cg-legal { display: block; padding: 0; max-width: none; }
  .cg-legal-main { width: auto; font-size: 12pt; }
  .cg-legal-main a { color: inherit; text-decoration: none; }
  .cg-legal-main h2 { break-after: avoid; }
  /* "Print the chart": only the chart (the rest is taken out, so no blank pages follow) */
  html.cg-print-chart .cg-intro, html.cg-print-chart .entry-content > :not(#chart) { display: none !important; }
  html.cg-print-chart .cg-content .nv-content-wrap, html.cg-print-chart .cg-content .neve-main, html.cg-print-chart .single-page-container { padding-top: 0 !important; margin-top: 0 !important; }
  html.cg-print-chart #chart { break-inside: avoid; }
}

/* Neve's "scroll to top" button (all pages): site palette and a 44 px target. */
.scroll-to-top { width: 44px !important; height: 44px !important; border-radius: 10px !important; background: var(--cg-green) !important; color: #fff !important; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.scroll-to-top:hover { background: var(--cg-green-dk) !important; }
.scroll-to-top svg, .scroll-to-top .scroll-to-top-icon { fill: #fff !important; color: #fff !important; }
@media (max-width: 768px) { .scroll-to-top { bottom: 16px !important; } }

/* Phones: the 14 px tab under the table (table brief 2026-11-17 "tab shrunk"): cream, rounded
   on top, on the table green, with a handle bar; it links to the rules below. */
.cg-tab { display: none; }
@media (max-width: 768px) {
  .cg-tab { display: block; height: 14px; background: #1D5143; position: relative; text-decoration: none; }
  .cg-tab::before { content: ""; position: absolute; inset: 0; background: #f7f3e8; border-radius: 12px 12px 0 0; box-shadow: 0 -3px 10px rgba(0,0,0,.25); }
  .cg-tab span { position: absolute; left: 50%; top: 5px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #a39c88; }
  .cg-tab::after { content: ""; position: absolute; left: 30%; right: 30%; top: 0; height: 44px; }   /* 44 px tap area, below the tab (never over the game) */
  .cg-tab:focus-visible { outline: 2px solid var(--cg-gold); outline-offset: -2px; }
}
