/* Basis Integration Platform — customer deck, FLOW skin (from designs/04-flow)
   Stage: fixed 1280x720, scaled to fit. Themes: light (native) + dark.
   Own repo — deployed as a Cloudflare Pages project. */

:root {
  --vivid-cyan: #42d7ff;
  --vivid-basis: #52b6de;
  --vivid-green: #51f08f;
  --vivid-amber: #f4aa48;
  --vivid-oxide: #d35f3d;
  --night: #08131b;
  --font-display: "Manrope", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

[data-theme="light"] {
  --bg: #f4f7f8;
  --panel: #ffffff;
  --panel-2: #edf2f4;
  --border: #e3e9ed;
  --border-strong: rgba(14, 111, 154, 0.4);
  --ink: #08131b;
  --muted: #44545f;
  --dim: #5a6b76;
  --accent: #0e6f9a;
  --accent-2: #1a6b8f;
  --good: #157a43;
  --warn: #9a6a1b;
  --bad: #b04323;
  --shadow: 0 14px 34px rgba(11, 34, 48, 0.10), 0 2px 8px rgba(11, 34, 48, 0.05);
  --shadow-sm: 0 4px 14px rgba(11, 34, 48, 0.08);
  --aurora-1: rgba(66, 215, 255, 0.30);
  --aurora-2: rgba(82, 182, 222, 0.24);
  --aurora-3: rgba(81, 240, 143, 0.14);
  --dark-ink: #f5f7f2;
  --dark-muted: #a8b4bd;
  --grid-dot: rgba(14, 111, 154, 0.16);
  --green-soft: rgba(81, 240, 143, 0.16);
  --hook-tint: #fdf3ee;
}

[data-theme="dark"] {
  --bg: #08131b;
  --panel: #0c151c;
  --panel-2: #111a22;
  --border: #1e2c35;
  --border-strong: rgba(66, 215, 255, 0.4);
  --ink: #f5f7f2;
  --muted: #a8b4bd;
  --dim: #8995a0;
  --accent: #42d7ff;
  --accent-2: #52b6de;
  --good: #51f08f;
  --warn: #f4aa48;
  --bad: #e0795c;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.32);
  --aurora-1: rgba(66, 215, 255, 0.12);
  --aurora-2: rgba(82, 182, 222, 0.10);
  --aurora-3: rgba(81, 240, 143, 0.06);
  --dark-ink: #f5f7f2;
  --dark-muted: #a8b4bd;
  --grid-dot: rgba(102, 214, 255, 0.10);
  --green-soft: rgba(81, 240, 143, 0.12);
  --hook-tint: #1a1210;
}

/* Excalidraw figures are baked per theme (figures/<name>-<theme>.svg, swapped in main.js) */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
  transition: background 0.4s ease;
}

/* ---------- background: aurora + the fine blue dot grid (04-flow) ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); display: block; }
.aurora .b1 { width: 640px; height: 560px; right: -140px; top: -200px; background: var(--aurora-1); animation: drift1 26s ease-in-out infinite alternate; }
.aurora .b2 { width: 680px; height: 600px; left: -220px; bottom: -260px; background: var(--aurora-2); animation: drift2 32s ease-in-out infinite alternate; }
.aurora .b3 { width: 420px; height: 380px; right: 360px; bottom: -180px; background: var(--aurora-3); animation: drift3 24s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-70px, 50px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(60px, -40px) scale(1.08); } }
@keyframes drift3 { to { transform: translate(-50px, -30px) scale(1.15); } }
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.3px);
  background-size: 24px 24px;
  mask-image: radial-gradient(90% 85% at 55% 30%, rgba(0,0,0,.85) 25%, transparent 82%);
  -webkit-mask-image: radial-gradient(90% 85% at 55% 30%, rgba(0,0,0,.85) 25%, transparent 82%);
}
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

/* ---------- stage scaling ---------- */
#stage {
  position: fixed; left: 50%; top: 50%;
  width: 1280px; height: 720px;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  z-index: 1;
}

/* ---------- slides ---------- */
.slide {
  position: absolute; inset: 0;
  padding: 48px 64px 56px;
  display: none; flex-direction: column; visibility: hidden;
}
.slide.active { display: flex; visibility: visible; }

[data-anim] { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
[data-anim].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-anim] { transition: none; opacity: 1; transform: none; }
}

