:root {
  --bg: #070809;
  --panel: rgba(16, 18, 20, 0.74);
  --panel-strong: rgba(9, 10, 11, 0.88);
  --ink: #f8f2e8;
  --muted: #c8bbaa;
  --soft: #7c756d;
  --gold: #d8b25f;
  --bronze: #a46a37;
  --cyan: #63d6ff;
  --green: #62df83;
  --red: #ef735d;
  --line: rgba(216, 178, 95, 0.28);
  --line-soft: rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; max-width: 100%; overflow-x: hidden; background: var(--bg); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
body { overflow-y: hidden; }
button { font: inherit; }
.deck { position: relative; width: 100vw; height: 100vh; overflow: hidden; background: #000; }
.slide {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  pointer-events: none;
  transform: translateX(3%);
  transition: opacity 420ms ease, transform 520ms ease;
}
.slide.active { opacity: 1; pointer-events: auto; transform: translateX(0); }
.visual-shell { position: absolute; inset: 0; overflow: hidden; background: #090a0b; }
.visual-shell img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); filter: saturate(1.03) contrast(1.05); animation: drift 18s ease-in-out infinite alternate; }
.visual-shell.missing img { display: none; }
.visual-fallback { display: none; position: absolute; inset: 0; place-items: center; color: var(--muted); background: radial-gradient(circle at 50% 45%, rgba(99,216,255,.14), rgba(0,0,0,.9)); }
.visual-shell.missing .visual-fallback { display: grid; }
.shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,6,7,.94), rgba(5,6,7,.72) 42%, rgba(5,6,7,.22) 72%, rgba(5,6,7,.8)), linear-gradient(0deg, rgba(0,0,0,.86), transparent 30%, rgba(0,0,0,.34)); }
.shade::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(216,178,95,.08) 0 1px, transparent 1px 88px), repeating-linear-gradient(0deg, rgba(99,216,255,.045) 0 1px, transparent 1px 72px); mask-image: linear-gradient(90deg, black, transparent 82%); }
.slide-content { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 430px); gap: 24px; align-items: end; width: min(1560px, 100%); height: 100%; margin: 0 auto; padding: clamp(22px, 4vw, 58px) clamp(18px, 4vw, 52px) 104px; }
.main-copy { max-width: 890px; }
.eyebrow, .panel-label { margin: 0 0 10px; color: var(--gold); text-transform: uppercase; letter-spacing: 0; font-size: 12px; font-weight: 900; }
h1 { margin: 0; font-size: clamp(42px, 6vw, 86px); line-height: .96; max-width: 1050px; }
h2 { margin: 12px 0 0; color: #fff0d4; font-size: clamp(22px, 2.3vw, 34px); font-weight: 650; }
.core { max-width: 940px; margin: 22px 0 0; color: #fff7ea; font-size: clamp(18px, 1.55vw, 25px); line-height: 1.45; }
ul { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; max-width: 820px; }
li { position: relative; padding-left: 22px; color: var(--muted); font-size: clamp(16px, 1.25vw, 20px); line-height: 1.38; }
li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px rgba(99,216,255,.7); }
.side-panel, .decision-board, .notes-panel, .overview, .fallback-error, .noscript {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,250,241,.08), rgba(255,250,241,.035)), var(--panel);
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
  backdrop-filter: blur(14px);
}
.side-panel { display: grid; gap: 14px; align-self: stretch; max-height: min(680px, calc(100vh - 160px)); overflow: auto; padding: 18px; }
.side-panel h3 { margin: 0; font-size: 24px; }
.role-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.role-tags span { border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 9px; color: #fff; background: rgba(255,255,255,.055); font-size: 12px; font-weight: 800; }
dl { display: grid; grid-template-columns: 122px 1fr; gap: 8px 12px; margin: 0; }
dt { color: var(--gold); font-weight: 900; }
dd { margin: 0; color: var(--muted); }
.ai-boundary { margin: 0; border-left: 3px solid var(--cyan); padding: 10px 12px; color: #ddf9ff; background: rgba(99,216,255,.08); }
.decision-board { margin-top: 20px; max-width: 880px; padding: 14px; }
.decision-board h3 { margin: 0 0 10px; color: #fff; }
.workflow-line { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.workflow-line span { position: relative; border: 1px solid rgba(99,216,255,.42); border-radius: 8px; padding: 10px 12px; color: #dff9ff; background: rgba(99,216,255,.09); font-weight: 900; }
.workflow-line span:not(:last-child)::after { content: "->"; margin-left: 9px; color: var(--gold); }
.bottom-bar { position: fixed; z-index: 20; left: 18px; right: 18px; bottom: 16px; display: grid; grid-template-columns: repeat(7, auto) minmax(120px, 1fr) auto auto; gap: 8px; align-items: center; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: rgba(7,8,9,.88); backdrop-filter: blur(14px); }
.bottom-bar button, .notes-panel button, .overview button { border: 1px solid var(--line-soft); border-radius: 8px; padding: 9px 11px; color: var(--ink); background: rgba(255,250,241,.07); font-weight: 850; cursor: pointer; }
.bottom-bar > *, .bottom-bar button { min-width: 0; }
.bottom-bar button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom-bar button:hover, .notes-panel button:hover, .overview button:hover { color: #15110c; border-color: transparent; background: linear-gradient(135deg, var(--gold), var(--bronze)); }
.progress-wrap { height: 8px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.12); }
#progressBar { display: block; height: 100%; width: 5.55%; background: linear-gradient(90deg, var(--gold), var(--cyan)); transition: width 260ms ease; }
#slideCounter, #timerDisplay { color: #fff; font-weight: 900; white-space: nowrap; }
.notes-panel { position: fixed; z-index: 32; right: 18px; bottom: 86px; width: min(520px, calc(100vw - 36px)); max-height: calc(100vh - 130px); overflow: auto; padding: 16px; transform: translateY(16px); opacity: 0; pointer-events: none; transition: opacity 220ms ease, transform 220ms ease; }
.notes-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.notes-panel > div, .overview-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.notes-panel h2 { margin: 8px 0 10px; color: #fff; font-size: 24px; }
#notesText { color: var(--muted); line-height: 1.55; }
.overview { position: fixed; z-index: 34; inset: 18px; padding: 16px; overflow: auto; opacity: 0; pointer-events: none; transform: scale(.98); transition: opacity 220ms ease, transform 220ms ease; background: rgba(7,8,9,.94); }
.overview.open { opacity: 1; pointer-events: auto; transform: scale(1); }
.overview-grid { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.overview-grid button { min-height: 112px; padding: 12px; text-align: left; color: var(--muted); background: rgba(255,250,241,.055); }
.overview-grid button.active { border-color: var(--gold); color: #fff; background: rgba(216,178,95,.12); }
.overview-grid span { display: block; margin-bottom: 8px; color: var(--gold); font-size: 22px; font-weight: 950; }
.fallback-error { position: fixed; z-index: 50; top: 12px; left: 50%; transform: translateX(-50%); display: grid; gap: 4px; width: min(720px, calc(100vw - 32px)); padding: 12px; color: #fff7ea; }
.fallback-error[hidden] { display: none; }
.noscript { position: fixed; z-index: 48; left: 20px; top: 20px; max-width: 520px; padding: 16px; }
body.clean .bottom-bar, body.clean .side-panel, body.clean .notes-panel, body.clean .overview { display: none !important; }
body.clean .slide-content { grid-template-columns: 1fr; }
body.clean .main-copy { max-width: 1100px; }
@keyframes drift { from { transform: scale(1.04) translate3d(-.6%, -.4%, 0); } to { transform: scale(1.08) translate3d(.6%, .4%, 0); } }
@media (max-width: 1100px) {
  body { overflow-y: auto; }
  .deck { min-height: 100vh; height: auto; overflow: visible; }
  .slide { position: relative; min-height: 100vh; display: none; }
  .slide.active { display: grid; }
  .slide-content { grid-template-columns: 1fr; height: auto; min-height: 100vh; padding-bottom: 124px; }
  .side-panel { max-height: none; }
  .overview-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .bottom-bar { grid-template-columns: repeat(4, 1fr); }
  .progress-wrap, #slideCounter, #timerDisplay { grid-column: span 2; }
}
@media (max-width: 640px) {
  .slide-content { padding: 20px 14px 142px; }
  h1 { font-size: clamp(34px, 12vw, 52px); }
  .core { font-size: 17px; }
  dl { grid-template-columns: 1fr; }
  .bottom-bar { left: 8px; right: 8px; bottom: 8px; grid-template-columns: repeat(2, 1fr); }
  .bottom-bar button { padding: 8px; }
}
@media print {
  body { overflow: visible; background: #fff; color: #111; }
  .bottom-bar, .notes-panel, .overview { display: none !important; }
  .deck { height: auto; overflow: visible; background: #fff; }
  .slide { position: relative; display: grid !important; opacity: 1; transform: none; page-break-after: always; min-height: 100vh; color: #111; }
}
