/* ===========================================================
   PhishWall — Presentation Deck
   Theme: Purple / White Modern Minimalist Business Portfolio.
   Light-first, generous whitespace, thin borders, soft shadows,
   a single violet accent — with a complementary dark variant for
   projectors. Functional result colours (malicious / spam /
   legitimate / undetermined) are kept from the PhishWall app.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* violet accent */
  --accent:      #7c3aed;
  --accent-2:    #a78bfa;
  --accent-deep: #5b21b6;
  --accent-soft: rgba(124, 58, 237, 0.10);
  --accent-ring: rgba(124, 58, 237, 0.40);

  /* class semantics (from the PhishWall app) */
  --legit: #10b981;        --legit-soft: rgba(16, 185, 129, 0.12);
  --spam: #f59e0b;         --spam-soft: rgba(245, 158, 11, 0.12);
  --malicious: #e11d48;    --malicious-soft: rgba(225, 29, 72, 0.10);
  --undet: #94a3b8;        --undet-soft: rgba(148, 163, 184, 0.14);

  /* type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* radius */
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 24px;

  /* light-first surface tokens (purple/white) */
  --bg: #ffffff;
  --bg-grad-1: #f6f3ff;
  --bg-grad-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #faf8ff;
  --surface-3: #f2ecff;
  --border: rgba(76, 29, 149, 0.12);
  --border-strong: rgba(76, 29, 149, 0.22);
  --text: #1c1330;
  --text-2: #5b5470;
  --text-3: #8b85a0;
  --shadow: 0 24px 60px -28px rgba(76, 29, 149, 0.30);
  --shadow-sm: 0 10px 26px -16px rgba(76, 29, 149, 0.28);
  color-scheme: light;
}

[data-theme="dark"] {
  --accent: #a78bfa;
  --accent-2: #c4b5fd;
  --accent-deep: #8b5cf6;
  --accent-soft: rgba(167, 139, 250, 0.16);
  --accent-ring: rgba(167, 139, 250, 0.45);

  --legit-soft: rgba(16, 185, 129, 0.16);
  --spam-soft: rgba(245, 158, 11, 0.16);
  --malicious: #fb7185;  --malicious-soft: rgba(251, 113, 133, 0.16);
  --undet-soft: rgba(148, 163, 184, 0.18);

  --bg: #120c22;
  --bg-grad-1: #1b1233;
  --bg-grad-2: #120c22;
  --surface: #1c1436;
  --surface-2: #221842;
  --surface-3: #2b2052;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f1ecff;
  --text-2: #b9b1d6;
  --text-3: #837a9e;
  --shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1100px 640px at 88% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(820px 520px at -6% 8%, color-mix(in oklab, var(--accent) 7%, transparent), transparent 58%),
    linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.018em; margin: 0; line-height: 1.12; }
.mono { font-family: var(--font-mono); }
::selection { background: var(--accent-soft); color: var(--text); }
a { color: var(--accent); }
kbd {
  font-family: var(--font-mono); font-size: .82em;
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px; color: var(--text-2);
}

/* ===========================================================
   DECK + SLIDE LAYOUT
   =========================================================== */
.deck { position: fixed; inset: 0; overflow: hidden; }

.slide {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  padding: 64px 72px 92px;
  overflow: hidden;
}
.slide.active { display: flex; }
.slide.anim-in .slide-inner { animation: slideIn .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes slideIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.slide-inner { width: 100%; max-width: 1180px; max-height: calc(100vh - 156px); }

/* progress bar */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--accent-2));
  z-index: 50; transition: width .45s cubic-bezier(.2,.7,.2,1);
}

/* brand chip (top-left) */
.brand-chip {
  position: fixed; top: 18px; left: 22px; z-index: 40;
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: var(--text); letter-spacing: -.01em;
}
.brand-chip b { color: var(--accent); font-weight: 700; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent-deep), var(--accent));
  box-shadow: 0 6px 16px -6px var(--accent-ring);
}
.brand-mark svg { width: 18px; height: 18px; }
.bc-tag {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 9px; letter-spacing: .04em;
}

