  :root {
    --bg-1: #050810;
    --teal: #00C4A0;
    --pink: #EC4899;
    --amber: #F59E0B;
    --red: #EF4444;
    --purple: #A78BFA;
    --blue: #5B8DEF;
    --white: #FFFFFF;
    --gray: #9CA3AF;
    --light: #E5E7EB;
    --dim: #6B7280;
    --card: #0F1419;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    width: 100vw; height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at 70% 60%, #1a0a2e 0%, #050810 70%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Calibri, sans-serif;
    color: var(--white);
  }
  .deck { position: relative; width: 100vw; height: 100vh; }

  /* Index page styling */
  .index-view {
    position: absolute; inset: 0;
    padding: 6vh 6vw 8vh;
    overflow-y: auto;
    display: none;
  }
  .index-view.active { display: block; }
  .index-header { margin-bottom: 32px; max-width: 1200px; }
  .index-header .kicker { color: var(--teal); font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 12px; }
  .index-header h1 { font-size: clamp(36px, 4vw, 56px); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 16px; }
  .index-header h1 span { color: var(--teal); }
  .index-header p { color: var(--light); font-size: clamp(15px, 1.3vw, 18px); max-width: 800px; line-height: 1.5; }

  /* Stats bar */
  .stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #1F2937;
    border-radius: 12px;
    overflow: hidden;
    margin: 32px 0 40px;
    max-width: 1200px;
  }
  .stat-cell {
    background: var(--card);
    padding: 22px 24px;
  }
  .stat-cell .num {
    font-size: clamp(28px, 2.4vw, 34px);
    font-weight: 800;
    color: var(--teal);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
  }
  .stat-cell .lbl {
    color: var(--gray);
    font-size: 12px;
    letter-spacing: 0.05em;
    line-height: 1.3;
  }

  /* How to use section */
  .how-to {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
    max-width: 1200px;
  }
  .how-to .card {
    background: rgba(15, 20, 25, 0.5);
    border: 1px solid #1F2937;
    border-radius: 10px;
    padding: 18px 20px;
  }
  .how-to .card .lbl { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 8px; }
  .how-to .card h4 { color: var(--white); font-size: 16px; font-weight: 600; margin-bottom: 6px; }
  .how-to .card p { color: var(--gray); font-size: 13px; line-height: 1.5; }

  .section-label {
    color: var(--gray);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 16px;
  }

  .incident-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 18px;
    max-width: 1400px;
  }

  .index-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #1F2937;
    color: var(--dim);
    font-size: 12px;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  .index-footer a { color: var(--gray); text-decoration: none; border-bottom: 1px dotted var(--dim); }
  .index-footer a:hover { color: var(--teal); border-color: var(--teal); }

  @media (max-width: 760px) {
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .how-to { grid-template-columns: 1fr; }
  }
  .incident-card {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #1F2937;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
  }
  .incident-card:hover {
    border-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,196,160,0.15);
  }
  .incident-card .badge {
    display: inline-block;
    background: rgba(239,68,68,0.15);
    border: 1px solid var(--red);
    color: var(--red);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
  }
  .incident-card h3 { color: var(--white); font-size: 22px; font-weight: 700; margin-bottom: 6px; line-height: 1.2; }
  .incident-card .meta { color: var(--gray); font-size: 13px; margin-bottom: 14px; }
  .incident-card .tagline { color: var(--light); font-size: 14px; line-height: 1.5; }
  .incident-card .arrow { color: var(--teal); font-size: 13px; font-weight: 600; margin-top: 16px; }

  /* Slide deck styling */
  .slide-deck { position: absolute; inset: 0; display: none; }
  .slide-deck.active { display: block; }
  .slide {
    position: absolute; inset: 0;
    padding: 4vh 5vw;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    overflow: hidden;
  }
  .slide.active { opacity: 1; transform: translateX(0); pointer-events: auto; }
  .slide.exit-left { opacity: 0; transform: translateX(-60px); }

  .kicker { color: var(--teal); font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 12px; }
  h1 { font-size: clamp(36px, 4.4vw, 64px); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 24px; }
  h2 { font-size: clamp(22px, 2.2vw, 32px); font-weight: 700; line-height: 1.1; margin-bottom: 14px; }
  .subtitle { color: var(--light); font-size: clamp(14px, 1.2vw, 18px); line-height: 1.5; max-width: 1200px; }

  .accent-pink { color: var(--pink); }
  .accent-teal { color: var(--teal); }
  .accent-red { color: var(--red); }
  .accent-amber { color: var(--amber); }
  .accent-blue { color: var(--blue); }
  .accent-purple { color: var(--purple); }

  /* Title slide */
  .slide-title { justify-content: center; align-items: flex-start; }
  .slide-title h1 { white-space: pre-wrap; }
  .slide-title .label {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--red);
    color: var(--red);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    display: inline-block;
    margin-bottom: 24px;
  }
  .slide-title .meta { margin-top: 32px; color: var(--gray); font-size: 14px; }
  .slide-title .meta strong { color: var(--white); }

  /* Conversation */
  .chat-frame {
    background: var(--card);
    border: 1px solid #1F2937;
    border-radius: 16px;
    padding: 24px 28px;
    max-width: 760px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  }
  .chat-header { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid #1F2937; }
  .pepper-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
  .pepper-name { font-weight: 700; color: var(--white); }
  .pepper-status { font-size: 12px; color: var(--teal); }
  .msg { margin-bottom: 14px; opacity: 0; transform: translateY(8px); transition: opacity 0.4s ease, transform 0.4s ease; }
  .msg.show { opacity: 1; transform: translateY(0); }
  .msg-user { background: linear-gradient(135deg, #1E3A5F, #2A4D7A); border-radius: 16px 16px 4px 16px; padding: 12px 16px; margin-left: 60px; color: var(--white); font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
  .msg-bot { background: #151B26; border: 1px solid #1F2937; border-radius: 16px 16px 16px 4px; padding: 12px 16px; margin-right: 60px; color: var(--light); font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
  .code-block {
    background: #0A0F18;
    border-left: 3px solid var(--pink);
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 10px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    color: var(--teal);
    white-space: pre;
    overflow-x: auto;
  }
  .code-block .kw { color: var(--purple); }
  .code-block .fn { color: var(--blue); }
  .code-block .cmt { color: var(--dim); font-style: italic; }
  .footer-quote { position: absolute; bottom: 80px; left: 5vw; right: 5vw; text-align: center; color: var(--gray); font-style: italic; font-size: 14px; opacity: 0; transition: opacity 1s ease; }
  .footer-quote.show { opacity: 1; }

  /* Timeline */
  .timeline {
    margin-top: 28px;
    padding-left: 24px;
    border-left: 2px solid var(--red);
    flex: 1;
    overflow-y: auto;
  }
  .timeline-event {
    position: relative;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .timeline-event.show { opacity: 1; transform: translateX(0); }
  .timeline-event::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 6px;
    width: 16px;
    height: 16px;
    background: var(--red);
    border-radius: 50%;
    border: 3px solid var(--bg-1);
  }
  .timeline-event .time { color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 6px; }
  .timeline-event .title { color: var(--white); font-size: 17px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
  .timeline-event .detail { color: var(--gray); font-size: 14px; line-height: 1.5; max-width: 900px; }

  /* Failure grid */
  .fail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
    flex: 1;
    min-height: 0;
  }
  .fail-card {
    background: var(--card);
    border-radius: 10px;
    padding: 14px 16px;
    border-top: 3px solid var(--red);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    flex-direction: column;
  }
  .fail-card.show { opacity: 1; transform: translateY(0); }
  .fail-card .x-mark { font-size: 16px; color: var(--red); font-weight: 700; margin-bottom: 4px; }
  .fail-card h3 { color: var(--red); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
  .fail-card .what { color: var(--white); font-size: 14px; font-weight: 600; margin-bottom: 8px; line-height: 1.25; }
  .fail-card p { color: var(--gray); font-size: 12px; line-height: 1.45; }

  /* Cost rows */
  .cost-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 16px 24px;
    background: var(--card);
    border-radius: 10px;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .cost-row.show { opacity: 1; transform: translateX(0); }
  .cost-label { color: var(--light); font-size: 16px; }
  .cost-detail { color: var(--gray); font-size: 13px; margin-top: 4px; }
  .cost-value { font-size: 28px; font-weight: 700; font-family: 'SF Mono', Consolas, monospace; }
  .cost-low { color: var(--teal); }
  .cost-high { color: var(--red); }
  .cost-multi { color: var(--amber); }

  /* Big stat */
  .big-stat { display: flex; flex-direction: column; align-items: flex-start; margin-top: 24px; }
  .big-stat-value {
    font-size: clamp(60px, 8vw, 120px);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--red), var(--amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
  }
  .big-stat-label { color: var(--white); font-size: 20px; font-weight: 600; margin-top: 8px; }
  .big-stat-detail { color: var(--gray); font-size: 15px; margin-top: 4px; line-height: 1.5; }

  /* Impact stats grid */
  .impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 30px;
    flex: 1;
    min-height: 0;
    align-content: start;
  }
  .impact-card {
    background: var(--card);
    border-radius: 12px;
    padding: 24px 22px;
    border-left: 3px solid var(--amber);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    flex-direction: column;
  }
  .impact-card.show { opacity: 1; transform: translateY(0); }
  .impact-card .stat {
    font-size: clamp(40px, 4vw, 64px);
    font-weight: 800;
    line-height: 1;
    color: var(--amber);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
  }
  .impact-card .stat-label { color: var(--white); font-size: 15px; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
  .impact-card .stat-source { color: var(--gray); font-size: 12px; line-height: 1.5; font-style: italic; }

  /* Quilr response */
  .quilr-response {
    background: linear-gradient(135deg, rgba(0,196,160,0.08), rgba(0,196,160,0.02));
    border: 1px solid rgba(0,196,160,0.4);
    border-radius: 16px;
    padding: 22px 26px;
    margin-top: 14px;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.6s ease, transform 0.6s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .quilr-response.show { opacity: 1; transform: scale(1); }
  .quilr-response h2 { color: var(--teal); font-size: 22px; margin-bottom: 6px; }
  .quilr-response .qsub { color: var(--gray); font-size: 13px; margin-bottom: 18px; }
  .quilr-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 18px 22px;
    flex: 1;
    min-height: 0;
  }
  .step { display: flex; align-items: start; gap: 12px; }
  .step-num {
    width: 30px; height: 30px;
    background: var(--teal);
    color: var(--bg-1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
  }
  .step-content h4 { color: var(--white); font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.25; }
  .step-content p { color: var(--gray); font-size: 12px; line-height: 1.45; }

  /* Nav */
  .nav { position: absolute; bottom: 24px; right: 32px; display: flex; gap: 8px; z-index: 100; }
  .nav-btn {
    background: rgba(0, 196, 160, 0.1);
    border: 1px solid var(--teal);
    color: var(--teal);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }
  .nav-btn:hover { background: var(--teal); color: var(--bg-1); }
  .nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
  .progress {
    position: absolute;
    top: 0; left: 0;
    height: 3px;
    background: var(--teal);
    width: 0%;
    transition: width 0.4s ease;
    z-index: 200;
  }
  .slide-counter {
    position: absolute;
    bottom: 32px;
    left: 32px;
    color: var(--dim);
    font-size: 12px;
    letter-spacing: 0.1em;
  }
  .home-btn {
    position: absolute;
    bottom: 32px;
    left: 130px;
    color: var(--gray);
    font-size: 12px;
    text-decoration: none;
    border-bottom: 1px dotted var(--gray);
    z-index: 100;
  }
  .home-btn:hover { color: var(--teal); border-color: var(--teal); }

  /* Loading */
  .loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 14px;
  }
