/*
 * Chancepedia main stylesheet.
 * Tokens follow the final theme (version 5). Logical properties are used
 * throughout so the same file works for right-to-left languages.
 */

/* ---------- Tokens ---------- */
:root {
	--paper: #F5F7FA;
	--stock: #EEF1F6;
	--surface: #FFFFFF;
	--ink: #16203A;
	--muted: #525C72;
	--line: #D6DCE6;
	--line-strong: #7A849A;
	--games: #B4232F;
	--games-t: #F8E3E5;
	--bet: #23408E;
	--bet-t: #E4E9F5;
	--plat: #8F5A06;
	--plat-t: #FCEFD2;
	--know: #0E6B5E;
	--know-t: #DDF0EC;
	--turmeric: #F2B33D;
	--on-turmeric: #16203A;
	--focus: #23408E;
	--on-ink: #FFFFFF;
	--band: #16203A;
	--band-text: #EDEFF5;
	--band-muted: #AEB6C8;
	--band-line: #2A3452;
	--font-head: "Rozha One", Georgia, serif;
	--font-body: "Anek Latin", system-ui, -apple-system, "Segoe UI", sans-serif;
	--radius: 10px;
	--wrap: 1180px;
	--gutter: 32px;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--paper: #10162A;
	--stock: #18203A;
	--surface: #161D33;
	--ink: #EDEFF5;
	--muted: #AEB6C8;
	--line: #2A3452;
	--line-strong: #6B779C;
	--games: #FF8A93;
	--games-t: #3A1C24;
	--bet: #9DB4F2;
	--bet-t: #1E2A4E;
	--plat: #F2B33D;
	--plat-t: #3A2C10;
	--know: #6FD3BF;
	--know-t: #14332E;
	--focus: #9DB4F2;
	--on-ink: #10162A;
	--band: #0B1020;
	color-scheme: dark;
}
/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	font-variant-numeric: tabular-nums;
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--bet); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--turmeric); text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button { font: inherit; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.cp-skip {
	position: absolute; inset-inline-start: 12px; top: -60px; z-index: 1000;
	background: var(--turmeric); color: var(--on-turmeric); padding: 10px 16px;
	border-radius: 6px; font-weight: 700; text-decoration: none;
}
.cp-skip:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Type ---------- */
.cp-h1, .cp-prose h1 { font-family: var(--font-head); font-weight: 400; font-size: clamp(34px, 5vw, 48px); line-height: 1.08; margin: 0; }
.cp-h2, .cp-prose h2 { font-family: var(--font-head); font-weight: 400; font-size: clamp(26px, 3.4vw, 31px); line-height: 1.15; margin: 0; }
.cp-h3, .cp-prose h3 { font-stretch: 92%; font-weight: 650; font-size: 20px; line-height: 1.28; margin: 0; }
.cp-lede { font-size: 20px; line-height: 1.5; color: var(--muted); margin: 16px 0 0; max-width: 68ch; }
.cp-small { font-size: 15px; line-height: 1.45; color: var(--muted); margin: 0; }
.cp-label { display: block; font-size: 15px; font-weight: 620; margin-bottom: 6px; }

/* ---------- Layout ---------- */
.cp-wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.cp-main { display: block; padding-block: 40px 56px; }
.cp-main:focus { outline: none; }
.cp-main--post { background: var(--surface); }
.cp-main--builder { padding: 0; }
.cp-layout {
	max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter);
	display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start;
}
.cp-layout__main { flex: 999 1 620px; min-width: 0; max-width: 760px; }
.cp-rail { flex: 1 1 280px; max-width: 300px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 18px; }
.cp-grid { display: grid; gap: 24px; }
.cp-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
@media (max-width: 1023px) {
	.cp-rail { position: static; max-width: none; flex-basis: 100%; }
	.cp-rail .cp-toc { display: none; }
	.cp-layout { gap: 36px; }
}
@media (max-width: 600px) {
	:root { --gutter: 16px; }
	.cp-main { padding-block: 24px 40px; }
}

