/* Chat-Deep brand system ("Evolved"). One set of tokens for the theme,
   buttons, links, pills and the chat. Primary #1257A8; amber #FFB01F only
   for limits, warnings and the Pro badge; green only for availability. */

@font-face {
	font-family: "Public Sans";
	src: url("fonts/public-sans-latin-var.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Sora";
	src: url("fonts/sora-latin-var.woff2") format("woff2");
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}

:root {
	--cd-primary: #1257A8;
	--cd-primary-strong: #0E4687;
	--cd-primary-soft: #E8F0FA;
	--cd-mark-light: #9DC2F5;
	--cd-accent: #FFB01F;
	--cd-accent-soft: #FFF4DC;
	--cd-success: #1D8A4E;
	--cd-success-soft: #E3F4EA;
	--cd-success-ink: #17703F; /* green text on the soft green pill: 5.4:1 */
	--cd-page: #F4F6FA;
	--cd-surface: #FFFFFF;
	--cd-line: #D9DFEA;
	--cd-ink: #14213A;
	--cd-muted: #5B6478;
	--cd-code: #EEF2F8;

	--cd-dark-primary-soft: #1A2D4B;
	--cd-dark-success: #3FBF7A;
	--cd-dark-success-soft: #12301F;
	--cd-dark-accent-soft: #3A2C0A;
	--cd-dark-page: #0E1524;
	--cd-dark-surface: #152036;
	--cd-dark-line: #2A3752;
	--cd-dark-ink: #E8EDF6;
	--cd-dark-muted: #A3AEC4;
	--cd-dark-code: #0E1524;

	--cd-font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--cd-font-head: "Sora", "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Theme typography through Blocksy's own variable. */
:root:root { --theme-font-family: var(--cd-font-body); }
h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title,
.page-title,
.wp-block-heading {
	--theme-font-family: var(--cd-font-head);
	font-family: var(--cd-font-head);
}

/* Wordmark: "Chat-Deep" in Sora 700 next to the inline SVG mark. */
.site-branding .site-title { font-weight: 700; letter-spacing: -.02em; font-size: 22px; line-height: 1.1; }
.site-branding .site-title a { color: var(--cd-ink); text-decoration: none; }
.site-branding .site-logo-container svg { display: block; width: auto; }

/* Footer brand block. */
.cd-footer-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--cd-font-head); font-weight: 700; font-size: 20px; letter-spacing: -.02em; color: var(--cd-ink) !important; text-decoration: none !important; }
.cd-footer-brand svg { width: 36px; height: 36px; flex: none; }
.cd-footer-tagline { margin: 8px 0 0; font-size: 14px; color: var(--cd-muted); }

/* Visible keyboard focus site-wide. */
a:focus-visible, button:focus-visible, .ct-button:focus-visible, .wp-block-button__link:focus-visible {
	outline: 2px solid var(--cd-primary);
	outline-offset: 2px;
}

/* ---------------- ad slots (fixed boxes: no layout shift) ---------------- */
.cd-ad { display: block; margin: 16px auto; text-align: center; }
.cd-ad__label { display: block; margin: 0 0 4px; font-family: var(--cd-font-body); font-size: 11px; line-height: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--cd-muted); }
.cd-ad[data-cd-ad]:not([data-cd-ready]) .cd-ad__label { visibility: hidden; }
/* AdSense collapses unfilled units; the box keeps its size (no layout shift) and the label hides. */
.cd-ad:has(ins[data-ad-status="unfilled"]) .cd-ad__label { visibility: hidden; }
.cd-ad__box { position: relative; margin: 0 auto; max-width: 100%; overflow: hidden; background: transparent; }
.cd-ad__box ins.adsbygoogle { display: block !important; width: 100%; height: 100%; }
.cd-ad__box > *:not(ins) { max-width: 100%; }

/* A1 — under the site header, every page: full-page-width responsive AdSense unit
   (data-ad-format="auto", full-width-responsive). No width or height cap and no clipping,
   so AdSense can serve the tallest ad it allows for the page width. min-height reserves
   space against layout shift (250px from 1024px up, 100px below); !important because AdSense
   writes an inline height on the box of an unfilled unit.
   width:100% because #main-container is a flex column: auto margins would shrink-wrap the slot. */
.cd-ad--a1 { width: 100%; box-sizing: border-box; margin: 12px 0 4px; padding: 0; max-height: none; }
.cd-ad--a1 .cd-ad__box { width: 100%; max-width: none; height: auto; max-height: none; min-height: 100px !important; overflow: visible; }
.cd-ad--a1 .cd-ad__box ins.adsbygoogle { height: auto; }
@media (min-width: 1024px) { .cd-ad--a1 .cd-ad__box { min-height: 250px !important; } }

/* A2 — homepage, right after the chat: 300×250 → 728×90 */
.cd-ad--a2 { margin: 28px auto; }
.cd-ad--a2 .cd-ad__box { width: 300px !important; height: 250px !important; }
@media (min-width: 768px) { .cd-ad--a2 .cd-ad__box { width: 728px !important; height: 90px !important; } }

/* A3 — full chat rail, desktop only: 300×600, sticky */
.cd-ad--a3 { position: sticky; top: 0; margin: 0; flex: none; }
.cd-ad--a3 .cd-ad__box { width: 300px !important; height: 600px !important; }
@media (max-width: 899.98px) { .cd-ad--a3 { display: none; } }

/* A4 — in-article after paragraph 3: 300×250 → 336×280 */
.cd-ad--a4 { margin: 28px auto; clear: both; }
.cd-ad--a4 .cd-ad__box { width: 300px !important; height: 250px !important; }
@media (min-width: 768px) { .cd-ad--a4 .cd-ad__box { width: 336px !important; height: 280px !important; } }

/* A5 — mobile anchor: 320×50 */
.cd-anchor {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 9990;
	display: flex;
	justify-content: center;
	padding: 15px 40px calc(4px + env(safe-area-inset-bottom, 0px));
	background: var(--cd-surface);
	border-top: 1px solid var(--cd-line);
	box-shadow: 0 -4px 16px rgba(20, 33, 58, .08);
}
.cd-anchor[hidden] { display: none !important; }
.cd-anchor .cd-ad { margin: 0; }
.cd-anchor .cd-ad__label { position: absolute; top: 2px; left: 0; right: 0; margin: 0; font-size: 9px; line-height: 11px; }
.cd-ad--a5 .cd-ad__box { width: 320px !important; height: 50px !important; }
.cd-anchor__close { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 1px solid var(--cd-line); border-radius: 50%; background: var(--cd-surface); color: var(--cd-muted); font-size: 16px; line-height: 24px; padding: 0; cursor: pointer; }
@media (min-width: 900px) { .cd-anchor { display: none !important; } }
html.cd-anchor-on body { padding-bottom: 76px; }
