/**
 * SDD blueprint scene (page-sdd template + M04 video).
 * Logical canvas: 1280x720 (desktop) or 720x1280 (shorts), scaled by sdd.js.
 */
@font-face {
	font-family: "SDD Manrope";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url(fonts/manrope-latin.woff2) format("woff2");
}

.sdd-wrap {
	--sdd-bg1: #f3f4f6;
	--sdd-bg2: #e4e6e9;
	--sdd-ink: #23272e;
	--sdd-muted: #6b7078;
	--sdd-line: #b4b9c1;
	--sdd-paper: #fbfbfc;
	--sdd-block: #cdd0d5;
	--sdd-acc: #7393db;
	--sdd-acc-ink: #4e6fc0;
	--sdd-warn: #c98a5a;
	--sdd-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
	font-family: "SDD Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--sdd-ink);
}

/* ---------- stage ---------- */
.sdd-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sdd-bg2); }
.sdd-stage.is-sh { aspect-ratio: 9 / 16; }
.sdd-canvas { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden;
	background: radial-gradient(120% 90% at 30% 30%, var(--sdd-bg1), var(--sdd-bg2)); }
.is-sh .sdd-canvas { width: 720px; height: 1280px; }
.sdd-canvas * { box-sizing: border-box; margin: 0; }

