/*
Theme Name: Box Network
Theme URI: https://seobusinessinabox.com/
Author: Mass Density, Inc.
Author URI: https://massdensity.com/
Description: The shared theme for the Business in a Box Network (SEO, Info, Video and Niche Business in a Box). One theme, four brands: pick the brand in Appearance → Customize → Box Brand and the colors, logo, tagline and network links switch automatically. Pair with the BIAB Core plugin for tools, games, quizzes, course, membership and one-click demo content.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: box-network
Tags: blog, education, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--box: #2563eb;          /* brand color — overwritten per brand via inline CSS */
	--box-600: #1d4ed8;
	--box-50: #eff6ff;
	--box-ink: #0b1220;
	--ink: #0f172a;
	--ink-2: #334155;
	--muted: #64748b;
	--line: #e2e8f0;
	--paper: #ffffff;
	--paper-2: #f8fafc;
	--paper-3: #f1f5f9;
	--good: #16a34a;
	--warn: #d97706;
	--bad: #dc2626;
	--c-seo: #2563eb;
	--c-info: #f59e0b;
	--c-video: #ef4444;
	--c-niche: #10b981;
	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
	--shadow-lg: 0 20px 50px rgba(15, 23, 42, .14);
	--font-head: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	--wrap: 1200px;
	--wrap-text: 760px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
