/* ==========================================================================
   8xbet Network — main stylesheet (mobile-first, no framework)
   Colours/typography come from theme.json presets (--wp--preset--*).
   ========================================================================== */

:root {
	--xbn-primary: var(--wp--preset--color--primary, #1d67c4);
	--xbn-primary-light: var(--wp--preset--color--primary-light, #4c9eea);
	--xbn-navy: var(--wp--preset--color--navy, #13305d);
	--xbn-accent: var(--wp--preset--color--accent, #d9480f);
	--xbn-success: var(--wp--preset--color--success, #23863a);
	--xbn-text: var(--wp--preset--color--text, #1f2937);
	--xbn-muted: var(--wp--preset--color--muted, #5b6675);
	--xbn-surface: var(--wp--preset--color--surface, #f4f7fb);
	--xbn-border: var(--wp--preset--color--border, #e1e8f1);
	--xbn-white: #fff;
	--xbn-radius: 14px;
	--xbn-radius-sm: 8px;
	--xbn-shadow: 0 1px 2px rgba(19, 48, 93, .06), 0 6px 20px rgba(19, 48, 93, .08);
	--xbn-shadow-hover: 0 2px 4px rgba(19, 48, 93, .08), 0 14px 32px rgba(19, 48, 93, .14);
	--xbn-gutter: 16px;
	--xbn-max: 1200px;
	--xbn-header-h: 64px;
	--xbn-section-gap: clamp(2.5rem, 6vw, 4.5rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--xbn-header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--xbn-white);
	color: var(--xbn-text);
	font-family: var(--wp--preset--font-family--system, system-ui, sans-serif);
	font-size: 1rem;
	line-height: 1.7;
	overflow-x: hidden;
	text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--xbn-primary); text-underline-offset: .18em; }
a:hover { color: var(--xbn-navy); }
:focus-visible { outline: 3px solid var(--xbn-primary-light); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4, h5, h6 { color: var(--xbn-navy); line-height: 1.25; font-weight: 700; margin: 0 0 .6em; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.25rem); }
h2 { font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.75rem); }
h3 { font-size: clamp(1.125rem, 1.05rem + .4vw, 1.25rem); }
p { margin: 0 0 1em; }
.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;
}
.xbn-skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	left: 12px; top: 12px; z-index: 1000; padding: .75rem 1rem;
	background: var(--xbn-white); color: var(--xbn-navy); box-shadow: var(--xbn-shadow);
}
.xbn-icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }

/* ---------- Layout ---------- */
.xbn-container { width: 100%; max-width: calc(var(--xbn-max) + 2 * var(--xbn-gutter)); margin-inline: auto; padding-inline: var(--xbn-gutter); }
.xbn-main { padding-block: 1.5rem var(--xbn-section-gap); min-height: 50vh; }
.xbn-main--landing { padding-top: 1rem; }
@media (min-width: 768px) { :root { --xbn-gutter: 24px; --xbn-header-h: 72px; } }

/* ---------- Buttons ---------- */
.xbn-btn,
.wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	min-height: 44px; padding: .6rem 1.25rem; border-radius: 999px; border: 0;
	font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; text-align: center;
	cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.xbn-btn:hover, .wp-block-button__link:hover { transform: translateY(-1px); box-shadow: var(--xbn-shadow); }
.xbn-btn--primary, .wp-block-button__link { background: var(--xbn-primary); color: var(--xbn-white); }
.xbn-btn--primary:hover, .wp-block-button__link:hover { background: var(--xbn-navy); color: var(--xbn-white); }
.xbn-btn--register, .is-style-xbn-register .wp-block-button__link { background: var(--xbn-accent); color: var(--xbn-white); }
.xbn-btn--register:hover, .is-style-xbn-register .wp-block-button__link:hover { background: #b93d0c; color: var(--xbn-white); }
.xbn-btn--login, .is-style-xbn-login .wp-block-button__link { background: var(--xbn-success); color: var(--xbn-white); }
.xbn-btn--login:hover, .is-style-xbn-login .wp-block-button__link:hover { background: #1b6b2e; color: var(--xbn-white); }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--xbn-primary); box-shadow: inset 0 0 0 2px currentColor; }
.is-style-outline .wp-block-button__link:hover { background: var(--xbn-primary); color: var(--xbn-white); }

/* ---------- Header ---------- */
.xbn-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--xbn-white); /* no backdrop-filter: it would trap the fixed mobile drawer inside the header */
	border-bottom: 1px solid var(--xbn-border);
}
.admin-bar .xbn-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .xbn-header { top: 32px; } }
.xbn-header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--xbn-header-h); }
.xbn-logo { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.xbn-logo__img { display: block; height: 36px; width: auto; max-width: 140px; }
.xbn-logo--text { font-weight: 800; font-size: 1.25rem; color: var(--xbn-navy); }
.xbn-header__actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.xbn-cta { display: flex; gap: .5rem; }
.xbn-cta--header .xbn-btn { min-height: 40px; padding: .5rem .9rem; font-size: .85rem; }
/* Small phones: logo + Register + menu button only. Language list moves into the drawer;
   the Log in button lives in the sticky bottom bar. */
@media (max-width: 599px) {
	.xbn-header .xbn-lang { display: none; }
	.xbn-cta--header .xbn-btn--login { display: none; }
	.xbn-logo__img { height: 30px; max-width: 110px; }
}
@media (max-width: 340px) {
	.xbn-logo__img { height: 26px; max-width: 92px; }
	.xbn-cta--header .xbn-btn { padding: .45rem .6rem; font-size: .75rem; }
}

/* Primary navigation: off-canvas drawer below 1200px, inline above */
.xbn-nav-toggle {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 44px; height: 44px; border: 1px solid var(--xbn-border); border-radius: 10px;
	background: var(--xbn-white); color: var(--xbn-navy); cursor: pointer;
}
.xbn-nav-toggle__close { display: none; }
.xbn-nav-open .xbn-nav-toggle__open { display: none; }
.xbn-nav-open .xbn-nav-toggle__close { display: inline-flex; }
.xbn-nav__list, .xbn-nav__list ul { list-style: none; margin: 0; padding: 0; }
.xbn-nav__list .current-menu-item > a, .xbn-nav__list a:hover { color: var(--xbn-primary); }
.xbn-nav__langs { display: none; }

@media (max-width: 1199px) {
	.xbn-nav {
		position: fixed; inset: var(--xbn-header-h) 0 0 0; z-index: 99;
		background: var(--xbn-white); padding: .5rem var(--xbn-gutter) 7rem; overflow-y: auto; overscroll-behavior: contain;
		transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s;
	}
	.admin-bar .xbn-nav { top: calc(var(--xbn-header-h) + 46px); }
	.xbn-nav-open .xbn-nav { transform: none; visibility: visible; }
	.xbn-nav-open { overflow: hidden; }
	.xbn-nav__list a {
		display: flex; align-items: center; min-height: 52px; padding: .75rem .25rem;
		border-bottom: 1px solid var(--xbn-border); color: var(--xbn-navy); font-weight: 600; text-decoration: none;
	}
	.xbn-nav__list .sub-menu a { padding-left: 1rem; font-weight: 500; }
	.xbn-nav__langs { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
	.xbn-nav__langs a {
		display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .9rem;
		border: 1px solid var(--xbn-border); border-radius: 999px; color: var(--xbn-text); text-decoration: none; font-size: .9rem;
	}
	.xbn-nav__langs a[aria-current] { border-color: var(--xbn-primary); color: var(--xbn-primary); font-weight: 700; }
}
@media (min-width: 783px) and (max-width: 1199px) { .admin-bar .xbn-nav { top: calc(var(--xbn-header-h) + 32px); } }

@media (min-width: 1200px) {
	.xbn-nav-toggle { display: none; }
	.xbn-nav { position: static; flex: 1; min-width: 0; }
	.xbn-nav__list { display: flex; justify-content: center; flex-wrap: wrap; gap: .1rem .25rem; }
	.xbn-nav__list > li { position: relative; }
	.xbn-nav__list a { border: 0; padding: .5rem .7rem; border-radius: 8px; font-size: .92rem; white-space: nowrap; }
	.xbn-nav__list > li > a:hover, .xbn-nav__list > .current-menu-item > a { background: var(--xbn-surface); }
	.xbn-nav__list .sub-menu {
		position: absolute; top: 100%; left: 0; min-width: 220px; padding: .5rem;
		background: var(--xbn-white); border: 1px solid var(--xbn-border); border-radius: 12px; box-shadow: var(--xbn-shadow);
		opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
	}
	.xbn-nav__list li:hover > .sub-menu, .xbn-nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
	.xbn-nav__list .sub-menu a { padding: .5rem .75rem; }
	.xbn-nav__list a { display: block; color: var(--xbn-navy); font-weight: 600; text-decoration: none; }
	.xbn-header__actions { margin-left: 0; }
}

/* Language switcher */
.xbn-lang { position: relative; }
.xbn-lang__toggle {
	display: inline-flex; align-items: center; gap: .3rem; list-style: none; cursor: pointer;
	min-height: 40px; padding: .35rem .55rem; border: 1px solid var(--xbn-border); border-radius: 10px;
	font-size: .8rem; font-weight: 700; color: var(--xbn-navy); background: var(--xbn-white);
}
.xbn-lang__toggle::-webkit-details-marker { display: none; }
.xbn-lang__toggle .xbn-icon--chevron { width: 1em; height: 1em; transition: transform .15s; }
.xbn-lang[open] .xbn-icon--chevron { transform: rotate(180deg); }
.xbn-lang__list {
	position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; min-width: 190px;
	list-style: none; margin: 0; padding: .4rem; background: var(--xbn-white);
	border: 1px solid var(--xbn-border); border-radius: 12px; box-shadow: var(--xbn-shadow);
}
.xbn-lang__list a { display: block; padding: .5rem .7rem; border-radius: 8px; color: var(--xbn-text); text-decoration: none; font-size: .9rem; }
.xbn-lang__list a:hover { background: var(--xbn-surface); }
.xbn-lang__list a[aria-current] { color: var(--xbn-primary); font-weight: 700; }
@media (max-width: 380px) { .xbn-lang__toggle span { display: none; } }

/* ---------- Prose (page/post/landing content) ---------- */
.xbn-prose > * + * { margin-top: 0; }
.xbn-prose :where(p, ul, ol, table, figure, blockquote, details) { margin-bottom: 1.1rem; }
.xbn-prose :where(h2, h3, h4) { margin-top: 1.6em; }
.xbn-prose :where(h2, h3, h4):first-child { margin-top: 0; }
.xbn-prose ul, .xbn-prose ol { padding-left: 1.4em; }
.xbn-prose li { margin-bottom: .35em; }
.xbn-prose li > p { margin: 0; }
.xbn-prose blockquote, .xbn-prose .wp-block-quote {
	margin-inline: 0; padding: 1rem 1.25rem; border-left: 4px solid var(--xbn-primary-light);
	background: var(--xbn-surface); border-radius: 0 var(--xbn-radius-sm) var(--xbn-radius-sm) 0;
}
.xbn-prose figure { margin-inline: 0; }
.xbn-prose figcaption, .wp-element-caption { font-size: .85rem; color: var(--xbn-muted); text-align: center; margin-top: .5rem; }
.xbn-prose img { border-radius: var(--xbn-radius-sm); }
.xbn-prose .wp-block-table, .xbn-prose .xbn-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.xbn-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
.xbn-prose th, .xbn-prose td { padding: .65rem .8rem; border: 1px solid var(--xbn-border); text-align: left; vertical-align: top; }
.xbn-prose thead th, .xbn-prose tr:first-child th { background: var(--xbn-navy); color: var(--xbn-white); }
.xbn-prose tbody tr:nth-child(even) { background: var(--xbn-surface); }
.xbn-prose .wp-block-embed iframe { width: 100%; border-radius: var(--xbn-radius-sm); }
.xbn-prose .alignwide { max-width: 1320px; }
.xbn-prose .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.xbn-prose .has-text-align-center { text-align: center; }
.xbn-prose .wp-block-buttons { gap: .6rem; }
.xbn-prose hr, .wp-block-separator { border: 0; border-top: 1px solid var(--xbn-border); margin: 2rem 0; }

/* ---------- Landing sections (block styles) ---------- */
.xbn-landing > * { margin-bottom: 0; }
.xbn-landing > * + * { margin-top: var(--xbn-section-gap); }
.xbn-landing__title { text-align: center; }

.is-style-xbn-section > :where(h2):first-child,
.is-style-xbn-section > .xbn-section-head { text-align: center; }
.is-style-xbn-section > h2:first-child { margin-bottom: .4em; }
.is-style-xbn-section > h2:first-child + p { max-width: 820px; margin-inline: auto; text-align: center; color: var(--xbn-muted); }
.xbn-landing h1 { text-align: center; color: var(--xbn-navy); }

.is-style-xbn-panel {
	background: var(--xbn-surface); border: 1px solid var(--xbn-border);
	border-radius: var(--xbn-radius); padding: clamp(1.25rem, 3vw, 2.25rem);
}

/* Cards (games, features, network, app) */
.is-style-xbn-card {
	position: relative; display: flex; flex-direction: column; gap: .6rem;
	background: var(--xbn-white); border: 1px solid var(--xbn-border); border-radius: var(--xbn-radius);
	padding: .75rem; box-shadow: var(--xbn-shadow); text-align: center;
	transition: transform .2s ease, box-shadow .2s ease; height: 100%;
}
.is-style-xbn-card:hover { transform: translateY(-3px); box-shadow: var(--xbn-shadow-hover); }
.is-style-xbn-card > * { margin: 0 !important; }
.is-style-xbn-card .wp-block-image img { border-radius: calc(var(--xbn-radius) - 6px); width: 100%; }
.is-style-xbn-card h3 { font-size: 1rem; margin: 0; }
.is-style-xbn-card p { font-size: .925rem; color: var(--xbn-muted); text-align: left; }
.is-style-xbn-card .wp-block-buttons { justify-content: center; margin-top: auto !important; }
.is-style-xbn-card .wp-block-button__link { min-height: 40px; padding: .5rem 1rem; font-size: .875rem; width: 100%; }
.is-style-xbn-card .wp-block-button { width: 100%; }
.xbn-feature .wp-block-image img { width: auto; max-width: 160px; max-height: 140px; margin-inline: auto; border-radius: 0; }
.xbn-feature p { text-align: left; }

/* Native grid layout fallback for older browsers */
.xbn-cards.is-layout-grid { gap: clamp(.75rem, 2vw, 1.25rem); }

/* Gallery as banner slider */
.wp-block-gallery.is-style-xbn-slider.has-nested-images {
	position: relative; display: flex; flex-wrap: nowrap; gap: 0 !important;
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
	scrollbar-width: none; border-radius: var(--xbn-radius); margin-bottom: 0;
}
.wp-block-gallery.is-style-xbn-slider::-webkit-scrollbar { display: none; }
.wp-block-gallery.is-style-xbn-slider.has-nested-images figure.wp-block-image:not(#xbn) {
	flex: 0 0 100%; width: 100%; max-width: 100%; margin: 0; scroll-snap-align: start; border-radius: 0;
}
.wp-block-gallery.is-style-xbn-slider.has-nested-images figure.wp-block-image img {
	width: 100%; height: auto; aspect-ratio: 23 / 10; object-fit: cover; border-radius: 0;
}
.wp-block-gallery.is-style-xbn-slider.has-nested-images figure.wp-block-image figcaption { display: none; }
.xbn-slider { position: relative; }
.xbn-slider__btn {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255, 255, 255, .9); color: var(--xbn-navy); box-shadow: var(--xbn-shadow);
	display: none; align-items: center; justify-content: center;
}
.xbn-slider__btn--prev { left: 12px; }
.xbn-slider__btn--prev .xbn-icon { transform: rotate(180deg); }
.xbn-slider__btn--next { right: 12px; }
@media (hover: hover) and (min-width: 768px) { .xbn-slider__btn { display: inline-flex; } }
.xbn-slider__dots { display: flex; justify-content: center; gap: .25rem; margin-top: .5rem; }
.xbn-slider__dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.xbn-slider__dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--xbn-border); transition: .2s; }
.xbn-slider__dot[aria-current="true"]::before { background: var(--xbn-primary); width: 24px; border-radius: 6px; }

