// slides-6.jsx — Workflow detail slides (full-bleed embeds of the standalone
// workflow pages). Each is a self-contained 1280×720 HTML card scaled 1.5× to
// fill the 1920×1080 stage exactly.
// Globals used: Slide.

function WorkflowSlide({ src, label }) {
  return (
    <Slide bg={C.cream} pad={false} label={label} style={{ position: 'relative', overflow: 'hidden' }}>
      <iframe
        src={src}
        title={label}
        scrolling="no"
        style={{
          position: 'absolute',
          top: 0,
          left: 0,
          width: 1280,
          height: 720,
          border: 0,
          transformOrigin: 'top left',
          transform: 'scale(1.5)'
        }} />
      
    </Slide>);

}

function S_Workflow1({ num, total }) {
  const steps = [
  { n: '1', t: 'Find the PDF', s: 'Grabs the newest Employee_Labor_Detail PDF in the input folder.' },
  { n: '2', t: 'Extract', s: 'pdfplumber pulls the pay-period dates and every Location 3 / GL 66000 line.' },
  { n: '3', t: 'Match names', s: 'Exact-matches each name to Column B and finds the right date column.' },
  { n: '4', t: 'Write cells', s: 'Fills hours, dollars & PTO across five sections — leaves formula cells alone.' },
  { n: '5', t: 'Save', s: 'Writes the workbook to SharePoint and prompts to delete the PDF.' }];

  return (
    <Slide bg={C.cream} label="10 Python script" style={{ position: 'relative' }}>
      <TitleBlock title="The Python script." />

      <div style={{
        marginTop: 32, fontSize: 34, fontWeight: 500, lineHeight: 1.4,
        color: 'rgba(16,50,63,0.72)', maxWidth: 1500, textWrap: 'pretty'
      }}>Reads the payroll PDF and writes Location 3 labor data into the workbook — the same five fixed steps, the same way, every time. No judgment, no memory.

      </div>

      <div style={{
        marginTop: 'auto', marginBottom: 'auto', paddingTop: 48,
        display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: 20
      }}>
        {steps.map((st) =>
        <div key={st.n} style={{
          background: C.creamSoft, border: `1px solid ${C.creamDeep}`, borderRadius: 20,
          padding: '28px 26px', display: 'flex', flexDirection: 'column', gap: 14
        }}>
          <div style={{
            width: 46, height: 46, borderRadius: 12, background: C.tealInk, color: C.cream,
            display: 'flex', alignItems: 'center', justifyContent: 'center',
            fontSize: 24, fontWeight: 800, fontFamily: '"Barlow Condensed",system-ui,sans-serif'
          }}>{st.n}</div>
          <div style={{ fontSize: 27, fontWeight: 800, color: C.tealInk, lineHeight: 1.15, letterSpacing: '-0.01em' }}>{st.t}</div>
          <div style={{ fontSize: 21, color: 'rgba(16,50,63,0.6)', lineHeight: 1.4, textWrap: 'pretty' }}>{st.s}</div>
        </div>
        )}
      </div>

      <Chrome num={num} total={total} />
    </Slide>);
}