/* ambient: drifting light, breathing dots, quiet network */
.sdd-amb { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sdd-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; will-change: transform; }
.sdd-b1 { width: 560px; height: 560px; right: -120px; top: -180px; background: #afc2f2; }
.sdd-b2 { width: 460px; height: 460px; left: 28%; bottom: -220px; background: #cfc7f1; }
.sdd-b3 { width: 320px; height: 320px; right: 24%; top: 38%; background: #c4e6ea; opacity: .4; }
.sdd-grid { position: absolute; inset: 0; background-image: radial-gradient(#8f99ad 1px, transparent 1.3px); background-size: 28px 28px; opacity: .3;
	-webkit-mask-image: radial-gradient(60% 70% at 72% 40%, #000, transparent 75%); mask-image: radial-gradient(60% 70% at 72% 40%, #000, transparent 75%); }
.is-sh .sdd-grid { -webkit-mask-image: radial-gradient(80% 60% at 50% 60%, #000, transparent 75%); mask-image: radial-gradient(80% 60% at 50% 60%, #000, transparent 75%); }
.sdd-scan { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .45) 50%, transparent 60%); background-size: 250% 100%; mix-blend-mode: soft-light; }
.sdd-amb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sdd-edge { stroke: #9dabc8; stroke-width: 1; opacity: .35; }
.sdd-spark { stroke: var(--sdd-acc-ink); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 6 600; fill: none; opacity: .7; }
.sdd-nd { fill: #8e9cbc; opacity: .55; }

/* ---------- scenes ---------- */
.sdd-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.sdd-pedestal { position: absolute; right: 40px; bottom: 0; width: 430px; height: 330px; background: linear-gradient(180deg, #e2dfdb, #d3cfca); border-radius: 4px 4px 0 0; box-shadow: inset 0 10px 30px rgba(255, 255, 255, .4); }
.sdd-left { position: absolute; left: 96px; top: 110px; width: 520px; }
.sdd-kicker { font-size: 13px; letter-spacing: .32em; color: var(--sdd-muted); text-transform: uppercase; font-weight: 600; }
.sdd-rule { position: relative; height: 1px; background: var(--sdd-line); margin: 18px 0 40px; width: 460px; }
.sdd-rule::after { content: ""; position: absolute; right: -28px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--sdd-acc); }
.sdd-h { font-size: 60px; line-height: 1.08; font-weight: 700; letter-spacing: -.01em; }
.sdd-sub { margin-top: 26px; font-size: 21px; line-height: 1.5; color: #4a4f57; max-width: 450px; }
.sdd-foot { position: absolute; left: 96px; bottom: 42px; font-size: 13px; color: var(--sdd-muted); letter-spacing: .06em; }
.sdd-foot b { color: var(--sdd-ink); }

.sdd-paper { position: absolute; background: var(--sdd-paper); border-radius: 6px; box-shadow: 0 30px 60px rgba(40, 45, 55, .18), 0 4px 10px rgba(40, 45, 55, .08); }
.sdd-ph { font-weight: 800; font-style: italic; font-size: 22px; text-align: center; padding-top: 28px; }
.sdd-phr { height: 1px; background: #c9ccd2; margin: 14px 46px 0; }
.sdd-body { padding: 22px 44px 28px; }

.sdd-node { position: relative; border-radius: 6px; background: #e9ebee; border: 1px solid #d6d9de; padding: 10px 14px; font-size: 14px; font-weight: 600; text-align: center; }
.sdd-node small { display: block; font-family: var(--sdd-mono); font-weight: 400; font-size: 11.5px; color: var(--sdd-muted); margin-top: 3px; }
.sdd-node.acc { background: var(--sdd-acc); border-color: var(--sdd-acc); color: #fff; }
.sdd-node.acc small { color: #e8eefb; }
.sdd-node.ghost { background: transparent; border: 1px dashed var(--sdd-line); color: var(--sdd-muted); }
.sdd-node.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: left; padding: 8px 12px; font-size: 13.5px; }
.sdd-node.row small { margin: 0; text-align: right; }
.sdd-v { width: 1px; height: 22px; background: var(--sdd-line); margin: 0 auto; position: relative; }
.sdd-v::after { content: ""; position: absolute; left: -3px; bottom: -1px; border: 3.5px solid transparent; border-top: 5px solid var(--sdd-line); }
.sdd-tag { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sdd-acc-ink); font-weight: 700; }
.sdd-tag.mut { color: var(--sdd-muted); }
.sdd-note { text-align: center; margin-top: 16px; }
.sdd-mono { font-family: var(--sdd-mono); }

/* s1 cover sheet */
.sdd-s1 .sdd-paper { left: 740px; top: 130px; width: 400px; height: 520px; }
.sdd-cov { padding: 40px 50px; }
.sdd-cov-top { width: 76px; height: 26px; background: var(--sdd-acc); border-radius: 4px; margin: 0 auto; }
.sdd-cov-row { display: flex; justify-content: space-between; width: 300px; margin: 0 auto; }
.sdd-cov-row i { width: 64px; height: 24px; background: var(--sdd-block); border-radius: 4px; }
.sdd-cov-lines { margin-top: 56px; display: grid; gap: 16px; }
.sdd-cov-lines span { display: flex; gap: 12px; align-items: center; }
.sdd-cov-lines span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #555; }
.sdd-cov-lines span::after { content: ""; height: 2px; background: #c9ccd2; width: var(--w, 100%); }

/* s2 requirements */
.sdd-s2 .sdd-paper { left: 680px; top: 70px; width: 520px; }
.sdd-mods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sdd-mod { padding: 12px 10px; text-align: left; }
.sdd-mod b { display: block; font-size: 14px; }
.sdd-mod small { margin-top: 6px; line-height: 1.35; }
.sdd-mod .sdd-tag { font-size: 10px; margin-bottom: 4px; }
.sdd-out { margin-top: 24px; }
.sdd-out li { list-style: none; position: relative; font-size: 15px; color: var(--sdd-muted); padding: 7px 0 7px 18px; border-bottom: 1px solid #eceef1; }
.sdd-out li::before { content: "×"; position: absolute; left: 0; color: var(--sdd-warn); font-weight: 700; }
.sdd-out ul { padding: 0; margin: 10px 0 0; }
.sdd-strike { position: absolute; left: 18px; top: 50%; height: 1.5px; width: calc(100% - 18px); background: var(--sdd-warn); opacity: .7; transform-origin: left; }

/* s3 architecture */
.sdd-s3 .sdd-paper { left: 720px; top: 60px; width: 440px; }
.sdd-pair { display: flex; gap: 10px; align-items: center; }
.sdd-pair > .sdd-node { flex: 1; }
.sdd-dash { width: 14px; height: 1px; background: var(--sdd-line); }

/* s4 gates */
.sdd-s4 .sdd-paper { left: 640px; top: 70px; width: 560px; }
.sdd-gates { display: grid; grid-template-columns: 250px 1fr; column-gap: 22px; }
.sdd-gates .sdd-v { height: 34px; }
.sdd-step { display: block; font-size: 11px; letter-spacing: .14em; color: var(--sdd-muted); }
.sdd-node.acc .sdd-step { color: #e8eefb; }
.sdd-ok { text-align: center; font-weight: 700; }
.sdd-ok .sdd-mono { color: var(--sdd-acc-ink); }
.sdd-br { position: absolute; left: -22px; right: 0; display: flex; align-items: center; gap: 10px; }
.sdd-br i { width: 40px; border-top: 1px dashed var(--sdd-warn); }
.sdd-br b { font-family: var(--sdd-mono); font-size: 26px; color: var(--sdd-warn); font-weight: 500; }
.sdd-br span { font-size: 13px; color: var(--sdd-muted); line-height: 1.3; }

/* s5 flow */
.sdd-s5 .sdd-paper { left: 650px; top: 46px; width: 540px; }
.sdd-s5 .sdd-v { height: 14px; }
.sdd-flow { position: relative; }
.sdd-flow .sdd-gate-br { position: absolute; right: -6px; transform: translateX(100%); font-size: 12px; color: var(--sdd-warn); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sdd-flow .sdd-gate-br i { width: 22px; border-top: 1px dashed var(--sdd-warn); }
.sdd-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--sdd-acc-ink); box-shadow: 0 0 0 6px rgba(115, 147, 219, .22); opacity: 0; z-index: 3; }

/* s6 order */
.sdd-s6 .sdd-paper { left: 680px; top: 70px; width: 520px; }
.sdd-ord { padding: 0; margin: 0; counter-reset: o; }
.sdd-ord li { list-style: none; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eceef1; }
.sdd-ord li::before { counter-increment: o; content: counter(o); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: #e9ebee; color: var(--sdd-ink); }
.sdd-ord li.last::before { background: var(--sdd-acc); color: #fff; }
.sdd-ord b { display: block; font-size: 15px; }
.sdd-ord small { display: block; font-family: var(--sdd-mono); font-size: 11.5px; color: var(--sdd-muted); margin-top: 2px; }

/* s7 family */
.sdd-s7 .sdd-top { position: absolute; left: 96px; top: 70px; }
.sdd-s7 .sdd-rule { margin-bottom: 24px; }
.sdd-s7 .sdd-h { font-size: 52px; }
.sdd-fam { position: absolute; left: 96px; right: 96px; top: 290px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.sdd-fam .sdd-paper { position: relative; padding: 22px 26px 26px; }
.sdd-fam .sdd-paper.is-acc { outline: 2px solid var(--sdd-acc); outline-offset: -2px; }
.sdd-fam h3 { font-weight: 800; font-size: 20px; margin: 6px 0 16px; }
.sdd-fam .sdd-node small { margin: 0; }

/* s8 chain */
.sdd-s8 .sdd-top { position: absolute; left: 0; right: 0; top: 120px; text-align: center; }
.sdd-s8 .sdd-rule { margin: 18px auto 30px; }
.sdd-chain { position: absolute; left: 120px; right: 120px; top: 330px; display: flex; align-items: flex-start; gap: 0; }
.sdd-chain > div { flex: 1; text-align: center; }
.sdd-chain .sdd-node { font-size: 20px; padding: 16px; }
.sdd-chain p { margin-top: 12px; font-size: 14px; color: var(--sdd-muted); }
.sdd-chain .sdd-arr { flex: 0 0 46px; height: 1px; background: var(--sdd-line); margin-top: 30px; position: relative; }
.sdd-chain .sdd-arr::after { content: ""; position: absolute; right: -1px; top: -3.5px; border: 3.5px solid transparent; border-left: 5px solid var(--sdd-line); }
.sdd-logo { position: absolute; left: 50%; top: 520px; width: 183px; margin-left: -91px; }
.sdd-url { position: absolute; left: 0; right: 0; top: 600px; text-align: center; font-size: 16px; color: var(--sdd-muted); letter-spacing: .04em; }
.sdd-url b { color: var(--sdd-ink); }

/* ---------- shorts layout (720x1280) ---------- */
.is-sh .sdd-left { left: 60px; top: 110px; width: 600px; }
.is-sh .sdd-rule { width: 560px; margin: 16px 0 28px; }
.is-sh .sdd-h { font-size: 56px; }
.is-sh .sdd-sub { font-size: 22px; max-width: 600px; margin-top: 18px; }
.is-sh .sdd-foot { left: 60px; bottom: 56px; font-size: 15px; }
.is-sh .sdd-pedestal { right: 60px; width: 600px; height: 300px; }
.is-sh .sdd-s1 .sdd-paper { left: 160px; top: 560px; width: 400px; height: 520px; }
.is-sh .sdd-s2 .sdd-paper,
.is-sh .sdd-s3 .sdd-paper,
.is-sh .sdd-s4 .sdd-paper,
.is-sh .sdd-s5 .sdd-paper,
.is-sh .sdd-s6 .sdd-paper { left: 40px; width: 640px; top: 420px; }
.is-sh .sdd-s5 .sdd-paper { top: 380px; }
.is-sh .sdd-s4 .sdd-gates { grid-template-columns: 300px 1fr; }
.is-sh .sdd-s5 .sdd-flow { margin-right: 96px; }
.is-sh .sdd-s7 .sdd-top { left: 60px; top: 110px; }
.is-sh .sdd-s7 .sdd-h { font-size: 50px; }
.is-sh .sdd-fam { left: 60px; right: 60px; top: 340px; grid-template-columns: 1fr; gap: 26px; }
.is-sh .sdd-fam .sdd-paper { padding: 18px 22px 20px; }
.is-sh .sdd-fam h3 { margin: 4px 0 10px; }
.is-sh .sdd-s8 .sdd-top { top: 160px; }
.is-sh .sdd-s8 .sdd-rule { width: 420px; }
.is-sh .sdd-chain { left: 140px; right: 140px; top: 420px; flex-direction: column; align-items: stretch; }
.is-sh .sdd-chain .sdd-arr { flex: 0 0 26px; width: 1px; height: 26px; margin: 4px auto; }
.is-sh .sdd-chain .sdd-arr::after { right: auto; top: auto; left: -3px; bottom: -1px; border: 3.5px solid transparent; border-top: 5px solid var(--sdd-line); }
.is-sh .sdd-chain p { margin-top: 6px; }
.is-sh .sdd-logo { top: 1000px; }
.is-sh .sdd-url { top: 1080px; font-size: 18px; }

/* ---------- page mode: hover, tips, nav ---------- */
.sdd-stage.is-live [data-tip] { cursor: help; transition: box-shadow .25s, border-color .25s; }
.sdd-stage.is-live .sdd-node[data-tip]:hover { box-shadow: 0 8px 20px rgba(78, 111, 192, .2); border-color: var(--sdd-acc); }
.sdd-tip { position: absolute; z-index: 50; max-width: 290px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; color: var(--sdd-ink);
	background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(115, 147, 219, .35);
	box-shadow: 0 14px 34px rgba(40, 45, 55, .16); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.sdd-tip.on { opacity: 1; transform: none; }
.sdd-tip b { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sdd-acc-ink); margin-bottom: 4px; }
.sdd-tip::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -6px; width: 10px; height: 10px; background: inherit; border-right: 1px solid rgba(115, 147, 219, .35); border-bottom: 1px solid rgba(115, 147, 219, .35); transform: translateX(-50%) rotate(45deg); }

.sdd-nav { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 30; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 12px 16px;
	background: rgba(228, 230, 233, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(180, 185, 193, .45); }
.sdd-page { padding-bottom: clamp(64px, 8vw, 120px); }
.sdd-nav button { font: 600 13px/1 "SDD Manrope", sans-serif; letter-spacing: .04em; padding: 9px 14px; border-radius: 999px; border: 1px solid #cfd3da; background: rgba(255, 255, 255, .7); color: var(--sdd-ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.sdd-nav button:hover { border-color: var(--sdd-acc); }
.sdd-nav button[aria-current="step"] { background: var(--sdd-acc); border-color: var(--sdd-acc); color: #fff; }
.sdd-nav .sdd-pause { min-width: 44px; }

/* ---------- lab (pattern 4wpdev/sdd-lab) ---------- */
.sdd-lab { max-width: 1100px; margin: 0 auto; padding: 56px 24px 8px; }
.sdd-lab > h2 { font-size: 30px; font-weight: 700; margin: 0 0 8px; }
.sdd-lab > p { color: var(--sdd-muted); margin: 0 0 28px; font-size: 17px; }
.sdd-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.sdd-card { background: var(--sdd-paper); border-radius: 10px; padding: 24px; box-shadow: 0 20px 40px rgba(40, 45, 55, .1), 0 2px 6px rgba(40, 45, 55, .06); }
.sdd-card h3 { font-size: 19px; font-weight: 800; margin: 4px 0 14px; }
.sdd-card label { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 6px 0; cursor: pointer; }
.sdd-card select { font: inherit; padding: 8px 10px; border-radius: 6px; border: 1px solid #cfd3da; background: #fff; width: 100%; }
.sdd-layers { display: grid; gap: 8px; margin: 16px 0; }
.sdd-layers div { border-radius: 6px; padding: 8px 12px; border: 1px solid #d6d9de; background: #e9ebee; font-size: 14px; display: flex; justify-content: space-between; }
.sdd-layers div.on { background: #e5ecfb; border-color: var(--sdd-acc); }
.sdd-layers div.off { background: #fbefe6; border-color: var(--sdd-warn); }
.sdd-layers code, .sdd-route code { font-family: var(--sdd-mono); font-size: 12.5px; color: var(--sdd-muted); background: none; padding: 0; }
.sdd-result { border-radius: 8px; padding: 12px 14px; font-size: 15px; background: #f1f3f6; }
.sdd-result b { font-family: var(--sdd-mono); font-size: 20px; margin-right: 8px; }
.sdd-result.ok b { color: var(--sdd-acc-ink); }
.sdd-result.bad b { color: var(--sdd-warn); }
.sdd-route { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 6px; }
.sdd-route li { border-left: 3px solid #d6d9de; padding: 4px 10px; font-size: 14px; color: var(--sdd-muted); transition: border-color .3s, color .3s; }
.sdd-route li.on { border-color: var(--sdd-acc); color: var(--sdd-ink); }
.sdd-route li.stop { border-color: var(--sdd-warn); color: var(--sdd-ink); }
.sdd-sheet ol { margin: 0 0 14px; padding-left: 20px; font-size: 14.5px; line-height: 1.6; }
.sdd-sheet button { font: 600 14px/1 "SDD Manrope", sans-serif; padding: 11px 16px; border-radius: 999px; border: 0; background: var(--sdd-acc); color: #fff; cursor: pointer; }
.sdd-sheet button:hover { background: var(--sdd-acc-ink); }

@media (prefers-reduced-motion: reduce) {
	.sdd-tip { transition: none; }
}

/* shorts: larger sheets so the schemes read on a phone */
.is-sh .sdd-kicker { font-size: 16px; }
.is-sh .sdd-s2 .sdd-paper > *, .is-sh .sdd-s3 .sdd-paper > *, .is-sh .sdd-s4 .sdd-paper > *,
.is-sh .sdd-s5 .sdd-paper > *, .is-sh .sdd-s6 .sdd-paper > * { zoom: 1.3; }
.is-sh .sdd-s2 .sdd-paper, .is-sh .sdd-s3 .sdd-paper, .is-sh .sdd-s4 .sdd-paper, .is-sh .sdd-s6 .sdd-paper { top: 400px; }
.is-sh .sdd-s5 .sdd-paper { top: 360px; }
.is-sh .sdd-fam { top: 290px; gap: 22px; }
.is-sh .sdd-fam .sdd-paper > * { zoom: 1.14; }
.is-sh .sdd-chain { left: 110px; right: 110px; top: 400px; }
.is-sh .sdd-chain .sdd-node { font-size: 28px; padding: 20px; }
.is-sh .sdd-chain p { font-size: 19px; }
.is-sh .sdd-chain .sdd-arr { flex-basis: 34px; height: 34px; }
.is-sh .sdd-logo { top: 1030px; }
.is-sh .sdd-url { top: 1110px; }
.is-sh .sdd-s4 .sdd-gates { grid-template-columns: 220px 1fr; }
.is-sh .sdd-fam { top: 270px; gap: 18px; }
.is-sh .sdd-fam .sdd-paper > * { zoom: 1.08; }
.is-sh .sdd-tip { font-size: 22px; max-width: 520px; padding: 16px 18px; }
.is-sh .sdd-tip b { font-size: 16px; }