/* ---------- chrome ---------- */
.mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--night); border: 1px solid transparent;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; color: #f5f7f2;
}
[data-theme="dark"] .mark { border-color: var(--border); }
.mark i { font-style: normal; color: var(--vivid-cyan); }
.mark.sm { width: 30px; height: 30px; font-size: 15px; border-radius: 8px; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin-left: 12px; }
.wordmark i { font-style: normal; color: var(--accent); }
.brandrow { display: flex; align-items: center; }

.chrome { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-shrink: 0; }
.kicker { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.32em; color: var(--accent); text-transform: uppercase; }
.kicker .new { color: var(--good); }
h2 { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.02em; margin-bottom: 20px; flex-shrink: 0; }
.lede { color: var(--muted); font-size: 15.5px; margin: -8px 0 18px; max-width: 1020px; }
h3 { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; }
p { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.hcode { font-family: var(--font-mono); font-size: 0.72em; color: var(--accent); background: var(--panel-2); padding: 2px 9px; border-radius: 7px; letter-spacing: -0.01em; }

.slidefoot { margin-top: auto; font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.08em; flex-shrink: 0; }

/* ---------- shared atoms ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; box-shadow: var(--shadow);
}
.panel.flat { box-shadow: none; }
.darkcard { background: var(--night) !important; border-color: #1e2c35 !important; color: var(--dark-ink); }
.darkcard p, .darkcard li { color: var(--dark-muted); }
.darkcard h3, .darkcard b { color: var(--dark-ink); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.accent { background: var(--accent); }
.dot.good { background: var(--good); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

.mono, .mono-label, .mono-micro { font-family: var(--font-mono); }
.mono-label { font-size: 11.5px; letter-spacing: 0.22em; color: var(--dim); }
.mono-label.accent { color: var(--accent); }
.mono-label.good { color: var(--good); }
.mono-micro { font-size: 10px; color: var(--dim); letter-spacing: 0.06em; }
.ok { color: var(--good); }
.good { color: var(--good); } .accent { color: var(--accent); } .warn { color: var(--warn); }

.strip {
  margin-top: auto; display: flex; align-items: center; gap: 12px;
  border-radius: 12px; padding: 13px 18px; font-size: 13.5px;
}
.strip.darkcard { color: var(--dark-ink); }
.strip b { font-weight: 600; }
.statement { margin-top: auto; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 21px; color: var(--ink); }
.statement em { font-style: normal; color: var(--accent); }
.statement.sm { font-size: 15px; font-family: var(--font-body); font-weight: 500; }

.callout { display: flex; gap: 14px; align-items: baseline; border: 1px solid var(--border); background: var(--panel-2); border-radius: 12px; padding: 13px 18px; }
.callout .ci { font-family: var(--font-mono); font-weight: 600; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); flex-shrink: 0; }
.callout p { font-size: 12.5px; }
.callout b { color: var(--ink); }
.callout.warn { background: color-mix(in srgb, var(--warn) 8%, var(--panel-2)); }
.callout.warn .ci { color: var(--warn); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; }
.kv dt { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.kv dd { font-size: 12.5px; color: var(--muted); }
.kv b { color: var(--ink); }
.cmpbox { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow-sm); }
.cmpbox .ct { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 6px; }
.figcap { font-size: 11.5px; color: var(--dim); text-align: center; margin-top: 8px; }

.split-46 { display: grid; grid-template-columns: 4fr 5fr; gap: 24px; flex: 1; min-height: 0; align-items: center; }
.split-50 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; flex: 1; min-height: 0; }
.split-55 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.split-64 { display: grid; grid-template-columns: 6fr 4fr; gap: 26px; flex: 1; min-height: 0; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; flex: 1; align-content: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }

ul.ticks { list-style: none; display: flex; flex-direction: column; gap: 12px; }
ul.ticks li { position: relative; padding-left: 30px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
ul.ticks li b { color: var(--ink); font-weight: 600; }
ul.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: var(--green-soft); color: var(--good);
}
ul.ticks.accent li::before { content: ""; top: 6px; width: 9px; height: 9px; background: var(--accent); left: 4px; }
ul.ticks.accent li { padding-left: 24px; }

/* ---------- 01 hook (SAP PO 2027 — the 04-flow hook card) ---------- */
.hookwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.hook-card {
  position: relative; overflow: hidden;
  background: linear-gradient(125deg, var(--panel) 52%, var(--hook-tint));
  border: 1px solid var(--border); border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 52px 60px;
}
.hook-num {
  position: absolute; right: -0.04em; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 800;
  font-size: 300px; line-height: 1; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(211, 95, 61, 0.26);
  pointer-events: none; user-select: none; z-index: 0;
}
[data-theme="dark"] .hook-num { -webkit-text-stroke-color: rgba(224, 121, 92, 0.3); }
.hook-body { position: relative; z-index: 1; max-width: 700px; }
.kicker.oxide { color: var(--bad); }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--vivid-cyan), var(--vivid-basis)); box-shadow: 0 0 0 4px rgba(66, 215, 255, 0.18); flex: none; display: inline-block; margin-right: 9px; vertical-align: 1px; }
.kdot.oxide { background: linear-gradient(135deg, #e57a52, #d35f3d); box-shadow: 0 0 0 4px rgba(211, 95, 61, 0.14); }
.hook-card h2 { font-size: 40px; margin: 16px 0 0; }
.hook-card h2 .oxide { color: var(--bad); }
.hook-text { margin-top: 14px; font-size: 16.5px; color: var(--muted); max-width: 52ch; }
.hook-text b { color: var(--ink); }
.timeline-h { display: flex; margin-top: 34px; max-width: 560px; list-style: none; }
.timeline-h li { position: relative; flex: 1; padding-top: 20px; padding-right: 12px; }
.timeline-h li::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.timeline-h li:last-child::before { right: 40%; }
.timeline-h li::after {
  content: ""; position: absolute; top: 4px; left: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--dim);
}
.timeline-h .t-hot::after { border-color: var(--vivid-oxide); background: var(--vivid-oxide); box-shadow: 0 0 0 5px rgba(211, 95, 61, 0.15); }
.t-year { display: block; font-family: var(--font-mono); font-weight: 600; font-size: 14px; color: var(--ink); }
.t-hot .t-year { color: var(--bad); }
.t-label { display: block; font-size: 12.5px; line-height: 1.45; color: var(--dim); margin-top: 3px; max-width: 19ch; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; color: var(--accent); background: none; border: none; cursor: pointer; }
.link-arrow svg { width: 15px; height: 15px; transition: transform 0.25s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- 02 cover ---------- */
.slide.cover { padding-top: 56px; }
.cover-body { margin: auto 0; max-width: 700px; position: relative; z-index: 2; }
.cover-body .kicker { margin-bottom: 18px; display: block; }
h1 { font-family: var(--font-display); font-weight: 800; font-size: 54px; line-height: 1.06; letter-spacing: -0.03em; margin-bottom: 22px; }
.grad {
  background: linear-gradient(100deg, var(--accent), #1593c4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="dark"] .grad { background: linear-gradient(100deg, var(--vivid-cyan), var(--vivid-basis)); -webkit-background-clip: text; background-clip: text; }
.sub { font-size: 16px; max-width: 600px; margin-bottom: 26px; }

.pipe-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pchip {
  font-family: var(--font-mono); font-size: 12px; color: var(--dim);
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 13px; box-shadow: var(--shadow-sm);
}
.pchip.ok { color: var(--good); background: color-mix(in srgb, var(--good) 8%, var(--panel)); }
.arr { color: var(--dim); font-size: 13px; }
.cover-note { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 13px; color: var(--dim); }
.envdots { display: inline-flex; gap: 4px; flex: none; }
.envdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.envdots i:nth-child(2) { opacity: 0.65; }
.envdots i:nth-child(3) { opacity: 0.4; }

/* floating product-UI cards (04-flow hero, graph card dropped by request) */
.float-cluster { position: absolute; right: 52px; top: 96px; width: 340px; z-index: 1; }
.ui-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  box-shadow: var(--shadow-sm); padding: 9px 15px;
  font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em;
  margin-left: 6px; margin-bottom: 14px;
  animation: bob 6.5s ease-in-out infinite;
}
.ui-chip .mono { font-size: 10.5px; }
.ui-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); padding: 17px 18px; margin-bottom: 16px;
  transform: rotate(var(--rot, 0deg));
  animation: bob var(--bobd, 7s) ease-in-out var(--bobdel, 0s) infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-9px) rotate(var(--rot, 0deg)); } }