function S_Workflow1b({ num, total }) {
  const breaks = [
  { t: "Name doesn't match", s: '"Finnegan, D." vs. "Finnegan, David" → silently dumped into "All Other."' },
  { t: 'New employee', s: 'No row in Column B → their hours vanish into the catch-all.' },
  { t: 'PDF format changes', s: 'iSolved → Paylocity tweak → the regex returns zero rows.' },
  { t: 'Excel is open', s: 'File is locked → the save throws and the run dies.' }];

  return (
    <Slide bg={C.cream} label="11 Where it breaks">
      <TitleBlock eyebrow="Deterministic automation · Its ceiling" title="Where it breaks." />

      <div style={{
        marginTop: 32, fontSize: 34, fontWeight: 500, lineHeight: 1.4,
        color: 'rgba(16,50,63,0.72)', maxWidth: 1500, textWrap: 'pretty'
      }}>
        It does exactly what it was told — and nothing more. The moment reality drifts from the rules, it fails silently or stops cold.
      </div>

      <div style={{
        marginTop: 44, display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 24
      }}>
        {breaks.map((b) =>
        <div key={b.t} style={{
          background: C.creamSoft, border: `1px solid ${C.creamDeep}`,
          borderRadius: 20, padding: '28px 32px', display: 'flex', flexDirection: 'column', gap: 12
        }}>
          <div style={{ fontSize: 30, fontWeight: 800, color: C.tealInk, lineHeight: 1.15, letterSpacing: '-0.01em' }}>{b.t}</div>
          <div style={{ fontSize: 24, color: 'rgba(16,50,63,0.62)', lineHeight: 1.4, textWrap: 'pretty' }}>{b.s}</div>
        </div>
        )}
      </div>

      <div style={{
        marginTop: 'auto', display: 'flex', alignItems: 'center', gap: 24,
        background: C.coral, color: C.cream, borderRadius: 20, padding: '28px 44px'
      }}>
        <div style={{ fontSize: 44, fontWeight: 800, lineHeight: 1, flexShrink: 0 }}>→</div>
        <div style={{ fontSize: 36, fontWeight: 800, letterSpacing: '-0.01em', lineHeight: 1.1, whiteSpace: 'nowrap' }}>
          So a human has to step in.
        </div>
      </div>

      <Chrome num={num} total={total} />
    </Slide>);
}