/* Gallery as logo grid (payments, currencies, licences) */
.wp-block-gallery.is-style-xbn-logos.has-nested-images {
	display: grid !important; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .75rem !important;
}
.wp-block-gallery.is-style-xbn-logos.has-nested-images figure.wp-block-image:not(#xbn) {
	width: auto; margin: 0; display: flex; align-items: center; justify-content: center;
	background: var(--xbn-white); border: 1px solid var(--xbn-border); border-radius: var(--xbn-radius-sm);
	padding: .75rem; min-height: 72px;
}
.wp-block-gallery.is-style-xbn-logos.has-nested-images figure.wp-block-image img {
	width: auto; max-width: 100%; height: 40px; object-fit: contain; border-radius: 0;
}

/* Checklist */
.is-style-xbn-checklist { list-style: none; padding-left: 0 !important; }
.is-style-xbn-checklist li { position: relative; padding-left: 1.9em; }
.is-style-xbn-checklist li::before {
	content: ""; position: absolute; left: 0; top: .3em; width: 1.2em; height: 1.2em; border-radius: 50%;
	background: var(--xbn-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.is-style-xbn-rounded img { border-radius: var(--xbn-radius); }

/* FAQ (details) */
.is-style-xbn-faq { display: grid; gap: .75rem; }
.is-style-xbn-faq > * { margin: 0 !important; }
.wp-block-details, .is-style-xbn-faq details {
	background: var(--xbn-white); border: 1px solid var(--xbn-border); border-radius: var(--xbn-radius-sm);
	padding: 0; box-shadow: 0 1px 2px rgba(19, 48, 93, .04);
}
.wp-block-details summary {
	position: relative; cursor: pointer; list-style: none;
	padding: 1rem 3rem 1rem 1.1rem; font-weight: 600; color: var(--xbn-navy);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: ""; position: absolute; right: 1.1rem; top: 50%; width: .6rem; height: .6rem;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.wp-block-details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.wp-block-details[open] summary { color: var(--xbn-primary); }
.wp-block-details > :not(summary) { padding-inline: 1.1rem; }
.wp-block-details > :last-child { padding-bottom: 1rem; margin-bottom: 0; }

/* Read more (collapsible long content). Collapsed only when JS runs. */
.is-style-xbn-readmore { position: relative; }
.is-style-xbn-readmore.is-collapsed { max-height: 32rem; overflow: hidden; }
.is-style-xbn-readmore.is-collapsed::after {
	content: ""; position: absolute; inset: auto 0 0 0; height: 8rem; pointer-events: none;
	background: linear-gradient(rgba(255, 255, 255, 0), var(--xbn-white));
}
.xbn-readmore-toggle { display: flex; margin: 1rem auto 0; }

/* App download section */
.xbn-app .xbn-qr img { max-width: 140px; margin-inline: auto; }
.xbn-app .wp-block-columns { align-items: center; }

/* ---------- Post cards & grids ---------- */
.xbn-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.xbn-card-post {
	display: flex; flex-direction: column; background: var(--xbn-white); border: 1px solid var(--xbn-border);
	border-radius: var(--xbn-radius); overflow: hidden; box-shadow: var(--xbn-shadow); transition: transform .2s, box-shadow .2s;
}
.xbn-card-post:hover { transform: translateY(-3px); box-shadow: var(--xbn-shadow-hover); }
.xbn-card-post__media { display: block; aspect-ratio: 16 / 9; background: var(--xbn-surface); overflow: hidden; }
.xbn-card-post__media img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.xbn-card-post__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--xbn-surface), var(--xbn-border)); }
.xbn-card-post__body { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem 1.2rem; flex: 1; }
.xbn-card-post__title { font-size: 1.06rem; margin: 0; }
.xbn-card-post__title a { color: var(--xbn-navy); text-decoration: none; }
.xbn-card-post__title a:hover { color: var(--xbn-primary); }
.xbn-card-post__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.xbn-card-post { position: relative; }
.xbn-card-post__excerpt { font-size: .925rem; color: var(--xbn-muted); margin: 0; }
.xbn-card-post__date { font-size: .8rem; color: var(--xbn-muted); margin-top: auto; }
.xbn-chip {
	display: inline-block; align-self: flex-start; padding: .15rem .6rem; border-radius: 999px;
	background: #e8f1fc; color: var(--xbn-primary); font-size: .75rem; font-weight: 700;
	text-decoration: none; text-transform: uppercase; letter-spacing: .02em; position: relative; z-index: 1;
}