/* top-right chrome */
.topchrome { position: fixed; top: 16px; right: 20px; z-index: 40; display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  display: grid; place-items: center;
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: .18s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.mini-btn {
  height: 38px; border-radius: 11px; cursor: pointer;
  padding: 0 12px; font: 600 12px var(--font-body);
  color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: .18s;
}
.mini-btn:hover { color: var(--accent); border-color: var(--border-strong); transform: translateY(-1px); }
.mini-btn:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

/* ===========================================================
   SLIDE HEADINGS
   =========================================================== */
.s-head { margin-bottom: 30px; }
.s-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 16px;
}
.s-eyebrow svg { width: 15px; height: 15px; }
.s-title { font-size: clamp(28px, 3.6vw, 46px); }
.s-title .grad, .grad {
  background: linear-gradient(120deg, var(--accent-deep), var(--accent) 55%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.s-lead {
  margin: 16px 0 0; max-width: 880px;
  font-size: clamp(15px, 1.5vw, 18px); line-height: 1.6; color: var(--text-2);
}

/* chapter number badge inside the eyebrow */
.s-chapter {
  font-family: var(--font-display); font-weight: 700;
  font-size: 13px; color: var(--accent);
  margin-right: 4px;
}

/* ===========================================================
   GRID HELPERS
   =========================================================== */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.split-img { display: grid; grid-template-columns: 1fr 1.15fr; gap: 26px; align-items: center; }
.mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mb0 { margin-bottom: 0; }

/* ===========================================================
   CARDS
   =========================================================== */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-strong {
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--accent) 5%, var(--surface)), var(--surface));
  border-color: var(--border-strong);
}
.pcard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: .2s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--accent-ring); box-shadow: var(--shadow); }
.pcard h3 { font-size: 17px; margin-bottom: 8px; }
.pcard p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.pc-num {
  font-family: var(--font-display); font-weight: 700; font-size: 26px;
  color: var(--accent); opacity: .9; margin-bottom: 10px;
}
.pc-ic {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--border);
}
.pc-ic svg { width: 23px; height: 23px; }

h3 { font-size: 18px; }

/* class-coloured tints */
.bg-mal   { background: var(--malicious-soft); color: var(--malicious); }
.bg-spam  { background: var(--spam-soft);      color: var(--spam); }
.bg-legit { background: var(--legit-soft);     color: var(--legit); }
.bg-undet { background: var(--undet-soft);     color: var(--undet); }
.c-mal { color: var(--malicious); } .c-spam { color: var(--spam); }
.c-legit { color: var(--legit); } .c-undet { color: var(--undet); }

/* ===========================================================
   LISTS
   =========================================================== */