function S_Workflow2({ num, total }) {
  const nodes = [
  { n: '1', t: 'Run the Python script', s: 'Claude runs the exact same deterministic script as the engine.', from: '← Workflow 1 lives here', hi: true },
  { n: '2', t: 'Hit a new edge case', s: 'A new employee, a renamed GL code, a different PDF layout.' },
  { n: '3', t: 'Diagnose & fix', s: 'Reads the error, resolves it for this run, gets the report out.' },
  { n: '4', t: 'Write the fix back', s: 'Patches extract_payroll.py and logs it in the skill\'s failures table.' }];

  return (
    <Slide bg={C.cream} label="13 Agentic workflow" style={{ position: 'relative' }}>
      <TitleBlock title="Python + Claude = Agentic Workflow" />

      <div style={{
        marginTop: 32, fontSize: 34, fontWeight: 500, lineHeight: 1.4,
        color: 'rgba(16,50,63,0.72)', maxWidth: 1520, textWrap: 'pretty'
      }}>
        The same script — now wrapped in judgment and memory. Claude runs the report from plain language, handles what the script can't, and writes every lesson back into the code so it never has to learn it twice.
      </div>

      <div style={{ flex: 1, display: 'flex', flexDirection: 'column', justifyContent: 'center', gap: 28 }}>
      <div style={{
          display: 'flex', alignItems: 'stretch', gap: 0
        }}>
        {nodes.map((nd, i) =>
          <React.Fragment key={nd.n}>
          <div style={{
              flex: 1, background: nd.hi ? C.teal : C.creamSoft,
              border: `1px solid ${nd.hi ? C.teal : C.creamDeep}`, borderRadius: 20,
              padding: '26px 26px', display: 'flex', flexDirection: 'column', gap: 12
            }}>
            <div style={{
                width: 44, height: 44, borderRadius: 11, background: nd.hi ? C.peach : C.tealInk,
                color: nd.hi ? C.tealInk : C.cream,
                display: 'flex', alignItems: 'center', justifyContent: 'center',
                fontSize: 22, fontWeight: 800, fontFamily: '"Barlow Condensed",system-ui,sans-serif'
              }}>{nd.n}</div>
            <div style={{ fontSize: 25, fontWeight: 800, lineHeight: 1.15, letterSpacing: '-0.01em', color: nd.hi ? C.cream : C.tealInk }}>{nd.t}</div>
            <div style={{ fontSize: 20, lineHeight: 1.4, textWrap: 'pretty', color: nd.hi ? 'rgba(243,236,223,0.85)' : 'rgba(16,50,63,0.6)' }}>{nd.s}</div>
            {nd.from &&
              <div style={{
                marginTop: 'auto', fontFamily: '"Barlow Condensed",system-ui,sans-serif',
                fontSize: 18, fontWeight: 700, letterSpacing: '0.06em', textTransform: 'uppercase',
                color: C.peach
              }}>{nd.from}</div>}
          </div>
          {i < nodes.length - 1 &&
            <div style={{ display: 'flex', alignItems: 'center', color: C.coral, fontSize: 30, fontWeight: 800, padding: '0 10px' }}>→</div>}
        </React.Fragment>
          )}
      </div>

      <div style={{
          display: 'flex', alignItems: 'center', gap: 20,
          background: C.aqua, border: `1px solid ${C.creamDeep}`, borderRadius: 20, padding: '24px 36px'
        }}>
        <div style={{ fontSize: 38, lineHeight: 1, flexShrink: 0, color: C.teal }}>↻</div>
        <div style={{ fontSize: 26, lineHeight: 1.35, color: C.tealInk, textWrap: 'pretty' }}>
          <strong style={{ color: C.teal }}>Next run is smarter.</strong> The edge case that used to break the script is handled before it happens — and the system hardens with every run.
        </div>
      </div>

      <div style={{
          display: 'flex', alignItems: 'flex-end', gap: 56, flexWrap: 'wrap',
          paddingTop: 24, borderTop: `1px solid ${C.creamDeep}`
        }}>
        {[
        { label: 'Build time', value: '8 hrs' },
        { label: 'Time saved', value: '30 min / mo' },
        { label: 'ROI', value: '~1.5 yrs', hi: true }].
        map((m) =>
          <div key={m.label}>
            <div style={{
              fontFamily: '"Barlow Condensed",system-ui,sans-serif',
              textTransform: 'uppercase', letterSpacing: '0.14em',
              fontSize: 18, color: 'rgba(16,50,63,0.55)', fontWeight: 700, marginBottom: 8, whiteSpace: 'nowrap'
            }}>{m.label}</div>
            <div style={{
              fontSize: 42, fontWeight: 800, lineHeight: 1, letterSpacing: '-0.02em',
              color: m.hi ? C.coral : C.teal, fontVariantNumeric: 'tabular-nums', whiteSpace: 'nowrap'
            }}>{m.value}</div>
          </div>
        )}
        <div style={{
          fontSize: 24, color: 'rgba(16,50,63,0.5)', fontStyle: 'italic',
          lineHeight: 1.3, paddingBottom: 4
        }}>…worth every minute.</div>
      </div>
      </div>

      <Chrome num={num} total={total} />
    </Slide>);
}