/* ---------- Header ---------- */
.cp-topbar { background: var(--band); color: var(--band-text); font-size: 14px; }
.cp-topbar__in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; flex-wrap: wrap; }
.cp-topbar__notice { margin: 0; padding-block: 6px; }
.cp-topbar__tools { display: flex; gap: 20px; align-items: center; }
.cp-topbar__help { color: var(--turmeric); font-weight: 650; }
.cp-topbar__help:hover { color: var(--turmeric); }
.cp-topbar__btn { background: none; border: 0; color: var(--band-text); min-height: 38px; cursor: pointer; padding: 0; }
.cp-header { background: var(--surface); position: relative; z-index: 50; border-bottom: 1px solid var(--line); }
.cp-header__main { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; }
.cp-header__actions { display: flex; gap: 8px; align-items: center; }
.cp-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.cp-brand:hover { text-decoration: none; }
.cp-brand__name { font-family: var(--font-head); font-size: 28px; line-height: 1; margin: 0; font-weight: 400; }
.custom-logo-link img { max-height: 48px; width: auto; display: block; }
.cp-mark { display: inline-flex; align-items: center; justify-content: center; background: #F2B33D; border: 1.5px solid #16203A; border-radius: 4px; flex: none; }
.cp-mark svg { width: 70%; display: block; }
.cp-mark--sm { width: 22px; height: 30px; }
.cp-mark--md { width: 30px; height: 40px; }
.cp-mark--lg { width: 36px; height: 48px; }

.cp-nav__list { list-style: none; margin: 0; padding: 0; }
.cp-nav--desktop .cp-nav__list { display: flex; gap: 2px; }
.cp-nav__link, .cp-nav__toggle {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px;
	color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 600; font-stretch: 92%;
	background: none; border: 0; cursor: pointer; border-radius: 6px;
}
.cp-nav__link:hover, .cp-nav__toggle:hover { text-decoration: none; background: var(--stock); }
.cp-nav__item.is-current > .cp-nav__link, .cp-nav__item.is-current > .cp-nav__toggle { box-shadow: inset 0 -3px 0 var(--turmeric); }
.cp-nav__chev { width: 8px; height: 8px; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.cp-nav__toggle[aria-expanded="true"] .cp-nav__chev { transform: rotate(-135deg) translateY(-1px); }
.cp-nav--desktop .cp-mega {
	position: absolute; inset-inline: 0; top: 100%; background: var(--surface);
	border-top: 1px solid var(--line); border-bottom: 2px solid var(--ink); box-shadow: 0 18px 30px rgba(22, 32, 58, .08);
}
.cp-mega__inner { max-width: var(--wrap); margin-inline: auto; padding: 24px var(--gutter) 28px; }
.cp-mega__cols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.cp-mega__head { display: block; font-weight: 700; color: var(--ink); text-decoration: none; padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 6px; }
.cp-mega__col ul { list-style: none; margin: 0; padding: 0; }
.cp-mega__col li a { display: block; padding: 6px 0; color: var(--ink); text-decoration: none; font-size: 15px; }
.cp-mega__col li a:hover { text-decoration: underline; }
.cp-mega__all { display: inline-block; margin-top: 18px; font-weight: 650; }
.cp-menu-btn { display: none; }
.cp-search { border-top: 1px solid var(--line); background: var(--surface); padding-block: 16px; }
.cp-drawer { border-top: 1px solid var(--line); background: var(--surface); max-height: calc(100vh - 110px); overflow-y: auto; }
.cp-nav--mobile .cp-nav__item { border-bottom: 1px solid var(--line); }
.cp-nav--mobile .cp-nav__link, .cp-nav--mobile .cp-nav__toggle { width: 100%; justify-content: space-between; padding-inline: var(--gutter); min-height: 52px; border-radius: 0; }
.cp-nav--mobile .cp-mega__inner { padding: 4px var(--gutter) 16px; }
.cp-nav--mobile .cp-mega__cols { grid-template-columns: 1fr; gap: 14px; }
.cp-menu-empty { margin: 0; font-size: 14px; }
@media (max-width: 1099px) {
	.cp-nav--desktop { display: none; }
	.cp-menu-btn { display: inline-flex; }
	.cp-header__main { min-height: 60px; }
	.cp-brand__name { font-size: 24px; }
}
@media (min-width: 1100px) {
	.cp-drawer { display: none !important; }
}
@media (max-width: 600px) {
	.cp-topbar__notice { font-size: 13px; }
	.cp-header__actions .cp-btn { padding-inline: 12px; }
}

/* ---------- Buttons, tags, cards ---------- */
.cp-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px;
	border-radius: 6px; background: var(--ink); color: var(--on-ink); border: 0; font-size: 16px; font-weight: 640;
	font-stretch: 92%; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center;
}
.cp-btn:hover { text-decoration: none; color: var(--on-ink); filter: brightness(1.12); }
.cp-btn--sm { min-height: 44px; padding: 0 16px; }
.cp-btn--block { width: 100%; }
.cp-btn--sec { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cp-btn--sec:hover { color: var(--ink); background: var(--stock); filter: none; }
.cp-btn--hi { background: var(--turmeric); color: var(--on-turmeric); box-shadow: inset 0 0 0 1px var(--on-turmeric); }
.cp-btn--hi:hover { color: var(--on-turmeric); }
.cp-btn--ink { background: #16203A; color: #fff; }
.cp-btn--ink:hover { color: #fff; }
.cp-btn--outline-ink { background: transparent; color: #16203A; box-shadow: inset 0 0 0 1.5px #16203A; }
.cp-btn--outline-ink:hover { color: #16203A; }
.cp-tag {
	display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 9px; border-radius: 4px;
	font-size: 14px; font-weight: 600; font-stretch: 92%; background: var(--games-t); color: var(--ink); text-decoration: none;
}
.cp-tag:hover { text-decoration: underline; }
.cp-tag i { width: 9px; height: 9px; background: var(--games); display: inline-block; }
.cp-tag--bet { background: var(--bet-t); } .cp-tag--bet i { background: var(--bet); }
.cp-tag--plat { background: var(--plat-t); } .cp-tag--plat i { background: var(--plat); }
.cp-tag--know { background: var(--know-t); } .cp-tag--know i { background: var(--know); }
.cp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.cp-postcard { display: flex; flex-direction: column; gap: 10px; }
.cp-postcard__media img { border-radius: 8px; display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.cp-postcard__title a { color: var(--ink); text-decoration: none; }
.cp-postcard__title a:hover { text-decoration: underline; }
.cp-input {
	min-height: 46px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--surface);
	padding: 0 14px; font: inherit; font-size: 17px; color: var(--ink); width: 100%;
}
.cp-searchform__row { display: flex; gap: 8px; }
.cp-searchform { max-width: 640px; }
.cp-empty { padding: 32px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.cp-page__head { margin-bottom: 28px; display: grid; gap: 14px; }
.cp-page { max-width: 820px; }
.cp-404 { max-width: 760px; display: grid; gap: 18px; }
.cp-404__code { font-family: var(--font-head); font-size: 96px; line-height: 1; margin: 0; color: var(--turmeric); -webkit-text-stroke: 1px var(--on-turmeric); }

/* ---------- Post ---------- */
.cp-progress { position: sticky; top: 0; z-index: 40; height: 4px; background: var(--line); }
.cp-progress__bar { height: 4px; width: 0; background: var(--turmeric); border-inline-end: 2px solid var(--on-turmeric); }
.cp-crumbs { font-size: 15px; margin-bottom: 18px; }
.cp-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cp-crumbs li + li::before { content: "/"; color: var(--muted); margin-inline-end: 6px; }
.cp-crumbs a { color: var(--muted); }
.cp-article__title { margin-top: 14px; }
.cp-byline { font-size: 15px; color: var(--muted); margin: 16px 0 0; }
.cp-article__media { margin: 26px 0 0; }
.cp-article__media img { display: block; width: 100%; border-radius: 8px; }
.cp-article__media figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.cp-usestrip { margin-top: 22px; }
.cp-usestrip__title { font-weight: 650; font-stretch: 92%; font-size: 16px; margin: 0 0 8px; }
.cp-usestrip__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cp-takeaways { margin-top: 26px; background: var(--stock); border-radius: var(--radius); padding: 18px 20px; border-inline-start: 4px solid var(--ink); }
.cp-takeaways__title { font-weight: 700; margin: 0 0 6px; }
.cp-takeaways ul { margin: 0; padding-inline-start: 20px; }
.cp-edgebox { margin-top: 20px; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 16px 20px; background: var(--surface); }
.cp-edgebox__title { font-weight: 700; margin: 0 0 4px; }
.cp-edge { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 70px; gap: 14px; align-items: center; padding: 9px 0; }
.cp-edge__track { height: 12px; background: var(--stock); border: 1px solid var(--line-strong); border-radius: 2px; position: relative; display: block; }
.cp-edge__track b { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; background: var(--turmeric); border: 1px solid var(--on-turmeric); border-inline-end-width: 2px; min-width: 4px; }
.cp-edge__value { text-align: end; font-weight: 680; font-stretch: 90%; }
.cp-edgebox__facts { margin: 6px 0 0; display: grid; gap: 6px; }
.cp-edgebox__facts div { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 14px; }
.cp-edgebox__facts dt { color: var(--muted); }
.cp-edgebox__facts dd { margin: 0; font-weight: 600; }

.cp-prose { max-width: 68ch; font-size: 18px; line-height: 1.6; margin-top: 26px; }
.cp-prose > * { margin-block: 0 1em; }
.cp-prose h2 { margin-block: 1.8em 0.6em; }
.cp-prose h3 { margin-block: 1.4em 0.5em; }
.cp-prose > h2:first-child { margin-top: 0; }
.cp-prose ul, .cp-prose ol { padding-inline-start: 24px; }
.cp-prose li { margin-bottom: 0.3em; }
.cp-prose blockquote { margin-inline: 0; padding-inline-start: 18px; border-inline-start: 4px solid var(--turmeric); font-size: 20px; }
.cp-prose img { border-radius: 8px; }
.cp-prose figcaption, .cp-prose .wp-element-caption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.cp-prose .wp-block-image { margin-block: 24px; }

/* Core Table block, plain HTML tables */
.cp-prose .wp-block-table, .cp-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-block: 16px 20px; }
.cp-prose .wp-block-table table, .cp-table table { border-collapse: collapse; width: 100%; font-size: 16px; }
.cp-prose .wp-block-table th, .cp-table th { text-align: start; font-weight: 680; font-stretch: 90%; padding: 10px 14px; border: 0; border-bottom: 2px solid var(--ink); background: var(--surface); }
.cp-prose .wp-block-table td, .cp-table td { padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); }
.cp-prose .wp-block-table tr:last-child td { border-bottom: 0; }
.cp-prose .wp-block-table th:first-child, .cp-prose .wp-block-table td:first-child { position: sticky; inset-inline-start: 0; background: var(--surface); }
.cp-prose .wp-block-table figcaption { padding: 8px 14px; margin: 0; }

/* Notes and patterns */
.cp-note { border-radius: 8px; padding: 16px 18px; margin-block: 22px; position: relative; padding-inline-start: 58px; }
.cp-note::before {
	content: ""; position: absolute; inset-inline-start: 18px; top: 18px; width: 24px; height: 24px; border-radius: 50%; background: var(--know);
}
.cp-note > p, .cp-note p { margin: 0 0 6px; }
.cp-note > *:last-child { margin-bottom: 0; }
.cp-note__title { font-weight: 700; }
.cp-note--tip { background: var(--know-t); }
.cp-note--warn { background: var(--games-t); }
.cp-note--warn::before { background: var(--games); border-radius: 4px; transform: rotate(45deg); width: 20px; height: 20px; inset-inline-start: 20px; top: 20px; }
.cp-note--ex { background: var(--plat-t); }
.cp-note--ex::before { background: var(--turmeric); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--on-turmeric); }
aside.cp-note, div.cp-note.cp-note--tip[role="note"] { display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; padding-inline-start: 18px; }
aside.cp-note::before, div.cp-note[role="note"]::before { display: none; }
.cp-glyph { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #fff; background: var(--know); }
.cp-note--warn .cp-glyph { background: var(--games); border-radius: 4px; transform: rotate(45deg); }
.cp-note--warn .cp-glyph span { transform: rotate(-45deg); }
:root[data-theme="dark"] .cp-glyph { color: #10162A; }
.cp-mythfact, .cp-proscons { gap: 16px !important; margin-block: 22px; }
.cp-mythfact__myth { background: var(--games-t); border-radius: 8px; padding: 16px 18px; }
.cp-mythfact__fact { background: var(--know-t); border-radius: 8px; padding: 16px 18px; }
.cp-proscons > .wp-block-column { background: var(--stock); border-radius: 8px; padding: 16px 18px; }
.cp-proscons > .wp-block-column > * { margin: 0 0 6px; }
.cp-steps { list-style: none; counter-reset: cp-step; padding-inline-start: 0 !important; }
.cp-steps > li { counter-increment: cp-step; position: relative; padding-inline-start: 52px; min-height: 38px; margin-bottom: 12px; }
.cp-steps > li::before {
	content: counter(cp-step); position: absolute; inset-inline-start: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%;
	background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* Section links on long posts */
.cp-secnav { display: flex; justify-content: space-between; gap: 12px; margin: 26px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; }
.cp-secnav a:last-child { text-align: end; }

/* Rail */
.cp-rail__title { font-stretch: 92%; font-weight: 650; font-size: 17px; line-height: 1.28; margin: 0; }
.cp-toc { border-top: 2px solid var(--ink); padding-top: 10px; }
.cp-toc ol { list-style: none; margin: 6px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.cp-toc a { display: block; padding: 7px 10px; border-inline-start: 3px solid transparent; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35; }
.cp-toc a:hover { background: var(--stock); }
.cp-toc a[aria-current] { border-inline-start-color: var(--bet); color: var(--bet); font-weight: 700; background: var(--bet-t); }
.cp-more .cp-rail__title { border-top: 2px solid var(--ink); padding-top: 10px; }
.cp-more ul { list-style: none; margin: 4px 0 0; padding: 0; }
.cp-more li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.cp-more a { color: var(--ink); font-size: 15px; text-decoration: none; }
.cp-more a:hover { text-decoration: underline; }
.cp-railcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; }
.cp-railcard--help { background: var(--plat-t); border: 0; }
.cp-railcard--help .cp-small { color: var(--ink); }

/* Mobile section bar and sheet */
.cp-secbar { display: none; }
@media (max-width: 1023px) {
	.cp-secbar { display: block; position: sticky; top: 4px; z-index: 39; background: var(--surface); border-bottom: 1px solid var(--line); }
	.cp-secbar__btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 0 var(--gutter); background: none; border: 0; color: var(--ink); font-weight: 650; font-size: 15px; text-align: start; cursor: pointer; }
	.cp-secbar__btn span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.cp-secbar__icon { width: 18px; height: 12px; flex: none; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
	.cp-secbar__icon::after { content: ""; position: absolute; inset-inline: 0; top: 3px; border-top: 2px solid currentColor; }
}
.cp-sheet { position: fixed; inset: 0; z-index: 200; background: rgba(16, 22, 42, .55); display: flex; align-items: flex-end; }
.cp-sheet[hidden] { display: none; }
.cp-sheet__panel { background: var(--surface); width: 100%; max-height: 80vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 18px var(--gutter) 28px; }
.cp-sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cp-sheet .cp-toc { border-top: 0; padding-top: 0; }
.cp-sheet .cp-toc ol { max-height: none; }
.cp-sheet .cp-toc a { min-height: 44px; display: flex; align-items: center; }

/* FAQ */
.cp-faq { margin-top: 32px; }
.cp-faq .cp-h2 { margin-bottom: 8px; }
.cp-faq__item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.cp-faq__item summary { cursor: pointer; font-weight: 650; font-stretch: 92%; font-size: 18px; min-height: 28px; }
.cp-faq__a { margin-top: 8px; }
.cp-faq__a p { margin: 0 0 8px; }

/* Editorial box */
.cp-ed { margin-top: 36px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.cp-ed__head { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cp-ed__title { margin: 0; font-weight: 700; font-size: 18px; }
.cp-ed__line { margin: 2px 0 0; font-size: 15px; }
.cp-ed__body { padding: 16px 20px; display: grid; gap: 14px; }
.cp-ed__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-ed__chips:empty { display: none; }
.cp-ed__extra { margin: 0; font-size: 15px; }
.cp-ed__fold summary { cursor: pointer; font-weight: 650; }
.cp-ed__links { margin: 0; font-size: 15px; }
.cp-ed__links span { color: var(--muted); margin-inline: 4px; }
.cp-chipr { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 4px; background: var(--know-t); font-size: 14px; font-weight: 600; }
.cp-chipr--plain { background: var(--stock); }
.cp-srcs { margin: 6px 0 0; padding-inline-start: 22px; font-size: 15px; line-height: 1.55; }
.cp-srcs--plain { list-style: none; padding-inline-start: 0; }
.cp-variant-safety .cp-prose { font-size: 19px; }

/* Previous and next */
.cp-prevnext { background: var(--paper); border-top: 1px solid var(--line); }
.cp-prevnext__in { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-block: 28px; }
.cp-prevnext__link { text-decoration: none; color: var(--ink); display: grid; gap: 4px; }
.cp-prevnext__link:hover { border-color: var(--ink); text-decoration: none; }
.cp-prevnext__link--next { text-align: end; }
@media (max-width: 600px) { .cp-prevnext__in { grid-template-columns: 1fr; } }

/* Back to top */
.cp-totop {
	position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60; min-height: 44px; padding: 0 14px;
	border-radius: 6px; background: var(--ink); color: var(--on-ink); font-weight: 640; font-size: 15px; border: 0; cursor: pointer;
}
.cp-totop[hidden] { display: none; }

/* ---------- Footer ---------- */
.cp-helpstrip { background: #F2B33D; color: #16203A; }
.cp-helpstrip__in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-block: 28px; }
.cp-helpstrip__title { font-family: var(--font-head); font-size: clamp(24px, 3vw, 30px); line-height: 1.1; margin: 0; }
.cp-helpstrip__text { margin: 6px 0 0; font-size: 16px; font-weight: 550; }
.cp-helpstrip__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.cp-helpstrip a:focus-visible { outline-color: #16203A; }
.cp-footer__main { background: var(--band); color: var(--band-text); }
.cp-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px; padding-block: 40px 28px; font-size: 15px; }
.cp-footer__about { grid-column: span 2; max-width: 360px; }
@media (max-width: 600px) { .cp-footer__about { grid-column: auto; } }
.cp-footer .cp-brand { color: #fff; margin-bottom: 10px; }
.cp-footer .cp-mark { border-color: #F2B33D; }
.cp-footer__blurb { margin: 0; }
.cp-footer__note { margin: 6px 0 0; color: var(--band-muted); font-size: 14px; }
.cp-footer__head { margin: 0 0 8px; font-weight: 650; }
.cp-footer__links { list-style: none; margin: 0; padding: 0; }
.cp-footer__links a, .cp-footer__legal a, .cp-social a { color: var(--band-muted); text-decoration: none; font-size: 14px; line-height: 2; }
.cp-footer__links a:hover, .cp-footer__legal a:hover, .cp-social a:hover { color: #fff; text-decoration: underline; }
.cp-footer a:focus-visible { outline-color: #F2B33D; }
.cp-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--band-line); padding-block: 16px 22px; }
.cp-footer__bottom p { margin: 0; color: var(--band-muted); font-size: 14px; }
.cp-footer__legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.cp-social { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* ---------- Misc WordPress ---------- */
.alignwide { max-width: var(--wrap); }
.alignfull { width: 100%; }
.cp-pagelinks, .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); text-decoration: none; padding: 0 10px; }
.page-numbers.current { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.cp-comments-wrap { padding-block: 32px; }
.cp-comments__list { padding-inline-start: 20px; }
.wp-block-button__link { border-radius: 6px; }

/* ---------- Fixes after first render ---------- */
.cp-header .cp-menu-btn { display: none; }
.cp-nav__link, .cp-nav__toggle { white-space: nowrap; padding-inline: 8px; font-size: 15.5px; }
@media (max-width: 1179px) {
	.cp-nav--desktop { display: none; }
	.cp-header .cp-menu-btn { display: inline-flex; }
}
@media (min-width: 1180px) {
	.cp-drawer { display: none !important; }
}
@media (min-width: 900px) {
	.cp-footer__grid { grid-template-columns: 2fr repeat(4, 1fr); }
	.cp-footer__about { grid-column: auto; }
}
@media (max-width: 600px) {
	.cp-topbar__in { gap: 0 12px; padding-block: 4px; }
	.cp-topbar__tools { gap: 14px; }
}
.comment-form { display: grid; gap: 14px; max-width: 640px; }
.comment-form label { display: block; font-size: 15px; font-weight: 620; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; min-height: 46px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--surface); padding: 10px 14px; font: inherit; color: var(--ink);
}
.comment-form .submit { min-height: 46px; padding: 0 20px; border-radius: 6px; background: var(--ink); color: var(--on-ink); border: 0; font-weight: 640; cursor: pointer; }
.cp-comments-wrap { background: var(--surface); }

/* ---------- Reading settings ---------- */
.cp-reading { align-items: flex-end; justify-content: flex-end; }
.cp-reading__panel { max-width: 420px; margin-inline-start: auto; border-radius: 16px 16px 0 0; display: grid; gap: 16px; }
@media (min-width: 700px) { .cp-reading { align-items: flex-start; } .cp-reading__panel { border-radius: 0 0 0 16px; max-height: 100vh; } }
.cp-reading__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-chip { min-height: 44px; padding: 0 14px; border-radius: 6px; border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.cp-chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; font-weight: 640; }
.cp-reading__switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; cursor: pointer; }
.cp-reading__switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line-strong); position: relative; cursor: pointer; margin: 0; flex: none; }
.cp-reading__switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.cp-reading__switch input:checked { background: var(--know); }
.cp-reading__switch input:checked::after { inset-inline-start: 21px; }
.cp-reading__note { margin: 0; font-size: 14px; font-weight: 650; }
html[data-text="small"] body { font-size: 16px; } html[data-text="small"] .cp-prose { font-size: 16.5px; }
html[data-text="large"] body { font-size: 19px; } html[data-text="large"] .cp-prose { font-size: 20.5px; }
html[data-text="xlarge"] body { font-size: 21px; } html[data-text="xlarge"] .cp-prose { font-size: 23px; } html[data-text="xlarge"] .cp-h1 { font-size: clamp(36px, 6vw, 54px); }
html[data-spacing="wide"] .cp-prose, html[data-spacing="wide"] body { line-height: 1.9; letter-spacing: .02em; word-spacing: .1em; }
html[data-spacing="wide"] .cp-prose p { margin-bottom: 1.4em; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-font="dyslexic"] body, html[data-font="dyslexic"] .cp-h1, html[data-font="dyslexic"] .cp-h2, html[data-font="dyslexic"] .cp-prose h2, html[data-font="dyslexic"] .cp-prose h3, html[data-font="dyslexic"] .cp-h3, html[data-font="dyslexic"] button, html[data-font="dyslexic"] input { font-family: "OpenDyslexic", var(--font-body); }
html[data-font="dyslexic"] .cp-prose { font-size: .95em; line-height: 1.75; }

/* ---------- Notes and bands ---------- */
.cp-infonote { margin: 14px 0 0; display: inline-flex; gap: 10px; align-items: center; background: var(--stock); border-inline-start: 4px solid var(--ink); border-radius: 4px; padding: 8px 14px; font-size: 15px; font-weight: 600; }
.cp-comments-band { background: var(--surface); border-top: 1px solid var(--line); }
.cp-comments-wrap { padding-block: 32px 48px; }

/* ---------- Chips used as filter links ---------- */
.cp-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0; }
a.cp-chip { display: inline-flex; align-items: center; text-decoration: none; }
a.cp-chip.is-on { background: var(--ink); color: var(--on-ink); box-shadow: none; font-weight: 640; }
a.cp-chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- Tool pages ---------- */
.cp-main--tool { padding-bottom: 0; }
.cp-toolhead { display: grid; gap: 12px; padding-bottom: 24px; }
.cp-toolhead .cp-crumbs { margin-bottom: 0; }
.cp-toolhead .cp-tag { justify-self: start; }
.cp-toolarea { padding-bottom: 40px; }
.cp-toolarea .cpc-dl { margin-top: 16px; max-width: 640px; }
.cp-rules { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.cp-rules ul { margin: 8px 0 0; padding-inline-start: 20px; }
.cp-toolbody { background: var(--surface); border-top: 1px solid var(--line); padding-block: 48px 64px; }
.cp-related { margin-top: 36px; }
.cp-related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.cp-related__card { display: grid; gap: 8px; text-decoration: none; color: var(--ink); align-content: start; }
.cp-related__card:hover { border-color: var(--ink); }

/* ---------- Category archives ---------- */
.cp-archive { padding-top: 0; }
.cp-archive__head { background: var(--surface); border-bottom: 1px solid var(--line); border-top: 6px solid var(--games); padding-block: 32px 28px; }
.cp-group--bet .cp-archive__head, .cp-archive.cp-group--bet .cp-archive__head { border-top-color: var(--bet); }
.cp-archive.cp-group--plat .cp-archive__head { border-top-color: var(--plat); }
.cp-archive.cp-group--know .cp-archive__head { border-top-color: var(--know); }
.cp-archive__head .cp-wrap { display: grid; gap: 12px; }
.cp-archive__head .cp-crumbs { margin: 0; }
.cp-archive__body { padding-block: 36px 56px; display: grid; gap: 44px; }
.cp-archive__section > .cp-h2 { margin-bottom: 16px; }
.cp-catcard { display: grid; gap: 6px; text-decoration: none; color: var(--ink); border-top: 4px solid var(--games); }
.cp-catcard.cp-group--bet { border-top-color: var(--bet); }
.cp-catcard.cp-group--plat { border-top-color: var(--plat); }
.cp-catcard.cp-group--know { border-top-color: var(--know); }
.cp-catcard:hover { border-color: var(--ink); }

/* ---------- Glossary ---------- */
.cp-glossary__search { max-width: 520px; }
.cp-az { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cp-az__l { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); font-weight: 700; text-decoration: none; font-size: 17px; border: 0; cursor: pointer; font-family: inherit; }
.cp-az__l:hover { background: var(--ink); color: var(--on-ink); text-decoration: none; }
.cp-az__l--soon { box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); background: transparent; font-weight: 500; }
.cp-az__l--soon[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--plat); color: var(--ink); }
.cp-glossary__soon { margin-block: 12px 0; max-width: 640px; }
.cp-glossary__letter { border-top: 2px solid var(--ink); padding-top: 12px; margin-bottom: 28px; }
.cp-glossary__lh { font-family: var(--font-head); font-weight: 400; font-size: 40px; margin: 0 0 8px; line-height: 1; }
.cp-glossary__letter dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 4px 32px; }
.cp-glossary__item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cp-glossary__item dt a { font-weight: 700; font-size: 18px; color: var(--ink); }
.cp-glossary__item dd { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.cp-newtag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 4px; background: var(--turmeric); color: var(--on-turmeric); box-shadow: inset 0 0 0 1px var(--on-turmeric); font-size: 12px; font-weight: 700; vertical-align: middle; margin-inline-start: 6px; }
.cp-glossary__suggest { margin-top: 40px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cp-term__def { font-size: 22px; line-height: 1.45; margin: 18px 0 0; padding: 18px 20px; background: var(--know-t); border-radius: var(--radius); border-inline-start: 4px solid var(--know); }
.cp-term__related { margin-top: 28px; }
.cp-term__related .cp-chips { margin-top: 10px; }
.cp-term__cite { margin-top: 24px; font-size: 15px; color: var(--muted); word-break: break-word; }

/* ---------- Chancepedia Elementor widgets ---------- */
.elementor .cp-wrap { width: 100%; }
.cpw-hero { display: grid; gap: 32px; align-items: center; padding-block: 24px; }
.cpw-hero--img { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 800px) { .cpw-hero--img { grid-template-columns: 1fr; } }
.cpw-hero__eyebrow { margin: 0 0 12px; font-weight: 650; color: var(--muted); }
.cpw-hero__h { font-family: var(--font-head); font-weight: 400; font-size: clamp(38px, 6vw, 64px); line-height: 1.04; margin: 0; max-width: 18ch; }
.cpw-hero__p { font-size: 20px; line-height: 1.5; color: var(--muted); margin: 18px 0 0; max-width: 60ch; }
.cpw-hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cpw-hero__img { width: 100%; height: auto; border-radius: 10px; }
.cpw-promises { list-style: none; margin: 28px auto 0; padding-inline: var(--gutter); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; border-top: 2px solid var(--ink); padding-top: 20px; }
.cpw-promises li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.cpw-promises__n { font-family: var(--font-head); font-size: 34px; line-height: 1; color: var(--plat); }
.cpw-promises__t { margin: 0; font-weight: 700; font-size: 18px; }
.cpw-promises__p { margin: 4px 0 0; color: var(--muted); }
.cpw-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.cpw-posts--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.cpw-posts--lead { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .cpw-posts--lead { grid-template-columns: 1fr; } }
.cpw-posts__list { display: grid; gap: 0; }
.cpw-posts__list .cpw-post { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cpw-posts--list .cpw-post { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cpw-post { display: grid; gap: 8px; align-content: start; }
.cpw-post .cp-tag { justify-self: start; }
.cpw-posts--grid .cpw-post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cpw-post__t { margin: 0; font-weight: 650; font-stretch: 92%; font-size: 19px; line-height: 1.3; }
.cpw-post--lead .cpw-post__t { font-family: var(--font-head); font-weight: 400; font-size: clamp(26px, 3vw, 34px); line-height: 1.12; }
.cpw-post__t a { color: var(--ink); text-decoration: none; }
.cpw-post__t a:hover { text-decoration: underline; }
.cpw-post__x { margin: 0; color: var(--muted); font-size: 15.5px; }
.cpw-post__img { width: 100%; height: auto; border-radius: 10px; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.cpw-terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 4px 32px; margin: 0 auto 32px; }
.cpw-terms div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cpw-terms dt a { font-weight: 700; color: var(--ink); }
.cpw-terms dd { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.cpw-help { margin-top: 8px; }
.cpw-help .cp-railcard--help { max-width: 640px; }

/* ---------- Library ---------- */
.cp-library .cp-page__head { gap: 12px; }
.cp-library__cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Elementor pages: bands and text follow the theme colours */
.cp-band { background: var(--surface) !important; }
.cp-built-with-elementor .elementor { color: var(--ink); }
.cp-built-with-elementor .elementor .cp-h2, .cp-built-with-elementor .elementor .cpw-hero__h { color: var(--ink); }