/* Query Loop block (latest posts on the landing page) */
.xbn-posts .wp-block-post-template { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); padding: 0; list-style: none; }
.xbn-posts .wp-block-post-template > li { margin: 0; }
.xbn-posts .wp-block-post {
	display: flex; flex-direction: column; height: 100%; background: var(--xbn-white); border: 1px solid var(--xbn-border);
	border-radius: var(--xbn-radius); overflow: hidden; box-shadow: var(--xbn-shadow);
}
.xbn-posts .wp-block-post > * { margin: 0 !important; padding-inline: 1.1rem; }
.xbn-posts .wp-block-post-featured-image { padding: 0 !important; aspect-ratio: 16 / 9; overflow: hidden; }
.xbn-posts .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.xbn-posts .wp-block-post-terms { padding-top: 1rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.xbn-posts .wp-block-post-terms a { text-decoration: none; }
.xbn-posts .wp-block-post-title { font-size: 1.06rem; padding-top: .4rem; }
.xbn-posts .wp-block-post-title a { color: var(--xbn-navy); text-decoration: none; }
.xbn-posts .wp-block-post-excerpt { font-size: .925rem; color: var(--xbn-muted); padding-top: .4rem; }
.xbn-posts .wp-block-post-excerpt__more-text { display: none; }
.xbn-posts .wp-block-post-date { font-size: .8rem; color: var(--xbn-muted); padding-block: .5rem 1.1rem; margin-top: auto !important; }

/* ---------- Single / page ---------- */
.xbn-breadcrumbs { font-size: .85rem; color: var(--xbn-muted); margin-bottom: 1rem; overflow-wrap: anywhere; }
.xbn-breadcrumbs a { color: var(--xbn-muted); }
.xbn-breadcrumbs .sep { margin-inline: .35rem; }
.xbn-page-header { margin-bottom: 1.5rem; }
.xbn-page-title { margin-bottom: .5rem; }
.xbn-article { max-width: 820px; margin-inline: auto; }
.xbn-article .xbn-page-header, .xbn-article ~ .xbn-breadcrumbs { text-align: left; }
.xbn-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; list-style: none; margin: .25rem 0 0; padding: 0; font-size: .85rem; color: var(--xbn-muted); }
.xbn-meta li { display: inline-flex; align-items: center; gap: .35rem; }
.xbn-meta a { color: inherit; }
.xbn-featured { margin: 0 0 1.5rem; }
.xbn-featured img { width: 100%; border-radius: var(--xbn-radius); display: block; }
.xbn-entry { font-size: 1.0625rem; }
.xbn-entry-footer { margin-top: 2rem; display: grid; gap: 1.25rem; }
.xbn-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.xbn-tags a { padding: .25rem .7rem; border: 1px solid var(--xbn-border); border-radius: 999px; font-size: .8rem; text-decoration: none; color: var(--xbn-muted); }
.xbn-postnav .nav-links { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .xbn-postnav .nav-links { grid-template-columns: 1fr 1fr; } .xbn-postnav .nav-next { text-align: right; } }
.xbn-postnav a { display: block; height: 100%; padding: 1rem; border: 1px solid var(--xbn-border); border-radius: var(--xbn-radius-sm); text-decoration: none; }
.xbn-postnav__label { display: block; font-size: .75rem; text-transform: uppercase; color: var(--xbn-muted); font-weight: 700; }
.xbn-postnav__title { color: var(--xbn-navy); font-weight: 600; }
.xbn-related { margin-top: var(--xbn-section-gap); }
.xbn-archive-desc { color: var(--xbn-muted); max-width: 820px; }