function S_Workflow3({ num, total }) {
  const steps = [
  { n: '1', t: 'Discovers', s: 'At session start, Claude reads only each skill\'s name + description — cheap to keep dozens on hand.' },
  { n: '2', t: 'Triggers', s: 'You say "run production labor." It matches the description, so Claude loads the full SKILL.md into context.' },
  { n: '3', t: 'Follows', s: 'Claude works the steps as written — running the bundled script, applying judgment, checking the output.' },
  { n: '4', t: 'Improves', s: 'When it learns something new, it writes the lesson back into the SKILL.md — so the next run already knows it.', hi: true }];

  const Mono = ({ children, color }) =>
  <span style={{ fontFamily: 'ui-monospace,"SF Mono",Menlo,monospace', color: color || C.tealInk }}>{children}</span>;


  return (
    <Slide bg={C.cream} label="14 What is a skill" style={{ position: 'relative' }}>
      <div style={{
        position: 'absolute', top: 110, right: SPACING.paddingX,
        fontFamily: 'ui-monospace,"SF Mono",Menlo,monospace', fontSize: 22, fontWeight: 700,
        color: C.coral, background: C.white, border: `1px solid ${C.creamDeep}`,
        borderRadius: 999, padding: '12px 24px', whiteSpace: 'nowrap'
      }}>SKILL.md</div>

      <TitleBlock eyebrow="The agentic workflow — but how?" title="What is a skill?" />

      <div style={{
        marginTop: 28, fontSize: 32, fontWeight: 500, lineHeight: 1.4,
        color: 'rgba(16,50,63,0.72)', maxWidth: 1520, textWrap: 'pretty'
      }}>
        A skill is just a <strong style={{ color: C.tealInk, fontWeight: 700 }}>folder with a Markdown file</strong> — <Mono>SKILL.md</Mono> — that teaches Claude one job. Plain-English instructions on top, the deterministic script bundled alongside. If you can write a memo, you can write a skill.
      </div>

      <div style={{
        marginTop: 40, flex: 1, minHeight: 0,
        display: 'grid', gridTemplateColumns: '480px 1fr', gap: 40
      }}>
        {/* SKILL.md file card */}
        <div style={{ display: 'flex', flexDirection: 'column' }}>
          <div style={{
            fontFamily: '"Barlow Condensed",system-ui,sans-serif', textTransform: 'uppercase',
            letterSpacing: '0.14em', fontSize: 22, fontWeight: 700, color: C.coral, marginBottom: 16
          }}>What's inside</div>
          <div style={{
            background: C.white, border: `1px solid ${C.creamDeep}`, borderRadius: 20, overflow: 'hidden',
            flex: 1, display: 'flex', flexDirection: 'column'
          }}>
            <div style={{
              background: C.creamSoft, borderBottom: `1px solid ${C.creamDeep}`,
              padding: '14px 20px', fontSize: 18, fontWeight: 700, color: C.tealInk,
              display: 'flex', alignItems: 'center', gap: 10,
              fontFamily: 'ui-monospace,"SF Mono",Menlo,monospace'
            }}>
              <span style={{ width: 11, height: 11, borderRadius: '50%', background: C.coral }} />
              production-labor / SKILL.md
            </div>
            <div style={{ padding: '20px 24px', fontFamily: 'ui-monospace,"SF Mono",Menlo,monospace', fontSize: 19, lineHeight: 1.7 }}>
              <div style={{
                background: C.creamSoft, border: `1px dashed ${C.coral}`, borderRadius: 10,
                padding: '12px 14px', marginBottom: 14, color: 'rgba(16,50,63,0.75)'
              }}>
                <div style={{ color: 'rgba(16,50,63,0.4)' }}>---</div>
                <div><Mono color={C.coral}>name:</Mono> production-labor</div>
                <div><Mono color={C.coral}>description:</Mono> Run when</div>
                <div>&nbsp;&nbsp;asked to "run production labor."</div>
                <div style={{ color: 'rgba(16,50,63,0.4)' }}>---</div>
              </div>
              <div style={{ color: C.tealInk }}>## Steps</div>
              <div style={{ color: 'rgba(16,50,63,0.75)' }}>1. Run extract_payroll.py</div>
              <div style={{ color: 'rgba(16,50,63,0.75)' }}>2. Reconcile any name mismatch</div>
              <div style={{ color: 'rgba(16,50,63,0.75)' }}>3. Validate totals vs. last period</div>
              <div style={{ color: 'rgba(16,50,63,0.4)' }}># + the script, references, notes</div>
            </div>
          </div>
        </div>

        {/* How Claude reads it */}
        <div style={{ display: 'flex', flexDirection: 'column' }}>
          <div style={{
            fontFamily: '"Barlow Condensed",system-ui,sans-serif', textTransform: 'uppercase',
            letterSpacing: '0.14em', fontSize: 22, fontWeight: 700, color: C.coral, marginBottom: 16
          }}>How Claude reads it</div>
          <div style={{ display: 'flex', flexDirection: 'column', gap: 14, flex: 1 }}>
            {steps.map((st) =>
            <div key={st.n} style={{
              flex: 1, display: 'flex', gap: 18, alignItems: 'center',
              background: st.hi ? C.aqua : C.creamSoft,
              border: `1px solid ${st.hi ? C.aqua : C.creamDeep}`, borderRadius: 16, padding: '16px 22px'
            }}>
              <div style={{
                width: 44, height: 44, borderRadius: 11, flexShrink: 0,
                background: st.hi ? C.teal : C.tealInk, color: C.cream,
                display: 'flex', alignItems: 'center', justifyContent: 'center',
                fontSize: 22, fontWeight: 800, fontFamily: '"Barlow Condensed",system-ui,sans-serif'
              }}>{st.n}</div>
              <div style={{ minWidth: 0 }}>
                <div style={{ fontSize: 24, fontWeight: 800, color: st.hi ? C.teal : C.tealInk, lineHeight: 1.15 }}>{st.t}</div>
                <div style={{ fontSize: 19, color: 'rgba(16,50,63,0.6)', lineHeight: 1.35, marginTop: 3, textWrap: 'pretty' }}>{st.s}</div>
              </div>
            </div>
            )}
          </div>
        </div>
      </div>

      <Chrome num={num} total={total} />
    </Slide>);
}