a { color: var(--box-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--box); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.2; color: var(--ink); margin: 1.6em 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); margin-top: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1.1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
code, pre { font-family: var(--font-mono); font-size: .9em; }
pre { background: var(--box-ink); color: #e2e8f0; padding: 1rem 1.2rem; border-radius: var(--radius-sm); overflow: auto; white-space: pre-wrap; }
:not(pre) > code { background: var(--paper-3); padding: .15em .4em; border-radius: 5px; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.5em; font-size: .95rem; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--paper-2); font-family: var(--font-head); font-weight: 600; }
blockquote {
	margin: 1.5em 0; padding: 1rem 1.4rem; border-left: 4px solid var(--box);
	background: var(--box-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	font-family: var(--font-head); font-size: 1.15rem; color: var(--ink);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; margin-top: .4rem; font-size: .85rem; color: var(--muted); font-style: normal; font-family: var(--font-body); }
details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem 1rem; margin: .5rem 0 1rem; background: var(--paper-2); }
details summary { cursor: pointer; font-weight: 600; font-family: var(--font-head); }
details[open] summary { margin-bottom: .5rem; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; clip: auto; width: auto; height: auto; background: #fff; padding: .6rem 1rem; }
:focus-visible { outline: 3px solid var(--box); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap--text { max-width: var(--wrap-text); }

/* Buttons */
.btn, .wp-block-button__link, input[type=submit] {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	padding: .8rem 1.35rem; border-radius: 999px; border: 2px solid var(--box);
	background: var(--box); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 1rem;
	text-decoration: none; cursor: pointer; line-height: 1.2; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover, input[type=submit]:hover { background: var(--box-600); border-color: var(--box-600); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px color-mix(in srgb, var(--box) 35%, transparent); }
.btn--ghost { background: transparent; color: var(--box-600); }
.btn--ghost:hover { background: var(--box-50); color: var(--box-600); }
.btn--light { background: #fff; border-color: #fff; color: var(--box-ink); }
.btn--light:hover { background: #f1f5f9; border-color: #f1f5f9; color: var(--box-ink); }
.btn--sm { padding: .5rem .9rem; font-size: .9rem; }

/* Forms */
input[type=text], input[type=email], input[type=url], input[type=password], input[type=number], input[type=search], select, textarea {
	width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
	font: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--box); outline: none; box-shadow: 0 0 0 4px var(--box-50); }
label { font-weight: 600; font-size: .92rem; display: block; margin-bottom: .3rem; }

/* ==========================================================================
   Network bar
   ========================================================================== */
.netbar { background: var(--box-ink); color: #cbd5e1; font-size: .8rem; }
.netbar .wrap { display: flex; align-items: center; gap: 1rem; min-height: 38px; overflow-x: auto; white-space: nowrap; }
.netbar__label { font-family: var(--font-head); font-weight: 600; color: #fff; letter-spacing: .02em; }
.netbar__list { display: flex; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.netbar__list a { display: inline-flex; align-items: center; gap: .4rem; color: #cbd5e1; text-decoration: none; padding: .3rem .6rem; border-radius: 999px; }
.netbar__list a:hover { background: rgba(255,255,255,.08); color: #fff; }
.netbar__list a.is-current { background: rgba(255,255,255,.12); color: #fff; }
.netbar__dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.netbar__right { margin-left: auto; display: flex; gap: .8rem; }
.netbar__right a { color: #cbd5e1; text-decoration: none; }
.netbar__right a:hover { color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.site-header .wrap { display: flex; align-items: center; gap: 1.2rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand__logo { width: 42px; height: 42px; flex-shrink: 0; }
.brand__logo img { max-height: 42px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.brand__name b { color: var(--box); }
.brand__tag { font-size: .72rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }
.custom-logo-link img { max-height: 48px; width: auto; }

.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; align-items: center; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: .55rem .75rem; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; border-radius: 8px; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { color: var(--box-600); background: var(--box-50); }
.primary-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); opacity: .6; }
.primary-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .5rem; flex-direction: column; align-items: stretch; z-index: 60; }
.primary-nav .sub-menu a { padding: .5rem .7rem; font-size: .92rem; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: flex; }
.header-cta { display: flex; gap: .5rem; align-items: center; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line); border-radius: 10px; padding: .5rem .65rem; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; transition: .2s; }

@media (max-width: 1060px) {
	.nav-toggle { display: block; }
	.header-cta .btn--ghost { display: none; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); max-height: 75vh; overflow: auto; }
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; align-items: stretch; padding: .8rem 20px; }
	.primary-nav .sub-menu { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 0 1rem; min-width: 0; }
	.primary-nav .menu-item-has-children > a::after { display: none; }
	.header-cta { margin-left: 0; }
}
@media (max-width: 600px) {
	.brand__tag { display: none; }
	.header-cta .btn { padding: .55rem .9rem; font-size: .88rem; }
	.admin-bar .site-header { top: 0; }
}

/* ==========================================================================
   Hero & sections
   ========================================================================== */
.hero {
	position: relative; overflow: hidden; color: #fff;
	background:
		radial-gradient(1000px 500px at 85% -10%, color-mix(in srgb, var(--box) 55%, transparent), transparent 60%),
		radial-gradient(700px 400px at -10% 110%, color-mix(in srgb, var(--box) 35%, transparent), transparent 60%),
		var(--box-ink);
	padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000, transparent 90%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); gap: 3rem; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: color-mix(in srgb, var(--box) 55%, #fff); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; letter-spacing: .04em; margin-bottom: 1.2rem; }
.hero__lead { font-size: 1.2rem; color: #cbd5e1; max-width: 38em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero__actions .btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero__actions .btn--ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 1.8rem; margin-top: 2.2rem; color: #94a3b8; font-size: .9rem; }
.hero__stats strong { display: block; font-family: var(--font-head); color: #fff; font-size: 1.5rem; }
.hero__art { display: flex; justify-content: center; }
.hero__art svg { width: min(360px, 90%); filter: drop-shadow(0 30px 60px rgba(0,0,0,.45)); animation: boxfloat 6s ease-in-out infinite; }
@keyframes boxfloat { 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .hero__art svg { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: minmax(0,1fr); } .hero__art { order: -1; } .hero__art svg { width: 180px; } }

.page-hero { background: var(--box-ink); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3.2rem); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 90% 0%, color-mix(in srgb, var(--box) 45%, transparent), transparent 70%); }
.page-hero .wrap { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: .5rem; font-size: clamp(1.9rem, 4vw, 2.9rem); }
.page-hero p { color: #cbd5e1; font-size: 1.1rem; max-width: 46em; margin: 0; }
.page-hero__icon { font-size: 2.2rem; line-height: 1; margin-bottom: .6rem; display: block; }
.crumbs { font-size: .82rem; color: #94a3b8; margin-bottom: .9rem; }
.crumbs a { color: #cbd5e1; text-decoration: none; }
.crumbs a:hover { color: #fff; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: #94a3b8; font-size: .9rem; margin-top: .8rem; }
.entry-meta a { color: #cbd5e1; }

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section--alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--dark { background: var(--box-ink); color: #cbd5e1; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.section__head h2 { margin-top: 0; }
.section__head p { color: var(--muted); font-size: 1.08rem; }
.section--dark .section__head p { color: #94a3b8; }
.kicker { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--box-600); margin-bottom: .6rem; }
.section--dark .kicker { color: color-mix(in srgb, var(--box) 60%, #fff); }

/* ==========================================================================
   Grids & cards
   ========================================================================== */
.grid { display: grid; gap: 1.2rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0,1fr); } }

.card {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem;
	box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--box) 35%, var(--line)); }
.card h3 { margin: .2rem 0 .5rem; font-size: 1.15rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { color: var(--ink-2); font-size: .95rem; margin-bottom: .6rem; }
.card__icon { font-size: 1.8rem; line-height: 1; width: 52px; height: 52px; display: grid; place-items: center; background: var(--box-50); border-radius: 12px; margin-bottom: .6rem; }
.card__meta { margin-top: auto; font-size: .82rem; color: var(--muted); display: flex; gap: .8rem; flex-wrap: wrap; }
.card__tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--box-600); margin-bottom: .2rem; }
.card--dark { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); box-shadow: none; }
.card--dark h3, .card--dark h3 a { color: #fff; }
.card--dark p { color: #94a3b8; }
.card--dark .card__icon { background: rgba(255,255,255,.06); }

.post-card { padding: 0; overflow: hidden; }
.post-card__thumb { aspect-ratio: 16/9; background: var(--box-50); overflow: hidden; display: block; text-decoration: none; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.post-card__ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--box-ink), color-mix(in srgb, var(--box) 70%, var(--box-ink))); color: #fff; font-family: var(--font-head); font-weight: 700; padding: 1.2rem; text-align: center; font-size: 1.05rem; line-height: 1.25; position: relative; }
.post-card__ph span { position: relative; z-index: 1; max-width: 90%; }
.post-card__ph::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 26px 26px; }

/* Steps (home) */
.roadmap { counter-reset: rs; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
.roadmap__step { counter-increment: rs; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.1rem 1rem; position: relative; }
.roadmap__step::before { content: counter(rs, decimal-leading-zero); font-family: var(--font-head); font-weight: 700; color: var(--box); font-size: .9rem; letter-spacing: .05em; }
.roadmap__step h3 { font-size: 1rem; margin: .2rem 0 .3rem; }
.roadmap__step p { font-size: .88rem; color: var(--muted); margin: 0; }
@media (max-width: 960px) { .roadmap { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .roadmap { grid-template-columns: minmax(0,1fr); } }

/* Network boxes */
.netgrid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1.2rem; }
@media (max-width: 960px) { .netgrid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .netgrid { grid-template-columns: minmax(0,1fr); } }
.netbox { --nb: var(--box); border-radius: var(--radius); padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--nb); box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.netbox:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.netbox svg.boxlogo { width: 64px; height: 64px; margin-bottom: .6rem; }
.netbox h3 { margin: 0 0 .2rem; font-size: 1.12rem; }
.netbox h3 a { color: var(--ink); text-decoration: none; }
.netbox h3 a::after { content: ""; position: absolute; inset: 0; }
.netbox__promise { font-weight: 600; color: var(--nb); font-size: .92rem; margin-bottom: .5rem; }
.netbox p { font-size: .9rem; color: var(--ink-2); }
.netbox ul { margin: 0 0 .8rem; padding-left: 1.1rem; font-size: .86rem; color: var(--ink-2); }
.netbox__status { margin-top: auto; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nb); }
.netbox.is-current { outline: 2px solid var(--nb); outline-offset: 3px; }
.section--dark .netbox { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); border-top-color: var(--nb); }
.section--dark .netbox h3 a { color: #fff; }
.section--dark .netbox p, .section--dark .netbox ul { color: #94a3b8; }

/* CTA band */
.band { background: linear-gradient(120deg, var(--box-600), var(--box)); color: #fff; border-radius: calc(var(--radius) + 6px); padding: clamp(1.8rem, 5vw, 3rem); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1.5rem; align-items: center; box-shadow: var(--shadow-lg); }
.band h2 { color: #fff; margin: 0 0 .4rem; }
.band p { color: rgba(255,255,255,.88); margin: 0; }
@media (max-width: 760px) { .band { grid-template-columns: minmax(0,1fr); } }

/* Quote strip */
.quote-strip { text-align: center; max-width: 820px; margin: 0 auto; }
.quote-strip blockquote { background: none; border: 0; font-size: clamp(1.3rem, 3vw, 1.9rem); line-height: 1.35; padding: 0; color: #fff; }
.quote-strip cite { color: #94a3b8; }

/* ==========================================================================
   Content layout
   ========================================================================== */
.content-area { padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 3rem; }
.layout--full { grid-template-columns: minmax(0,1fr); }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0,1fr); } }
.entry-content { max-width: var(--wrap-text); }
.layout--full .entry-content { max-width: 900px; margin: 0 auto; }
.page-template-template-wide .entry-content, .entry-content.is-wide { max-width: 100%; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { padding-top: .4rem; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .35em; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius); }
.post-thumb { margin: 0 0 2rem; border-radius: var(--radius); overflow: hidden; }
.post-thumb img { width: 100%; display: block; }

.sidebar .widget { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.2rem; font-size: .94rem; }
.sidebar .widget-title, .sidebar h2 { font-size: 1rem; margin: 0 0 .7rem; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.sidebar li:last-child { border: 0; }
.sidebar a { text-decoration: none; color: var(--ink-2); }
.sidebar a:hover { color: var(--box-600); }
.sidebar .sticky-box { position: sticky; top: 100px; }
.toc ol { list-style: decimal; padding-left: 1.2rem; }
.toc li { border: 0; padding: .2rem 0; }

/* Author / share / post nav */
.post-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.tags a { display: inline-block; background: var(--paper-3); color: var(--ink-2); padding: .25rem .7rem; border-radius: 999px; font-size: .82rem; margin: 0 .3rem .4rem 0; text-decoration: none; }
.tags a:hover { background: var(--box-50); color: var(--box-600); }
.share { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; font-size: .9rem; }
.share a, .share button { font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); text-decoration: none; cursor: pointer; font-family: inherit; }
.share a:hover, .share button:hover { border-color: var(--box); color: var(--box-600); }
.author-box { display: flex; gap: 1rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin: 2rem 0; }
.author-box img { border-radius: 50%; }
.author-box h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.author-box p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.post-nav { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1rem; margin-top: 2rem; }
.post-nav a { display: block; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 600; }
.post-nav a span { display: block; font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--muted); }
.post-nav .next { text-align: right; }
@media (max-width: 600px) { .post-nav { grid-template-columns: minmax(0,1fr); } }
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--box); width: 0; z-index: 100; }

/* Pagination */
.pagination, .nav-links { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink-2); }
.page-numbers.current, .page-numbers:hover { background: var(--box); color: #fff; border-color: var(--box); }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: 2rem; }
.chips a { padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: .9rem; background: #fff; }
.chips a:hover, .chips a.is-active { background: var(--box); border-color: var(--box); color: #fff; }

/* Comments */
.comments-area { margin-top: 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; }
.comment-meta { font-size: .85rem; color: var(--muted); }
.comment-form p { margin-bottom: 1rem; }

/* Search form */
.search-form { display: flex; gap: .5rem; }
.search-form label { flex: 1; margin: 0; }

/* ==========================================================================
   Content components (used by prepopulated content)
   ========================================================================== */
.biab-lead { font-size: 1.22rem; line-height: 1.6; color: var(--ink-2); }
.biab-callout { border-radius: var(--radius-sm); padding: 1rem 1.2rem 1rem 3.2rem; margin: 1.6em 0; position: relative; background: var(--paper-2); border: 1px solid var(--line); }
.biab-callout::before { position: absolute; left: 1rem; top: .95rem; font-size: 1.3rem; line-height: 1; }
.biab-callout > :last-child { margin-bottom: 0; }
.biab-callout--tip { background: #f0fdf4; border-color: #bbf7d0; }
.biab-callout--tip::before { content: "💡"; }
.biab-callout--warn { background: #fffbeb; border-color: #fde68a; }
.biab-callout--warn::before { content: "⚠️"; }
.biab-callout--ai { background: #f5f3ff; border-color: #ddd6fe; }
.biab-callout--ai::before { content: "🤖"; }
.biab-callout--box { background: var(--box-50); border-color: color-mix(in srgb, var(--box) 30%, #fff); }
.biab-callout--box::before { content: "📦"; }

ol.biab-steps { list-style: none; counter-reset: bstep; padding-left: 0 !important; margin: 1.5em 0; }
ol.biab-steps > li { counter-increment: bstep; position: relative; padding: .1rem 0 1.1rem 3.3rem; margin: 0; border-left: 2px dashed var(--line); margin-left: 1.1rem; padding-left: 2.4rem; }
ol.biab-steps > li:last-child { border-left-color: transparent; padding-bottom: .2rem; }
ol.biab-steps > li::before { content: counter(bstep); position: absolute; left: -1.15rem; top: -.1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--box); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: .95rem; box-shadow: 0 0 0 5px #fff; }

ul.biab-checklist { list-style: none; padding-left: 0 !important; }
ul.biab-checklist li { position: relative; padding-left: 2rem; }
ul.biab-checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.2rem; height: 1.2rem; border-radius: 6px; background: var(--box) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M8.1 14.3 3.8 10l1.4-1.4 2.9 2.9 6.7-6.7 1.4 1.4z'/%3E%3C/svg%3E") center/80% no-repeat; }

.biab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 1rem; margin: 1.5em 0; }
.biab-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.biab-card h3, .biab-card h4 { margin: 0 0 .4rem; font-size: 1.05rem; }
.biab-card p, .biab-card li { font-size: .93rem; color: var(--ink-2); }
.biab-card > :last-child { margin-bottom: 0; }

.biab-prompt { position: relative; background: var(--box-ink); border-radius: var(--radius-sm); margin: 1.6em 0; padding: 2.3rem 1.1rem 1rem; }
.biab-prompt pre { background: none; padding: 0; margin: 0; color: #e2e8f0; font-size: .88rem; line-height: 1.6; white-space: pre-wrap; }
.biab-prompt__label { position: absolute; top: .7rem; left: 1.1rem; font-family: var(--font-head); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--box) 55%, #fff); font-weight: 700; }
.biab-prompt__label::before { content: "✨ "; }
.biab-copy { position: absolute; top: .5rem; right: .6rem; background: rgba(255,255,255,.1); color: #e2e8f0; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: .25rem .65rem; font-size: .78rem; cursor: pointer; font-family: inherit; }
.biab-copy:hover { background: rgba(255,255,255,.2); }
.biab-table { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.biab-table table { margin: 0; }
.biab-table tr:last-child td { border-bottom: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--box-ink); color: #94a3b8; padding: 4rem 0 0; margin-top: 0; font-size: .93rem; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); gap: 2rem; padding-bottom: 3rem; }
@media (max-width: 900px) { .footer-top { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }
@media (max-width: 520px) { .footer-top { grid-template-columns: minmax(0,1fr); } }
.footer-top h4 { color: #fff; font-size: .95rem; margin: 0 0 1rem; }
.footer-top ul { list-style: none; margin: 0; padding: 0; }
.footer-top li { margin-bottom: .45rem; }
.footer-brand .brand { color: #fff; margin-bottom: 1rem; }
.footer-brand .brand__tag { color: #94a3b8; }
.footer-network { border-top: 1px solid rgba(255,255,255,.08); padding: 1.8rem 0; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.footer-network__boxes { display: flex; flex-wrap: wrap; gap: .6rem; }
.footer-network__boxes a { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-size: .85rem; }
.footer-network__boxes a:hover { border-color: rgba(255,255,255,.3); }
.footer-network__boxes svg { width: 22px; height: 22px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.2rem 0; font-size: .8rem; display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; }
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: 0; }
.disclaimer-note { font-size: .78rem; color: #64748b; max-width: 60em; padding-bottom: 1.5rem; }

/* Back to top */
.to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; background: var(--box); color: #fff; border: 0; box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; font-size: 1.2rem; z-index: 90; }
.to-top.is-visible { opacity: 1; pointer-events: auto; }

/* WP core alignment */
.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1000px; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.sticky .card { border-color: var(--box); }
.bypostauthor > .comment-body { border-color: var(--box); }
.gallery-caption { font-size: .85rem; }
.wp-block-image { margin: 1.5em 0; }

/* 404 */
.notfound { text-align: center; padding: 5rem 0; }
.notfound svg { width: 160px; margin-bottom: 1rem; }

@media print { .netbar, .site-header, .site-footer, .sidebar, .to-top, .share { display: none !important; } .page-hero { background: none; color: #000; } .page-hero h1 { color: #000; } }

/* Network bar on small screens */
.netbar .wrap { min-width: 0; }
@media (max-width: 640px) {
	.netbar__label, .netbar__list small { display: none; }
	.netbar .wrap { gap: .4rem; }
	.netbar__list a { padding: .3rem .45rem; }
}
html, body { max-width: 100%; overflow-x: clip; }
.nav-cta { display: none; }
@media (max-width: 1060px) { .nav-cta { display: block; padding: 0 20px 1rem; margin: 0; } .nav-cta .btn { width: 100%; } }
@media (max-width: 520px) {
	.header-cta { display: none; }
	.site-header .wrap { gap: .6rem; }
	.brand__logo, .brand__logo svg { width: 36px; height: 36px; }
	.brand__name { font-size: 1.02rem; }
}
.entry-content.is-wide .biab-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 900px) { .entry-content.is-wide .biab-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .entry-content.is-wide .biab-grid { grid-template-columns: minmax(0,1fr); } }