/* Pagination */
.xbn-pagination { margin-top: 2rem; }
.xbn-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.xbn-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 .9rem;
	border: 1px solid var(--xbn-border); border-radius: 10px; text-decoration: none; color: var(--xbn-navy); font-weight: 600;
}
.xbn-pagination .page-numbers.current { background: var(--xbn-primary); border-color: var(--xbn-primary); color: var(--xbn-white); }
.xbn-pagination .page-numbers.dots { border: 0; }

/* Search */
.xbn-search { display: flex; max-width: 520px; border: 1px solid var(--xbn-border); border-radius: 999px; overflow: hidden; background: var(--xbn-white); }
.xbn-search__input { flex: 1; min-width: 0; border: 0; padding: .7rem 1.1rem; font: inherit; background: transparent; }
.xbn-search__input:focus { outline: none; }
.xbn-search:focus-within { outline: 3px solid var(--xbn-primary-light); outline-offset: 2px; }
.xbn-search__btn { border: 0; background: var(--xbn-primary); color: var(--xbn-white); padding: 0 1.1rem; cursor: pointer; }

/* 404 / empty / sitemap */
.xbn-404 { text-align: center; max-width: 720px; }
.xbn-404 .xbn-search { margin: 1.5rem auto; }
.xbn-404__code { font-size: clamp(4rem, 15vw, 7rem); font-weight: 800; line-height: 1; color: var(--xbn-primary-light); margin: 0 0 .5rem; }
.xbn-404 .xbn-related { text-align: left; }
.xbn-empty { padding: 2rem; background: var(--xbn-surface); border-radius: var(--xbn-radius); }
.xbn-sitemap__cols { display: grid; gap: 1.5rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .xbn-sitemap__cols { grid-template-columns: 1fr 1fr; } }
.xbn-sitemap__posts { columns: 1; column-gap: 2rem; }
@media (min-width: 768px) { .xbn-sitemap__posts { columns: 2; } }
.xbn-sitemap li { margin-bottom: .35rem; break-inside: avoid; }