Object.assign(window, { WorkflowSlide, S_Workflow1, S_Workflow1b, S_Workflow2, S_Workflow3 });

// ─── What is an API? — concept primer ────────────────────────────────────
function S_WhatIsAPI({ num, total }) {
  const Endpoint = ({ title, sub }) =>
  <div style={{
    flex: 1, background: C.white, borderRadius: 22, padding: '34px 40px',
    border: `1px solid ${C.creamDeep}`,
    boxShadow: '0 1px 2px rgba(16,50,63,0.05), 0 18px 40px rgba(16,50,63,0.07)'
  }}>
      <div style={{ fontSize: 36, fontWeight: 800, color: C.tealInk, letterSpacing: '-0.01em' }}>{title}</div>
      <div style={{ fontSize: 24, color: 'rgba(16,50,63,0.6)', marginTop: 10, lineHeight: 1.35 }}>{sub}</div>
    </div>;


  const Card = ({ bg, badge, headline, body }) =>
  <div style={{
    flex: 1, background: bg, color: C.cream, borderRadius: 26, padding: '38px 40px',
    display: 'flex', flexDirection: 'column', gap: 16
  }}>
      <div style={{
      fontFamily: '"Barlow Condensed",system-ui,sans-serif',
      textTransform: 'uppercase', letterSpacing: '0.2em', fontSize: 22,
      fontWeight: 700, color: 'rgba(243,236,223,0.75)'
    }}>{badge}</div>
      <div style={{ fontSize: 40, fontWeight: 800, lineHeight: 1.08, letterSpacing: '-0.01em' }}>{headline}</div>
      <div style={{ fontSize: 26, lineHeight: 1.4, color: 'rgba(243,236,223,0.9)', textWrap: 'pretty' }}>{body}</div>
    </div>;


  return (
    <Slide bg={C.cream} label="What is an API">
      <TitleBlock eyebrow="Under the hood · A primer" title="What is an API?" />

      <div style={{
        marginTop: 44, fontSize: 52, fontWeight: 600, lineHeight: 1.15,
        letterSpacing: '-0.02em', color: C.tealInk, maxWidth: 1500, textWrap: 'balance'
      }}>
        Think of it as a <span style={{ color: C.coral }}>digital bridge</span> between your systems.
      </div>

      {/* Bridge diagram */}
      <div style={{ marginTop: 48, display: 'flex', alignItems: 'stretch', gap: 0 }}>
        <Endpoint title="Your tools" sub="Excel · QuickBooks · Database" />
        <div style={{
          flexShrink: 0, width: 240, display: 'flex', flexDirection: 'column',
          alignItems: 'center', justifyContent: 'center', gap: 12
        }}>
          <div style={{
            fontFamily: '"Barlow Condensed",system-ui,sans-serif',
            textTransform: 'uppercase', letterSpacing: '0.2em', fontSize: 22,
            fontWeight: 700, color: C.coral
          }}>API</div>
          <div style={{ position: 'relative', width: '100%', height: 3, background: C.coral }}>
            <span style={{ position: 'absolute', left: -2, top: -5, color: C.coral, fontSize: 20, lineHeight: 1 }}>◄</span>
            <span style={{ position: 'absolute', right: -2, top: -5, color: C.coral, fontSize: 20, lineHeight: 1 }}>►</span>
          </div>
          <div style={{ fontSize: 18, color: 'rgba(16,50,63,0.55)' }}></div>
        </div>
        <Endpoint title="Outside services" sub="Toast · Banks · Payroll System · Bill.com" />
      </div>

      {/* Power + risk */}
      <div style={{ marginTop: 'auto', paddingTop: 44, display: 'flex', gap: 28 }}>
        <div style={{
          flex: 1, background: C.teal, color: C.cream, borderRadius: 26, padding: '54px 48px',
          minHeight: 230, display: 'flex', alignItems: 'center',
        }}>
          <div style={{ fontSize: 50, fontWeight: 800, lineHeight: 1.1, letterSpacing: '-0.02em' }}>
            An incredibly powerful tool.
          </div>
        </div>

        <div style={{
          flex: 1, background: C.coral, color: C.cream, borderRadius: 26, padding: '54px 48px',
          minHeight: 230, display: 'flex', flexDirection: 'column', justifyContent: 'center', gap: 16,
        }}>
          <div style={{ fontSize: 50, fontWeight: 800, lineHeight: 1.1, letterSpacing: '-0.02em' }}>
            Not without risk.
          </div>
          <div style={{
            fontFamily: '"Barlow Condensed",system-ui,sans-serif', textTransform: 'uppercase',
            letterSpacing: '0.16em', fontSize: 22, fontWeight: 700, color: 'rgba(243,236,223,0.8)',
          }}>More on that, next →</div>
        </div>
      </div>

      <Chrome num={num} total={total} />
    </Slide>);
}

