  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

  :root {
    --black: #0A0A0A;
    --white: #F5F2EE;
    --accent: #BC2526;
    --accent-rgb: 188, 37, 38;
    --accent-glow: rgba(var(--accent-rgb), 0.4);
    --accent-dim: rgba(var(--accent-rgb), 0.15);
    --gray-800: #1A1A1A;
    --gray-700: #2A2A2A;
    --gray-600: #3A3A3A;
    --gray-400: #888;
    --gray-300: #AAA;
    --font-display: 'Helvetica Neue', 'Arial', 'Inter', sans-serif;
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  }

  html { font-size: 16px; }
  body {
    background: var(--black);
    color: var(--white);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  /* ─── RED DOT ─── */
  #red-dot {
    position: fixed;
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 50%;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(var(--accent-rgb), 0.15);
    transition: width 0.35s ease, height 0.35s ease, border-radius 0.3s ease, opacity 0.3s ease, background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
    transform: translate(-50%, -50%);
  }

  #red-dot.ring-mode {
    background: transparent;
    border: 2.5px solid var(--accent);
    box-shadow: 0 0 16px var(--accent-glow), 0 0 40px rgba(var(--accent-rgb), 0.12);
  }

  #red-dot.pulse {
    animation: dotBlink 2s ease-in-out infinite;
  }

  @keyframes dotBlink {
    0%, 100% { opacity: 1; box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(var(--accent-rgb), 0.15); }
    40% { opacity: 1; box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(var(--accent-rgb), 0.15); }
    50% { opacity: 0.3; box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.2), 0 0 20px rgba(var(--accent-rgb), 0.05); }
    60% { opacity: 1; box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(var(--accent-rgb), 0.15); }
  }

  /* ─── NAV ─── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 32px max(48px, calc((100vw - 1200px) / 2 + 48px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    min-height: 80px;
  }

  .logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .nav-links { display: flex; gap: 36px; list-style: none; }
  .nav-links a {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.2s;
  }
  .nav-links a:hover { color: var(--white); }

  /* ─── HERO ─── */
  .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 48px 80px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
  }

  /* Hero video background — scrolls with content */
  .hero-video-wrap {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
  }
  .hero-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* variants override via --hero-filter (Tron-family + dbz keep color); the
       default is the corporate black-and-white treatment. */
    filter: var(--hero-filter, grayscale(100%) contrast(1.2) brightness(0.45));
  }
  .hero-video-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(10,10,10,0.3) 0%,
      rgba(10,10,10,0.15) 40%,
      rgba(10,10,10,0.6) 85%,
      rgba(10,10,10,1) 100%
    );
  }

  /* On variant routes the shared ::after fade lands on #0A0A0A, but variants
     override --black — so the hard bottom edge shows a seam. Mask the video's
     bottom to transparent instead, letting it blend into the variant's real
     background (and the ambient effect behind it). */
  :root[data-variant] .hero-video-wrap {
    -webkit-mask-image: linear-gradient(to bottom, #000 66%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 66%, transparent 100%);
  }

  .hero > *:not(.hero-video-wrap):not(.section-bg-overlay):not(.section-bg-btn):not(.section-bg-input) {
    position: relative;
    z-index: 1;
  }

  .hero-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .hero-label::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--accent);
  }

  h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(48px, 6vw, 80px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    max-width: 800px;
  }

  .hero-sub {
    font-size: 20px;
    line-height: 1.6;
    color: var(--gray-300);
    max-width: 600px;
  }
  .hero-sub strong { color: var(--white); font-weight: 500; }

  /* Glitch / scramble effect on "Hallucination" */
  .glitch-word {
    display: inline;
    position: relative;
  }
  .glitch-word.glitching {
    animation: glitch-shake 0.12s steps(1) infinite;
  }
  @keyframes glitch-shake {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(-0.4px, 0.2px); }
    66%  { transform: translate(0.4px, -0.2px); }
    100% { transform: translate(0, 0); }
  }

  .industry-strip {
    display: flex;
    gap: 24px;
    margin-top: 48px;
    flex-wrap: wrap;
  }

  .industry-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-400);
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.06);
  }

  /* ─── SECTIONS ─── */
  section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 48px;
    position: relative;
  }

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

  h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
  }

  .section-body {
    font-size: 18px;
    line-height: 1.7;
    color: var(--gray-300);
    max-width: 640px;
  }
  .section-body strong { color: var(--white); font-weight: 500; }

  .redline-divider {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 1px;
    position: relative;
    padding: 0 48px;
  }
  .redline-divider::after {
    content: '';
    position: absolute;
    left: 48px; right: 48px; top: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 30%, rgba(255,255,255,0.06) 30%);
  }

  /* ─── REDLINE UNDERLINE EFFECT ─── */
  /* Uses text-decoration so underlines follow each wrapped line */
  .redline-underline {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
    transition: text-decoration-color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .redline-underline.active {
    text-decoration-color: var(--accent);
  }

  /* Section headings: red text instead of underline when dot is nearby */
  #rl-blueprint,
  #rl-dataflow,
  #rl-team {
    text-decoration: none;
    transition: color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  #rl-blueprint.active,
  #rl-dataflow.active,
  #rl-team.active {
    color: var(--accent);
  }

  /* Hero underline: drawn by the red dot using hand-drawn SVG
     TO REVERT: delete this block and uncomment the ORIGINAL block below */
  #rl-hero {
    text-decoration: none;
    position: relative;
    --draw-pct: 0;
  }
  .hero-underline-svg {
    position: absolute;
    left: 0;
    bottom: -30px;
    width: 100%;
    height: 40px;
    pointer-events: none;
  }
  .hero-underline-svg path {
    fill: var(--accent);
    clip-path: inset(0 calc(100% - var(--draw-pct, 0) * 100%) 0 0);
  }
  #rl-hero.active .hero-underline-svg path {
    clip-path: inset(0 0 0 0);
  }

  /* ── ORIGINAL FLAT UNDERLINE (uncomment to revert) ──
  #rl-hero {
    text-decoration: none;
    position: relative;
    --draw-pct: 0%;
  }
  #rl-hero::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    height: 3px;
    width: var(--draw-pct);
    background: var(--accent);
  }
  #rl-hero.active {
    text-decoration: none;
  }
  #rl-hero.active::after {
    width: 100%;
  }
  ── END ORIGINAL */

  /* ─── BLUEPRINT SECTION ─── */
  #blueprint-section {
    padding-bottom: 80px;
  }

  .blueprint-container {
    margin-top: 64px;
    position: relative;
  }

  .blueprint-canvas {
    width: 100%;
    height: 500px;
    background: var(--gray-800);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
  }

  /* Grid overlay */
  .blueprint-canvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
  }

  .blueprint-canvas::after {
    content: var(--label-assembly, 'ASSEMBLY — DWG-4471-REV.C');
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray-400);
    opacity: 0.6;
  }

  /* Real technical drawing image (Layer 1) */
  .blueprint-drawing-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(1);
    opacity: 0.25;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  /* Shared layer styles for Layers 2 & 3 */
  .blueprint-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
  }

  /* Changed part (Layer 2) — stays visible when rest of drawing fades */
  .blueprint-part-img {
    filter: invert(1);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  /* Change highlights (Layer 3) — red elements, revealed top-down via clip-path */
  .blueprint-highlights-img {
    opacity: 0.85;
    clip-path: inset(0 0 100% 0);  /* fully clipped = hidden */
    transition: clip-path 0.1s linear;
  }

  /* Databases (Layer 3) — white icons on dark bg, dimmed slightly */
  .blueprint-databases-img {
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  /* Red glow border on container when animation triggers */
  .blueprint-canvas.glow-active {
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.15), inset 0 0 30px rgba(var(--accent-rgb), 0.05);
  }

  /* SVG diagram inside blueprint (original, kept for reference) */
  .blueprint-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .bp-line {
    stroke: rgba(255,255,255,0.12);
    stroke-width: 1.5;
    fill: none;
  }

  .bp-component {
    fill: none;
    stroke: rgba(255,255,255,0.15);
    stroke-width: 1.5;
  }

  .bp-component-fill {
    fill: rgba(255,255,255,0.03);
    stroke: rgba(255,255,255,0.15);
    stroke-width: 1.5;
  }

  .bp-text {
    font-family: var(--font-body);
    font-size: 9px;
    fill: var(--gray-400);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
  }

  /* Redline highlight circle */
  .redline-highlight {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-dasharray: 8 4;
    opacity: 0;
    transition: opacity 0.6s ease;
    filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.5));
  }

  .redline-highlight.active {
    opacity: 1;
    animation: redlineRotate 8s linear infinite;
  }

  @keyframes redlineRotate {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -48; }
  }

  /* Redline callout */
  .redline-callout {
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
  }
  .redline-callout.active { opacity: 1; }

  .callout-line {
    stroke: var(--accent);
    stroke-width: 1;
    stroke-dasharray: 4 3;
  }

  .callout-box {
    fill: rgba(var(--accent-rgb), 0.1);
    stroke: var(--accent);
    stroke-width: 1;
  }

  .callout-text {
    font-family: var(--font-body);
    font-size: 10px;
    fill: var(--accent);
    font-weight: 600;
    letter-spacing: 0.06em;
  }

  /* ─── DATA FLOW SECTION ─── */
  .dataflow-section {
    background: var(--gray-800);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }

  #team {
    padding-top: 60px;
  }

  .dataflow-section section { padding: 120px 48px; }

  .dataflow-canvas {
    width: 100%;
    height: 400px;
    position: relative;
    margin-top: 64px;
  }

  .dataflow-svg {
    width: 100%;
    height: 100%;
  }

  /* DB nodes */
  .db-node {
    transition: opacity 0.3s ease;
  }

  .db-node-bg {
    fill: var(--gray-700);
    stroke: rgba(255,255,255,0.08);
    stroke-width: 1.5;
    rx: 6;
    transition: stroke 0.4s ease, fill 0.4s ease;
  }

  .db-node.lit .db-node-bg {
    stroke: var(--accent);
    fill: rgba(var(--accent-rgb), 0.08);
    filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.3));
  }

  .db-node-icon {
    fill: none;
    stroke: var(--gray-400);
    stroke-width: 1.5;
    transition: stroke 0.4s ease;
  }

  .db-node.lit .db-node-icon {
    stroke: var(--accent);
  }

  .db-node-label {
    font-family: var(--font-body);
    font-size: 10px;
    fill: var(--gray-400);
    text-anchor: middle;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: fill 0.4s ease;
  }

  .db-node.lit .db-node-label {
    fill: var(--white);
  }

  /* Flow lines */
  .flow-path {
    fill: none;
    stroke: rgba(255,255,255,0.06);
    stroke-width: 1.5;
    transition: stroke 0.4s ease;
  }

  .flow-path.lit {
    stroke: var(--accent);
    filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.3));
  }

  .flow-particle {
    fill: var(--accent);
    opacity: 0;
    r: 3;
  }

  .flow-particle.active {
    opacity: 1;
  }

  /* ─── TEAM SECTION ─── */
  .team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    margin-top: 64px;
  }

  .team-member {
    background: var(--gray-800);
    padding: 32px 24px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.04);
    transition: border-color 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .team-member.revealed {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.04);
  }

  /* Full grid highlight — red border around the whole grid */
  .team-grid.highlighted {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.12), 0 0 80px rgba(var(--accent-rgb), 0.06);
    border-radius: 2px;
  }

  /* Hover highlight — these boxes have no click target, so no pointer cursor */
  .team-member:hover {
    overflow: visible; /* let the avatar ring show outside the card */
  }

  .team-member:hover .team-avatar-container {
    box-shadow: 0 0 0 3px var(--accent), 0 0 20px rgba(var(--accent-rgb), 0.35);
    overflow: visible;
  }

  .team-member:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: rgba(var(--accent-rgb), 0.06);
  }

  .team-avatar-container {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
    transition: outline-color 0.2s ease, box-shadow 0.3s ease;
  }

  .team-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--gray-400);
    font-family: var(--font-display);
    font-weight: 700;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  }

  .team-avatar.professional {
    background: var(--gray-700);
  }

  .team-avatar.fun {
    opacity: 0;
    transform: scale(0.8) rotateY(90deg);
  }

  .team-member.revealed .team-avatar.professional {
    opacity: 0;
    transform: scale(0.8) rotateY(-90deg);
  }

  .team-member.revealed .team-avatar.fun {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
  }

  .team-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
  }

  .team-title {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.3s ease;
  }

  .team-member.revealed .team-title {
    color: var(--accent);
  }

  .fun-title {
    display: none;
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-top: 4px;
    font-style: italic;
  }

  .team-member.revealed .fun-title { display: block; }

  /* ─── CTA ─── */
  .cta-section {
    text-align: center;
    padding: 160px 48px;
    transition: background 0.6s ease;
    position: relative;
    max-width: 100%;
  }

  .cta-section.red-bg {
    background: var(--accent);
  }

  .cta-section.red-bg .section-label { color: rgba(255,255,255,0.6); }
  .cta-section.red-bg h2 { color: var(--white); }
  .cta-section.red-bg .section-body { color: rgba(255,255,255,0.85); }
  .cta-section.red-bg .section-body strong { color: var(--white); }
  .cta-section.red-bg .cta-btn { background: var(--black); color: var(--white); }
  .cta-section.red-bg .cta-btn:hover { background: var(--white); color: var(--black); }

  .cta-section h2 {
    max-width: 600px;
    margin: 0 auto 16px;
  }

  .cta-section .section-body {
    max-width: 500px;
    margin: 0 auto 48px;
    text-align: center;
  }

  .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--white);
    color: var(--black);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
  }

  .cta-btn:hover {
    background: var(--accent);
    color: var(--white);
  }

  .cta-btn svg { width: 16px; height: 16px; transition: transform 0.2s; }
  .cta-btn:hover svg { transform: translateX(4px); }

  /* ─── FOOTER ─── */
  .footer-wrap {
    position: relative;
    overflow: hidden;
  }
  footer {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 48px;
    padding-bottom: 80px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .footer-mountains {
    display: block;
    width: 100%;
    height: auto;
    filter: contrast(0) brightness(0.35);
    pointer-events: none;
  }

  .footer-mark {
    display: flex;
    align-items: center;
  }
  .footer-mark img {
    height: 22px;
    filter: contrast(0) brightness(0.55);
  }

  .footer-links { display: flex; gap: 24px; list-style: none; }
  .footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
  }
  .footer-links a:hover { color: var(--white); }

  /* ─── SCROLL HINT ─── */
  .scroll-hint {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 99;
    opacity: 1;
    transition: opacity 0.5s ease;
  }

  .scroll-hint.hidden { opacity: 0; pointer-events: none; }

  .scroll-hint span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-400);
  }

  .scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    animation: scrollBounce 1.5s ease-in-out infinite;
  }

  @keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(6px); }
  }

  /* ─── RESPONSIVE ─── */
  @media (max-width: 900px) {
    nav { padding: 20px 24px; }
    .nav-links { display: none; }
    .hero { padding: 140px 24px 80px; }
    section { padding: 80px 24px; }
    .ap-text-block { padding: 0 24px; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-section { padding: 100px 24px; }
    footer { padding: 32px 24px; flex-direction: column; gap: 24px; }

    /* Headline typography: scale down so long words fit, and hard-break
       anything that still would overflow (e.g. "Hallucination" at 302px). */
    h1 {
      font-size: clamp(34px, 10vw, 56px);
      max-width: 100%;
      overflow-wrap: break-word;
      word-break: break-word;
      hyphens: auto;
    }
    h2 {
      font-size: clamp(28px, 8vw, 44px);
      overflow-wrap: break-word;
    }
    .hero-sub { font-size: 16px; }
    .industry-strip { flex-wrap: wrap; gap: 8px; }

    /* AI on Rails — desktop uses fixed widths (480 + 580 with -120
       overlap = ~940px total visual width) that blow out the mobile
       viewport. Instead of hiding the session frame, zoom the whole
       row down so both screens remain visible at a legible size.
       The actual zoom value is set by JS on page load and resize
       via the --illust-scale custom property. */
    .dataflow-section section { padding: 80px 24px; }
    /* Use #ids to beat the desktop .approach-illust-layout rule
       that's defined further down in source order. */
    #ap-layout {
      min-height: 0;
      padding: 20px 0 40px;
      width: 100%;
      box-sizing: border-box;
      overflow: hidden;
    }
    #ap-sticky {
      position: static;
      width: 100%;
      max-width: 100%;
      margin: 0;
      box-sizing: border-box;
      overflow: hidden;
    }
    .ap-illust-row {
      zoom: var(--illust-scale, 0.37);
    }
    /* Extra safety: clip the monitor column so filler bars that
       escape the wrapper's translateX(-50px) can't leak out left. */
    .ap-monitor-col {
      overflow: hidden;
    }

    /* Blueprint canvas is also fixed-width on desktop; constrain it. */
    .blueprint-canvas,
    .blueprint-container {
      max-width: 100%;
      overflow: hidden;
    }

    /* Hero underline: on mobile the #rl-hero element is narrower than
       the SVG's natural aspect (676:152 ≈ 4.45:1), so a fixed 40px
       height combined with preserveAspectRatio="none" squashes the
       hand-drawn squiggle horizontally. Drop the fixed height and let
       it scale from width via aspect-ratio — that way x-scale == y-scale
       and the path keeps its natural shape. Anchor via top so the taller
       SVG extends downward below the text rather than overlapping it. */
    .hero-underline-svg {
      height: auto;
      aspect-ratio: 676 / 152;
      bottom: auto;
      top: calc(100% - 14px);
    }
    /* Bump h1 margin-bottom so the now-taller proportional SVG has
       clearance before the paragraph starts. */
    .hero h1 { margin-bottom: 52px; }
  }

  /* Logo image — shown once a logo image is uploaded */
  .logo-img {
    height: 36px;
    display: none;
    vertical-align: middle;
  }

  .logo.has-image .logo-text { display: none; }
  .logo.has-image .logo-img { display: inline-block; }

  /* ─── SECTION BACKGROUND IMAGES ─── */
  .section-bg {
    position: relative;
  }

  .section-bg-overlay {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
  }

  .section-bg.has-bg .section-bg-overlay {
    opacity: 0.15;
  }

  .section-bg > *:not(.section-bg-overlay):not(.hero-video-wrap) {
    position: relative;
    z-index: 1;
  }

  /* ═══ APPROACH ILLUSTRATION ═══ */
  .approach-illust-layout {
    min-height: 140vh;
    position: relative;
    padding-top: 20px;
    padding-bottom: 60px;
  }

  .approach-illust-sticky {
    position: sticky;
    top: 120px; /* clear the fixed nav with more breathing room */
    max-width: 1200px;
    margin: 0 auto;
    z-index: 10;
  }

  .ap-text-block {
    margin-bottom: 30px;
    padding: 0 48px;
  }

  .ap-illust-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
  }

  .ap-monitor-col {
    flex: 0 0 480px;
    position: relative;
  }

  .ap-illustration-wrapper {
    position: relative;
    width: 480px;
    aspect-ratio: 1674 / 1339;
    /* Clip the ap-screen-ui layer so the left-anchored filler bars
       (which get pushed past the monitor's left edge by the parent
       translateX(-50px)) don't show as "ghost text" outside the
       monitor frame. */
    overflow: hidden;
  }

  .ap-screen-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    filter: invert(1); opacity: 0.35;
    pointer-events: none; user-select: none;
  }

  .ap-screen-ui {
    position: absolute;
    top: 0; left: 0; right: 0;
    bottom: 32%;
    z-index: 5;
    transform: translateX(-50px);
  }

  .ap-ui-box {
    position: absolute;
    top: 8%; right: 8%; width: 38%;
  }

  .ap-ui-box-label {
    width: 35%; height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px; margin-bottom: 4px;
  }

  .ap-ui-box-field {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px; padding: 7px 10px;
    transition: border-color 0.3s, background 0.3s;
  }
  .ap-ui-box-field.open {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
  }
  .ap-ui-box-field.selected { border-color: rgba(255,255,255,0.15); }

  .ap-ui-box-bar {
    height: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.12);
    transition: background 0.3s, width 0.3s;
  }
  .ap-ui-box-bar.placeholder { width: 55%; }
  .ap-ui-box-bar.filled { width: 70%; background: rgba(255,255,255,0.3); }

  .ap-ui-box-arrow {
    width: 0; height: 0;
    border-left: 3px solid transparent; border-right: 3px solid transparent;
    border-top: 4px solid rgba(255,255,255,0.15);
    transition: transform 0.2s;
  }
  .ap-ui-box-field.open .ap-ui-box-arrow { transform: rotate(180deg); }

  .ap-ui-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    margin-top: 2px;
    background: rgba(25,25,25,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px; z-index: 10; overflow: hidden;
    max-height: 0; opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s;
  }
  .ap-ui-dropdown.open { max-height: 100px; opacity: 1; }

  .ap-ui-dd-item {
    display: flex; align-items: center;
    padding: 5px 10px; gap: 6px;
    transition: background 0.15s;
  }
  .ap-ui-dd-item.hovered { background: rgba(255,255,255,0.06); }
  .ap-ui-dd-item.selected { background: rgba(var(--accent-rgb), 0.12); }

  .ap-ui-dd-bar {
    height: 3px; border-radius: 2px;
    background: rgba(255,255,255,0.1);
  }
  .ap-ui-dd-item.hovered .ap-ui-dd-bar,
  .ap-ui-dd-item.selected .ap-ui-dd-bar { background: rgba(255,255,255,0.25); }

  .ap-ui-toggle-row {
    position: absolute; top: 42%; right: 10%; width: 35%;
    display: flex; align-items: center; gap: 8px; padding: 3px 0;
  }
  .ap-ui-toggle-bar {
    height: 4px; width: 40%; border-radius: 2px;
    background: rgba(255,255,255,0.1);
  }
  .ap-ui-toggle {
    width: 26px; height: 13px; border-radius: 7px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    transition: background 0.3s, border-color 0.3s;
  }
  .ap-ui-toggle.active {
    background: rgba(var(--accent-rgb), 0.3);
    border-color: rgba(var(--accent-rgb), 0.45);
  }
  .ap-ui-toggle-knob {
    position: absolute; top: 1px; left: 1px;
    width: 9px; height: 9px; border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), background 0.3s;
  }
  .ap-ui-toggle.active .ap-ui-toggle-knob {
    transform: translateX(13px);
    background: rgba(255,255,255,0.75);
  }

  .ap-ui-btn {
    position: absolute; bottom: 8%; right: 10%;
    padding: 5px 20px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    transition: background 0.2s, border-color 0.2s, transform 0.12s;
  }
  .ap-ui-btn-bar {
    height: 4px; width: 40px; border-radius: 2px;
    background: rgba(255,255,255,0.12);
    transition: background 0.2s;
  }
  .ap-ui-btn.pressed {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: scale(0.95);
  }
  .ap-ui-btn.pressed .ap-ui-btn-bar { background: rgba(255,255,255,0.35); }

  .ap-ui-filler {
    position: absolute;
    display: flex; flex-direction: column; gap: 4px;
  }
  .ap-ui-filler-bar {
    height: 3px; border-radius: 2px;
    background: rgba(255,255,255,0.07);
  }

  .ap-cursor-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform: translateX(-50px);
    z-index: 18;
  }

  .ap-auto-cursor {
    position: absolute; width: 22px; height: 22px;
    pointer-events: none; filter: invert(1);
    opacity: 0; z-index: 20; transition: opacity 0.4s;
  }
  .ap-auto-cursor.visible { opacity: 0.9; }

  .ap-click-flash {
    position: absolute; width: 14px; height: 14px;
    border-radius: 50%; background: rgba(255,255,255,0.3);
    pointer-events: none; opacity: 0; z-index: 19;
    transform: translate(-50%,-50%) scale(0.5);
  }
  .ap-click-flash.flash {
    animation: apClickFlash 0.3s ease-out forwards;
  }
  @keyframes apClickFlash {
    0%   { opacity: 0.5; transform: translate(-50%,-50%) scale(0.5); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(2.5); }
  }

  .ap-dot-col {
    flex: 0 0 580px;
    position: relative;
    aspect-ratio: 1674 / 1339;
    align-self: flex-start;
    background: rgba(20, 20, 20, 0.55);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-left: -120px;
    margin-top: 50px;
    z-index: 20;
    backdrop-filter: blur(1px);
  }

  /* Grid overlay — matches blueprint canvas treatment */
  .ap-dot-col::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
  }

  /* Corner label */
  .ap-dot-col::after {
    content: var(--label-session, 'SESSION 4471-A');
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray-400);
    opacity: 0.6;
    pointer-events: none;
  }

  .ap-red-dot {
    position: absolute;
    width: 16px; height: 16px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: 18;
    box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.5);
    transform: translate(-50%, -50%);
    transition: opacity 0.4s,
                width 0.35s cubic-bezier(0.34,1.56,0.64,1),
                height 0.35s cubic-bezier(0.34,1.56,0.64,1),
                background 0.25s,
                box-shadow 0.25s;
  }
  .ap-red-dot.visible { opacity: 1; }
  .ap-red-dot.pulse { width: 26px; height: 26px; }
  .ap-red-dot.confirmed {
    background: #219653;
    box-shadow: none;
  }

  .ap-dot-ring {
    position: absolute;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid #219653;
    pointer-events: none; opacity: 0; z-index: 17;
    transform: translate(-50%, -50%);
  }
  .ap-dot-ring.fire { animation: apRingPulse 0.5s ease-out forwards; }
  @keyframes apRingPulse {
    0%   { transform: translate(-50%,-50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%,-50%) scale(3.5); opacity: 0; }
  }

  .ap-green-check {
    position: absolute;
    width: 120px; height: 120px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    z-index: 16;
    transform: translate(-50%,-50%) scale(0);
    filter: none;
  }
  .ap-green-check.appear {
    visibility: visible;
    animation: apCheckGrow 0.8s cubic-bezier(0.34,1.56,0.64,1) forwards;
  }
  @keyframes apCheckGrow {
    0%   { opacity: 0; transform: translate(-50%,-50%) scale(0); }
    25%  { opacity: 1; transform: translate(-50%,-50%) scale(0.15); }
    65%  { transform: translate(-50%,-50%) scale(1.1); }
    100% { opacity: 0.9; transform: translate(-50%,-50%) scale(1); }
  }

  .ap-green-check.drift {
    transition: left 1.1s cubic-bezier(0.25,0.46,0.45,0.94),
                top 1.1s cubic-bezier(0.25,0.46,0.45,0.94),
                opacity 1.1s ease-out;
    opacity: 0.35;
  }

  .ap-green-check.float {
    animation: apSubtleFloat 4s ease-in-out infinite alternate;
  }
  @keyframes apSubtleFloat {
    0%   { transform: translate(-50%,-50%) scale(1) translateY(0); }
    100% { transform: translate(-50%,-50%) scale(1) translateY(-4px); }
  }

