/* DSP-218 round 2: accessibility and resilience fixes. Loaded after custom(.min).css (functions.php). */

/* HIGH-3 / SEO audit 2026-11-16 item 10: .reveal content is visible in its final state until
   assets/js/app.js arms the reveal (html.bk-reveal-armed), after it has marked everything on the
   first screen and a half as already shown. Only content further down is then hidden (off screen)
   and fades in when scrolled to. No/failed/slow JS or reduced motion: content shows, never hidden.
   (html.bk-reveal, still set by inc/a11y.php, no longer hides anything.) */
html:not(.bk-reveal-armed) .reveal { opacity: 1 !important; translate: none !important; scale: none !important; }
html.bk-reveal-instant .reveal { transition: none !important; }

/* Server-rendered offer notes that app.js hides at the offer end (same clock as the countdowns). */
[data-bk-offer-note][hidden] { display: none !important; }

/* Search overlay: visible keyboard focus. */
.bk-sp__item:focus-visible, .bk-sp__chip:focus-visible, .bk-sp__close:focus-visible { outline: 2px solid #7C3AED !important; outline-offset: 2px; }
.bk-sp__bar:focus-within { box-shadow: 0 0 0 2px #7C3AED; border-radius: 14px; }
.bk-sp .bk-sp__input:focus-visible { outline: 2px solid #7C3AED !important; outline-offset: 4px; border-radius: 6px; }
body:has(.bk-sp.is-open) .bk-consent { display: none; } /* never over the open search dialog */
/* QA-gaps F1: never over the open mobile menu either (a modal dialog that keeps Tab inside). Only hidden while
   the menu is open: no choice is made or stored, and the banner and its buttons are back and reachable on close. */
body:has(.bk-offcanvas.is-open) .bk-consent { display: none; }

/* Scrollable table regions (inc/a11y.php adds tabindex="0"): show focus. */
figure.wp-block-table[tabindex]:focus-visible, .overflow-x-auto[tabindex]:focus-visible, .bk-pr-compare[tabindex]:focus-visible { outline: 2px solid #7C3AED; outline-offset: 2px; }

/* Contrast (axe color-contrast, WCAG 1.4.3 ≥ 4.5:1). */
.bk-of-row__first s { color: #6B6280 !important; }
.bkag-pairs__in { color: #625B78 !important; }
[data-op-step] > b { color: #5F5582 !important; }
.wx-q__marks, .wx-q__marks > span, .wx-q__axis, .wx-q__axis > span { color: #625B78 !important; }
.agp-flow__node { opacity: 1 !important; color: #6B6280 !important; border-style: dashed; }
.agp-auto[data-trigger="upload"] [data-src="upload"], .agp-auto[data-trigger="save"] [data-src="save"], .agp-auto[data-trigger="both"] .agp-flow__node { border-style: solid; }
header a[href$="/playground/"].btn-secondary { background-color: #6D28D9; color: #fff; }
.bkag-flow__kicker, .is-success.is-new > code, .is-success.is-new > span { color: #625B78 !important; }
.wx-seg__btn small { opacity: 1 !important; } /* was opacity .7 on the label colour */
.bk-op-vanity__side.is-vanity b { color: #8A7FB0 !important; } /* 88px display text: ≥ 3:1 */
.bk-op-field__input.is-placeholder { color: #6B6280 !important; }
.bk-op-hist__chg > s { color: #6B6280 !important; }

/* Cookie choices: compact, never a wall over the first screen or the docs sidebar. */
.bk-consent__inner { padding: 12px 14px; gap: 10px; }
.bk-consent__text { font-size: 13px; line-height: 1.45; }
.bk-consent__btn { padding: 0 10px; font-size: 14px; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 768px) {
	/* Owner 2026-11-19: a small card at the bottom left (text, then the two buttons), clear of the chat on the right. */
	.bk-consent { left: 24px; right: auto; bottom: 24px; width: 360px; }
	.bk-consent__inner { flex-direction: column; align-items: stretch; padding: 16px 18px; gap: 12px; }
	.bk-consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	.bk-consent__btn { min-height: 40px; }
}


/* Crisp chat bubble: sticky asides keep clear of it. */
@media (min-width: 1024px) {
	.bk-doc__menu, .bk-doc__toc { max-height: calc(100vh - var(--promo-h, 0px) - 6rem - 96px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 8px; }
}

/* Touch targets ≥ 44 px on small screens (WCAG 2.5.5). */
@media (max-width: 767.98px) {
	[data-bk-promo] .container > a { min-height: 44px; display: inline-flex; align-items: center; }
	a[aria-label="ByteKeel home"] { min-height: 44px; }
	footer li > a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
	.bk-doc__menu-link { display: flex; align-items: center; min-height: 44px; }
	/* Docs previous/next and roadmap notes never clip at 320 px. */
	.bk-doc__pager { grid-template-columns: 1fr; }
	.bk-doc__pager a { overflow-wrap: anywhere; }
	.bk-rd-pill__note { white-space: normal; }
}
@media (max-width: 767.98px) {
	.bk-pcard__links > a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
}

/* Home hero on large screens (2026-11-18): content centred in the hero, hero capped at 1000 px tall,
   and the four floating labels anchored to the demo card instead of to the window edges.
   Front page only: product landing and pricing heroes share the .bk-s-abe4f133 class. */
@media (min-width: 1024px) {
	.home .bk-s-abe4f133 { display: flex; flex-direction: column; justify-content: center; min-height: min(100svh, 1000px); }
}
@media (min-width: 1280px) {
	.home .bk-s-abe4f133 .animate-float { right: auto; bottom: auto; }
	.home .bk-s-abe4f133 .bk-s-0d94d388 { left: calc(50% + 23px); top: calc(50% + var(--promo-h, 0px) / 2 - 246px); }
	.home .bk-s-abe4f133 .bk-s-8fd93761 { left: calc(50% + 416px); top: calc(50% + var(--promo-h, 0px) / 2 - 246px); }
	.home .bk-s-abe4f133 .bk-s-d6f317bc { left: calc(50% + 23px); top: calc(50% + var(--promo-h, 0px) / 2 + 245px); }
	.home .bk-s-abe4f133 .bk-s-9312d8d6 { left: calc(50% + 373px); top: calc(50% + var(--promo-h, 0px) / 2 + 245px); }
}

/* Blog cards, 2026-11-18: every post now has a 1200 x 630 branded featured image, so card media use that exact
   ratio (no cropping). /blog (page 10): body as wide as the hero (1200 px), 3 columns on desktop with the newest
   post as a wide lead card, one scrollable row of filter chips on phones, excerpts clamped to 3 lines. */
.bk-blog-card__media { aspect-ratio: 1200 / 630; background: #1A0B3D; }
.bk-blog-card__img { aspect-ratio: 1200 / 630; object-fit: cover; }
.page-id-10 .section > .container.max-w-4xl { max-width: 1200px; }
.page-id-10 .bk-blog-card, .bk-post__related .bk-blog-card { display: flex; flex-direction: column; }
.page-id-10 .bk-blog-card__body, .bk-post__related .bk-blog-card__body { display: flex; flex: 1; flex-direction: column; }
.page-id-10 .bk-blog-card__excerpt, .bk-post__related .bk-blog-card__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
@media (max-width: 767px) {
	.page-id-10 .bk-blog-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -1rem; padding-inline: 1rem; }
	.page-id-10 .bk-blog-chips::-webkit-scrollbar { display: none; }
	.page-id-10 .bk-blog-chips a { flex: none; white-space: nowrap; }
}
@media (min-width: 1024px) {
	.page-id-10 .bk-blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
	.page-id-10 .bk-blog-grid > .bk-blog-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
	.page-id-10 .bk-blog-grid > .bk-blog-card:first-child .bk-blog-card__media { border-bottom: 0; border-radius: 0; }
	.page-id-10 .bk-blog-grid > .bk-blog-card:first-child .bk-blog-card__body { justify-content: center; padding: 2.5rem; }
	.page-id-10 .bk-blog-grid > .bk-blog-card:first-child .bk-blog-card__title { font-size: 1.75rem; line-height: 1.25; letter-spacing: -.01em; }
	.page-id-10 .bk-blog-grid > .bk-blog-card:first-child .bk-blog-card__excerpt { font-size: 1.0625rem; -webkit-line-clamp: 4; }
}

/* Divi Smart Popup page (page 68), 2026-11-19: targeting image moved into its own two-column section;
   "Check it before visitors see it" screenshots shown at one size (whole screen visible); the extra
   answers list sits directly under the blog guides as one block. */
.bk-pe-target { background: #fff; }
.bk-pe-target .bk-pimg__fig { max-width: none; margin: 0; }
.bk-pe-target .bk-pimg__img { aspect-ratio: 16 / 9; object-fit: cover; }
.page-id-68 ol.space-y-16 > li .shadow-lift { aspect-ratio: 16 / 11; display: flex; align-items: center; justify-content: center; background: #fff; }
.page-id-68 ol.space-y-16 > li .shadow-lift img { width: 100%; height: 100%; object-fit: contain; }
.page-id-68 .bk-pe-more { padding-top: 0; }
@media (min-width: 1024px) { .bk-pe-target .container { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } }
.bk-pe-target .h-section { text-wrap: balance; }

/* Divi Smart Popup page (page 68), design pass 2, 2026-11-19. */
/* One label style for every section (white pill on tinted sections, glass pill on dark ones). */
.page-id-68 .eyebrow, .page-id-68 .bk-pe-pill { display: inline-flex; align-items: center; margin-bottom: 1rem; padding: .3rem .8rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.page-id-68 .eyebrow { background: #F3EEFF; border: 1px solid #E4D9FF; color: #6D28D9; }
.page-id-68 .bg-ink-wash .eyebrow, .page-id-68 .bk-pe-light .eyebrow { background: #fff; }
/* Hero: one row of reasons to trust, quieter requirements line. */
.page-id-68 .bk-pe-trust { gap: .5rem 1.25rem; }
.page-id-68 .bk-pe-spec { margin-top: .75rem; }
/* AI demo: the four steps as cards. */
.page-id-68 .bk-pe-aidemo__steps li { padding: 1.1rem 1.1rem 1.1rem 3.25rem; border: 1px solid #E9E3F6; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(32, 16, 72, .05); }
.page-id-68 .bk-pe-aidemo__steps li:before { left: 1rem; top: 1.05rem; }
/* Speed: the four facts as one stat band. */
.page-id-68 .bk-pe-light__grid { gap: 0; overflow: hidden; border: 1px solid #E9E3F6; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgba(32, 16, 72, .05), 0 12px 32px -18px rgba(32, 16, 72, .2); }
.page-id-68 .bk-pe-light__grid li { padding: 1.75rem 1.5rem; border: 0; border-radius: 0; box-shadow: none; }
.page-id-68 .bk-pe-light__grid li + li { border-left: 1px solid #EFEAFB; }
.page-id-68 .bk-pe-light__grid li b { font-size: 1.875rem; line-height: 1.1; letter-spacing: -.02em; }
@media (max-width: 1023px) { .page-id-68 .bk-pe-light__grid li + li { border-left: 0; } .page-id-68 .bk-pe-light__grid li:nth-child(even) { border-left: 1px solid #EFEAFB; } .page-id-68 .bk-pe-light__grid li:nth-child(n+3) { border-top: 1px solid #EFEAFB; } }
/* Targeting: image without its own frame box. */
.page-id-68 .bk-pe-target .bk-pimg__img { box-shadow: 0 30px 60px -30px rgba(27, 21, 48, .35); }
/* "Check it before visitors see it": three equal cards (screen on top, step below) instead of a zigzag. */
@media (min-width: 1024px) {
	.page-id-68 ol.space-y-16 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
	.page-id-68 ol.space-y-16 > * { margin-top: 0 !important; }
}
.page-id-68 ol.space-y-16 > li { display: flex; flex-direction: column; gap: 0; overflow: hidden; border: 1px solid #E9E3F6; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgba(32, 16, 72, .05); }
.page-id-68 ol.space-y-16 > li > .shadow-lift { order: -1; margin: 0; border: 0; border-bottom: 1px solid #EFEAFB; border-radius: 0; box-shadow: none; background: #F7F4FE; aspect-ratio: 16 / 11; }
.page-id-68 ol.space-y-16 > li > .shadow-lift img { padding: 12px; }
.page-id-68 ol.space-y-16 > li > div:not(.shadow-lift) { padding: 1.5rem; }
.page-id-68 ol.space-y-16 > li h3 { margin-top: .75rem; font-size: 1.25rem; }
.page-id-68 ol.space-y-16 > li .lead { font-size: 1rem; }
.page-id-68 ol.space-y-16 > li .reveal { opacity: 1; translate: none; }

/* Divi Smart Popup page: ByteKeel AI band under the AI demo (2026-11-19). */
.bk-pe-aiband { padding: 0 0 5rem; background: #fff; }
.bk-pe-aiband__card { position: relative; display: grid; gap: 1.75rem; align-items: center; max-width: 68rem; margin: 0 auto; padding: 2rem; overflow: hidden; border-radius: 24px; background: linear-gradient(135deg, #2E1065 0%, #5B21B6 55%, #7C3AED 100%); color: #fff; box-shadow: 0 30px 60px -30px rgba(46, 16, 101, .7); }
.bk-pe-aiband__card::before { content: ""; position: absolute; right: -120px; top: -140px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(196, 181, 253, .35), rgba(196, 181, 253, 0) 65%); pointer-events: none; }
.bk-pe-aiband__copy, .bk-pe-aiband__ctas { position: relative; }
.bk-pe-aiband__eyebrow { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .9rem; padding: .3rem .8rem; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #FDE68A; }
.bk-pe-aiband__title { margin: 0; font-family: var(--font-manrope), Helvetica Neue, Arial, sans-serif; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.1rem); font-weight: 800; line-height: 1.15; letter-spacing: -.025em; color: #fff; text-wrap: balance; }
.bk-pe-aiband__text { margin: .9rem 0 0; max-width: 40rem; font-size: 1.0625rem; line-height: 1.6; color: rgba(237, 233, 254, .9); }
.bk-pe-aiband__ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.bk-pe-aiband__ctas .btn-secondary { background: #fff; color: #4C1D95; }
.bk-pe-aiband__ghost { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.25rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: 12px; color: #fff; font-weight: 600; text-decoration: none; }
.bk-pe-aiband__ghost:hover { background: rgba(255, 255, 255, .1); }
@media (min-width: 1024px) { .bk-pe-aiband__card { grid-template-columns: minmax(0, 1fr) auto; padding: 2.5rem 3rem; } .bk-pe-aiband__ctas { flex-direction: column; align-items: stretch; } }

/* Product landing pages (children of /products), 2026-11-19: same polish as the Divi Smart Popup page.
   One label style (white pill on tinted sections), the product screenshot after the hero at a calmer
   size, and TurboCache's speed streaks kept to the right half so they never cross the hero text. */
.parent-pageid-67 .eyebrow { padding: .3rem .8rem; font-weight: 700; letter-spacing: .08em; }
.parent-pageid-67 .bg-ink-wash .eyebrow { background: #fff; border: 1px solid #E4D9FF; }
.parent-pageid-67 .bk-pimg { padding: 4rem 0 1rem; }
.parent-pageid-67 .bk-pimg__fig { max-width: 880px; }
section .bk-speed-streaks { opacity: .55; }
@media (min-width: 1024px) { section .bk-speed-streaks { left: 48% !important; } }

/* Product hero layout B (owner pick, 2026-11-19): identity row, quiet offer line, three checks. */
.bk-hero-id { display: flex; align-items: center; gap: 14px; margin: 8px 0 22px; }
.bk-hero-id img { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.bk-hero-id p { display: flex; flex-direction: column; margin: 0; line-height: 1.25; }
.bk-hero-id b { font-size: 17px; font-weight: 700; color: #fff; }
.bk-hero-id span { margin-top: 3px; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(221,214,254,.8); }
.bk-hero-offer { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: rgba(255,255,255,.75); }
.bk-hero-offer__dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #FACC15; }
.bk-hero-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 22px 0 0; list-style: none; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px; color: rgba(255,255,255,.8); }
.bk-hero-checks li { display: flex; align-items: center; gap: 7px; }
.bk-hero-checks svg { color: #86EFAC; flex-shrink: 0; }
.bk-hero-checks { flex: 1 1 100%; width: 100%; }
@media (max-width: 640px) { .bk-hero-id span { font-size: 11.5px; } }
/* DSP "Check it" cards: image fills the card top edge to edge, like the demo cards (owner, 2026-11-19). */
.page-id-68 ol.space-y-16 > li { align-items: stretch; }
.page-id-68 ol.space-y-16 > li > .shadow-lift { width: 100%; }
.page-id-68 ol.space-y-16 > li > .shadow-lift img { padding: 0; object-fit: cover; object-position: top center; }
/* Dark pills (hero tag, section eyebrows, AI badge): a soft light runs around the border (owner, 2026-11-19). Off under reduced motion. */
@property --bk-ring { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.rounded-full.border.border-white\/15.bg-white\/5, .bk-pe-pill, .bk-ai-badge--dark { position: relative; isolation: isolate; }
.rounded-full.border.border-white\/15.bg-white\/5::before, .bk-pe-pill::before, .bk-ai-badge--dark::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; padding: 1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--bk-ring), transparent 0deg 250deg, rgb(196 181 253 / .4) 300deg, rgb(255 255 255 / .95) 345deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: bk-ring 4s linear infinite;
}
@keyframes bk-ring { to { --bk-ring: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .rounded-full.border.border-white\/15.bg-white\/5::before, .bk-pe-pill::before, .bk-ai-badge--dark::before { animation: none; display: none; }
}