Object.assign(window, { S_WhatIsAPI });

// ─── The list of APIs we call ────────────────────────────────────────────
function S_APIList({ num, total }) {
  const apis = [
    { name: 'Toast', sub: 'POS — sales & labor hours by store', dot: C.peach },
    { name: 'QuickBooks', sub: 'Accounting & journal entries', dot: C.coral },
    { name: 'Bill.com', sub: 'Accounts payable & payments', dot: C.powder },
    { name: 'Database', sub: 'Supabase — our system of record', dot: C.aqua },
    { name: 'SharePoint', sub: 'Workbooks & shared file storage', dot: C.butter },
    { name: 'Outlook', sub: 'Sending reports, alerts & email', dot: C.pink },
    { name: 'Weather', sub: 'Daily forecast — ice cream tracks the weather', dot: C.teal },
  ];
  return (
    <Slide bg={C.cream} label="The APIs">
      <TitleBlock title="The APIs I'm calling." />

      <div style={{
        marginTop: 28, fontSize: 34, fontWeight: 500, lineHeight: 1.4,
        color: 'rgba(16,50,63,0.72)', maxWidth: 1500, textWrap: 'pretty',
      }}>
        Every place the workers can reach to grab data or push results — on their own, without me in the middle.
      </div>

      <div style={{ flex: 1, display: 'flex', alignItems: 'center' }}>
        <div style={{ display: 'flex', flexWrap: 'wrap', gap: 28, width: '100%' }}>
          {apis.map((a) =>
          <div key={a.name} style={{
            width: 392, background: C.creamSoft, border: `1px solid ${C.creamDeep}`,
            borderRadius: 20, padding: '30px 32px', display: 'flex', flexDirection: 'column', gap: 12,
          }}>
            <div style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
              <span style={{ width: 16, height: 16, borderRadius: 5, background: a.dot, flexShrink: 0 }} />
              <div style={{ fontSize: 34, fontWeight: 800, color: C.tealInk, letterSpacing: '-0.01em', whiteSpace: 'nowrap' }}>{a.name}</div>
            </div>
            <div style={{ fontSize: 24, color: 'rgba(16,50,63,0.62)', lineHeight: 1.35, textWrap: 'pretty' }}>{a.sub}</div>
          </div>
          )}
        </div>
      </div>

      <Chrome num={num} total={total} />
    </Slide>);
}