/* Comments */
.xbn-comments { max-width: 820px; margin: 2.5rem auto 0; }
.xbn-comments__list { padding-left: 0; list-style: none; }
.xbn-comments textarea, .xbn-comments input[type="text"], .xbn-comments input[type="email"], .xbn-comments input[type="url"] {
	width: 100%; padding: .6rem .8rem; border: 1px solid var(--xbn-border); border-radius: var(--xbn-radius-sm); font: inherit;
}
.xbn-comments .submit { background: var(--xbn-primary); color: var(--xbn-white); border: 0; border-radius: 999px; padding: .7rem 1.4rem; font-weight: 600; cursor: pointer; }

/* ---------- Footer ---------- */
.xbn-footer { margin-top: var(--xbn-section-gap); background: var(--xbn-navy); color: #d5deeb; font-size: .925rem; }
.xbn-footer a { color: #fff; }
.xbn-footer :where(h2, h3, h4) { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .03em; margin-top: 0; }
.xbn-footer__content { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.xbn-footer__content .wp-block-columns { gap: 2rem; }
.xbn-footer__content ul { padding-left: 1.1em; }
.xbn-footer__content li { margin-bottom: .3rem; }
.xbn-footer__content .is-style-xbn-panel { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); padding: 1rem; color: #e6edf6; }
.xbn-footer__content img { border-radius: var(--xbn-radius-sm); }
.xbn-footer__content iframe { width: 100%; border-radius: var(--xbn-radius-sm); border: 0; }
.xbn-footer__content .xbn-hashtags { color: #a8b6cc; font-size: .85rem; overflow-wrap: anywhere; }
.xbn-footer__bar { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 1.25rem calc(1.25rem + 64px); }
@media (min-width: 600px) { .xbn-footer__bar { padding-bottom: 1.25rem; } }
.xbn-footer__bar-inner { display: grid; gap: 1rem; justify-items: center; text-align: center; }
.xbn-footer__copy { margin: 0; font-size: .825rem; color: #a8b6cc; max-width: 900px; }
.xbn-footer__menu { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; list-style: none; margin: 0; padding: 0; }
.xbn-footer__menu a { text-decoration: none; font-size: .85rem; }
.xbn-social { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.xbn-social a {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
	background: rgba(255, 255, 255, .1); color: #fff; transition: background .15s;
}
.xbn-social a:hover { background: var(--xbn-primary-light); }

/* Back to top + sticky mobile CTA */
.xbn-to-top {
	position: fixed; right: 16px; bottom: 84px; z-index: 90; width: 44px; height: 44px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center; background: var(--xbn-primary); color: #fff;
	box-shadow: var(--xbn-shadow); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
}
.xbn-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.xbn-to-top:hover { color: #fff; background: var(--xbn-navy); }
.xbn-sticky-cta {
	position: fixed; inset: auto 0 0 0; z-index: 95; padding: .6rem var(--xbn-gutter) calc(.6rem + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, .97); border-top: 1px solid var(--xbn-border); box-shadow: 0 -4px 16px rgba(19, 48, 93, .08);
}
.xbn-sticky-cta .xbn-cta { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (min-width: 600px) { .xbn-sticky-cta { display: none; } .xbn-to-top { bottom: 24px; } }

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

/* ---------- Print ---------- */
@media print {
	.xbn-header, .xbn-footer, .xbn-sticky-cta, .xbn-to-top, .xbn-slider__btn, .xbn-slider__dots { display: none !important; }
	.is-style-xbn-readmore.is-collapsed { max-height: none; }
}

.xbn-sticky-cta .xbn-cta--single { grid-template-columns: 1fr; }

/* ---------- Landing refinements ---------- */
/* Card grids stretch to fill the row (auto-fit) instead of leaving empty columns. */
.xbn-prose .xbn-cards.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr)); }
.xbn-prose .xbn-cards.is-layout-grid:has(> .xbn-feature) { grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.xbn-prose .xbn-app .xbn-cards.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); }
/* Six-card grids (games, network): balanced 2 / 3 / 6 columns. */
.xbn-prose .xbn-cards.is-layout-grid:has(> .is-style-xbn-card:nth-child(6):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .xbn-prose .xbn-cards.is-layout-grid:has(> .is-style-xbn-card:nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .xbn-prose .xbn-cards.is-layout-grid:has(> .is-style-xbn-card:nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Card titles: navy, no underline, whole title clickable. */
.is-style-xbn-card h3 a { color: var(--xbn-navy); text-decoration: none; }
.is-style-xbn-card h3 a:hover { color: var(--xbn-primary); }

/* App screenshots are portrait: show them whole, not cropped to a banner. */
.wp-block-gallery.xbn-app-shots.is-style-xbn-slider.has-nested-images figure.wp-block-image img {
	aspect-ratio: auto; max-height: 520px; width: auto; max-width: 100%; margin-inline: auto; object-fit: contain;
}
.wp-block-gallery.xbn-app-shots.is-style-xbn-slider.has-nested-images figure.wp-block-image:not(#xbn) { display: flex; justify-content: center; }
.xbn-app .wp-block-column > p { text-align: center; color: var(--xbn-muted); }
.xbn-cta .xbn-btn { white-space: nowrap; }
@media (max-width: 599px) { .xbn-cta--header .xbn-btn { padding: .45rem .7rem; font-size: .8rem; } .xbn-header__inner { gap: .5rem; } }
