/* ==========================================================================
   Bob Teaches Tech — main stylesheet (v2)
   Brand: charcoal #262b31, teal #1f4e56, orange #e17648 (from the logo).
   Editorial layout in the spirit of engineering publications: white pages,
   strong headlines, real images, rounded controls.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
	--brand: #1f4e56;
	--accent: #e17648;
	--accent-ink: #ffffff;
	--charcoal: #262b31;
	--live: #2f9e44;
	--fault: #d64545;
	--amber: #e2a03f;

	--bg: #ffffff;
	--surface: #ffffff;
	--alt: #f3f6f7;
	--sunk: #eef2f3;
	--ink: #1d2126;
	--ink-2: #3a4048;
	--muted: #6b7178;
	--line: #e1e6e9;
	--line-2: #cdd5d9;
	--brand-soft: color-mix(in srgb, var(--brand) 8%, #ffffff);
	--accent-soft: color-mix(in srgb, var(--accent) 10%, #ffffff);
	--code-bg: #1f2429;
	--code-ink: #e6e6e1;

	/* Topic colours (only used when "topic colours" is on) */
	--c-orange: #e17648;
	--c-blue: #2f6f9f;
	--c-teal: #1f4e56;
	--c-violet: #6a4c93;
	--c-green: #3d8a4f;
	--c-amber: #c4862a;
	--c-sky: #2a8a9a;
	--c-red: #c84b3a;

	--font-head: "Roboto", "Helvetica Neue", Arial, sans-serif;
	--font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--base: 1.125rem;

	--r: 10px;
	--r-lg: 14px;
	--pill: 999px;
	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 32px);
	--header-h: 84px;
	--shadow-sm: 0 1px 2px rgba(20, 30, 35, .06);
	--shadow: 0 1px 2px rgba(20, 30, 35, .05), 0 4px 14px -6px rgba(20, 30, 35, .12);
	--shadow-lg: 0 2px 4px rgba(20, 30, 35, .04), 0 18px 40px -18px rgba(20, 30, 35, .28);
	--ease: cubic-bezier(.2, .7, .2, 1);
	color-scheme: light;
}