.blist { list-style: none; margin: 0; padding: 0; }
.blist li {
  position: relative; padding-left: 24px; margin-bottom: 11px;
  color: var(--text-2); font-size: 14.5px; line-height: 1.55;
}
.blist li:last-child { margin-bottom: 0; }
.blist li b { color: var(--text); }
.blist li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent); transform: rotate(45deg);
}
.blist.check li::before {
  content: "✓"; left: 0; top: 0; width: auto; height: auto;
  background: none; transform: none;
  color: var(--legit); font-weight: 800; font-size: 14px;
}
.ref-list {
  margin: 0;
  padding-left: 24px;
  columns: 2;
  column-gap: 28px;
  color: var(--text-2);
  font-size: 12.4px;
  line-height: 1.38;
}
.ref-list li {
  break-inside: avoid;
  margin: 0 0 10px;
  padding-left: 4px;
}
.ref-list li::marker {
  color: var(--accent);
  font-weight: 800;
}
.ref-list-all {
  columns: 3;
  column-gap: 20px;
  font-size: 9.4px;
  line-height: 1.26;
}
.ref-list-all li {
  margin-bottom: 6px;
}
.kw {
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 5px; padding: 0 5px; font-weight: 600;
}
[data-theme="dark"] .kw { color: var(--accent-2); }
.note { color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.muted { color: var(--text-3); }

/* ===========================================================
   CHIPS
   =========================================================== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px;
}

/* ===========================================================
   STAT TILES
   =========================================================== */
.stat { text-align: center; }
.stat .sv {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3vw, 38px);
  background: linear-gradient(120deg, var(--accent-deep), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.stat .sl { color: var(--text-2); font-size: 13px; margin-top: 10px; line-height: 1.45; }

/* ===========================================================
   BANNERS
   =========================================================== */
.banner {
  display: flex; align-items: center; gap: 13px;
  border-radius: var(--radius-sm); padding: 15px 18px;
  font-size: 14.5px; line-height: 1.5; color: var(--text-2);
}
.banner b { color: var(--text); }
.banner svg { width: 22px; height: 22px; flex: none; }
.banner-info {
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
}
.banner-info svg { color: var(--accent); }

/* ===========================================================
   TABLES
   =========================================================== */
.ptable {
  position: relative;
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.ptable th, .ptable td {
  text-align: left; padding: 13px 18px; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.ptable thead th {
  font-family: var(--font-display); font-weight: 600; font-size: 12.5px;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--surface-3);
}
[data-theme="dark"] .ptable thead th { color: var(--accent-2); }
.ptable tbody tr:last-child td { border-bottom: none; }
.ptable td.c { color: var(--text-2); }
.ptable tbody tr:nth-child(even) td { background: var(--surface-2); }
.ptable-compact th,
.ptable-compact td {
  padding: 9px 11px;
  font-size: 12.2px;
  line-height: 1.35;
}
.ptable-compact thead th {
  font-size: 10.6px;
}

/* ===========================================================
   FLOW / PROCESS STEPS
   =========================================================== */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.flow-step {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 14px; box-shadow: var(--shadow-sm);
}
.flow-step .fs-n {
  font-family: var(--font-mono); font-weight: 600; font-size: 12px;
  color: var(--accent); margin-bottom: 8px;
}
.flow-step h4 { font-size: 15px; margin-bottom: 5px; }
.flow-step p { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.flow-step:not(:last-child)::after {
  content: "→"; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-weight: 700; z-index: 2;
}

/* ===========================================================
   TABLE OF CONTENTS / AGENDA GRID
   =========================================================== */
.agenda-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.agenda-item {
  position: relative;
  display: block; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-sm); transition: .2s; font-family: var(--font-body);
}
.agenda-item:hover { transform: translateY(-3px); border-color: var(--accent-ring); box-shadow: var(--shadow); }
.agenda-item .ai-n {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 22px; color: var(--accent); opacity: .85;
}
.agenda-item .ai-t { display: block; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text); margin-top: 4px; }
.agenda-item .ai-d { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

/* ===========================================================
   METERS / DONUT (sample model output)
   =========================================================== */
.meter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.meter-row .lbl { width: 84px; font-size: 12.5px; font-weight: 600; }
.meter-row .val { width: 42px; text-align: right; font-family: var(--font-mono); font-size: 12.5px; }
.meter { flex: 1; height: 9px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; }
.cdonut { width: 122px; height: 122px; flex: none; display: grid; place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(var(--malicious) 0 78%, var(--surface-3) 78% 100%);
}
.cdonut .cd-c {
  width: 86px; height: 86px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; text-align: center; box-shadow: var(--shadow-sm);
}
.cd-score { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--malicious); }
.cd-lbl { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* ===========================================================
   FIGURE FRAME + BROWSER MOCKUP (screenshots / diagrams)
   =========================================================== */
.figframe {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
  animation: figureFloat 5.8s ease-in-out infinite;
  will-change: translate;
}
.figframe.on-white { background: #ffffff; }
.figframe img {
  display: block; margin: 0 auto;
  width: auto; height: auto;
  max-width: 100%; max-height: min(52vh, calc(100vh - 310px));
  object-fit: contain; border-radius: 10px;
}
.figcap {
  margin-top: 12px; text-align: center;
  font-size: 12.5px; color: var(--text-3); font-family: var(--font-mono);
}

.browser {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  animation: figureFloat 5.8s ease-in-out infinite;
  will-change: translate;
}
.browser-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.browser-bar .bd { width: 11px; height: 11px; border-radius: 50%; }
.browser-bar .url {
  margin-left: 12px; font-family: var(--font-mono); font-size: 12px;
  color: var(--text-3); background: var(--surface-3);
  padding: 4px 14px; border-radius: 999px;
}
.browser img {
  display: block; margin: 0 auto;
  width: auto; height: auto;
  max-width: 100%; max-height: min(52vh, calc(100vh - 330px));
  object-fit: contain;
}

.draggable-box {
  position: relative;
  left: var(--drag-x, 0px);
  top: var(--drag-y, 0px);
  cursor: grab;
  transition: left .18s ease, top .18s ease;
}
.draggable-box.dragging {
  cursor: grabbing;
  z-index: 30;
  transition: none !important;
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
}

@keyframes figureFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* zoomable images */
.zoomable { cursor: zoom-in; }
.zoom-badge {
  position: absolute; right: 12px; bottom: 12px; z-index: 5;
  width: 34px; height: 34px; border-radius: 9px; cursor: zoom-in;
  display: grid; place-items: center;
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--accent); border: 1px solid var(--border-strong);
}
.zoom-badge svg { width: 17px; height: 17px; }
.zoom-badge:hover { background: var(--surface); }

/* ===========================================================
   COVER + SECTION DIVIDER SLIDES
   =========================================================== */
.cover { text-align: center; }
.cover-inner { max-width: 920px; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
.brand .brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -.02em; }
.brand-name b { color: var(--accent); font-weight: 700; }
.cover h1 { font-size: clamp(34px, 5.4vw, 66px); line-height: 1.04; }
.cover h1.typewriter-title { position: relative; display: block; }
.typewriter-title::before {
  content: attr(data-full-title);
  display: block;
  visibility: hidden;
}
.typewriter-text {
  position: absolute;
  inset: 0;
  display: block;
}
.typewriter-title.is-typing .typewriter-text::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.86em;
  margin-left: 0.06em;
  margin-right: -0.14em;
  opacity: 1;
  vertical-align: -0.08em;
  background: var(--accent);
  animation: caretBlink .9s steps(1, end) infinite;
}
.cover-lead { font-size: clamp(15px, 1.7vw, 20px); color: var(--text-2); margin: 20px auto 0; max-width: 760px; line-height: 1.5; }
.cover-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.cover-pill {
  font-size: 13px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 16px; box-shadow: var(--shadow-sm);
}
.cover-pill b { color: var(--accent); }
.author-band {
  margin-top: 34px; display: inline-block; text-align: center;
  padding: 22px 34px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.au-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.au-role { color: var(--text-2); font-size: 14px; margin-top: 5px; }
.au-sup { color: var(--text-3); font-size: 13.5px; margin-top: 8px; }
.au-sup b { color: var(--accent); }

/* big section divider */
.divider { text-align: center; }
.divider .dv-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(70px, 13vw, 150px); line-height: 1;
  background: linear-gradient(150deg, var(--accent-deep), var(--accent) 60%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .96;
}
.divider h2 { font-size: clamp(28px, 4vw, 50px); margin-top: 6px; }
.divider p { color: var(--text-2); margin: 16px auto 0; max-width: 620px; font-size: 16px; line-height: 1.55; }
.dv-rule { width: 64px; height: 4px; border-radius: 999px; margin: 22px auto 0;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); }

/* placeholder banner (missing source content) */
.placeholder {
  border: 1.5px dashed var(--accent-ring);
  background: var(--accent-soft);
  border-radius: var(--radius); padding: 28px;
  text-align: center; color: var(--text-2);
}
.placeholder h3 { color: var(--accent-deep); margin-bottom: 10px; }
[data-theme="dark"] .placeholder h3 { color: var(--accent-2); }

/* ===========================================================
   CONTROLS / COUNTER
   =========================================================== */
.controls {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 40; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 9px; box-shadow: var(--shadow);
}
.nav-btn {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--text-2);
  background: transparent; border: none; transition: .18s;
}
.nav-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.nav-btn svg { width: 19px; height: 19px; }
.nav-btn:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.counter {
  min-width: 78px; text-align: center; cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-2);
}
.counter b { color: var(--accent); }

