/* ============================================================================
   PathGuided Marketing Homepage · Warm Studio Daylight
   ============================================================================

   Staged verbatim to /assets/marketing_home.css and loaded only by the
   dedicated marketing homepage document root. All fonts live locally in
   priv/static/fonts/home_workbench/ and are served same-origin under the
   strict browser CSP (no CDN, no inline styles, no unsafe-inline).
   ========================================================================== */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/home_workbench/figtree.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Gabarito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/home_workbench/gabarito.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/home_workbench/jetbrains-mono.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/home_workbench/newsreader.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

    /* ==========================================================================
       PathGuided Warm Studio — Shared Tokens, Layout & Motion Foundation
       ========================================================================== */
    :root {
      /* Surfaces (4-step daylight ladder) */
      --ds-canvas: #F4F1EA;
      --ds-surface-well: #EAE5DB;
      --ds-rail: #EFECE4;
      --ds-chrome: #F7F4EE;
      --ds-panel: #FCFBF8;
      --ds-panel-2: #FFFFFF;

      /* Borders & Hairlines */
      --ds-panel-border: #DFD9CE;
      --ds-node-border: #CEC7B9;
      --ds-input-border: #8A8275;
      --ds-line: rgba(26, 32, 38, 0.09);
      --ds-line-2: rgba(26, 32, 38, 0.16);

      /* Ink */
      --ds-ink: #1A2026;
      --ds-ink-2: #283038;
      --ds-muted: #464F59;

      /* Brand & Wayfinding */
      --ds-accent: #196456;
      --ds-accent-hover: #134E43;
      --ds-accent-ink: #FFFFFF;
      --ds-selection-bg: #E5F2EE;
      --ds-selection-border: #8CC5B7;

      --ds-waypoint: #C45B2C;
      --ds-waypoint-bg: #FBECE4;
      --ds-waypoint-fg: #9E431B;

      /* Mineral Artifact Tints */
      --ds-artifact-sage: #E3EFE8;
      --ds-artifact-sand: #F2E9D8;
      --ds-artifact-sky: #E4EFFA;

      /* Grounded Warm Charcoal Islands */
      --ds-terminal: #1C1E1C;
      --ds-terminal-bar: #252725;
      --ds-terminal-border: #363936;
      --ds-terminal-ink: #EFECE4;
      --ds-terminal-muted: #BDB9AE;
      --ds-terminal-pine: #5DC2AC;
      --ds-terminal-green: #6AD1A3;
      --ds-terminal-amber: #E8A866;
      --ds-terminal-clay: #E38A5B;
      --ds-terminal-blue: #87BDF2;

      /* Typography */
      --ds-editorial: "Newsreader", Georgia, "Times New Roman", serif;
      --ds-display: "Gabarito", "Figtree", ui-sans-serif, system-ui, sans-serif;
      --ds-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, sans-serif;
      --ds-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

      /* Radii */
      --ds-radius-badge: 5px;
      --ds-radius-control: 8px;
      --ds-radius-panel: 12px;
      --ds-radius-stage: 16px;
      --ds-radius-pill: 999px;

      /* Layout */
      --pg-max-w: 1200px;
      --pg-gutter: clamp(20px, 4vw, 48px);
      --pg-section-y: clamp(64px, 8vw, 108px);
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
      -webkit-text-size-adjust: 100%;
    }

    body {
      margin: 0;
      background-color: var(--ds-canvas);
      color: var(--ds-ink);
      font-family: var(--ds-sans);
      font-size: 15.5px;
      line-height: 1.6;
      font-variant-numeric: tabular-nums;
      -webkit-font-smoothing: antialiased;
      overflow-x: clip;
    }

    section[id] {
      scroll-margin-top: 84px;
    }

    code {
      font-family: var(--ds-mono);
      font-size: 0.875em;
    }

    /* Shared Layout Utilities */
    .pg-container {
      width: 100%;
      max-width: var(--pg-max-w);
      margin: 0 auto;
      padding-inline: var(--pg-gutter);
    }

    .pg-section {
      padding-block: var(--pg-section-y);
      position: relative;
    }

    .pg-arch-grid {
      background-image:
        radial-gradient(circle, rgba(26, 32, 38, 0.085) 1px, transparent 1px);
      background-size: 24px 24px;
      background-position: -1px -1px;
    }

    .pg-eyebrow {
      font-family: var(--ds-mono);
      font-size: 0.8125rem;
      font-weight: 500;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--ds-accent);
      margin: 0;
    }

    /* Shared Buttons */
    .pg-btn-primary,
    .pg-btn-secondary {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 44px;
      padding: 0 22px;
      border-radius: var(--ds-radius-control);
      font-family: var(--ds-sans);
      font-size: 0.96875rem;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
      white-space: nowrap;
      transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
    }

    .pg-btn-primary {
      background: var(--ds-accent);
      color: var(--ds-accent-ink);
      border: 1px solid var(--ds-accent);
    }

    .pg-btn-primary:hover {
      background: var(--ds-accent-hover);
      border-color: var(--ds-accent-hover);
      transform: translateY(-1px);
    }

    .pg-btn-primary:focus-visible {
      outline: 2px solid var(--ds-accent);
      outline-offset: 2px;
    }

    .pg-btn-secondary {
      background: var(--ds-panel-2);
      color: var(--ds-ink);
      border: 1px solid var(--ds-node-border);
    }

    .pg-btn-secondary:hover {
      background: var(--ds-chrome);
      border-color: var(--ds-input-border);
      transform: translateY(-1px);
    }

    .pg-btn-secondary:focus-visible {
      outline: 2px solid var(--ds-accent);
      outline-offset: 2px;
    }

    /* Purposeful SVG & Entrance Motion */
    @keyframes pg-dash-flow {
      to {
        stroke-dashoffset: -28;
      }
    }

    @keyframes pg-dot-pulse {
      0%, 100% {
        opacity: 1;
      }
      50% {
        opacity: 0.42;
      }
    }

    @keyframes pg-hero-enter {
      from {
        opacity: 0;
        transform: translateY(12px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .pg-flow-dash {
      stroke-dasharray: 7 7;
      animation: pg-dash-flow 1.8s linear infinite;
    }

    .pg-flow-dash-slow {
      stroke-dasharray: 6 10;
      animation: pg-dash-flow 3.2s linear infinite;
    }

    .pg-pulse-dot {
      animation: pg-dot-pulse 2.4s ease-in-out infinite;
    }

    #hero .pg-reveal {
      animation: pg-hero-enter 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    #hero .pg-stagger-1 {
      animation-delay: 110ms;
    }

    @media (prefers-reduced-motion: reduce) {
      html {
        scroll-behavior: auto;
      }
      .pg-flow-dash,
      .pg-flow-dash-slow,
      .pg-pulse-dot,
      #hero .pg-reveal {
        animation: none !important;
      }
      .pg-btn-primary,
      .pg-btn-secondary {
        transition: none !important;
        transform: none !important;
      }
    }

    /* ==========================================================================
       Section Styles — Part 1, Part 2, Part 3
       ========================================================================== */
/* ==========================================================================
     PART 1: Navigation, Editorial Hero, Live Concurrency Stage & Education
     Scoped prefix: .p1-*
     ========================================================================== */

  .p1-skip {
    position: absolute;
    left: 16px;
    top: -64px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--ds-accent);
    color: var(--ds-accent-ink);
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--ds-radius-control);
    text-decoration: none;
    transition: top 160ms ease;
  }
  .p1-skip:focus {
    top: 12px;
  }

  /* --- Sticky Navigation Header --- */
  .p1-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(244, 241, 234, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ds-line);
  }
  .p1-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 70px;
  }
  .p1-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ds-ink);
    flex-shrink: 0;
    border-radius: var(--ds-radius-badge);
    padding: 4px 2px;
  }
  .p1-brand:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }
  .p1-brand-mark {
    width: 28px;
    height: 28px;
    color: var(--ds-accent);
    flex-shrink: 0;
  }
  .p1-brand-word {
    font-family: var(--ds-display);
    font-size: 1.3125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--ds-ink);
  }

  .p1-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .p1-nav-links a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ds-ink-2);
    text-decoration: none;
    border-radius: var(--ds-radius-control);
    transition: color 150ms ease, background-color 150ms ease;
    white-space: nowrap;
  }
  .p1-nav-links a:hover {
    color: var(--ds-ink);
    background: rgba(26, 32, 38, 0.05);
  }
  .p1-nav-links a:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }

  .p1-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }
  .p1-beta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-selection-bg);
    border: 1px solid var(--ds-selection-border);
    font-family: var(--ds-mono);
    font-size: 0.78125rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--ds-accent);
    white-space: nowrap;
  }
  .p1-beta-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ds-accent);
    flex-shrink: 0;
  }
  .p1-nav-cta {
    min-height: 40px;
    padding: 0 18px;
    font-size: 0.9375rem;
  }

  .p1-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-node-border);
    border-radius: var(--ds-radius-control);
    color: var(--ds-ink);
    cursor: pointer;
    flex-shrink: 0;
  }
  .p1-menu-btn:hover {
    background: var(--ds-chrome);
  }
  .p1-menu-btn:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }

  .p1-mobile-drawer {
    display: none;
    border-top: 1px solid var(--ds-line);
    background: var(--ds-panel);
    padding: 16px var(--pg-gutter) 24px;
  }
  .p1-mobile-drawer.is-open {
    display: block;
  }
  .p1-mobile-links {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .p1-mobile-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    font-family: var(--ds-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ds-ink);
    text-decoration: none;
    border-radius: var(--ds-radius-control);
  }
  .p1-mobile-links a:hover {
    background: var(--ds-rail);
  }
  .p1-mobile-links a:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }
  .p1-mobile-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ds-line);
  }

  /* --- Hero Section --- */
  .p1-hero {
    position: relative;
    overflow: hidden;
    padding-top: clamp(44px, 6vw, 76px);
    padding-bottom: clamp(64px, 7vw, 100px);
    background-color: var(--ds-canvas);
  }
  .p1-hero-watermark {
    position: absolute;
    top: -40px;
    right: -60px;
    width: clamp(320px, 38vw, 520px);
    height: auto;
    color: var(--ds-ink);
    opacity: 0.032;
    pointer-events: none;
    user-select: none;
  }

  .p1-hero-head {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin-bottom: clamp(32px, 4.5vw, 48px);
  }
  .p1-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
  }
  .p1-eyebrow-pip {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--ds-accent);
    flex-shrink: 0;
  }
  .p1-hero-title {
    margin: 0 0 20px;
    font-family: var(--ds-editorial);
    font-size: clamp(2.5rem, 5vw, 4.15rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--ds-ink);
  }
  .p1-hero-title-accent {
    display: block;
    color: var(--ds-accent);
    font-style: italic;
    font-weight: 500;
  }
  .p1-hero-lead {
    margin: 0 0 28px;
    max-width: 62ch;
    font-family: var(--ds-sans);
    font-size: clamp(1.0625rem, 1.3vw, 1.2rem);
    line-height: 1.6;
    color: var(--ds-ink-2);
  }
  .p1-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
  }
  .p1-hero-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
    margin: 0;
    padding: 16px 0 0;
    list-style: none;
    border-top: 1px solid var(--ds-line);
    font-family: var(--ds-mono);
    font-size: 0.84375rem;
    font-weight: 500;
    color: var(--ds-muted);
  }
  .p1-hero-facts li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .p1-fact-tick {
    width: 14px;
    height: 14px;
    color: var(--ds-accent);
    flex-shrink: 0;
  }

  /* --- Abstracted Live Concurrency Stage (Warm Charcoal Island) --- */
  .p1-stage {
    position: relative;
    z-index: 1;
    background: var(--ds-terminal);
    border: 1px solid var(--ds-terminal-border);
    border-radius: var(--ds-radius-stage);
    box-shadow: 0 24px 56px -24px rgba(26, 32, 38, 0.28), 0 4px 14px -4px rgba(26, 32, 38, 0.12);
    overflow: hidden;
    color: var(--ds-terminal-ink);
  }
  .p1-stage-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 20px;
    background: var(--ds-terminal-bar);
    border-bottom: 1px solid var(--ds-terminal-border);
  }
  .p1-stage-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .p1-stage-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ds-terminal-green);
    flex-shrink: 0;
  }
  .p1-stage-label {
    font-family: var(--ds-mono);
    font-size: 0.84375rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ds-terminal-ink);
  }
  .p1-stage-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .p1-stage-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 11px;
    border-radius: var(--ds-radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ds-terminal-border);
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    color: var(--ds-terminal-muted);
  }
  .p1-stage-summary strong {
    color: var(--ds-terminal-clay);
    font-weight: 600;
  }
  .p1-motion-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 11px;
    background: transparent;
    border: 1px solid var(--ds-terminal-border);
    border-radius: var(--ds-radius-badge);
    font-family: var(--ds-mono);
    font-size: 0.78125rem;
    font-weight: 500;
    color: var(--ds-terminal-muted);
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
  }
  .p1-motion-toggle:hover {
    color: var(--ds-terminal-ink);
    border-color: #555955;
    background: rgba(255, 255, 255, 0.04);
  }
  .p1-motion-toggle:focus-visible {
    outline: 2px solid var(--ds-terminal-pine);
    outline-offset: 2px;
  }

  .p1-stage-canvas {
    padding: 20px 20px 14px;
    background: var(--ds-terminal);
  }
  .p1-stage-svg {
    display: block;
    width: 100%;
    height: auto;
  }
  .p1-svg-lane {
    cursor: pointer;
    transition: opacity 180ms ease;
  }
  .p1-svg-lane:hover .p1-lane-bg {
    fill: rgba(255, 255, 255, 0.045);
  }
  .p1-svg-lane.is-selected .p1-lane-bg {
    fill: rgba(93, 194, 172, 0.08);
    stroke: rgba(93, 194, 172, 0.45);
  }
  .p1-svg-lane.is-escalation.is-selected .p1-lane-bg {
    fill: rgba(227, 138, 91, 0.11);
    stroke: rgba(227, 138, 91, 0.6);
  }

  /* Pause motion state */
  .p1-stage.p1-stage-paused .pg-flow-dash,
  .p1-stage.p1-stage-paused .pg-flow-dash-slow,
  .p1-stage.p1-stage-paused .pg-pulse-dot {
    animation-play-state: paused !important;
  }

  /* Stage Inspector Footer */
  .p1-stage-inspector {
    padding: 16px 20px 20px;
    background: var(--ds-terminal-bar);
    border-top: 1px solid var(--ds-terminal-border);
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .p1-lane-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .p1-lane-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ds-terminal-border);
    border-radius: var(--ds-radius-badge);
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-terminal-muted);
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  }
  .p1-lane-tab:hover {
    color: var(--ds-terminal-ink);
    border-color: #545954;
  }
  .p1-lane-tab:focus-visible {
    outline: 2px solid var(--ds-terminal-pine);
    outline-offset: 2px;
  }
  .p1-lane-tab[aria-selected="true"] {
    background: rgba(93, 194, 172, 0.14);
    border-color: var(--ds-terminal-pine);
    color: var(--ds-terminal-ink);
  }
  .p1-lane-tab.is-alert[aria-selected="true"] {
    background: rgba(227, 138, 91, 0.16);
    border-color: var(--ds-terminal-clay);
    color: #FDECE3;
  }
  .p1-tab-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .p1-tab-dot--green { background: var(--ds-terminal-green); }
  .p1-tab-dot--pine  { background: var(--ds-terminal-pine); }
  .p1-tab-dot--clay  { background: var(--ds-terminal-clay); }

  .p1-inspector-readout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 24px;
    padding: 14px 16px;
    background: var(--ds-terminal);
    border: 1px solid var(--ds-terminal-border);
    border-radius: var(--ds-radius-control);
  }
  .p1-inspector-main {
    min-width: 0;
  }
  .p1-inspector-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 4px;
  }
  .p1-inspector-id {
    font-family: var(--ds-mono);
    font-size: 0.84375rem;
    font-weight: 600;
    color: var(--ds-terminal-ink);
  }
  .p1-inspector-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: var(--ds-radius-pill);
    font-family: var(--ds-mono);
    font-size: 0.78125rem;
    font-weight: 500;
  }
  .p1-inspector-badge--clay {
    background: rgba(227, 138, 91, 0.18);
    color: #F4B38E;
    border: 1px solid rgba(227, 138, 91, 0.45);
  }
  .p1-inspector-badge--green {
    background: rgba(106, 209, 163, 0.16);
    color: #9EE6C3;
    border: 1px solid rgba(106, 209, 163, 0.4);
  }
  .p1-inspector-badge--pine {
    background: rgba(93, 194, 172, 0.16);
    color: #8FD9C8;
    border: 1px solid rgba(93, 194, 172, 0.4);
  }
  .p1-inspector-text {
    margin: 0;
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ds-terminal-ink);
  }
  .p1-inspector-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    color: var(--ds-terminal-muted);
    white-space: nowrap;
  }

  /* --- Section 2: Educational Section (What is a Spec-Driven Software Factory?) --- */
  .p1-edu {
    background: var(--ds-panel);
    border-top: 1px solid var(--ds-line);
    border-bottom: 1px solid var(--ds-line);
  }
  .p1-edu-head {
    max-width: 740px;
    margin-bottom: clamp(32px, 4.5vw, 48px);
  }
  .p1-edu-title {
    margin: 12px 0 16px;
    font-family: var(--ds-editorial);
    font-size: clamp(1.95rem, 3.2vw, 2.85rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
  }
  .p1-edu-lead {
    margin: 0;
    max-width: 64ch;
    font-family: var(--ds-sans);
    font-size: clamp(1.0625rem, 1.25vw, 1.15625rem);
    line-height: 1.6;
    color: var(--ds-ink-2);
  }

  .p1-diagram-frame {
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-stage);
    padding: clamp(16px, 2.5vw, 28px);
    margin-bottom: clamp(24px, 3vw, 36px);
  }
  .p1-diagram-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--ds-line);
  }
  .p1-diagram-caption {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ds-muted);
  }
  .p1-diagram-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-family: var(--ds-mono);
    font-size: 0.78125rem;
    color: var(--ds-muted);
  }
  .p1-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .p1-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
  }
  .p1-compare-svg {
    display: block;
    width: 100%;
    height: auto;
  }

  .p1-edu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .p1-edu-card {
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-panel);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .p1-edu-card--featured {
    background: var(--ds-selection-bg);
    border-color: var(--ds-selection-border);
  }
  .p1-card-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--ds-radius-badge);
    font-family: var(--ds-mono);
    font-size: 0.78125rem;
    font-weight: 500;
    letter-spacing: 0.03em;
  }
  .p1-card-badge--neutral {
    background: var(--ds-rail);
    color: var(--ds-muted);
    border: 1px solid var(--ds-panel-border);
  }
  .p1-card-badge--warn {
    background: var(--ds-waypoint-bg);
    color: var(--ds-waypoint-fg);
    border: 1px solid rgba(196, 91, 44, 0.35);
  }
  .p1-card-badge--pine {
    background: var(--ds-panel-2);
    color: var(--ds-accent);
    border: 1px solid var(--ds-selection-border);
  }
  .p1-edu-card h3 {
    margin: 0;
    font-family: var(--ds-display);
    font-size: clamp(1.2rem, 1.5vw, 1.375rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
  }
  .p1-edu-card p {
    margin: 0;
    font-family: var(--ds-sans);
    font-size: 0.96875rem;
    line-height: 1.6;
    color: var(--ds-ink-2);
  }
  .p1-card-foot {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--ds-line);
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-muted);
  }
  .p1-edu-card--featured .p1-card-foot {
    color: var(--ds-accent);
    border-top-color: rgba(25, 100, 86, 0.2);
  }

  /* --- Responsive Breakpoints --- */
  @media (max-width: 980px) {
    .p1-nav-links,
    .p1-nav-actions {
      display: none;
    }
    .p1-menu-btn {
      display: inline-flex;
    }
    .p1-edu-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 720px) {
    .p1-inspector-readout {
      grid-template-columns: 1fr;
    }
    .p1-inspector-meta {
      align-items: flex-start;
      flex-direction: row;
      flex-wrap: wrap;
      gap: 6px 14px;
      padding-top: 8px;
      border-top: 1px solid var(--ds-terminal-border);
    }
    .p1-stage-bar {
      padding: 12px 14px;
    }
    .p1-stage-canvas {
      padding: 14px 10px 10px;
    }
    .p1-stage-inspector {
      padding: 14px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .p1-skip,
    .p1-nav-links a,
    .p1-motion-toggle,
    .p1-svg-lane,
    .p1-lane-tab {
      transition: none !important;
    }
  }

/* ==========================================================================
     Part 2 — Concurrency, Three Walls & Research-to-Production Diagrams (.p2-*)
     ========================================================================== */

  .p2-header {
    max-width: 68ch;
    margin-bottom: clamp(32px, 4.5vw, 52px);
  }

  .p2-title {
    font-family: var(--ds-editorial);
    font-weight: 500;
    font-size: clamp(1.95rem, 3.2vw, 2.85rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
    margin: 12px 0 18px;
  }

  .p2-lead {
    font-family: var(--ds-sans);
    font-size: clamp(1.0625rem, 1.3vw, 1.2rem);
    line-height: 1.6;
    color: var(--ds-ink-2);
    margin: 0;
  }

  /* ---- Section 3: Concurrency Stage ---- */
  #concurrency {
    background-color: var(--ds-canvas);
    border-top: 1px solid var(--ds-line);
  }

  .p2-stage-card {
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-stage);
    overflow: hidden;
  }

  .p2-stage-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 22px;
    background: var(--ds-chrome);
    border-bottom: 1px solid var(--ds-panel-border);
  }

  .p2-stage-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ds-mono);
    font-size: 0.84375rem;
    font-weight: 500;
    color: var(--ds-ink-2);
  }

  .p2-live-pip {
    width: 8px;
    height: 8px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-accent);
    flex-shrink: 0;
  }

  .p2-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .p2-tab {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-control);
    padding: 7px 14px;
    min-height: 36px;
    font-family: var(--ds-sans);
    font-size: 0.90625rem;
    font-weight: 500;
    color: var(--ds-ink-2);
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  }

  .p2-tab:hover {
    background: var(--ds-rail);
    color: var(--ds-ink);
  }

  .p2-tab[aria-selected="true"] {
    background: var(--ds-panel-2);
    border-color: var(--ds-node-border);
    color: var(--ds-accent);
  }

  .p2-tab:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }

  .p2-svg-wrap {
    padding: clamp(16px, 2.5vw, 28px);
    background: var(--ds-panel-2);
  }

  .p2-svg {
    display: block;
    width: 100%;
    height: auto;
  }

  /* Concurrency mode transitions */
  .p2-svg .p2-layer {
    transition: opacity 240ms ease;
  }

  .p2-stage-card[data-mode="gates"] .p2-layer-wave2-normal,
  .p2-stage-card[data-mode="gates"] .p2-layer-escalation {
    opacity: 0.28;
  }

  .p2-stage-card[data-mode="escalation"] .p2-layer-wave1,
  .p2-stage-card[data-mode="escalation"] .p2-layer-wave2-normal,
  .p2-stage-card[data-mode="escalation"] .p2-layer-merge {
    opacity: 0.28;
  }

  .p2-stage-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px 22px;
    background: var(--ds-panel);
    border-top: 1px solid var(--ds-panel-border);
  }

  .p2-stage-caption {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ds-ink-2);
    margin: 0;
    max-width: 66ch;
  }

  .p2-stage-caption strong {
    color: var(--ds-ink);
    font-weight: 600;
  }

  .p2-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-family: var(--ds-mono);
    font-size: 0.78125rem;
    color: var(--ds-muted);
  }

  .p2-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }

  .p2-swatch {
    width: 10px;
    height: 10px;
    border-radius: var(--ds-radius-pill);
    display: inline-block;
  }

  .p2-swatch-pine { background: var(--ds-accent); }
  .p2-swatch-clay { background: var(--ds-waypoint); }
  .p2-swatch-ink { background: var(--ds-node-border); }

  .p2-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
  }

  .p2-pillar {
    background: var(--ds-panel);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-panel);
    padding: 22px 24px;
  }

  .p2-pillar-title {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: clamp(1.1rem, 1.35vw, 1.25rem);
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--ds-ink);
    margin: 0 0 8px;
  }

  .p2-pillar-body {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.58;
    color: var(--ds-ink-2);
    margin: 0;
  }

  .p2-code-inline {
    font-family: var(--ds-mono);
    font-size: 0.84375rem;
    color: var(--ds-ink);
    background: var(--ds-rail);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-badge);
    padding: 1px 6px;
  }

  /* ---- Section 4: Three Walls Solved ---- */
  #three-walls {
    background-color: var(--ds-surface-well);
    border-top: 1px solid var(--ds-line);
    border-bottom: 1px solid var(--ds-line);
  }

  .p2-walls-stack {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 3vw, 32px);
  }

  .p2-wall-card {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.44fr);
    gap: clamp(24px, 3.2vw, 44px);
    align-items: center;
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-stage);
    padding: clamp(22px, 3vw, 36px);
  }

  .p2-wall-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ds-accent);
    background: var(--ds-selection-bg);
    border: 1px solid var(--ds-selection-border);
    border-radius: var(--ds-radius-badge);
    padding: 4px 10px;
    margin-bottom: 14px;
  }

  .p2-wall-badge-clay {
    color: var(--ds-waypoint-fg);
    background: var(--ds-waypoint-bg);
    border-color: var(--ds-panel-border);
  }

  .p2-wall-title {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: clamp(1.3rem, 1.8vw, 1.6rem);
    line-height: 1.22;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
    margin: 0 0 12px;
  }

  .p2-wall-problem {
    font-family: var(--ds-sans);
    font-size: 0.96875rem;
    line-height: 1.6;
    color: var(--ds-ink-2);
    margin: 0 0 18px;
  }

  .p2-wall-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .p2-wall-points li {
    position: relative;
    padding-left: 20px;
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ds-ink-2);
  }

  .p2-wall-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-accent);
  }

  .p2-wall-points strong {
    color: var(--ds-ink);
    font-weight: 600;
  }

  .p2-wall-diagram {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
  }

  /* ---- Section 5: Research -> Design -> Production ---- */
  #research-to-prod {
    background-color: var(--ds-panel);
    border-bottom: 1px solid var(--ds-line);
  }

  .p2-flow-card {
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-stage);
    padding: clamp(16px, 2.5vw, 28px);
  }

  .p2-stage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
  }

  .p2-stage-btn {
    appearance: none;
    text-align: left;
    background: var(--ds-panel);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-panel);
    padding: 16px 18px;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .p2-stage-btn:hover {
    background: var(--ds-chrome);
    border-color: var(--ds-node-border);
  }

  .p2-stage-btn[aria-pressed="true"] {
    background: var(--ds-selection-bg);
    border-color: var(--ds-selection-border);
  }

  .p2-stage-btn:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }

  .p2-stage-num {
    font-family: var(--ds-mono);
    font-size: 0.78125rem;
    font-weight: 500;
    color: var(--ds-accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .p2-stage-name {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1.0625rem;
    line-height: 1.25;
    color: var(--ds-ink);
  }

  .p2-stage-desc {
    font-family: var(--ds-sans);
    font-size: 0.90625rem;
    line-height: 1.5;
    color: var(--ds-ink-2);
  }

  .p2-artifact-strip {
    margin-top: 20px;
    padding: 18px 0 0;
    background: transparent;
    border-top: 1px solid var(--ds-line);
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
  }

  .p2-artifact-text {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ds-ink-2);
    margin: 0;
    max-width: 62ch;
  }

  .p2-artifact-text strong {
    color: var(--ds-ink);
    font-weight: 600;
  }

  .p2-artifact-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .p2-chip {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    color: var(--ds-accent);
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-selection-border);
    border-radius: var(--ds-radius-badge);
    padding: 4px 9px;
  }

  /* Flow diagram highlight states */
  .p2-flow-card[data-stage="0"] .p2-fnode:not(.p2-fnode-0),
  .p2-flow-card[data-stage="1"] .p2-fnode:not(.p2-fnode-1),
  .p2-flow-card[data-stage="2"] .p2-fnode:not(.p2-fnode-2),
  .p2-flow-card[data-stage="3"] .p2-fnode:not(.p2-fnode-3) {
    opacity: 0.45;
  }

  .p2-fnode {
    transition: opacity 200ms ease;
    cursor: pointer;
  }

  /* ---- Responsive Breakpoints ---- */
  @media (max-width: 980px) {
    .p2-wall-card {
      grid-template-columns: 1fr;
    }

    .p2-stage-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 760px) {
    .p2-pillars {
      grid-template-columns: 1fr;
    }

    .p2-stage-bar {
      padding: 14px 16px;
    }

    .p2-stage-footer {
      padding: 14px 16px;
    }

    .p2-svg-wrap {
      padding: 12px;
    }
  }

  @media (max-width: 520px) {
    .p2-stage-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .p2-tab,
    .p2-stage-btn,
    .p2-svg .p2-layer,
    .p2-fnode {
      transition: none !important;
    }
  }