:root[data-theme="dark"] {
	--brand: #5fb0bb;
	--bg: #1b1f24;
	--surface: #232830;
	--alt: #20252b;
	--sunk: #171a1e;
	--ink: #eef0f2;
	--ink-2: #c8ccd1;
	--muted: #949aa2;
	--line: #2f353d;
	--line-2: #3d444d;
	--brand-soft: color-mix(in srgb, var(--brand) 12%, #1b1f24);
	--accent-soft: color-mix(in srgb, var(--accent) 14%, #1b1f24);
	--code-bg: #13161a;
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--brand: #5fb0bb;
		--bg: #1b1f24;
		--surface: #232830;
		--alt: #20252b;
		--sunk: #171a1e;
		--ink: #eef0f2;
		--ink-2: #c8ccd1;
		--muted: #949aa2;
		--line: #2f353d;
		--line-2: #3d444d;
		--brand-soft: color-mix(in srgb, var(--brand) 12%, #1b1f24);
		--accent-soft: color-mix(in srgb, var(--accent) 14%, #1b1f24);
		--code-bg: #13161a;
		color-scheme: dark;
	}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
.icon { flex: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
kbd, code, pre, samp { font-family: var(--mono); }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(780px + var(--gutter) * 2); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--charcoal); color: #fff; padding: 8px 14px; border-radius: var(--pill); }
.skip-link:focus { top: 12px; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); }
.site-main { min-height: 60vh; outline: none; }

/* Small uppercase label used for categories and section kickers. */
.label { display: inline-flex; align-items: center; gap: .45em; font: 700 .75rem/1.4 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.label .icon { width: 15px; height: 15px; }
.pilot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; }
.pilot-fault { background: var(--fault); }

/* ---------- Buttons (always fully rounded) ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 46px; padding: .6em 1.4em;
	font: 600 .97rem/1.2 var(--font-head);
	border: 1.5px solid transparent; border-radius: var(--pill);
	cursor: pointer; text-decoration: none; white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s, box-shadow .2s, transform .15s var(--ease);
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); color: var(--accent-ink); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-ghost { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-ghost:hover { background: var(--brand); color: #fff; }
.btn-lg { min-height: 52px; padding: .75em 1.7em; font-size: 1.02rem; }
.btn-sm { min-height: 38px; padding: .4em 1em; font-size: .88rem; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 10px; background: transparent; border: 0; border-radius: var(--pill); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--alt); color: var(--ink); }
.icon-btn kbd { font-size: .7rem; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); }
.more { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; font-family: var(--font-head); }
.more .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.more:hover .icon { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 96%, transparent); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: saturate(1.3) blur(8px); } }
.no-sticky .site-header { position: relative; }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand .logo { height: 62px; width: auto; }
.brand .logo-dark { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
:root[data-theme="dark"] .brand .logo-light:not(.logo-only) { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .brand .logo-dark { display: block; }
	:root:not([data-theme="light"]) .brand .logo-light:not(.logo-only) { display: none; }
}
.primary-nav { margin-left: auto; }
.primary-nav .menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 9px 14px; font: 500 .97rem/1.2 var(--font-head); color: var(--ink-2); border-radius: var(--pill); }
.primary-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a, .primary-nav .current_page_item > a { color: var(--brand); font-weight: 600; }
.primary-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); opacity: .6; }
.primary-nav .sub-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; z-index: 5; list-style: none; margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s var(--ease), visibility .15s; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { border-radius: var(--r); }
.header-tools { display: flex; align-items: center; gap: 2px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.hire-link { padding: 9px 12px; font: 600 .94rem var(--font-head); color: var(--ink); }
.support-btn { margin-left: 4px; border-color: var(--line-2); color: var(--ink); }
.support-btn .icon { color: var(--accent); }
.support-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.header-cta { margin-left: 6px; }
.nav-toggle { display: none; }
.nav-toggle .i-close { display: none; }
.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }
body:not(.has-reading-layout) .read-progress { display: none; }
@media (max-width: 1020px) {
	:root { --header-h: 68px; }
	.nav-toggle { display: inline-flex; }
	.header-inner { gap: 10px; }
	.header-tools { margin-left: auto; }
	.icon-btn kbd, .support-btn span, .hire-link { display: none; }
	.support-btn { padding: 0; width: 42px; }
	.brand .logo { height: 48px; }
	.primary-nav { position: fixed; inset: var(--header-h) 0 0 0; margin: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 16px var(--gutter) 40px; overflow-y: auto; display: none; }
	body.nav-open .primary-nav { display: block; }
	body.nav-open { overflow: hidden; }
	body.nav-open .nav-toggle .i-close { display: block; }
	body.nav-open .nav-toggle .i-open { display: none; }
	.primary-nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
	.primary-nav .menu > li { border-bottom: 1px solid var(--line); }
	.primary-nav a { padding: 15px 4px; font-size: 1.08rem; border-radius: 0; background: none !important; }
	.primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 10px 12px; background: none; min-width: 0; }
	.primary-nav .sub-menu a { padding: 9px 4px; font-size: 1rem; color: var(--muted); }
	.primary-nav .menu-item-has-children > a::after { display: none; }
}
@media (max-width: 520px) { .header-cta { display: none; } }

/* ---------- Search dialog ---------- */
.search-dialog { width: min(680px, calc(100% - 32px)); margin: 12vh auto auto; padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
.search-dialog::backdrop { background: rgba(20, 24, 28, .55); }
.search-big { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-big input { flex: 1; min-width: 0; height: 50px; border: 0; background: transparent; color: var(--ink); font: 400 1.15rem var(--font-body); outline: none; }
.search-hints { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 20px 18px; font-size: .92rem; }
.search-hints .label { margin-right: 4px; }
.search-hints a { padding: 5px 12px; border-radius: var(--pill); background: var(--alt); color: var(--ink-2); }
.search-hints a:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="search"], input[type="url"], input[type="password"], textarea, select {
	width: 100%; min-height: 46px; padding: 10px 16px;
	font: 400 1rem/1.4 var(--font-body); color: var(--ink);
	background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r);
}
input[type="text"], input[type="email"], input[type="search"] { border-radius: var(--pill); }
textarea { border-radius: var(--r); }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
::placeholder { color: color-mix(in srgb, var(--muted) 85%, transparent); }
.search-form { display: flex; gap: 8px; max-width: 560px; margin: 1rem 0; }
.search-form .btn { flex: none; min-width: 50px; padding: 0 16px; }
.signup-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-fields input { flex: 1 1 150px; }
.signup-fields input[name="email"] { flex-basis: 220px; }
.signup-fields .btn { flex: 0 0 auto; }
.consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: .84rem; color: var(--muted); line-height: 1.45; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup-msg { margin: 10px 0 0; font-size: .92rem; }
.signup-msg:empty { display: none; }
.signup-msg.is-ok { color: var(--live); font-weight: 600; }
.signup-msg.is-err { color: var(--fault); }
.signup.is-done .signup-fields, .signup.is-done .consent { display: none; }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font: 700 .72rem/1.4 var(--font-head); letter-spacing: .07em; text-transform: uppercase; color: var(--brand); }
.tag .icon { width: 13px; height: 13px; }
.tag-tutorial, .tag-course { color: var(--accent); }
.tag-news { color: var(--c-red); }
.tag-level { padding: 2px 9px; border-radius: var(--pill); background: var(--alt); color: var(--ink-2); font-weight: 600; letter-spacing: .04em; text-transform: none; font-size: .75rem; }
.tag-level[data-level="beginner"] .icon { color: var(--live); }
.tag-level[data-level="intermediate"] .icon { color: var(--amber); }
.tag-level[data-level="advanced"] .icon { color: var(--fault); }
.tag-sponsored { padding: 2px 9px; border: 1px dashed var(--line-2); border-radius: var(--pill); color: var(--muted); }
.topic-colors .card .tags .tag:first-child { color: var(--tc); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 28px 24px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.stack { display: grid; gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--alt); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-placeholder { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%; background: radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%), linear-gradient(160deg, var(--brand-soft) 0%, var(--alt) 100%); color: var(--ink); text-align: center; padding: 16px; }
.topic-colors .card-placeholder { background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 12%, var(--surface)) 0%, var(--alt) 100%); }
.ph-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); box-shadow: 0 8px 20px -10px var(--brand); }
.topic-colors .ph-icon { background: var(--tc); }
.ph-icon .icon { width: 26px; height: 26px; color: #fff; }
.ph-title { font: 700 1.05rem/1.25 var(--font-head); color: var(--ink); max-width: 90%; }
.ph-cat { font: 700 .7rem/1.3 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card-title { font-size: 1.15rem; line-height: 1.32; margin: 0 0 8px; }
.card-title a { color: var(--ink); }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card-title a { color: var(--brand); }
.card-excerpt { color: var(--muted); font-size: .95rem; line-height: 1.55; margin: 0 0 16px; }
.card-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .84rem; color: var(--muted); }
.card-meta > * + *::before { content: "·"; margin-right: 14px; margin-left: -14px; opacity: .7; position: relative; left: 7px; }
.card-meta .price { color: var(--ink); font-weight: 600; }
.card-compact { flex-direction: row; align-items: stretch; }
.card-compact .card-body { padding: 14px 18px; }
.card-compact .card-title { font-size: 1.02rem; }
.card-row { flex-direction: row; }
.card-row .card-media { flex: 0 0 260px; aspect-ratio: auto; }
.card-row .ph-title { font-size: .92rem; }
@media (max-width: 640px) { .card-row { flex-direction: column; } .card-row .card-media { flex: none; aspect-ratio: 16/9; } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-tight { margin: 48px 0; }
.alt-bg, .courses-band, .resources-band, .about-band { background: var(--alt); }
.section-head { margin-bottom: 32px; max-width: 720px; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; max-width: none; }
.section-head h2 { margin: 6px 0 0; }
.section-head .label b { color: var(--accent); font-weight: 700; margin-right: 2px; }
.section-head .lead-sm { margin: 10px 0 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; min-height: 38px; font: 500 .9rem/1.2 var(--font-head); color: var(--ink-2); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--pill); cursor: pointer; }
.chip span { font-size: .78rem; color: var(--muted); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc, var(--brand)); flex: none; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.is-active span { color: inherit; opacity: .75; }
.chip.is-active i { background: #fff; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 40px; }
[data-feed].is-loading { opacity: .5; transition: opacity .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-grid.no-visual { grid-template-columns: minmax(0, 820px); }
.kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; font: 600 .95rem/1.2 var(--font-head); letter-spacing: .04em; color: var(--muted); }
.kicker::before { content: ""; width: 36px; height: 2px; background: var(--accent); border-radius: 2px; }
.kicker b { color: var(--brand); font-weight: 600; }
.hero h1 { font-size: clamp(2.3rem, 1.5rem + 3vw, 3.5rem); margin: 0 0 22px; max-width: 17ch; }
.hero h1 mark { background: none; color: var(--accent); }
.lead { font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); color: var(--ink-2); max-width: 58ch; line-height: 1.6; }
.hero .actions { margin: 32px 0 34px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 22px 0 0; list-style: none; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.hero-facts strong { color: var(--ink); font: 700 1.35rem/1 var(--font-head); margin-right: 6px; }
.hero-facts .icon { width: 18px; height: 18px; color: var(--live); vertical-align: -3px; margin-right: 4px; }
.hero-photo { position: relative; margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--r-lg) + 6px); box-shadow: var(--shadow-lg); }
.hero-photo::before { content: ""; position: absolute; right: -14px; bottom: -14px; width: 55%; height: 55%; border-radius: calc(var(--r-lg) + 6px); background: var(--accent-soft); z-index: -1; }
.hero-card { position: absolute; left: -24px; bottom: 28px; max-width: 300px; padding: 16px 18px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.hero-card .label { color: var(--accent); }
.hero-card a { display: block; margin-top: 4px; font: 700 1rem/1.35 var(--font-head); color: var(--ink); }
.hero-card a:hover { color: var(--brand); }
.hero-dark .hero { background: var(--charcoal); border-bottom: 0; }
.hero-dark .hero h1, .hero-dark .hero .hero-facts strong { color: #fff; }
.hero-dark .hero .lead { color: #c3c8ce; }
.hero-dark .hero .kicker, .hero-dark .hero .hero-facts { color: #9aa1a9; }
.hero-dark .hero .kicker b { color: #7cc2cc; }
.hero-dark .hero .hero-facts { border-color: #3a4048; }
.hero-dark .hero .btn-ghost { border-color: #7cc2cc; color: #7cc2cc; }
.hero-dark .hero .btn-ghost:hover { background: #7cc2cc; color: var(--charcoal); }
.hero-dark .hero-photo::before { background: color-mix(in srgb, var(--accent) 22%, var(--charcoal)); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } .hero-card { left: 12px; bottom: 12px; } }

/* Ladder screen (fallback hero visual) */
.ladder { margin: 0; background: var(--charcoal); border-radius: calc(var(--r-lg) + 6px); overflow: hidden; color: #9aa3ad; box-shadow: var(--shadow-lg); }
.ladder-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #353b43; font: 500 .74rem var(--mono); letter-spacing: .08em; color: #d5d9de; }
.ladder-bar .pilot { background: #7cc2cc; }
.ladder-state { margin-left: auto; padding: 3px 10px; border-radius: var(--pill); background: rgba(124, 194, 204, .15); color: #7cc2cc; }
.ladder svg { display: block; width: 100%; padding: 10px 8px 0; }
.ladder .rail path { stroke: #5a626c; stroke-width: 3; fill: none; }
.ladder .wire path, .ladder .el path, .ladder .el rect { stroke: #5a626c; stroke-width: 2; fill: none; }
.ladder .live path { stroke: #7cc2cc; }
.ladder .wire.live path { stroke-width: 2.5; }
.ladder text { font: 500 10.5px var(--mono); fill: #8e97a2; }
.ladder .no text { fill: #5d6570; }
.ladder text.strong { fill: #e6e9ec; }
.ladder text.acc { fill: var(--accent); }
.ladder figcaption { padding: 12px 18px; border-top: 1px solid #353b43; font: 400 .78rem var(--font-body); color: #9aa3ad; }

/* Featured (editorial lead story) */
.featured-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 32px; }
.lead-story { position: relative; display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: box-shadow .25s var(--ease); }
.lead-story:hover { box-shadow: var(--shadow-lg); }
.lead-story .card-media { aspect-ratio: 16 / 9; }
.lead-story .card-body { padding: 24px 28px 28px; }
.lead-story .card-title { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.85rem); line-height: 1.22; }
.lead-story .card-excerpt { font-size: 1.02rem; }
.side-stories { display: grid; gap: 0; align-content: start; }
.side-story { position: relative; display: grid; grid-template-columns: 132px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.side-story:first-child { padding-top: 0; }
.side-story .card-media { aspect-ratio: 4 / 3; border-radius: var(--r); }
.side-story h3 { font-size: 1.02rem; line-height: 1.35; margin: 4px 0 6px; }
.side-story h3 a { color: var(--ink); }
.side-story h3 a::after { content: ""; position: absolute; inset: 0; }
.side-story:hover h3 a { color: var(--brand); }
.side-story .card-meta { font-size: .8rem; }
@media (max-width: 920px) { .featured-grid { grid-template-columns: 1fr; } }

/* Core areas */
.area-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.area { position: relative; display: flex; flex-direction: column; padding: 26px 24px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.area:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; color: var(--ink); }
.area-tag { display: none; }
.area-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.topic-colors .area-icon { background: color-mix(in srgb, var(--tc) 12%, var(--surface)); color: var(--tc); }
.area-icon .icon { width: 24px; height: 24px; }
.area h3 { font-size: 1.15rem; margin-bottom: 6px; }
.area p { color: var(--muted); font-size: .94rem; line-height: 1.55; }
.area-count { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font: 600 .9rem var(--font-head); color: var(--brand); }
.area-count .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.area:hover .area-count .icon { transform: translateX(3px); color: var(--accent); }
@media (max-width: 980px) { .area-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .area-grid { grid-template-columns: 1fr; } }

/* Lead magnet */
.magnet-panel { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; padding: clamp(28px, 4vw, 56px); background: var(--charcoal); color: #fff; border-radius: calc(var(--r-lg) + 6px); overflow: hidden; position: relative; }
.magnet-panel h2 { color: #fff; margin: 10px 0; }
.magnet-panel p { color: #c3c8ce; }
.magnet-panel .label { color: var(--accent); }
.magnet-panel .label .pilot { display: none; }
.magnet-panel input[type="text"], .magnet-panel input[type="email"] { background: #fff; border-color: transparent; color: #1d2126; }
.magnet-panel .consent, .magnet-panel .muted { color: #9aa1a9; }
.magnet-panel .signup-msg.is-ok { color: #8fd19e; }
.magnet-visual img { border-radius: var(--r-lg); }
.sheet { position: relative; aspect-ratio: 1 / 1.3; max-width: 290px; margin-inline: auto; padding: 28px 24px; background: #fff; color: #1d2126; border-radius: var(--r); transform: rotate(3deg); box-shadow: -16px 18px 0 -2px var(--accent), 0 30px 60px -20px rgba(0, 0, 0, .6); }
.sheet .label { color: var(--brand); }
.sheet b { display: block; margin: 10px 0 18px; font: 700 1.15rem/1.25 var(--font-head); }
.sheet i { display: block; height: 8px; margin: 11px 0; background: #e6eaec; border-radius: 4px; }
.sheet i:nth-of-type(2) { width: 80%; } .sheet i:nth-of-type(4) { width: 60%; }
.sheet .stamp { position: absolute; right: 18px; bottom: 24px; padding: 4px 12px; border: 2px solid var(--accent); color: var(--accent); font: 700 .85rem var(--font-head); letter-spacing: .14em; transform: rotate(-10deg); border-radius: var(--pill); }
@media (max-width: 820px) { .magnet-panel { grid-template-columns: 1fr; } .magnet-visual { display: none; } }

/* Newsletter */
.newsletter { display: grid; gap: 20px; }
.newsletter h2 { margin: 8px 0 6px; font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); }
.newsletter p { color: var(--muted); margin: 0; }
.newsletter-panel, .newsletter-band { grid-template-columns: 1fr 1.1fr; align-items: center; gap: 48px; }
.newsletter-panel { padding: clamp(28px, 4vw, 56px); background: var(--brand-soft); border-radius: calc(var(--r-lg) + 6px); }
.newsletter-inline { padding: 28px; margin: 2rem 0; background: var(--brand-soft); border-radius: var(--r-lg); }
@media (max-width: 820px) { .newsletter-panel, .newsletter-band { grid-template-columns: 1fr; gap: 16px; } }
.footer-signup { padding: 56px 0; background: var(--brand); color: #fff; }
.footer-signup .newsletter h2 { color: #fff; }
.footer-signup .newsletter p, .footer-signup .consent { color: rgba(255, 255, 255, .78); }
.footer-signup .label { color: color-mix(in srgb, var(--accent) 60%, #fff); }
.footer-signup input[type="text"], .footer-signup input[type="email"] { background: #fff; border-color: transparent; color: #1d2126; }
.footer-signup .consent input { accent-color: var(--accent); }
.footer-signup .signup-msg.is-ok, .footer-signup .signup-msg.is-err { color: #fff; }
:root[data-theme="dark"] .footer-signup { background: #18393f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .footer-signup { background: #18393f; } }

/* Glossary band, about */
.term-cloud { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.term-cloud a { display: inline-block; padding: 9px 18px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--pill); font: 500 .95rem var(--font-head); color: var(--ink-2); }
.term-cloud a:hover { border-color: var(--brand); color: var(--brand); }
.about-grid { display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: center; max-width: 940px; }
.about-photo { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 6px var(--surface), 0 0 0 8px var(--accent); }
.about-grid h2 { margin: 6px 0 12px; }
.about-grid p { color: var(--ink-2); font-size: 1.05rem; }
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; gap: 24px; } .about-photo { width: 120px; height: 120px; } }

/* ---------- Page header band (all inner pages) ---------- */
.band { position: relative; padding: 8px 0 44px; background: var(--alt); border-bottom: 1px solid var(--line); }
.bands-dark .band { background: var(--charcoal); border-bottom: 0; }
.bands-dark .band h1, .bands-dark .band .entry-title { color: #fff; }
.bands-dark .band .lead, .bands-dark .band .entry-meta, .bands-dark .band .crumbs ol, .bands-dark .band .crumbs a, .bands-dark .band .muted { color: #b5bcc4; }
.bands-dark .band .entry-meta { border-color: #3a4048; }
.bands-dark .band .byline { color: #fff; }
.bands-dark .band .label, .bands-dark .band .tag { color: #7cc2cc; }
.bands-dark .band .tag-tutorial, .bands-dark .band .tag-course { color: var(--accent); }
.bands-dark .band .tag-level { background: rgba(255, 255, 255, .08); color: #d5d9de; }
.bands-dark .band .chip { background: transparent; border-color: #4a525c; color: #d5d9de; }
.band .entry-header { padding-top: 28px; padding-bottom: 0; }
.band .archive-header { padding: 0; margin: 0; border: 0; }
.band:has(+ .entry-media) { padding-bottom: 130px; }
.band + .entry-media { position: relative; z-index: 1; margin-top: -104px; }
.band + .entry-media img, .band + .entry-media .video { box-shadow: var(--shadow-lg); }
.band + .archive { padding-top: 48px; }
.page-body { padding-top: 40px; padding-bottom: 72px; }

/* ---------- Breadcrumbs & archives ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0 0 22px; padding: 22px 0 0; font-size: .86rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; opacity: .6; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.archive { padding-bottom: 80px; }
.archive-header h1 { margin: 8px 0 12px; }
.archive-header .lead p:last-child { margin: 0; }
.archive-header .chips { margin: 22px 0 0; }
.chips-level { margin-top: 10px !important; }
.panel { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 56px 0 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--pill); font: 600 .95rem var(--font-head); color: var(--ink-2); background: var(--surface); }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .dots { border: 0; background: none; }

/* ---------- Single article ---------- */
.entry-title { max-width: 26ch; margin: 6px 0 16px; }
.entry-header .lead { margin-bottom: 22px; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 16px 0 0; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.entry-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.entry-meta .icon { width: 16px; height: 16px; }
.entry-meta .updated { color: var(--live); font-weight: 500; }
.byline { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.byline img { border-radius: 50%; width: 36px; height: 36px; }
.tested-on { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; font-size: .9rem; color: var(--ink-2); }
.tested-on .label { color: var(--live); }
.tested-on .label .icon { color: var(--live); }
.bands-dark .band .tested-on { color: #d5d9de; }
.entry-media { margin: 32px auto 0; }
.entry-media img { width: 100%; border-radius: var(--r-lg); }
.entry-media figcaption { margin-top: 10px; font-size: .86rem; color: var(--muted); }
.reading-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding-top: 44px; padding-bottom: 56px; }
.entry-main { min-width: 0; max-width: 760px; }
.entry-aside .sticky, .curriculum .sticky, .resource-aside .sticky, .lesson-outline .sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.entry-aside .sticky { max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.toc-mobile { display: none; }
@media (max-width: 1080px) { .reading-grid { grid-template-columns: 1fr; gap: 0; } .entry-aside { display: none; } .toc-mobile { display: block; } }

.toc { font-size: .93rem; }
.toc details { padding: 20px 22px; background: var(--alt); border-radius: var(--r-lg); }
.toc summary { cursor: pointer; list-style: none; margin-bottom: 12px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0 0 4px; line-height: 1.4; }
.toc ol ol { padding: 4px 0 4px 14px; border-left: 2px solid var(--line); margin: 4px 0 6px 2px; font-size: .9rem; }
.toc a { display: block; padding: 4px 0; color: var(--ink-2); }
.toc a:hover { color: var(--brand); }
.toc a.is-active { color: var(--accent); font-weight: 600; }
.toc-mobile .toc { margin: 0 0 32px; }
.toc-mobile .toc details:not([open]) summary { margin: 0; }
.entry-aside .widgets, .entry-aside .ad-slot { margin-top: 32px; }

.quick-answer { margin: 0 0 36px; padding: 22px 26px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.quick-answer .label { color: color-mix(in srgb, var(--accent) 80%, #000); }
:root[data-theme="dark"] .quick-answer .label { color: var(--accent); }
.quick-answer p { margin: 10px 0 0; font-size: 1.1rem; line-height: 1.6; color: var(--ink); }
.quick-answer ul { margin: 12px 0 0; padding-left: 1.2em; }
.quick-answer li { margin-bottom: 4px; }
.disclosure { font-size: .88rem; color: var(--muted); padding: 12px 16px; background: var(--alt); border-radius: var(--r); }
.series { margin: 0 0 30px; padding: 18px 22px; background: var(--brand-soft); border-radius: var(--r-lg); }
.series summary { cursor: pointer; font-weight: 600; }
.series ol { margin: 12px 0 0; padding-left: 1.4em; font-size: .96rem; }
.series li { margin: 5px 0; }
.series li[aria-current] { color: var(--accent); }

/* Prose */
.prose { font-size: var(--base); line-height: 1.75; color: var(--ink-2); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2em; }
.prose h2 { margin: 2em 0 .65em; color: var(--ink); font-size: clamp(1.5rem, 1.3rem + .7vw, 1.9rem); }
.prose h3 { margin: 1.7em 0 .5em; color: var(--ink); font-size: 1.3rem; }
.prose h4 { margin: 1.4em 0 .4em; color: var(--ink); font-size: 1.1rem; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--brand); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--accent); text-decoration-color: currentColor; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--accent); }
.prose img { border-radius: var(--r-lg); }
.prose figure { margin: 2.2em 0; }
.prose figcaption, .prose .wp-element-caption { margin-top: 10px; font-size: .88rem; color: var(--muted); text-align: center; }
.prose blockquote { margin: 2em 0; padding: 6px 0 6px 22px; border-left: 4px solid var(--brand); font-size: 1.12rem; color: var(--ink); font-style: italic; }
.prose :not(pre) > code { padding: .12em .4em; font-size: .86em; background: var(--alt); border-radius: 5px; color: var(--ink); }
.prose pre, .wp-block-code { position: relative; margin: 1.8em 0; padding: 20px 22px; overflow-x: auto; background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-lg); font: 400 .9rem/1.65 var(--mono); tab-size: 4; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.wp-block-code.is-style-ladder { color: #9fd8df; }
.wp-block-code.is-style-ladder::before { content: "PLC program (IL)"; display: block; margin: -4px 0 12px; font: 600 .72rem var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: #7f8892; }
.wp-block-code.is-style-terminal::before { content: "Terminal"; display: block; margin: -4px 0 12px; font: 600 .72rem var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: #7f8892; }
.code-copy { position: absolute; top: 10px; right: 10px; padding: 5px 12px; font: 600 .74rem var(--font-head); color: #c8ccd1; background: #343a42; border: 0; border-radius: var(--pill); cursor: pointer; opacity: 0; transition: opacity .15s; }
pre:hover .code-copy, .code-copy:focus { opacity: 1; }
@media (hover: none) { .code-copy { opacity: 1; } }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose .wp-block-table { overflow-x: auto; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose thead th { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--brand); }
.prose .is-style-spec table, .parts-table { border: 1px solid var(--line); border-radius: var(--r-lg); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.prose .is-style-spec thead th, .parts-table thead th { background: var(--brand); color: #fff; border: 0; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.prose .is-style-spec tbody tr:nth-child(even) td, .parts-table tbody tr:nth-child(even) td { background: var(--alt); }
.prose .is-style-spec tr:last-child td, .parts-table tr:last-child td { border-bottom: 0; }
.prose .is-style-spec td:first-child, .parts-table td:first-child { font-weight: 600; color: var(--ink); }

/* Callouts */
.prose [class*="is-style-callout"], .callout { position: relative; margin: 1.9em 0; padding: 18px 22px; background: var(--alt); border-left: 4px solid var(--muted); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.prose [class*="is-style-callout"] > :last-child { margin-bottom: 0; }
.prose .is-style-callout-tip { border-left-color: var(--live); background: color-mix(in srgb, var(--live) 7%, var(--surface)); }
.prose .is-style-callout-note { border-left-color: var(--brand); background: var(--brand-soft); }
.prose .is-style-callout-warning { border-left-color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--surface)); }
.prose .is-style-callout-danger { border-left-color: var(--fault); background: color-mix(in srgb, var(--fault) 7%, var(--surface)); }
.prose .is-style-callout-danger::before { content: "⚠ Safety"; display: block; margin-bottom: 6px; font: 700 .76rem var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--fault); }
.prose .is-style-panel { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.prose .is-style-checklist { list-style: none; padding-left: 0; }
.prose .is-style-checklist li { position: relative; padding-left: 32px; }
.prose .is-style-checklist li::before { content: "✓"; position: absolute; left: 0; top: .1em; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--live) 15%, var(--surface)); color: var(--live); font-size: .8rem; font-weight: 700; }
.prose .is-style-steps { list-style: none; padding-left: 0; counter-reset: step; }
.prose .is-style-steps > li { position: relative; counter-increment: step; padding: 3px 0 12px 50px; margin: 0 0 6px; }
.prose .is-style-steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; font: 700 .9rem var(--font-head); background: var(--brand); color: #fff; border-radius: 50%; }
.prose details:not(.series), .faq-block details { margin: 0 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.prose details > summary, .faq-block summary { cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
.prose details > summary::-webkit-details-marker, .faq-block summary::-webkit-details-marker { display: none; }
.prose details > summary::after, .faq-block summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--alt); font: 600 1.1rem/1 var(--font-head); color: var(--brand); }
.prose details[open] > summary::after, .faq-block details[open] summary::after { content: "−"; }
.prose details > :not(summary), .faq-block details > div { padding: 0 20px; }
.prose details > :last-child, .faq-block details > div { padding-bottom: 16px; margin-bottom: 0; }
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.prose-full > * { max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.prose-full > .alignfull { max-width: none; padding-inline: 0; }

/* Tutorial builder output */
.parts, .faq-block { margin: 2.4em 0; }
.parts h2, .faq-block h2 { margin-top: 0; }
.parts-table { width: 100%; font-size: .95rem; }
.parts-table th, .parts-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.parts-table a { font-weight: 600; }
.update-note { margin: 0 0 30px; padding: 14px 20px; background: color-mix(in srgb, var(--live) 7%, var(--surface)); border-radius: var(--r-lg); font-size: .95rem; }
.update-note summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.update-note p { margin: 8px 0 0; color: var(--ink-2); white-space: pre-line; }
.suggest-update { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; font-weight: 600; }
.edit-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; background: var(--charcoal); color: #fff; border-radius: var(--pill); font: 600 .9rem var(--font-head); box-shadow: var(--shadow-lg); }
.edit-fab:hover { background: var(--brand); color: #fff; }
.edit-fab .icon { width: 17px; height: 17px; }

/* Video facade */
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-lg); overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .88; }
.video-play { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .6); transition: transform .15s var(--ease); }
.video-play .icon { width: 28px; height: 28px; fill: currentColor; margin-left: 4px; }
.video:hover .video-play { transform: scale(1.07); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-fallback { position: absolute; left: -9999px; }

/* Downloads */
.entry-downloads { margin: 44px 0 24px; display: grid; gap: 16px; }
.download { padding: 24px; background: var(--brand-soft); border-radius: var(--r-lg); }
.download-head { display: flex; gap: 16px; margin-bottom: 18px; }
.download-head h3 { margin: 4px 0; font-size: 1.12rem; }
.download-head h3 a { color: var(--ink); }
.download-head p { margin: 0; color: var(--muted); font-size: .94rem; }
.download-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--brand); color: #fff; }
.download .small { margin: 10px 0 0; }
.download-hero { padding: 0; background: none; margin-top: 22px; }
.resource-aside .download { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* Entry footer, share, author */
.entry-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; padding: 26px 0; margin-top: 36px; border-top: 1px solid var(--line); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag-list .label { margin-right: 4px; }
.tag-list a { padding: 5px 13px; font-size: .86rem; background: var(--alt); border-radius: var(--pill); color: var(--ink-2); }
.tag-list a:hover { background: var(--brand-soft); color: var(--brand); }
.share { display: flex; align-items: center; gap: 6px; }
.share .label { margin-right: 4px; color: var(--muted); }
.share a, .share button { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--alt); color: var(--ink-2); cursor: pointer; }
.share a:hover, .share button:hover { background: var(--brand); color: #fff; }
.share .icon { width: 18px; height: 18px; }
.share .copied { background: var(--live); color: #fff; }
.author-box { display: grid; grid-template-columns: 80px 1fr; gap: 22px; margin: 36px 0; padding: 26px; background: var(--alt); border-radius: var(--r-lg); }
.author-box img { width: 80px; height: 80px; border-radius: 50%; }
.author-box h2 { font-size: 1.2rem; margin: 4px 0 8px; }
.author-box h2 a { color: var(--ink); }
.author-box p { font-size: .97rem; color: var(--ink-2); margin-bottom: 12px; }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.social a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-2); background: var(--surface); }
.social a:hover { color: #fff; background: var(--brand); }
.social .icon { width: 18px; height: 18px; }
.social .hire { width: auto; padding: 0 16px; border-radius: var(--pill); font: 600 .88rem var(--font-head); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 36px 0; }
.post-nav a { display: block; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); font: 600 1rem/1.4 var(--font-head); color: var(--ink); background: var(--surface); transition: box-shadow .2s, border-color .2s; }
.post-nav a:hover { box-shadow: var(--shadow); border-color: transparent; color: var(--brand); }
.post-nav .label { display: block; margin-bottom: 6px; color: var(--muted); }
.post-nav .next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { grid-column: 1; } }
.ad-slot { margin: 2em 0; padding: 12px; background: var(--alt); border-radius: var(--r); text-align: center; }
.ad-slot .label { display: block; margin-bottom: 8px; font-size: .65rem; color: var(--muted); }
.ad-slot .widget { margin: 0; }

/* Donate */
.donate { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; margin: 36px 0; padding: 28px; background: var(--accent-soft); border-radius: var(--r-lg); }
.donate h2 { font-size: 1.35rem; margin: 6px 0 8px; }
.donate p { color: var(--ink-2); font-size: .97rem; margin: 0; }
.donate .label { color: color-mix(in srgb, var(--accent) 80%, #000); }
.donate .label .icon { color: var(--accent); }
.donate-methods { display: grid; gap: 14px; }
.mpesa { padding: 16px 18px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.mpesa .label { color: #3d8a4f; }
.mpesa-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.mpesa-num { font: 600 1.45rem var(--mono); letter-spacing: .05em; color: var(--ink); }
.mpesa p { margin: 4px 0 0; }
.mpesa .btn-ghost { border-color: var(--line-2); color: var(--ink); }
.mpesa .btn-ghost:hover { background: var(--alt); color: var(--ink); }
.mpesa .copied { border-color: var(--live); color: var(--live); }
.donate-links { display: flex; flex-wrap: wrap; gap: 8px; }
.donate-compact, .donate-post { grid-template-columns: 1fr; }
@media (max-width: 720px) { .donate { grid-template-columns: 1fr; } }

/* Comments */
.comments { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.comments-title, .comment-reply-title { font-size: 1.35rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .82rem; margin: 2px 0 8px 50px; }
.comment-metadata a { color: var(--muted); }
.comment-content { margin-left: 50px; }
.reply { margin-left: 50px; font-size: .88rem; font-weight: 600; }
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { border-radius: var(--r); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; }

/* ---------- Course & lesson ---------- */
.course-hero { padding: 0 0 52px; }
.course-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.course-hero-grid.no-media { grid-template-columns: minmax(0, 820px); }
.course-media img, .course-media .video { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.spec-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 26px; }
.spec-row div { padding: 10px 18px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.spec-row dt { font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.spec-row dd { margin: 2px 0 0; font: 700 1.05rem var(--font-head); color: var(--ink); }
.bands-dark .spec-row div { background: rgba(255, 255, 255, .06); box-shadow: none; }
.bands-dark .spec-row dd { color: #fff; }
.course-body { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 56px; padding-top: 44px; padding-bottom: 72px; }
.learn-box { margin-bottom: 34px; padding: 26px; background: var(--brand-soft); border-radius: var(--r-lg); }
.learn-box h2 { font-size: 1.25rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.checks .icon { flex: none; color: var(--live); margin-top: 2px; }
.curriculum .sticky { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.curriculum-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.curriculum-head .label { margin: 0; }
.meter { height: 6px; background: var(--alt); border-radius: var(--pill); overflow: hidden; flex: 1; max-width: 140px; }
.meter span { display: block; height: 100%; width: 0; background: var(--live); border-radius: var(--pill); transition: width .3s var(--ease); }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li { border-top: 1px solid var(--line); }
.lesson-list li:first-child { border-top: 0; }
.lesson-list a { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 8px; align-items: center; padding: 12px 0; font-size: .95rem; line-height: 1.4; color: var(--ink); }
.lesson-list a:hover { color: var(--brand); }
.lesson-list .num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--alt); font: 600 .78rem var(--font-head); color: var(--muted); }
.lesson-list .d { font-size: .8rem; color: var(--muted); }
.lesson-list .done { visibility: hidden; color: var(--live); }
.lesson-list .done .icon { width: 17px; height: 17px; }
.lesson-list li.is-done .done { visibility: visible; }
.lesson-list li.is-done .num { background: color-mix(in srgb, var(--live) 15%, var(--surface)); color: var(--live); }
.lesson-list li.is-current a { color: var(--accent); font-weight: 600; }
.lesson-list li.is-current .num { background: var(--accent); color: #fff; }
.lesson-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; padding-top: 28px; padding-bottom: 72px; }
.lesson-main { max-width: 780px; }
.lesson-outline .sticky { padding: 20px; background: var(--alt); border-radius: var(--r-lg); }
.lesson-outline .back { display: block; margin: 0 0 14px; line-height: 1.5; color: var(--brand); }
.lesson-outline .meter { max-width: none; margin-bottom: 12px; background: var(--surface); }
.lesson-complete { margin: 44px 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
[data-complete].is-done { background: var(--live); border-color: var(--live); color: #fff; }
.locked h2 { font-size: 1.35rem; }
@media (max-width: 1000px) { .course-hero-grid, .course-body, .lesson-grid { grid-template-columns: 1fr; } .lesson-outline { order: 2; } .curriculum .sticky, .lesson-outline .sticky { position: static; } }

/* ---------- Resource ---------- */
.resource-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; padding-top: 44px; padding-bottom: 72px; }
.resource-cover img { width: 100%; border-radius: var(--r-lg); margin-bottom: 16px; box-shadow: var(--shadow); }
@media (max-width: 960px) { .resource-grid { grid-template-columns: 1fr; } .resource-aside { order: -1; } .resource-aside .sticky { position: static; } }

/* ---------- Glossary ---------- */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.az a, .az span { display: inline-grid; place-items: center; width: 38px; height: 38px; font: 600 .92rem var(--font-head); border-radius: 50%; background: var(--surface); color: var(--ink-2); }
.az span { opacity: .35; }
.az a:hover { background: var(--brand); color: #fff; }
.bands-dark .band .az a, .bands-dark .band .az span { background: rgba(255, 255, 255, .08); color: #fff; }
.filter-box { position: relative; display: block; max-width: 440px; margin-top: 22px; }
.filter-box .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filter-box input { padding-left: 46px; }
.gloss-group { display: grid; grid-template-columns: 80px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.gloss-letter { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); font: 700 1.6rem var(--font-head); color: var(--brand); margin: 0; }
.gloss-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px 36px; }
.gloss-list a { color: var(--ink); }
.gloss-list a:hover strong { color: var(--brand); }
.gloss-list p { margin: 4px 0 0; font-size: .93rem; color: var(--muted); line-height: 1.5; }
.gloss-group.is-empty { display: none; }
.definition dfn { font-style: normal; font-weight: 700; color: var(--ink); }
.gloss { color: var(--brand); text-decoration: underline dotted; cursor: help; position: relative; }
.gloss[data-def]:hover::after, .gloss[data-def]:focus::after { content: attr(data-def); position: absolute; left: 0; bottom: calc(100% + 8px); width: max-content; max-width: 300px; padding: 10px 14px; background: var(--charcoal); color: #fff; font-size: .84rem; line-height: 1.45; border-radius: var(--r); z-index: 10; font-weight: 400; }
@media (max-width: 600px) { .gloss-group { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- Start here, 404 ---------- */
.paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.path { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.path h3 { display: flex; align-items: center; gap: 12px; font-size: 1.12rem; }
.path h3 .area-icon { margin: 0; width: 40px; height: 40px; }
.path ol { padding-left: 1.3em; margin: 0 0 14px; font-size: .97rem; }
.path li { margin: 7px 0; }
.path li::marker { color: var(--accent); font-weight: 600; }
.path a { color: var(--ink-2); }
.path a:hover { color: var(--brand); }
.error-404 { padding-top: 24px; }
.error-404 h1 { margin: 14px 0; }
.fault { color: var(--fault); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #c3c8ce; padding: 64px 0 28px; font-size: .96rem; }
.site-footer a { color: #c3c8ce; }
.site-footer a:hover { color: #fff; }
.site-footer .logo-footer { height: 56px; width: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-brand p { color: #9aa1a9; max-width: 34ch; margin: 18px 0; }
.site-footer h2.label { color: #fff; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 10px; }
.site-footer .social a { background: rgba(255, 255, 255, .07); color: #e2e5e8; }
.site-footer .social a:hover { background: var(--accent); color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding-top: 22px; border-top: 1px solid #3a4048; font-size: .86rem; color: #8d949c; }
.footer-bottom .status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Widgets ---------- */
.widget { margin-bottom: 30px; font-size: .95rem; }
.widget h2, .widget h3, .widget .wp-block-heading, .widget .wp-block-search__label, .widget-title { display: block; margin: 0 0 12px; font: 700 .78rem/1.4 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.widget a { color: var(--ink-2); }
.widget a:hover { color: var(--brand); }
.wp-block-search__inside-wrapper { display: flex; gap: 6px; }
.wp-block-search__button { min-height: 46px; padding: 0 18px; border: 0; border-radius: var(--pill); background: var(--brand); color: #fff; font: 600 .92rem var(--font-head); cursor: pointer; margin: 0; }

/* ---------- WordPress core ---------- */
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.page-links { margin: 2em 0; font-weight: 600; }

/* ---------- Print ---------- */
@media print {
	.site-header, .site-footer, .footer-signup, .entry-aside, .share, .donate, .post-nav, .comments, .related, .ad-slot, .toc-mobile, .entry-downloads, .edit-fab { display: none !important; }
	body { background: #fff; color: #000; font-size: 11pt; }
	.band { background: none; }
	.reading-grid { display: block; }
	.prose pre { white-space: pre-wrap; border: 1px solid #999; background: #f5f5f5; color: #000; }
	.prose a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ==========================================================================
   3D books + flipbook reader
   ========================================================================== */
.book3d { --w: 200px; --h: calc(var(--w) * 1.38); --t: 26px; display: inline-block; perspective: 1400px; flex: none; }
.book3d-sm { --w: 112px; --t: 15px; }
.book3d-inner { position: relative; display: block; width: var(--w); height: var(--h); transform-style: preserve-3d; transform: rotateY(-30deg); transition: transform .6s var(--ease); }
.book3d[data-flipbook] { cursor: pointer; }
.book3d[data-flipbook]:hover .book3d-inner, .book3d[data-flipbook]:focus-visible .book3d-inner, .card:hover .book3d-inner { transform: rotateY(-12deg); }
.book3d-cover { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 2px 6px 6px 2px; transform: translateZ(calc(var(--t) / 2)); background: var(--brand); box-shadow: inset 4px 0 6px -2px rgba(0, 0, 0, .35), 5px 5px 20px rgba(0, 0, 0, .18); }
.book3d-cover img { width: 100%; height: 100%; object-fit: cover; }
.book3d-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .25) 0, rgba(255, 255, 255, .12) 3%, transparent 7%, transparent 85%, rgba(255, 255, 255, .08) 100%); pointer-events: none; }
.book3d-inner::before { content: ""; position: absolute; left: 0; top: 4px; width: var(--t); height: calc(var(--h) - 8px); transform: translateX(calc(var(--w) - var(--t) / 2 - 3px)) rotateY(90deg); background: repeating-linear-gradient(90deg, #fbfaf7 0 2px, #e9e6de 2px 3px); }
.book3d-inner::after { content: ""; position: absolute; inset: 0; transform: translateZ(calc(var(--t) / -2)); background: color-mix(in srgb, var(--brand) 80%, #000); border-radius: 2px 6px 6px 2px; box-shadow: -14px 12px 40px rgba(0, 0, 0, .3); }
.book3d-blank { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 18% 12% 12% 16%; background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%), linear-gradient(160deg, var(--brand), color-mix(in srgb, var(--brand) 65%, #000)); color: #fff; text-align: left; }
.book3d-mark .icon { width: 22px; height: 22px; color: var(--accent); }
.book3d-title { font: 700 1.05rem/1.2 var(--font-head); }
.book3d-sm .book3d-title { font-size: .7rem; }
.book3d-site { font: 600 .62rem/1.2 var(--font-head); letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.book3d-sm .book3d-site { display: none; }

.book-launch { display: flex; align-items: center; gap: 44px; margin: 0 0 40px; padding: 34px 36px; background: var(--brand-soft); border-radius: var(--r-lg); }
.book-launch .label { color: var(--brand); }
.book-launch-copy p { margin: 8px 0 0; }
.book-launch .actions { margin-top: 18px; }
.book-launch.is-locked .book3d { filter: saturate(.75); }
.course-book h2 { font-size: 1.35rem; }
@media (max-width: 640px) { .book-launch { flex-direction: column; align-items: flex-start; gap: 28px; padding: 26px; } .book3d { --w: 160px; } }

.card-book { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(90% 90% at 70% 30%, var(--surface), var(--alt)); }
.card-row .card-book .book3d, .side-story .card-book .book3d { --w: 70px; --t: 10px; }

/* Reader dialog */
html.flip-open { overflow: hidden; }
.flip-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #1b1f24; color: #e9ecef; }
.flip-dialog::backdrop { background: rgba(10, 12, 14, .85); }
.flip-dialog[open] { display: flex; flex-direction: column; }
.flip-bar { display: flex; align-items: center; gap: 16px; padding: 10px 14px 10px 22px; background: #262b31; border-bottom: 1px solid #353b43; }
.flip-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 1rem var(--font-head); color: #fff; }
.flip-count { font: 500 .9rem var(--font-head); color: #aeb5bd; white-space: nowrap; }
.flip-tools { display: flex; gap: 2px; }
.flip-tools .icon-btn { color: #d5d9de; }
.flip-tools .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.flip-stage { position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; background: radial-gradient(70% 60% at 50% 45%, #2c333b, #1b1f24); }
.flip-holder { display: grid; place-items: center; }
.flip-book { position: relative; }
.flip-book.show-spine { box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.flip-book.show-spine::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 70px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .06) 35%, rgba(0, 0, 0, .2) 50%, rgba(0, 0, 0, .06) 65%, transparent); pointer-events: none; z-index: 5; }
.flip-page { background: #fff; overflow: hidden; }
.flip-page canvas { display: block; width: 100%; height: 100%; }
.flip-page:not(.is-ready) { background: #fff linear-gradient(90deg, #f3f4f5 25%, #e9ebed 37%, #f3f4f5 63%) 0 0 / 400% 100%; animation: flip-shimmer 1.4s ease infinite; }
@keyframes flip-shimmer { to { background-position: -100% 0; } }
.flip-num { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font: 500 .66rem var(--font-head); color: #9aa1a9; pointer-events: none; }
.flip-nav { position: absolute; top: 50%; z-index: 5; width: 52px; height: 52px; margin-top: -26px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font: 400 2rem/1 var(--font-head); cursor: pointer; transition: background .15s; }
.flip-nav:hover { background: var(--accent); }
.flip-prev { left: 18px; }
.flip-next { right: 18px; }
@media (max-width: 700px) { .flip-nav { top: auto; bottom: 14px; margin: 0; width: 46px; height: 46px; } .flip-prev { left: calc(50% - 56px); } .flip-next { right: calc(50% - 56px); } .flip-count { display: none; } }
.flip-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #1b1f24; color: #c8ccd1; font: 500 .95rem var(--font-head); z-index: 6; text-align: center; padding: 20px; }
.flip-loading[hidden] { display: none; }
.flip-spinner { width: 40px; height: 40px; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); border-radius: 50%; animation: flip-spin .9s linear infinite; }
@keyframes flip-spin { to { transform: rotate(360deg); } }
.flip-progress { width: 180px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.flip-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.flip-dialog:fullscreen .flip-bar { background: #1b1f24; }