.hint-key {
  position: fixed; bottom: 22px; right: 22px; z-index: 35;
  font-size: 11.5px; color: var(--text-3);
}
.hint-key kbd { margin: 0 1px; }
@media (max-width: 900px) { .hint-key { display: none; } }

/* ===========================================================
   OVERVIEW / JUMP GRID
   =========================================================== */
.overview {
  position: fixed; inset: 0; z-index: 60; display: none;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 40px 48px; overflow: auto;
}
.overview.open { display: block; }
.overview h3 { font-size: 22px; }
.ov-sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.ov-grid {
  margin-top: 24px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px;
}
.ov-item {
  text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; transition: .16s;
}
.ov-item:hover { border-color: var(--accent-ring); transform: translateY(-2px); }
.ov-item.cur { border-color: var(--accent); background: var(--accent-soft); }
.ov-n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.ov-t { font-family: var(--font-display); font-weight: 500; font-size: 14px; margin-top: 4px; }

/* ===========================================================
   IMAGE LIGHTBOX
   =========================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 80; display: none;
  background: color-mix(in oklab, #1c1330 88%, transparent);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lightbox.open { display: block; }
.lb-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: grab; }
.lb-stage.grabbing { cursor: grabbing; }
.lb-img { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); transform-origin: center center; will-change: transform; user-select: none; }
.lb-toolbar {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 10px; box-shadow: var(--shadow); z-index: 2;
}
.lb-zoom { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); min-width: 44px; text-align: center; }
.lb-cap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 12.5px; color: #fff; background: rgba(0,0,0,.35); padding: 6px 14px; border-radius: 999px; }
.lb-hint { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); font-size: 11.5px; color: rgba(255,255,255,.7); }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 1024px) {
  .slide { padding: 56px 40px 88px; }
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow-step:not(:last-child)::after { display: none; }
}
@media (max-width: 720px) {
  .slide { padding: 64px 22px 92px; }
  .g2, .g3, .g4, .split, .split-img, .agenda-grid { grid-template-columns: 1fr; }
  .ref-list { columns: 1; }
  .ref-list-all { columns: 1; font-size: 11px; }
  .brand-chip { font-size: 13px; }
  .cover-meta { gap: 8px; }
}

/* ===========================================================
   REVEAL ANIMATION
   =========================================================== */