/* ==========================================================================
     Part 3: Anti-Slop & Receipts · Safety Island · Human Element · Beta & Footer
     Scoped strictly to .p3-* classes using shared Warm Studio tokens
     ========================================================================== */

  .p3-section-head {
    max-width: 66ch;
    margin-bottom: clamp(32px, 4vw, 52px);
  }

  .p3-section-head h2 {
    font-family: var(--ds-editorial);
    font-weight: 500;
    font-size: clamp(1.95rem, 3.2vw, 2.85rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
    margin: 12px 0 16px;
  }

  .p3-lead {
    font-family: var(--ds-sans);
    font-size: clamp(1.0625rem, 1.3vw, 1.2rem);
    line-height: 1.6;
    color: var(--ds-ink-2);
    margin: 0;
  }

  .p3-body {
    font-family: var(--ds-sans);
    font-size: 0.96875rem;
    line-height: 1.6;
    color: var(--ds-ink-2);
    margin: 0;
  }

  .p3-mono {
    font-family: var(--ds-mono);
    font-size: 0.84375rem;
    font-weight: 500;
    line-height: 1.55;
  }

  /* --------------------------------------------------------------------------
     Section 6: Anti-Slop & Verification (#anti-slop)
     -------------------------------------------------------------------------- */
  .p3-anti-slop {
    background: var(--ds-canvas);
    border-top: 1px solid var(--ds-line);
  }

  .p3-diagram-card {
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-stage);
    padding: clamp(20px, 3vw, 36px);
    margin-bottom: 28px;
  }

  .p3-diagram-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ds-line);
  }

  .p3-diagram-title {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: clamp(1.15rem, 1.5vw, 1.35rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
    margin: 0;
  }

  .p3-diagram-tag {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-accent);
    background: var(--ds-selection-bg);
    border: 1px solid var(--ds-selection-border);
    border-radius: var(--ds-radius-pill);
    padding: 4px 12px;
    white-space: nowrap;
  }

  .p3-svg-wrap {
    width: 100%;
    overflow: hidden;
  }

  .p3-svg-wrap svg {
    display: block;
    width: 100%;
    height: auto;
  }

  .p3-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: clamp(40px, 5vw, 64px);
  }

  .p3-pillar {
    background: var(--ds-panel);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-panel);
    padding: 22px 24px;
  }

  .p3-pillar-kicker {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-accent);
    margin: 0 0 8px;
  }

  .p3-pillar h3 {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1.1875rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
    margin: 0 0 8px;
  }

  .p3-pillar p {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.58;
    color: var(--ds-ink-2);
    margin: 0;
  }

  /* Interactive Work Tour ("Show the Receipts") */
  .p3-tour-card {
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-stage);
    overflow: hidden;
  }

  .p3-tour-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 18px clamp(20px, 3vw, 32px);
    background: var(--ds-chrome);
    border-bottom: 1px solid var(--ds-panel-border);
  }

  .p3-tour-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
  }

  .p3-tour-label {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--ds-ink);
  }

  .p3-tour-branch {
    font-family: var(--ds-mono);
    font-size: 0.84375rem;
    color: var(--ds-ink-2);
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-badge);
    padding: 3px 10px;
  }

  .p3-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-accent);
    background: var(--ds-selection-bg);
    border: 1px solid var(--ds-selection-border);
    border-radius: var(--ds-radius-pill);
    padding: 5px 13px;
  }

  .p3-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ds-accent);
    flex-shrink: 0;
  }

  .p3-tour-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px clamp(20px, 3vw, 32px);
    background: var(--ds-panel);
    border-bottom: 1px solid var(--ds-panel-border);
  }

  .p3-tab-btn {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-control);
    min-height: 44px;
    padding: 8px 16px;
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ds-ink-2);
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .p3-tab-btn:hover {
    background: var(--ds-rail);
    color: var(--ds-ink);
  }

  .p3-tab-btn[aria-selected="true"] {
    background: var(--ds-panel-2);
    border-color: var(--ds-selection-border);
    color: var(--ds-accent);
    font-weight: 600;
  }

  .p3-tab-btn:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }

  .p3-tab-sha {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    opacity: 0.85;
  }

  .p3-tour-body {
    padding: clamp(22px, 3vw, 32px);
  }

  .p3-tour-panel[hidden] {
    display: none;
  }

  /* Tab 1: Commit Proof rows */
  .p3-receipt-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
  }

  .p3-receipt-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 18px;
    padding: 16px 18px;
    background: var(--ds-panel);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-panel);
  }

  .p3-receipt-chain {
    font-family: var(--ds-mono);
    font-size: 0.84375rem;
    font-weight: 600;
    color: var(--ds-accent);
    background: var(--ds-artifact-sage);
    border: 1px solid var(--ds-selection-border);
    border-radius: var(--ds-radius-badge);
    padding: 4px 10px;
    white-space: nowrap;
  }

  .p3-receipt-desc strong {
    display: block;
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--ds-ink);
    margin-bottom: 2px;
  }

  .p3-receipt-desc span {
    display: block;
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ds-ink-2);
  }

  .p3-receipt-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    white-space: nowrap;
  }

  .p3-pass-badge {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ds-accent);
  }

  .p3-commit-chip {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    color: var(--ds-muted);
  }

  .p3-receipt-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 12px 16px;
    background: var(--ds-rail);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-control);
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    color: var(--ds-ink-2);
  }

  /* Tab 2: Reviewer Catch & Patch */
  .p3-handoff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .p3-handoff-box {
    border-radius: var(--ds-radius-panel);
    padding: 20px 22px;
    border: 1px solid var(--ds-panel-border);
    background: var(--ds-panel);
  }

  .p3-handoff-box--catch {
    background: var(--ds-waypoint-bg);
    border-color: #E2BBA7;
  }

  .p3-handoff-box--patch {
    background: var(--ds-artifact-sage);
    border-color: var(--ds-selection-border);
  }

  .p3-handoff-kicker {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
  }

  .p3-handoff-box--catch .p3-handoff-kicker {
    color: var(--ds-waypoint-fg);
  }

  .p3-handoff-box--patch .p3-handoff-kicker {
    color: var(--ds-accent);
  }

  .p3-handoff-box h4 {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.3;
    color: var(--ds-ink);
    margin: 0 0 10px;
  }

  .p3-handoff-box p {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ds-ink-2);
    margin: 0 0 14px;
  }

  .p3-handoff-fact {
    font-family: var(--ds-mono);
    font-size: 0.84375rem;
    font-weight: 500;
    color: var(--ds-ink);
    background: transparent;
    border: none;
    border-top: 1px solid var(--ds-line);
    border-radius: 0;
    padding: 12px 0 0;
    margin-top: 4px;
  }

  /* Tab 3: Visual QA & Residual Risk */
  .p3-qa-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 18px;
  }

  .p3-qa-box {
    background: var(--ds-panel);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-panel);
    padding: 20px 22px;
  }

  .p3-qa-box--risk {
    background: var(--ds-artifact-sand);
    border-color: #DFD1B8;
  }

  .p3-qa-box h4 {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--ds-ink);
    margin: 0 0 10px;
  }

  .p3-qa-box p {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ds-ink-2);
    margin: 0 0 14px;
  }

  .p3-viewport-pair {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 14px;
  }

  .p3-vp-frame {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
  }

  .p3-vp-frame--desktop {
    flex: 1.6;
  }

  .p3-vp-frame--mobile {
    flex: 0.75;
  }

  .p3-vp-label {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    color: var(--ds-muted);
    margin-top: 8px;
    display: block;
  }

  .p3-risk-list {
    margin: 0;
    padding-left: 18px;
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ds-ink-2);
  }

  .p3-risk-list li + li {
    margin-top: 8px;
  }

  /* --------------------------------------------------------------------------
     Section 7: Safety, Sandboxing & Accountability (#safety — Warm Charcoal)
     -------------------------------------------------------------------------- */
  .p3-safety {
    background: var(--ds-terminal);
    color: var(--ds-terminal-ink);
    border-top: 1px solid var(--ds-terminal-border);
    border-bottom: 1px solid var(--ds-terminal-border);
  }

  .p3-safety .pg-eyebrow {
    color: var(--ds-terminal-pine);
  }

  .p3-safety .p3-section-head h2 {
    color: var(--ds-terminal-ink);
  }

  .p3-safety .p3-lead {
    color: var(--ds-terminal-muted);
  }

  .p3-dark-diagram {
    background: var(--ds-terminal-bar);
    border: 1px solid var(--ds-terminal-border);
    border-radius: var(--ds-radius-stage);
    padding: clamp(20px, 3vw, 34px);
    margin-bottom: 28px;
  }

  .p3-safety-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .p3-safety-card {
    background: var(--ds-terminal-bar);
    border: 1px solid var(--ds-terminal-border);
    border-radius: var(--ds-radius-panel);
    padding: 24px 26px;
  }

  .p3-safety-kicker {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-terminal-pine);
    margin: 0 0 8px;
  }

  .p3-safety-kicker--clay {
    color: var(--ds-terminal-clay);
  }

  .p3-safety-card h3 {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ds-terminal-ink);
    margin: 0 0 10px;
  }

  .p3-safety-card p {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--ds-terminal-muted);
    margin: 0;
  }

  /* --------------------------------------------------------------------------
     Section 8: The Human Element & Who It's Built For (#who-its-for)
     -------------------------------------------------------------------------- */
  .p3-human {
    background: var(--ds-panel);
  }

  .p3-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 2.6vw, 32px);
    margin-bottom: clamp(40px, 5vw, 60px);
  }

  .p3-photo-figure {
    margin: 0;
  }

  .p3-photo-frame {
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-stage);
    overflow: hidden;
    background: var(--ds-surface-well);
    aspect-ratio: 4 / 3;
  }

  .p3-photo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
  }

  .p3-photo-caption {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .p3-photo-caption strong {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--ds-ink);
  }

  .p3-photo-caption span {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ds-ink-2);
  }

  .p3-persona-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .p3-persona-card {
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-panel);
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .p3-persona-tag {
    align-self: flex-start;
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-accent);
    background: var(--ds-selection-bg);
    border: 1px solid var(--ds-selection-border);
    border-radius: var(--ds-radius-pill);
    padding: 3px 11px;
  }

  .p3-persona-card h3 {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: clamp(1.2rem, 1.5vw, 1.375rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
    margin: 4px 0 0;
  }

  .p3-persona-card p {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--ds-ink-2);
    margin: 0;
  }

  /* --------------------------------------------------------------------------
     Section 9: Closed Beta Waitlist (#waitlist) & Warm Studio Footer
     -------------------------------------------------------------------------- */
  .p3-waitlist {
    background: var(--ds-canvas);
    border-top: 1px solid var(--ds-line);
  }

  .p3-waitlist-shell {
    max-width: 640px;
    margin: 0 auto;
  }

  .p3-waitlist-head {
    margin-bottom: 28px;
  }

  .p3-waitlist-head h2 {
    font-family: var(--ds-editorial);
    font-weight: 500;
    font-size: clamp(1.95rem, 3.2vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ds-ink);
    margin: 12px 0 14px;
  }

  .p3-form-card {
    background: var(--ds-panel-2);
    border: 1px solid var(--ds-panel-border);
    border-radius: var(--ds-radius-stage);
    padding: clamp(24px, 4vw, 36px);
  }

  .p3-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .p3-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .p3-label {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ds-ink);
  }

  .p3-optional {
    font-weight: 400;
    color: var(--ds-muted);
    margin-left: 4px;
  }

  .p3-input,
  .p3-select,
  .p3-textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--ds-sans);
    font-size: 0.96875rem;
    color: var(--ds-ink);
    background-color: var(--ds-panel-2);
    border: 1px solid var(--ds-input-border);
    border-radius: var(--ds-radius-control);
    transition: border-color 150ms ease, background-color 150ms ease;
  }

  .p3-input,
  .p3-select {
    height: 44px;
    padding: 0 14px;
  }

  .p3-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none' stroke='%23283038' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 14px 14px;
    cursor: pointer;
  }

  .p3-textarea {
    padding: 11px 14px;
    min-height: 92px;
    resize: vertical;
    line-height: 1.5;
  }

  .p3-input::placeholder,
  .p3-textarea::placeholder {
    color: var(--ds-muted);
    opacity: 0.85;
  }

  .p3-input:focus-visible,
  .p3-select:focus-visible,
  .p3-textarea:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
    border-color: var(--ds-accent);
  }

  .p3-input[aria-invalid="true"],
  .p3-select[aria-invalid="true"] {
    border-color: var(--ds-waypoint);
    background-color: #FFFBF9;
  }

  .p3-field-error {
    font-family: var(--ds-sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ds-waypoint-fg);
    min-height: 1.25em;
    margin: 0;
  }

  .p3-field-error:empty {
    display: none;
  }

  .p3-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    margin-top: 4px;
  }

  .p3-submit-btn {
    min-height: 44px;
    font-family: var(--ds-sans);
    font-size: 0.96875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--ds-accent);
  }

  .p3-submit-btn:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }

  .p3-form-note {
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    color: var(--ds-muted);
    margin: 0;
  }

  .p3-confirm-box {
    background: var(--ds-selection-bg);
    border: 1px solid var(--ds-selection-border);
    border-radius: var(--ds-radius-panel);
    padding: 24px;
  }

  .p3-confirm-box[hidden] {
    display: none;
  }

  .p3-confirm-box h3 {
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--ds-ink);
    margin: 0 0 8px;
  }

  .p3-confirm-box p {
    font-family: var(--ds-sans);
    font-size: 0.96875rem;
    line-height: 1.55;
    color: var(--ds-ink-2);
    margin: 0 0 16px;
  }

  .p3-reset-btn {
    min-height: 44px;
    padding: 0 16px;
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--ds-radius-control);
  }

  .p3-reset-btn:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }

  /* Warm Studio Footer */
  .p3-footer {
    background: var(--ds-chrome);
    border-top: 1px solid var(--ds-panel-border);
    padding: 44px 0 40px;
  }

  .p3-footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--ds-line);
  }

  .p3-footer-brand {
    max-width: 38ch;
  }

  .p3-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ds-ink);
    font-family: var(--ds-display);
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
  }

  .p3-brand-lockup:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
    border-radius: var(--ds-radius-badge);
  }

  .p3-brand-mark {
    width: 24px;
    height: 24px;
    color: var(--ds-accent);
    flex-shrink: 0;
  }

  .p3-footer-desc {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ds-ink-2);
    margin: 0;
  }

  .p3-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    align-items: center;
  }

  .p3-footer-nav a {
    font-family: var(--ds-sans);
    font-size: 0.9375rem;
    color: var(--ds-ink-2);
    text-decoration: none;
    padding: 6px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .p3-footer-nav a:hover {
    color: var(--ds-accent);
  }

  .p3-footer-nav a:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
    border-radius: var(--ds-radius-badge);
  }

  .p3-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding-top: 20px;
    font-family: var(--ds-mono);
    font-size: 0.8125rem;
    color: var(--ds-muted);
  }

  /* --------------------------------------------------------------------------
     Responsive Breakpoints (Mobile <= 820px & 390px)
     -------------------------------------------------------------------------- */
  @media (max-width: 900px) {
    .p3-pillars {
      grid-template-columns: 1fr;
    }

    .p3-handoff-grid,
    .p3-qa-grid,
    .p3-safety-grid,
    .p3-photo-grid,
    .p3-persona-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 640px) {
    .p3-receipt-row {
      grid-template-columns: 1fr;
      align-items: flex-start;
      gap: 8px;
    }

    .p3-receipt-meta {
      flex-direction: row;
      align-items: center;
      gap: 12px;
    }

    .p3-tab-btn {
      width: 100%;
      justify-content: space-between;
    }

    .p3-submit-btn {
      width: 100%;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .p3-tab-btn,
    .p3-input,
    .p3-select,
    .p3-textarea {
      transition: none !important;
    }
  }

/* ==========================================================================
   Part 4 — Inside PathGuided Real Product Showcase (.p4-*)
   ========================================================================== */
.p4-studio {
  background: var(--ds-panel);
  border-top: 1px solid var(--ds-line);
  border-bottom: 1px solid var(--ds-line);
}
.p4-head {
  max-width: 68ch;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.p4-title {
  font-family: var(--ds-editorial);
  font-weight: 500;
  font-size: clamp(1.95rem, 3.2vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ds-ink);
  margin: 12px 0 16px;
}
.p4-lead {
  font-family: var(--ds-sans);
  font-size: clamp(1.0625rem, 1.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--ds-ink-2);
  margin: 0;
}
.p4-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.p4-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--ds-panel-2);
  border: 1px solid var(--ds-panel-border);
  border-radius: var(--ds-radius-control);
  font-family: var(--ds-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ds-ink-2);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.p4-tab:hover {
  background: var(--ds-chrome);
  border-color: var(--ds-node-border);
  color: var(--ds-ink);
}
.p4-tab[aria-selected="true"] {
  background: var(--ds-selection-bg);
  border-color: var(--ds-selection-border);
  color: var(--ds-accent);
  font-weight: 600;
}
.p4-tab:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: 2px;
}
.p4-tab-idx {
  font-family: var(--ds-mono);
  font-size: 0.78125rem;
  opacity: 0.8;
}
.p4-window {
  background: var(--ds-panel-2);
  border: 1px solid var(--ds-node-border);
  border-radius: var(--ds-radius-stage);
  overflow: hidden;
  box-shadow: 0 24px 56px -28px rgba(26, 32, 38, 0.24), 0 4px 14px -4px rgba(26, 32, 38, 0.08);
}
.p4-window-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 18px;
  background: var(--ds-chrome);
  border-bottom: 1px solid var(--ds-panel-border);
}
.p4-window-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.p4-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.p4-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ds-node-border);
}
.p4-uri {
  font-family: var(--ds-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ds-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p4-window-tag {
  font-family: var(--ds-mono);
  font-size: 0.78125rem;
  color: var(--ds-accent);
  font-weight: 500;
}
.p4-viewport {
  background: var(--ds-canvas);
}
.p4-panel[hidden] {
  display: none;
}
.p4-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}
.p4-window-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 16px 20px;
  background: var(--ds-panel);
  border-top: 1px solid var(--ds-panel-border);
}
.p4-caption {
  margin: 0;
  font-family: var(--ds-sans);
  font-size: 0.96875rem;
  line-height: 1.55;
  color: var(--ds-ink-2);
  max-width: 66ch;
}
.p4-caption strong {
  color: var(--ds-ink);
  font-weight: 600;
}
.p4-meta-tags {
  font-family: var(--ds-mono);
  font-size: 0.8125rem;
  color: var(--ds-muted);
  white-space: normal;
}
.p4-strip-label {
  margin: 28px 0 12px;
  font-family: var(--ds-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ds-muted);
}
.p4-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.p4-thumb {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.p4-thumb:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: 4px;
  border-radius: var(--ds-radius-control);
}
.p4-thumb-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--ds-radius-control);
  border: 1px solid var(--ds-panel-border);
  transition: border-color 150ms ease, transform 150ms ease;
}
.p4-thumb:hover .p4-thumb-img {
  border-color: var(--ds-accent);
  transform: translateY(-2px);
}
.p4-thumb[aria-current="true"] .p4-thumb-img {
  border-color: var(--ds-accent);
  box-shadow: 0 0 0 2px rgba(25, 100, 86, 0.22);
}
.p4-thumb-title {
  font-family: var(--ds-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ds-ink);
  line-height: 1.25;
}
.p4-thumb[aria-current="true"] .p4-thumb-title {
  color: var(--ds-accent);
}
.p4-thumb-sub {
  font-family: var(--ds-mono);
  font-size: 0.78125rem;
  color: var(--ds-muted);
}
@media (max-width: 980px) {
  .p4-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .p4-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .p4-tab {
    flex: 1 1 auto;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .p4-tab,
  .p4-thumb-img {
    transition: none !important;
    transform: none !important;
  }
}


  /* --- Production Homepage Additions (CSP-safe swatches & Login link) --- */
  .p1-legend-swatch--single {
    background: #8A8275;
  }
  .p1-legend-swatch--scatter {
    background: #C45B2C;
  }
  .p1-legend-swatch--parallel {
    background: #196456;
  }

  .p1-nav-inner {
    gap: 14px;
  }
  .p1-nav-links {
    gap: 2px;
  }
  .p1-nav-links a {
    padding: 8px 9px;
    font-size: 0.9rem;
  }
  .p1-nav-actions {
    gap: 10px;
  }
  .p1-nav-actions .p1-beta-pill {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
  .p1-nav-cta {
    padding: 0 15px;
    font-size: 0.9rem;
  }

  .p1-nav-login {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    font-family: var(--ds-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ds-ink-2);
    text-decoration: none;
    border-radius: var(--ds-radius-control);
    transition: color 150ms ease, background-color 150ms ease;
    white-space: nowrap;
  }
  .p1-nav-login:hover {
    color: var(--ds-ink);
    background: rgba(26, 32, 38, 0.05);
  }
  .p1-nav-login:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
  }

  .p1-mobile-cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  @media (max-width: 1240px) {
    .p1-nav-actions .p1-beta-pill {
      display: none;
    }
  }

  @media (max-width: 1040px) {
    .p1-nav-links,
    .p1-nav-actions {
      display: none;
    }
    .p1-menu-btn {
      display: inline-flex;
    }
  }