@media (prefers-reduced-motion: reduce) { .ui-card, .ui-chip { animation: none; } }
.ui-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ui-title { font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--ink); }
.ui-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-style: normal;
  font-weight: 600; font-size: 10.5px; line-height: 1; border-radius: 999px; padding: 6px 10px; white-space: nowrap; flex: none;
}
.pill.ok, .pill.green { color: var(--good); background: var(--green-soft); }
.pill.blue { color: var(--accent); background: color-mix(in srgb, var(--vivid-cyan) 14%, transparent); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.ci-steps { margin-top: 13px; display: grid; gap: 8px; list-style: none; }
.ci-steps li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tick {
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--green-soft); color: var(--good);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-size: 10px; font-weight: 700;
}
.digest { font-family: var(--font-mono); font-size: 10px; background: var(--panel-2); border: 1px solid var(--border); padding: 2px 7px; border-radius: 7px; color: var(--muted); margin-left: 2px; }
.ui-footnote { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border-strong); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.03em; color: var(--accent); }
.card-track { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.track-main { min-width: 0; flex: 1; }
.track-id { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-meta { font-size: 11px; color: var(--good); font-weight: 500; margin-top: 2px; }
.mini-btn {
  flex: none; font-weight: 600; font-size: 11.5px; color: var(--accent);
  border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--vivid-cyan) 8%, transparent);
  padding: 6px 12px; border-radius: 999px;
}
.fc-ci { --rot: -1.6deg; width: 88%; }
.fc-track { --rot: 1.2deg; --bobd: 6s; --bobdel: -2.5s; width: 96%; margin-left: auto; }