.reveal-target { opacity: 0; transform: translateY(16px); }
.slide.active .reveal-target {
  animation: reveal .55s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: var(--reveal-delay, 0s);
}
@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes caretBlink {
  0%, 72% { opacity: 1; }
  73%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .slide.anim-in .slide-inner,
  .slide.active .reveal-target { animation: none !important; }
  .reveal-target { opacity: 1 !important; transform: none !important; }
  .progress { transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ===========================================================
   PASSWORD SCREEN (index.php login)
   =========================================================== */
.login-body {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 38px 30px 26px;
  box-shadow: var(--shadow);
}
.login-mark {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 15px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  box-shadow: 0 10px 26px -10px var(--accent-ring);
}
.login-mark svg { width: 28px; height: 28px; }
.login-title { font-size: 26px; }
.login-title b { color: var(--accent); }
.login-sub { color: var(--text-2); font-size: 14px; margin: 8px 0 22px; line-height: 1.5; }
.login-form { display: grid; gap: 12px; text-align: left; }
.login-label { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.login-input {
  width: 100%; box-sizing: border-box; padding: 13px 15px; font-size: 15px;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-family: var(--font-body);
}
.login-input:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; border-color: var(--accent); }
.login-error {
  font-size: 13px; color: var(--malicious);
  background: var(--malicious-soft); border-radius: 9px; padding: 9px 12px;
}
.login-btn {
  margin-top: 4px; padding: 13px 16px; font-size: 15px; font-weight: 600; cursor: pointer;
  color: #fff; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  font-family: var(--font-display); transition: .18s;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px var(--accent-ring); }
.login-foot { margin-top: 22px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

/* ===========================================================
   PHONE REMOTE — pairing panel (display side)
   =========================================================== */
.remote-pair {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .2s;
}
.remote-pair.open { opacity: 1; }
.remote-pair[hidden] { display: none; }
.rp-card {
  position: relative; width: 100%; max-width: 360px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 26px 24px; box-shadow: var(--shadow);
}
.rp-close { position: absolute; top: 12px; right: 12px; }
.rp-title { font-size: 20px; }
.rp-sub { color: var(--text-2); font-size: 13.5px; margin: 8px 0 18px; line-height: 1.5; }
.rp-qr {
  width: 224px; height: 224px; margin: 0 auto; display: grid; place-items: center;
  background: #fff; border-radius: 14px; padding: 10px; box-sizing: border-box;
  border: 1px solid var(--border);
}
.rp-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.rp-code { margin-top: 14px; font-size: 13px; color: var(--text-2); }
.rp-code b { font-family: var(--font-mono); color: var(--accent); letter-spacing: 2px; font-size: 15px; }
.rp-urllabel { display: block; text-align: left; margin: 16px 0 5px; font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.rp-urllabel span { text-transform: none; }
.rp-url {
  width: 100%; box-sizing: border-box; padding: 9px 11px; font-size: 12px;
  font-family: var(--font-mono); color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: 9px;
}
.rp-url:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.rp-tip { margin-top: 14px; text-align: left; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.rp-tip b { color: var(--text-2); }

/* ===========================================================
   PHONE REMOTE — controller surface (?remote=CODE)
   =========================================================== */
.remote-mode .deck,
.remote-mode .topchrome,
.remote-mode .controls,
.remote-mode .progress,
.remote-mode .brand-chip,
.remote-mode .hint-key,
.remote-mode .overview,
.remote-mode .lightbox,
.remote-mode .remote-pair { display: none !important; }
.remote-mode { overflow: hidden; }

.remote-ctl { display: none; }
.remote-mode .remote-ctl {
  display: flex; flex-direction: column; gap: 18px;
  position: fixed; inset: 0; z-index: 100; padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background:
    radial-gradient(900px 500px at 80% -10%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2));
}
.rc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rc-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 16px; }
.rc-brand b { color: var(--accent); }
.rc-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep)); }
.rc-mark svg { width: 16px; height: 16px; }
.rc-tag { font-family: var(--font-mono); font-size: 10px; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 8px; }
.rc-status { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.rc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--legit); box-shadow: 0 0 0 3px var(--legit-soft); }
.rc-status.off .rc-dot { background: var(--spam); box-shadow: 0 0 0 3px var(--spam-soft); }