Object.assign(window, { S_APIList });

// ─── The key to your front door (image beat) ─────────────────────────────
function S_GreatPower({ num, total }) {
  return (
    <Slide bg={C.cream} label="Key to the front door">
      <h1 style={{
        fontSize: TYPE_SCALE.title, fontWeight: 700, letterSpacing: '-0.02em',
        lineHeight: 1.05, margin: 0, color: C.tealInk, textAlign: 'center', textWrap: 'balance',
      }}>Not without risk.</h1>
      <div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
        <img
          src="assets/great-power.png"
          alt="With great power comes great responsibility"
          style={{
            width: 'min(900px, 64%)', height: 'auto', borderRadius: 18,
            boxShadow: '0 1px 2px rgba(16,50,63,0.06), 0 26px 64px rgba(16,50,63,0.22)',
          }} />
      </div>
      <Chrome num={num} total={total} />
    </Slide>);
}

// ─── Not without risk — the risk list ────────────────────────────────────
function S_APIRisks({ num, total }) {
  const risks = [
    { t: "It's standing access", s: 'An API key is always-on access to your data — not a one-time login you can walk away from.' },
    { t: 'Scope it tightly', s: 'Give each key the least it needs — read-only where you can, one system at a time.' },
    { t: 'Store it safely', s: 'Never in the code, never in a chat. Keys live in a secrets manager, not a spreadsheet.' },
    { t: 'Know the blast radius', s: 'Know exactly what each key can reach — and what happens the day one leaks.' },
  ];
  return (
    <Slide bg={C.cream} label="The risks">
      <TitleBlock title={<>An API is the <span style={{ color: C.coral }}>key to your front door.</span></>} />

      <div style={{
        marginTop: 28, fontSize: 34, fontWeight: 500, lineHeight: 1.4,
        color: 'rgba(16,50,63,0.72)', maxWidth: 1500, textWrap: 'pretty',
      }}>
        Inside that front door is all your company data. Every key you hand out is another way in — so I treat them that way.
      </div>

      <div style={{
        flex: 1, display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 28, alignContent: 'center',
      }}>
        {risks.map((r) =>
        <div key={r.t} style={{
          background: C.creamSoft, border: `1px solid ${C.creamDeep}`, borderRadius: 20,
          padding: '32px 36px', display: 'flex', flexDirection: 'column', gap: 14,
        }}>
          <div style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
            <span style={{ width: 16, height: 16, borderRadius: 5, background: C.coral, flexShrink: 0 }} />
            <div style={{ fontSize: 32, fontWeight: 800, color: C.tealInk, letterSpacing: '-0.01em', whiteSpace: 'nowrap' }}>{r.t}</div>
          </div>
          <div style={{ fontSize: 24, color: 'rgba(16,50,63,0.62)', lineHeight: 1.4, textWrap: 'pretty' }}>{r.s}</div>
        </div>
        )}
      </div>

      <Chrome num={num} total={total} />
    </Slide>);
}

Object.assign(window, { S_GreatPower, S_APIRisks });