/* ---------- 03 bento pillars (04-flow) ---------- */
.bento3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; flex: 1; min-height: 0; align-content: center; }
.b-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow-sm); padding: 24px 26px; overflow: hidden;
}
.b-card::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 2px; border-radius: 2px;
  background: linear-gradient(135deg, var(--vivid-cyan), var(--vivid-basis));
}
.b-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.b-ico {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(66, 215, 255, 0.18), rgba(82, 182, 222, 0.12));
  border: 1px solid var(--border-strong); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.b-ico svg { width: 20px; height: 20px; }
.b-card h3 { font-size: 19px; letter-spacing: -0.01em; }
.b-tag { width: 100%; font-size: 12.5px; font-style: italic; font-weight: 500; color: var(--accent); }
.b-body { margin-top: 12px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.b-visual { margin-top: auto; padding-top: 18px; }

/* platform: SLA stack */
.stack-visual { display: grid; gap: 0; }
.layer { border-radius: 12px; padding: 11px 14px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.layer-you { background: var(--panel); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
.layer-basis { background: var(--night); border: 1px solid #1e2c35; }
.layer-name { font-weight: 600; font-size: 13px; color: var(--ink); }
.layer-basis .layer-name { color: var(--dark-ink); }
.layer-sub { font-family: var(--font-mono); font-size: 9px; color: var(--dim); letter-spacing: 0.02em; }
.layer-basis .layer-sub { color: var(--dark-muted); }
.sla-line { display: flex; align-items: center; gap: 10px; padding: 8px 6px; }
.sla-line::before, .sla-line::after { content: ""; flex: 1; border-top: 1.5px dashed var(--border-strong); }
.sla-line span { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }

/* framework: terminal snippet */
.term { background: var(--night); border: 1px solid #1e2c35; border-radius: 12px; padding: 14px 16px; font-family: var(--font-mono); font-size: 11px; line-height: 1.8; color: #c8d4da; }
.term p { font-size: inherit; color: inherit; line-height: inherit; }
.t-prompt { color: var(--vivid-cyan); }
.t-indent { padding-left: 18px; color: #8fa4af; }
.t-ok { color: var(--vivid-green); }

/* contract: ports rows */
.ports-visual { display: grid; gap: 8px; }
.ports-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.runtime { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--ink); margin-right: auto; white-space: nowrap; }
.port { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--vivid-cyan) 14%, transparent); border: 1px solid var(--border-strong); padding: 3px 8px; border-radius: 999px; }
.ports-cap { font-family: var(--font-mono); font-size: 10px; color: var(--dim); letter-spacing: 0.05em; padding-left: 2px; }

/* ---------- 04 ownership (04-flow) ---------- */
.own2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; flex: 1; min-height: 0; align-content: center; }
.own2 { border-radius: 20px; padding: 26px 30px; }
.own2 h3 { display: flex; align-items: center; gap: 12px; font-size: 20px; letter-spacing: -0.015em; color: var(--ink); }
.own-mark { width: 14px; height: 14px; border-radius: 5px; background: linear-gradient(135deg, var(--vivid-cyan), var(--vivid-basis)); flex: none; }
.own-mark.b { background: var(--vivid-green); }
.own2 ul { margin: 12px 0 0; list-style: none; }
.own2 li { display: flex; align-items: flex-start; gap: 12px; padding-block: 9px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.own2 li + li { border-top: 1px solid var(--border); }
.li-ico {
  width: 21px; height: 21px; border-radius: 50%; flex: none; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-soft); color: var(--good); font-size: 10px; font-weight: 700;
}
.own-you { background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.own-basis { position: relative; overflow: hidden; background: var(--night); border: 1px solid rgba(255, 255, 255, 0.08); }
.own-basis::before { content: ""; position: absolute; top: -120px; right: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(66, 215, 255, 0.16), transparent 70%); pointer-events: none; }
.own-basis h3 { color: var(--dark-ink); }
.own-basis li { color: #c2cdd4; border-top-color: rgba(255, 255, 255, 0.08); }
.own-basis .li-ico { background: rgba(66, 215, 255, 0.14); color: var(--vivid-cyan); }

/* ---------- 05 how it works (horizontal rail, 04-flow) ---------- */
.howx { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.howx-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; position: relative; }
.howx-steps::before { content: ""; position: absolute; top: 21px; left: 12.5%; right: 12.5%; height: 2px; background: linear-gradient(90deg, var(--vivid-cyan), var(--vivid-basis) 55%, var(--vivid-green)); opacity: 0.45; z-index: 0; }
.hstep { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.step-dot { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 600 12.5px var(--font-mono); background: linear-gradient(135deg, var(--vivid-cyan), var(--vivid-green)); color: #07131c; z-index: 1; box-shadow: 0 6px 18px -6px rgba(23, 146, 197, 0.6); }
.step-card { align-self: stretch; text-align: left; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 15px 16px 14px; flex: 1; }
.step-card h3 { font-size: 15.5px; letter-spacing: -0.01em; }
.step-card p { margin-top: 8px; font-size: 12px; line-height: 1.5; }
.chips { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; align-items: flex-start; }
.chip-code { font: 400 10.5px var(--font-mono); background: var(--night); color: #9be1ff; padding: 7px 10px; border-radius: 9px; overflow-wrap: anywhere; max-width: 100%; border: 1px solid transparent; }
[data-theme="dark"] .chip-code { border-color: var(--border); }
.chip-proof { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 11px; color: var(--good); background: var(--green-soft); border-radius: 999px; padding: 6px 11px; }
.chip-proof svg { width: 12px; height: 12px; flex: none; }

/* ---------- figure slides (deep-dive excalidraw figures) ---------- */
.slide.figslide { padding: 40px 48px 36px; justify-content: flex-start; }
.figwrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.figwrap .exfig { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }

/* ---------- message store: promise + toggle ---------- */
.msplit { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; flex: 1; min-height: 0; align-items: center; }
.togglecard { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.togglecard .tc-bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.togglecard .tc-bar i { width: 8px; height: 8px; border-radius: 50%; }
.togglecard .tc-bar i:nth-child(1) { background: var(--vivid-oxide); }
.togglecard .tc-bar i:nth-child(2) { background: var(--vivid-amber); }
.togglecard .tc-bar i:nth-child(3) { background: var(--vivid-green); }
.togglecard .tc-bar span { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); margin-left: 8px; }
.togglerow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; }
.togglerow .tr-main b { display: block; font-size: 14.5px; color: var(--ink); }
.togglerow .tr-main span { font-size: 11.5px; color: var(--dim); }
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: linear-gradient(135deg, var(--vivid-cyan), var(--vivid-green)); flex: none; box-shadow: 0 4px 12px -4px rgba(23, 146, 197, 0.7); }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(8, 19, 27, 0.3); }
.provlist { list-style: none; border-top: 1px dashed var(--border); padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.provlist .pl-cap { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 2px; }
.provlist li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.provlist li b { color: var(--ink); font-weight: 600; }
.provlist li code { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); background: color-mix(in srgb, var(--vivid-cyan) 9%, transparent); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.provlist .plus { width: 18px; height: 18px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--green-soft); color: var(--good); font-size: 11px; font-weight: 700; }

/* ---------- message store: the message path diagram ---------- */
.msgpath { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.mrow { display: flex; align-items: stretch; gap: 10px; }
.mnode { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 12px; text-align: center; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.mnode b { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.mnode span { font-size: 10px; color: var(--dim); line-height: 1.35; }
.mnode.kafka b { color: var(--accent); }
.mnode.kafka { border-color: var(--border-strong); background: color-mix(in srgb, var(--vivid-cyan) 6%, var(--panel)); }
.mnode.ext { background: var(--panel-2); }
.marrow { align-self: center; color: var(--dim); font-size: 15px; flex-shrink: 0; }
.adapterbox { flex: 2.6; border: 1.5px solid var(--border-strong); border-radius: 14px; padding: 20px 14px 12px; position: relative; background: color-mix(in srgb, var(--vivid-cyan) 4%, var(--panel)); box-shadow: var(--shadow-sm); }
.adapterbox > .ab-label { position: absolute; top: -9px; left: 16px; background: var(--bg); padding: 0 8px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--accent); font-weight: 600; }
.ab-funcs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.ab-funcs code { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; }
.ab-route { border: 1.5px dashed var(--border); border-radius: 10px; background: var(--panel); padding: 10px 12px; text-align: center; }
.ab-route b { font-size: 12px; color: var(--ink); display: block; }
.ab-route span { font-size: 10px; color: var(--dim); }
.mdown { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.msink { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow-sm); position: relative; }
.msink::before { content: "↓ " attr(data-via); position: absolute; top: -17px; left: 12px; font-family: var(--font-mono); font-size: 9px; color: var(--dim); }
.msink b { font-family: var(--font-mono); font-size: 11px; color: var(--ink); display: block; margin-bottom: 3px; }
.msink span { font-size: 10px; color: var(--dim); line-height: 1.4; display: block; }
.msink.pg b { color: var(--good); }
.msink.dlq b { color: var(--bad); }
.msink.dash b { color: var(--accent); font-family: var(--font-body); font-size: 12px; }
.mdown-wrap { padding-top: 20px; }

/* ---------- message store: resend sequence ---------- */
.seq { display: flex; flex-direction: column; gap: 0; }
.seq .sstep { display: grid; grid-template-columns: 38px 1fr; gap: 13px; }
.seq .sn { display: flex; flex-direction: column; align-items: center; }
.seq .sn b {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  color: var(--accent); background: color-mix(in srgb, var(--vivid-cyan) 12%, transparent); border: 1px solid var(--accent);
}
.seq .sn .ln { flex: 1; width: 2px; background: var(--border); margin: 4px 0; }
.seq .sstep:last-child .sn .ln { display: none; }
.seq .sc { padding-bottom: 13px; }
.seq .sc h3 { font-size: 14px; margin-bottom: 2px; }
.seq .sc p { font-size: 11.5px; }
.seq .sc code { font-family: var(--font-mono); font-size: 10px; color: var(--accent); background: var(--panel-2); border-radius: 5px; padding: 1px 6px; }
.shotframe { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.shotframe img { display: block; width: 100%; height: auto; }

/* ---------- message store: contract + certification ---------- */
.pkgrow { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.pkgrow .runtime { margin-right: auto; }
.pkgrow .reg { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; color: var(--good); background: var(--green-soft); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.certcard { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.certgrid { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; margin-top: 12px; }
.certgrid .rt { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.certcells { display: grid; grid-template-columns: repeat(22, 1fr); gap: 3px; }
.certcells i { display: block; aspect-ratio: 1; border-radius: 3px; background: color-mix(in srgb, var(--vivid-green) 55%, var(--panel)); border: 1px solid color-mix(in srgb, var(--good) 40%, var(--border)); }
.certcap { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.certcap .mono-micro { letter-spacing: 0.04em; }

/* ---------- gallery (what we've built) ---------- */
.built-body { position: relative; flex: 1 1 auto; min-height: 0; }
.built-intro { position: absolute; inset: 0; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 30px; align-items: center; }
.built-intro > * { min-width: 0; }
.oplist { list-style: none; display: flex; flex-direction: column; gap: 15px; align-self: center; }
.oplist li { position: relative; padding-left: 22px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.oplist li::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.oplist li b { color: var(--ink); font-weight: 600; }
.built-preview { display: flex; flex-direction: column; gap: 12px; min-width: 0; cursor: pointer; }
.preview-frame { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.preview-frame img { display: block; width: 100%; height: 330px; object-fit: cover; object-position: top center; }
.built-cue { display: inline-flex; align-items: center; gap: 11px; font-size: 13px; color: var(--muted); }
.built-cue .cue-key { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); color: var(--accent); font-family: var(--font-mono); font-size: 14px; }
.built-cue b { color: var(--ink); font-family: var(--font-mono); font-weight: 600; }
.gallery { position: absolute; inset: 0; z-index: 3; background: var(--bg); display: flex; flex-direction: column; gap: 10px; opacity: 0; visibility: hidden; transform: scale(0.985); transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s; }
.built.gallery-open .gallery { opacity: 1; visibility: visible; transform: none; }
.gallery-view { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.gallery-view img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; border-radius: 8px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.gallery-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gallery-cap { font-family: var(--font-mono); font-size: 12px; color: var(--dim); letter-spacing: 0.03em; }
.gallery-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.gallery-dots { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.gallery-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: none; padding: 0; cursor: pointer; opacity: 0.55; transition: opacity 0.2s, background 0.2s, transform 0.2s; }
.gallery-dot.on { background: var(--accent); opacity: 1; transform: scale(1.25); }
.gallery-dot:hover { opacity: 1; }

/* ---------- close (why basis + next steps) ---------- */
.split-50.last { align-items: center; }
.whycol { display: flex; flex-direction: column; gap: 22px; }
.stat { display: flex; align-items: center; gap: 20px; }
.stat b { font-family: var(--font-display); font-weight: 800; font-size: 54px; min-width: 170px; color: var(--accent); line-height: 1; }
.stat span { font-size: 14.5px; color: var(--muted); max-width: 260px; }
.tagline { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 17px; color: var(--ink); margin-top: 6px; }
.cta { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.cta h3 { font-size: 24px; }
.nextsteps { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.nextsteps li { display: flex; gap: 14px; font-size: 14px; color: var(--dark-muted); align-items: baseline; }
.nextsteps span { font-family: var(--font-mono); font-weight: 600; font-size: 12px; color: var(--vivid-cyan); }
.button {
  display: block; text-align: center; text-decoration: none;
  background: linear-gradient(100deg, var(--vivid-cyan), var(--vivid-basis));
  color: #041018; font-family: var(--font-display); font-weight: 800; font-size: 16px;
  border-radius: 10px; padding: 12px;
}

/* ---------- deck chrome ---------- */
.progress { position: fixed; left: 0; top: 0; right: 0; height: 3px; z-index: 5; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--vivid-cyan), var(--vivid-basis)); transition: width 0.3s ease; }
.hud { position: fixed; left: 18px; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 12px; }
.hudlabel { font-size: 9.5px; letter-spacing: 0.22em; color: var(--dim); }
.nav { position: fixed; right: 18px; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 10px; }
.nav button, #themeBtn {
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  color: var(--ink); font-size: 14px; min-width: 34px; height: 30px; padding: 0 7px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.nav button:hover, #themeBtn:hover { border-color: var(--border-strong); }
#counter { font-size: 11px; color: var(--dim); }
[data-theme="dark"] #themeBtn .sun { display: inline; } [data-theme="dark"] #themeBtn .moon { display: none; }
[data-theme="light"] #themeBtn .sun { display: none; } [data-theme="light"] #themeBtn .moon { display: inline; }


/* ---------- print ---------- */
@media print {
  body { overflow: visible; }
  .aurora, .grain, .hud, .nav, .progress { display: none !important; }
  #stage { position: static; transform: none; width: auto; height: auto; }
  .slide { display: flex !important; visibility: visible !important; position: relative; width: 1280px; height: 720px; page-break-after: always; }
  [data-anim] { opacity: 1 !important; transform: none !important; }
}