.rc-stage {
  flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm);
}
.rc-arrow {
  width: 100%; height: 100%; min-height: 150px; cursor: pointer;
  display: grid; place-items: center; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: var(--radius); transition: .12s; -webkit-tap-highlight-color: transparent;
}
.rc-arrow:active { transform: scale(.97); background: color-mix(in oklab, var(--accent) 22%, transparent); }
.rc-arrow svg { width: 46px; height: 46px; }
.rc-center { text-align: center; padding: 0 4px; }
.rc-counter { font-family: var(--font-mono); font-size: 22px; color: var(--text-2); white-space: nowrap; }
.rc-counter b { color: var(--accent); font-size: 30px; }
.rc-slidetitle { margin-top: 8px; font-family: var(--font-display); font-size: 13px; color: var(--text-2); line-height: 1.3; max-width: 130px; }

.rc-zoombar { display: flex; gap: 8px; }
.rc-zoombar[hidden] { display: none; }
.rc-zbtn {
  flex: 1; padding: 14px 8px; cursor: pointer; font-family: var(--font-display); font-size: 14px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); display: grid; place-items: center;
}
.rc-zbtn svg { width: 20px; height: 20px; }
.rc-zbtn:active { background: var(--accent-soft); }

.rc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rc-action {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 18px 12px; cursor: pointer; font-family: var(--font-display); font-size: 15px; font-weight: 500;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); transition: .12s; -webkit-tap-highlight-color: transparent;
}
.rc-action svg { width: 22px; height: 22px; color: var(--accent); }
.rc-action:active:not(:disabled) { transform: scale(.98); background: var(--accent-soft); }
.rc-action:disabled { opacity: .4; cursor: default; }
.rc-action.active { border-color: var(--accent); background: var(--accent-soft); }

.rc-jump {
  position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column;
  padding: 20px; padding-top: calc(20px + env(safe-area-inset-top));
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.rc-jump[hidden] { display: none; }
.rc-jump-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rc-jump-head span { font-family: var(--font-display); font-size: 18px; }
.rc-jump-list { flex: 1; overflow: auto; display: grid; gap: 8px; }
.rc-jitem {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.rc-jitem.cur { border-color: var(--accent); background: var(--accent-soft); }
.rc-jn { font-family: var(--font-mono); font-size: 13px; color: var(--accent); min-width: 24px; }
.rc-jt { flex: 1; font-family: var(--font-display); font-size: 15px; }
.rc-jfig { color: var(--accent); font-size: 13px; }
