/* Extracted from flywheel-animation.html */

  :root {
    --paper: #FFFFFF; --paper-off: #FAFBFA;
    --ink: #0B1A14; --ink-3: #56675F; --ink-4: #8A9892;
    --green: #3C9E76; --green-deep: #075A38;
    --mint-pale: #EAF4EE;
  }
  *, *::before, *::after { box-sizing: border-box; }
  html, body {
    margin: 0; padding: 0; background: var(--paper-off); color: var(--ink);
    font-family: 'IBM Plex Sans', system-ui, sans-serif; min-height: 100vh;
  }
  .page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px 40px 64px; }
  header.head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid #E4EAE6;
  }
  header.head .title { font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
  header.head .meta {
    font-family: 'IBM Plex Mono'; font-size: 11px; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--ink-4); font-weight: 700;
  }
  .controls {
    display: flex; align-items: center; gap: 14px; margin: 6px 0 18px;
    font-family: 'IBM Plex Mono'; font-size: 12px; color: var(--ink-3);
  }
  .controls button {
    appearance: none; border: 1px solid #C9D5CF; background: white;
    color: var(--ink); font-family: inherit; font-size: 12px; font-weight: 700;
    padding: 8px 14px; border-radius: 999px; cursor: pointer;
    letter-spacing: 0.08em; text-transform: uppercase;
  }
  .controls button:hover { border-color: var(--green); color: var(--green); }
  .controls .phase {
    margin-left: auto; font-family: 'IBM Plex Mono'; font-size: 11px;
    color: var(--ink-4); letter-spacing: 0.14em; text-transform: uppercase;
  }
  .controls .phase b { color: var(--green-deep); margin-left: 6px; }
  .controls .seg-group {
    display: inline-flex; gap: 6px; align-items: center; padding-left: 8px;
    border-left: 1px solid #D6E0DB; margin-left: 4px;
  }
  .controls .seg-label {
    font-family: 'IBM Plex Mono'; font-size: 10px; font-weight: 700;
    color: var(--ink-4); letter-spacing: 0.14em; text-transform: uppercase;
  }
  .controls .btn-seg {
    appearance: none; border: 1px solid #D6E0DB; background: white;
    color: var(--ink-3); font-family: 'IBM Plex Mono'; font-size: 10px; font-weight: 700;
    padding: 5px 10px; border-radius: 999px; cursor: pointer;
    letter-spacing: 0.06em; text-transform: uppercase;
  }
  .controls .btn-seg:hover { border-color: var(--green); color: var(--green); }
  .controls .btn-seg.is-active { background: var(--green-deep); border-color: var(--green-deep); color: white; }
  .stage {
    background: var(--paper); border: 1px solid #E4EAE6; border-radius: 16px;
    padding: 80px 60px; box-shadow: 0 1px 2px rgba(11,26,20,0.04);
    display: flex; align-items: center; justify-content: center;
  }
  .stage svg {
    width: 100%; max-width: 1100px; height: auto; display: block;
  }
  .fade { opacity: 0; }

  .stage-label { font-family: 'IBM Plex Sans'; font-weight: 700; fill: #FFFFFF;
    text-anchor: middle; letter-spacing: 1.6px; paint-order: stroke fill; stroke: rgba(7,90,56,0.35); stroke-width: 0.6px; }
  .hub-eyebrow { font-family: 'IBM Plex Mono'; font-weight: 700;
    fill: #A6E5C7; text-anchor: middle; letter-spacing: 3px; }
  .hub-title { font-family: 'IBM Plex Sans'; font-weight: 700;
    fill: white; text-anchor: middle; }
  .caption-soft { font-family: 'IBM Plex Sans'; fill: #9EBFA9; text-anchor: middle; }

  .legend {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px;
    margin-top: 24px; padding: 16px 20px;
    background: var(--mint-pale); border-radius: 12px;
    font-size: 13px; color: var(--ink-3);
  }
  .legend .row { display: flex; gap: 12px; align-items: baseline; }
  .legend .num {
    font-family: 'IBM Plex Mono'; font-weight: 700; color: var(--green-deep);
    width: 70px; flex: none; letter-spacing: 0.06em;
  }
  .legend .desc strong { color: var(--ink); font-weight: 600; }

  /* Embed mode: stripped chrome for use inside an <iframe> on the deck slide. */
  html.embed, body.embed { background: transparent; min-height: 0; }
  /* Paused mode: freeze every CSS animation at its first frame until told to play. */
  html.paused *, html.paused *::before, html.paused *::after { animation-play-state: paused !important; }
  body.embed .page { padding: 0; max-width: none; height: 100vh; display: flex; flex-direction: column; }
  body.embed header.head, body.embed .controls, body.embed .legend { display: none; }
  body.embed .stage {
    background: transparent; border: 0; box-shadow: none;
    padding: 0; flex: 1; min-height: 0; min-width: 0;
  }
  body.embed .stage svg { width: 100%; height: 100%; max-width: none; }
