/* Shared platform styles. Scoped so the home HUD is not restyled. */
@scope (body.platform-doc, #platform) {
    :scope {
      --bg: #121411;
      --panel: #1a1d19;
      --ink: #f3f2ed;
      --mute: rgba(243, 242, 237, 0.62);
      --line: rgba(243, 242, 237, 0.14);
      --signal: #3dba8a;
      --signal-dim: rgba(61, 186, 138, 0.22);
      --heat: #ff6b3d;
    }



    @supports not selector(::-webkit-scrollbar) {
      :scope {
        scrollbar-width: thin;
        scrollbar-color: var(--ink) var(--bg);
      }
    }

    :scope::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    :scope::-webkit-scrollbar-track {
      background: var(--bg);
    }

    :scope::-webkit-scrollbar-thumb {
      background: var(--ink);
    }

    :scope::-webkit-scrollbar-thumb:hover {
      background: var(--signal);
    }

    #contact {
      scroll-margin-top: 84px;
    }

    /* ---- copy email button ---- */
    .btn.copy-email {
      position: relative;
      border: 0;
      cursor: pointer;
    }

    .copy-ic {
      width: 15px;
      height: 15px;
      flex-shrink: 0;
    }

    .copy-tip {
      position: absolute;
      bottom: calc(100% + 10px);
      left: 50%;
      transform: translate(-50%, 4px);
      padding: 6px 10px;
      background: var(--panel);
      border: 1px solid var(--line);
      color: var(--ink);
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .copy-email:hover .copy-tip,
    .copy-email.copied .copy-tip {
      opacity: 1;
      transform: translate(-50%, 0);
    }

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

    :scope {
      position: relative;
      background: var(--bg);
      color: var(--ink);
      font-family: "Syne", sans-serif;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    /* ---- grain + vignette atmosphere ---- */
    :scope::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      opacity: 0.45;
      background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(61, 186, 138, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 80%, rgba(255, 107, 61, 0.06), transparent 50%),
        linear-gradient(180deg, #161814, #0e100e);
    }

    :scope::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 50;
      opacity: 0.035;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    }

    .wrap {
      position: relative;
      z-index: 1;
    }

    /* ---- header ---- */
    .site-header {
      position: sticky;
      top: 0;
      z-index: 40;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      padding: 20px clamp(20px, 4vw, 48px);
      background: rgba(18, 20, 17, 0.82);
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--line);
      animation: fade-down 0.7s ease both;
    }

    .brand {
      line-height: 0;
      flex-shrink: 0;
    }

    .brand img {
      display: block;
      height: clamp(18px, 2vw, 24px);
      width: auto;
      filter: brightness(0) invert(1);
    }

    .nav {
      display: flex;
      align-items: center;
      gap: clamp(16px, 3vw, 32px);
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.04em;
    }

    .nav a {
      position: relative;
      display: inline-block;
      text-align: center;
      opacity: 0.8;
      padding-bottom: 4px;
      background-image: linear-gradient(var(--signal), var(--signal));
      background-repeat: no-repeat;
      background-position: right bottom;
      background-size: 0% 1.5px;
      transition: opacity 0.3s ease, color 0.35s ease, background-size 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    /* invisible mono ghost reserves the hover width so items never shift */
    .nav a::before {
      content: attr(data-text);
      display: block;
      height: 0;
      overflow: hidden;
      visibility: hidden;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
    }

    /* mono overlay that rolls in over the original word on hover */
    .nav a::after {
      content: attr(data-text);
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      color: var(--ink);
      white-space: nowrap;
      opacity: 0;
      transform: translateY(45%);
      transition: opacity 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
      pointer-events: none;
    }

    .nav a:hover {
      opacity: 1;
      color: transparent;
      background-position: left bottom;
      background-size: 100% 1.5px;
    }

    .nav a:hover::after {
      opacity: 1;
      transform: translateY(0);
    }

    .nav a[aria-current="page"] {
      opacity: 1;
      color: var(--signal);
    }

    .nav a[aria-current="page"]::after {
      color: var(--signal);
    }

    .nav a[aria-current="page"]:hover {
      color: transparent;
    }

    /* ---- hero ---- */
    .hero {
      min-height: calc(100dvh - 90px);
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: clamp(32px, 5vw, 72px);
      align-items: center;
      padding: 24px clamp(20px, 4vw, 48px) 64px;
      max-width: 1280px;
      margin: 0 auto;
    }

    .hero-text {
      animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .eyebrow {
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--signal);
      margin-bottom: 22px;
    }

    .hero h1 {
      font-size: clamp(40px, 6.5vw, 78px);
      font-weight: 800;
      line-height: 0.92;
      letter-spacing: -0.035em;
      text-transform: uppercase;
      max-width: 10ch;
    }

    .hero h1 em {
      font-style: normal;
      color: var(--signal);
    }

    .hero-lede {
      margin-top: 24px;
      max-width: 28ch;
      font-size: clamp(16px, 1.6vw, 18px);
      font-weight: 500;
      line-height: 1.45;
      color: var(--mute);
    }

    .hero-actions {
      margin-top: 36px;
      display: flex;
      flex-wrap: wrap;
      gap: 14px 22px;
      align-items: center;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 14px 22px;
      background: var(--ink);
      color: var(--bg);
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.01em;
      transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .btn:hover {
      transform: translateY(-2px);
      opacity: 0.92;
    }

    .btn .arrow {
      transition: transform 0.25s ease;
    }

    .btn:hover .arrow {
      transform: translateX(4px);
    }

    .link-quiet {
      font-size: 14px;
      font-weight: 600;
      border-bottom: 1px solid var(--line);
      padding-bottom: 2px;
      color: var(--mute);
      transition: color 0.2s ease;
    }

    .link-quiet:hover {
      color: var(--ink);
    }

    /* cart visual */
    .hero-visual {
      position: relative;
      height: min(520px, 62vh);
      min-height: 360px;
      animation: rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
      overflow: visible;
    }

    .cart-stage {
      position: absolute;
      inset: 0;
      border: 1px solid var(--line);
      background:
        linear-gradient(165deg, rgba(61, 186, 138, 0.08), transparent 40%),
        var(--panel);
      overflow: visible;
    }

    .floor-grid {
      position: absolute;
      inset: 12% 8% 18% 8%;
      display: grid;
      grid-template-columns: repeat(8, 1fr);
      grid-template-rows: repeat(6, 1fr);
      gap: 3px;
      opacity: 0.9;
      overflow: hidden;
    }

    .floor-grid i {
      display: block;
      background: rgba(243, 242, 237, 0.04);
      border: 1px solid rgba(243, 242, 237, 0.05);
    }

    .floor-grid i.hot {
      background: rgba(255, 107, 61, 0.35);
      box-shadow: 0 0 24px rgba(255, 107, 61, 0.25);
      animation: heat-pulse 3.2s ease-in-out infinite;
    }

    .floor-grid i.warm {
      background: rgba(255, 107, 61, 0.16);
    }

    .floor-grid i.path {
      background: rgba(61, 186, 138, 0.28);
      animation: path-glow 2.8s ease-in-out infinite;
    }

    .cart-dot {
      position: absolute;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--signal);
      box-shadow: 0 0 0 6px var(--signal-dim), 0 0 28px rgba(61, 186, 138, 0.55);
      animation: cart-move 8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
      z-index: 2;
    }

    .screen-frame {
      position: absolute;
      right: 0;
      bottom: 9%;
      width: min(342px, 72%);
      aspect-ratio: 4.5 / 4.35;
      background: #050605;
      border: 1px solid rgba(243, 242, 237, 0.22);
      padding: 14px 10px 10px;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
      z-index: 3;
      transform: translateX(50%);
      animation: screen-float 5s ease-in-out infinite;
    }

    .screen-frame::before {
      content: "";
      position: absolute;
      top: 7px;
      left: 50%;
      transform: translateX(-50%);
      width: 26%;
      height: 3px;
      border-radius: 2px;
      background: rgba(243, 242, 237, 0.18);
    }

    .screen-ui {
      height: 100%;
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding-top: 8px;
    }

    .hud-panel {
      flex: 1 1 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 8px;
      border: 1px solid rgba(243, 242, 237, 0.08);
      background: #080a08;
    }

    .screen-meta {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 8px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(243, 242, 237, 0.45);
      flex-shrink: 0;
    }

    .screen-meta strong {
      color: var(--signal);
      font-weight: 500;
    }

    .screen-meta .muted {
      color: rgba(243, 242, 237, 0.35);
      letter-spacing: 0.1em;
    }

    .chart {
      flex: 1;
      min-height: 0;
      position: relative;
      overflow: hidden;
    }

    .chart svg {
      display: block;
      width: 100%;
      height: 100%;
    }

    .chart .grid-line {
      stroke: rgba(243, 242, 237, 0.06);
      stroke-width: 1;
    }

    .chart .area {
      fill: url(#chartFill);
      opacity: 0.9;
    }

    .chart .area.promo-area {
      fill: url(#promoFill);
    }

    .chart .line {
      fill: none;
      stroke: var(--signal);
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-dasharray: 420;
      stroke-dashoffset: 420;
      animation: chart-draw 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
      filter: drop-shadow(0 0 6px rgba(61, 186, 138, 0.55));
    }

    .chart .line.promo-line {
      stroke: #7dffc0;
      animation-delay: 0.75s;
      filter: drop-shadow(0 0 6px rgba(125, 255, 192, 0.45));
    }

    .chart .dot {
      fill: var(--signal);
      opacity: 0;
      animation: beacon-fade 0.45s ease 2.2s forwards;
      filter: drop-shadow(0 0 5px rgba(61, 186, 138, 0.7));
    }

    .chart .dot.promo-dot {
      fill: #7dffc0;
      animation-delay: 2.6s;
      filter: drop-shadow(0 0 5px rgba(125, 255, 192, 0.65));
    }

    .chart-legend {
      position: absolute;
      left: 0;
      top: 0;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 7px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(243, 242, 237, 0.35);
      pointer-events: none;
    }

    .stage-label {
      position: absolute;
      left: 8%;
      bottom: 8%;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 10px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--mute);
      z-index: 2;
    }

    /* ---- gap ---- */
    .gap {
      max-width: 1280px;
      margin: 0 auto;
      padding: 40px clamp(20px, 4vw, 48px) 80px;
    }

    .gap-head {
      margin-bottom: 36px;
      max-width: none;
      font-size: clamp(28px, 4vw, 44px);
      font-weight: 800;
      line-height: 1;
      letter-spacing: -0.03em;
      text-transform: uppercase;
    }

    .gap-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1px;
      background: var(--line);
      border: 1px solid var(--line);
    }

    .gap-cell {
      background: var(--bg);
      padding: clamp(28px, 4vw, 48px);
      min-height: 220px;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      gap: 12px;
    }

    .gap-cell h3 {
      font-size: clamp(22px, 2.8vw, 32px);
      font-weight: 800;
      letter-spacing: -0.03em;
      text-transform: uppercase;
      line-height: 1.05;
      white-space: nowrap;
    }

    .gap-cell p,
    .gap-cell > div {
      margin-top: auto;
      margin-bottom: auto;
      max-width: none;
      width: 100%;
      text-align: center;
    }

    .gap-cell p {
      font-size: 15px;
      font-weight: 500;
      line-height: 1.45;
      color: var(--mute);
    }

    .gap-cell p + p {
      margin-top: 12px;
    }

    .gap-cell p a {
      color: var(--signal);
      text-underline-offset: 3px;
      text-decoration: underline;
      text-decoration-thickness: 1px;
    }

    .gap-cell.online h3 {
      color: var(--signal);
    }

    .gap-cell.store {
      background: var(--panel);
    }

    .gap-cell .tag {
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 10px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--mute);
    }

    /* ---- capabilities ---- */
    .caps {
      border-top: 1px solid var(--line);
    }

    .cap {
      display: grid;
      grid-template-columns: 120px 1fr 1.1fr;
      gap: clamp(20px, 3vw, 40px);
      align-items: center;
      max-width: 1280px;
      margin: 0 auto;
      padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 48px);
      border-bottom: 1px solid var(--line);
      opacity: 0;
      transform: translateY(28px);
      transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .cap.in {
      opacity: 1;
      transform: translateY(0);
    }

    .cap-num {
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 13px;
      letter-spacing: 0.12em;
      color: var(--signal);
    }

    .cap h2 {
      font-size: clamp(28px, 3.8vw, 48px);
      font-weight: 800;
      letter-spacing: -0.03em;
      text-transform: uppercase;
      line-height: 0.95;
    }

    .cap p {
      font-size: clamp(15px, 1.5vw, 17px);
      font-weight: 500;
      line-height: 1.45;
      color: var(--mute);
      max-width: 36ch;
    }

    /* ---- demo section headings ---- */
    .demo-head {
      margin-bottom: clamp(22px, 3vw, 32px);
    }

    .demo-label {
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 11px;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--signal);
      margin-bottom: 12px;
    }

    .demo-head h2 {
      font-size: clamp(24px, 3.2vw, 38px);
      font-weight: 800;
      letter-spacing: -0.03em;
      text-transform: uppercase;
      line-height: 1;
    }

    /* ---- aisle route visual ---- */
    .viz-route {
      max-width: 1280px;
      margin: 0 auto 8px;
      padding: clamp(48px, 7vw, 80px) clamp(20px, 4vw, 48px);
    }

    .viz-route-frame {
      display: flex;
      flex-direction: column;
      gap: clamp(20px, 3vw, 28px);
      border: 1px solid var(--line);
      background:
        radial-gradient(ellipse 70% 55% at 50% 60%, rgba(61, 186, 138, 0.05), transparent 60%),
        var(--panel);
      padding: clamp(22px, 3vw, 32px) clamp(18px, 3vw, 36px) clamp(24px, 3vw, 36px);
      overflow: hidden;
    }

    .viz-route-meta {
      position: static;
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 8px 14px;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 10px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--mute);
      pointer-events: none;
      line-height: 1.4;
    }

    .viz-route-meta strong {
      color: var(--signal);
      font-weight: 500;
    }

    .viz-route-meta .sep {
      color: rgba(243, 242, 237, 0.25);
      letter-spacing: 0;
    }

    .viz-route-meta .dest {
      color: var(--ink);
      font-family: "Syne", sans-serif;
      font-size: clamp(16px, 2vw, 22px);
      font-weight: 800;
      letter-spacing: -0.03em;
      text-transform: uppercase;
      margin: 0;
      line-height: 1.2;
      flex: 1 1 auto;
      min-width: min(100%, 18ch);
    }

    .viz-route-map {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
    }

    .viz-route-map svg {
      display: block;
      width: min(100%, 920px);
      height: auto;
      aspect-ratio: 980 / 340;
    }

    .viz-route .store-shell {
      fill: rgba(243, 242, 237, 0.02);
      stroke: rgba(243, 242, 237, 0.14);
      stroke-width: 1.5;
    }

    .viz-route .fixture {
      fill: rgba(243, 242, 237, 0.07);
      stroke: rgba(243, 242, 237, 0.1);
      stroke-width: 1;
    }

    .viz-route .fixture.accent {
      fill: rgba(243, 242, 237, 0.07);
      stroke: rgba(243, 242, 237, 0.1);
    }

    .viz-route .fixture.checkout {
      fill: rgba(243, 242, 237, 0.14);
      stroke: rgba(243, 242, 237, 0.2);
    }

    .viz-route .entrance-gap {
      stroke: rgba(243, 242, 237, 0.28);
      stroke-width: 1.5;
      stroke-dasharray: 5 5;
      fill: none;
    }

    .viz-route .path-glow {
      fill: none;
      stroke: rgba(61, 186, 138, 0.2);
      stroke-width: 12;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .viz-route .path-line {
      fill: none;
      stroke: var(--signal);
      stroke-width: 2.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-dasharray: 1400;
      stroke-dashoffset: 1400;
    }

    .viz-route.is-inview .path-line {
      animation: chart-draw 3.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
      filter: drop-shadow(0 0 8px rgba(61, 186, 138, 0.55));
    }

    .viz-route .pin {
      fill: var(--signal);
      filter: drop-shadow(0 0 10px rgba(61, 186, 138, 0.7));
    }

    .viz-route .pin-ring {
      fill: none;
      stroke: var(--signal);
      stroke-width: 1.5;
      opacity: 0;
      transform-box: fill-box;
      transform-origin: center;
    }

    .viz-route.is-inview .pin-ring {
      animation: pin-ring 2.4s ease-out infinite;
      animation-delay: 3.1s;
    }

    .viz-route.is-inview .pin-ring.delay {
      animation-delay: 3.6s;
    }

    /* ---- ads workflow panels ---- */
    .viz-heat {
      max-width: 1280px;
      margin: 0 auto;
      padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 48px) clamp(64px, 8vw, 96px);
    }

    .ads-board {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1px;
      background: var(--line);
      border: 1px solid var(--line);
    }

    .ads-panel {
      background: var(--panel);
      padding: clamp(20px, 2.5vw, 28px);
      min-height: 280px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .ads-panel-top {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      gap: 12px;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--mute);
    }

    .ads-panel-top strong {
      color: var(--signal);
      font-weight: 500;
    }

    .ads-panel h3 {
      font-size: clamp(20px, 2.4vw, 26px);
      font-weight: 800;
      letter-spacing: -0.03em;
      text-transform: uppercase;
      line-height: 1;
    }

    .ads-panel p {
      font-size: 14px;
      font-weight: 500;
      line-height: 1.4;
      color: var(--mute);
      max-width: 28ch;
    }

    .ads-stage {
      margin-top: auto;
      border: 1px solid rgba(243, 242, 237, 0.1);
      background: #080a08;
      padding: 14px;
      min-height: 168px;
      display: flex;
      flex-direction: column;
    }

    /* create ad */
    .compose-ui {
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 9px;
      height: 100%;
    }

    .compose-ui .field {
      display: grid;
      grid-template-columns: 58px 1fr;
      align-items: center;
      gap: 8px;
    }

    .compose-ui .field label {
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 8px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(243, 242, 237, 0.38);
    }

    .compose-ui .field .input {
      height: 20px;
      border: 1px solid rgba(243, 242, 237, 0.1);
      background: rgba(243, 242, 237, 0.04);
      display: flex;
      align-items: center;
      padding: 0 8px;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 9px;
      letter-spacing: 0.06em;
      color: rgba(243, 242, 237, 0.65);
      white-space: nowrap;
      overflow: hidden;
    }

    .compose-ui .field .input .caret {
      display: none;
      width: 1px;
      height: 11px;
      margin-left: 2px;
      background: var(--signal);
      animation: caret-blink 1.1s steps(1) infinite;
    }

    .compose-ui .field.typing .caret {
      display: inline-block;
    }

    .compose-ui .field.typing .input {
      border-color: rgba(61, 186, 138, 0.45);
    }

    .demo-cursor {
      position: absolute;
      top: 0;
      left: 0;
      width: 15px;
      height: 15px;
      opacity: 0;
      pointer-events: none;
      z-index: 4;
      transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    }

    .demo-cursor svg {
      display: block;
      width: 100%;
      height: 100%;
      transition: transform 0.14s ease;
    }

    .demo-cursor.show {
      opacity: 1;
    }

    .demo-cursor.click svg {
      transform: scale(0.78);
    }

    .compose-ui .publish-row {
      margin-top: auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .compose-ui .preview-chip {
      flex: 1;
      padding: 8px 10px;
      border: 1px solid rgba(61, 186, 138, 0.35);
      background: rgba(61, 186, 138, 0.08);
      color: var(--signal);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      opacity: 0.22;
      transition: opacity 0.5s ease;
    }

    .compose-ui .preview-chip.show {
      opacity: 1;
    }

    .compose-ui .publish-btn {
      padding: 8px 12px;
      background: var(--signal);
      color: #06120d;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      white-space: nowrap;
      transition: transform 0.12s ease, background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
    }

    .compose-ui .publish-btn.pressed {
      transform: scale(0.9);
    }

    .compose-ui .publish-btn.done {
      background: rgba(61, 186, 138, 0.14);
      color: var(--signal);
      box-shadow: inset 0 0 0 1px rgba(61, 186, 138, 0.55);
    }

    /* benchmark */
    .bench-ui {
      display: flex;
      flex-direction: column;
      gap: 10px;
      height: 100%;
    }

    .bench-ui .meta {
      display: flex;
      justify-content: space-between;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 9px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(243, 242, 237, 0.4);
    }

    .bench-ui .meta b {
      color: var(--signal);
      font-weight: 500;
    }

    .bench-ui svg {
      width: 100%;
      height: 74px;
      display: block;
    }

    .bench-ui .bench-line {
      stroke-dasharray: 1;
      stroke-dashoffset: 1;
    }

    .bench-ui.reset .bench-area,
    .bench-ui.reset .bench-base,
    .bench-ui.reset .bench-dot,
    .bench-ui.reset .fill {
      transition: none;
    }

    .bench-ui .bench-area,
    .bench-ui .bench-base,
    .bench-ui .bench-dot {
      opacity: 0;
    }

    .bench-ui.run .bench-line {
      animation: bench-draw 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards;
    }

    .bench-ui.run .bench-base {
      transition: opacity 0.7s ease 0.2s;
      opacity: 1;
    }

    .bench-ui.run .bench-area {
      transition: opacity 0.9s ease 1s;
      opacity: 1;
    }

    .bench-ui.run .bench-dot {
      transition: opacity 0.3s ease 1.75s;
      opacity: 1;
    }

    @keyframes bench-draw {
      to { stroke-dashoffset: 0; }
    }

    .bench-bars {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .bench-bar {
      display: grid;
      grid-template-columns: 12px 1fr 34px;
      align-items: center;
      gap: 8px;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 9px;
      letter-spacing: 0.08em;
      color: rgba(243, 242, 237, 0.5);
    }

    .bench-bar .track {
      height: 9px;
      background: rgba(243, 242, 237, 0.06);
      overflow: hidden;
    }

    .bench-bar .fill {
      height: 100%;
      width: 0;
      background: var(--signal);
      box-shadow: 0 0 10px rgba(61, 186, 138, 0.4);
      transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.8s;
    }

    .bench-ui.run .fill {
      width: var(--w);
    }

    .bench-bar.b .fill {
      background: rgba(243, 242, 237, 0.3);
      box-shadow: none;
    }

    .bench-bar .val {
      text-align: right;
      color: var(--signal);
    }

    .bench-bar.b .val {
      color: rgba(243, 242, 237, 0.45);
    }

    /* queue */
    .queue-ui {
      display: flex;
      flex-direction: column;
      gap: 8px;
      height: 100%;
    }

    .queue-item {
      display: grid;
      grid-template-columns: 8px 1fr auto;
      gap: 10px;
      align-items: center;
      padding: 9px 10px;
      border: 1px solid rgba(243, 242, 237, 0.08);
      background: rgba(243, 242, 237, 0.03);
      transition: opacity 0.45s ease, border-color 0.45s ease, background 0.45s ease;
    }

    .queue-item.live {
      border-color: rgba(61, 186, 138, 0.35);
      background: rgba(61, 186, 138, 0.06);
    }

    .queue-item i {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--signal);
      box-shadow: 0 0 0 3px rgba(61, 186, 138, 0.18);
      animation: heat-pulse 2s ease-in-out infinite;
    }

    .queue-item.waiting i {
      background: rgba(243, 242, 237, 0.35);
      box-shadow: none;
      animation: none;
    }

    .queue-item .name {
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.01em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .queue-item .when {
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 9px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--mute);
    }

    .queue-item.live .when {
      color: var(--signal);
    }

    .queue-item.done {
      opacity: 0.4;
    }

    .queue-item.done i {
      background: rgba(243, 242, 237, 0.25);
      box-shadow: none;
      animation: none;
    }

    .queue-item.done .name {
      text-decoration: line-through;
      text-decoration-color: rgba(243, 242, 237, 0.45);
    }

    .queue-item.done .when {
      color: rgba(243, 242, 237, 0.35);
    }

    @keyframes caret-blink {
      0%, 55% { opacity: 1; }
      56%, 100% { opacity: 0; }
    }

    @media (max-width: 900px) {
      .ads-board {
        grid-template-columns: 1fr;
      }

      .ads-panel {
        min-height: 0;
      }
    }

    /* ---- dashboard slideshow ---- */
    .viz-dash {
      max-width: 1280px;
      margin: 0 auto;
      padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 48px) clamp(64px, 8vw, 96px);
    }

    .dash-wrap {
      position: relative;
    }

    .dash-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 6;
      background: none;
      border: 0;
      padding: 10px 4px;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 18px;
      line-height: 1;
      color: var(--mute);
      cursor: pointer;
      transition: color 0.2s ease;
    }

    .dash-arrow:hover {
      color: var(--signal);
    }

    .dash-arrow.prev {
      left: clamp(-40px, -2.6vw, -14px);
    }

    .dash-arrow.next {
      right: clamp(-40px, -2.6vw, -14px);
    }

    .dash-stage {
      position: relative;
      height: clamp(230px, 35vw, 440px);
      overflow: hidden;
    }

    .dash-slide {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 52%;
      aspect-ratio: 3024 / 1964;
      margin: 0;
      border: 1px solid var(--line);
      background: var(--panel);
      overflow: hidden;
      cursor: pointer;
      transform: translate(-50%, -50%);
      transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.65s ease, filter 0.65s ease;
      will-change: transform;
    }

    .dash-slide.no-anim {
      transition: none;
    }

    .dash-slide img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .app-slide {
      aspect-ratio: 1024 / 640;
    }

    .dash-slide[data-pos="0"] {
      transform: translate(-50%, -50%) scale(1);
      z-index: 5;
      opacity: 1;
      filter: none;
      box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
      cursor: default;
    }

    .dash-slide[data-pos="-1"] {
      transform: translate(calc(-50% - 61%), -50%) scale(0.7);
      z-index: 4;
      opacity: 0.55;
      filter: brightness(0.6);
    }

    .dash-slide[data-pos="1"] {
      transform: translate(calc(-50% + 61%), -50%) scale(0.7);
      z-index: 4;
      opacity: 0.55;
      filter: brightness(0.6);
    }

    .dash-slide[data-pos="-2"] {
      transform: translate(calc(-50% - 93%), -50%) scale(0.5);
      z-index: 3;
      opacity: 0.28;
      filter: brightness(0.45);
    }

    .dash-slide[data-pos="2"] {
      transform: translate(calc(-50% + 93%), -50%) scale(0.5);
      z-index: 3;
      opacity: 0.28;
      filter: brightness(0.45);
    }

    .dash-caption {
      margin-top: clamp(16px, 2.4vw, 24px);
      text-align: center;
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 12px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      transition: opacity 0.3s ease;
    }

    .dash-caption.swap {
      opacity: 0;
    }

    .dash-caption-num {
      color: var(--signal);
      margin-right: 12px;
    }

    @media (max-width: 720px) {
      .dash-stage {
        height: clamp(200px, 56vw, 320px);
      }

      .dash-slide {
        width: 74%;
      }

      .dash-slide[data-pos="-1"] {
        transform: translate(calc(-50% - 52%), -50%) scale(0.62);
      }

      .dash-slide[data-pos="1"] {
        transform: translate(calc(-50% + 52%), -50%) scale(0.62);
      }

      .dash-slide[data-pos="-2"],
      .dash-slide[data-pos="2"] {
        opacity: 0;
      }
    }

    /* ---- formula ---- */
    .formula {
      max-width: 1280px;
      margin: 0 auto;
      padding: clamp(72px, 10vw, 120px) clamp(20px, 4vw, 48px);
      text-align: center;
    }

    .formula-label {
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 11px;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--mute);
      margin-bottom: 28px;
    }

    .formula-chain {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 12px 8px;
      font-size: clamp(22px, 3.5vw, 40px);
      font-weight: 800;
      letter-spacing: -0.03em;
      text-transform: uppercase;
      line-height: 1;
    }

    .formula-chain .plus {
      color: var(--signal);
      font-weight: 600;
      opacity: 0.7;
      padding: 0 4px;
    }

    .formula-chain b {
      font-weight: 800;
      border-bottom: 2px solid var(--signal-dim);
      padding-bottom: 4px;
    }

    .formula-chain b.result {
      color: var(--signal);
      border-bottom-color: var(--signal);
    }

    .formula-note {
      margin: 32px auto 0;
      max-width: 48ch;
      font-size: 16px;
      font-weight: 500;
      line-height: 1.45;
      color: var(--mute);
    }

    /* ---- value row ---- */
    .value {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 clamp(20px, 4vw, 48px) 80px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1px;
      background: var(--line);
      border: 1px solid var(--line);
    }

    .value-col {
      background: var(--bg);
      padding: clamp(32px, 4vw, 48px);
    }

    .value-col h3 {
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--signal);
      margin-bottom: 20px;
    }

    .value-col ul {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .value-col li {
      font-size: clamp(18px, 2.2vw, 24px);
      font-weight: 700;
      letter-spacing: -0.02em;
      line-height: 1.15;
    }

    /* ---- pilot CTA ---- */
    .pilot {
      max-width: 1280px;
      margin: 0 auto 64px;
      padding: clamp(48px, 7vw, 80px) clamp(20px, 4vw, 48px);
      border-top: 1px solid var(--line);
      display: grid;
      grid-template-columns: 1.2fr 0.8fr;
      gap: 40px;
      align-items: end;
    }

    .pilot h2 {
      font-size: clamp(32px, 4.5vw, 56px);
      font-weight: 800;
      letter-spacing: -0.035em;
      text-transform: uppercase;
      line-height: 0.95;
      max-width: 12ch;
    }

    .pilot p {
      margin-top: 18px;
      max-width: 42ch;
      font-size: 16px;
      font-weight: 500;
      line-height: 1.45;
      color: var(--mute);
    }

    .pilot-side {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 18px;
    }

    .pilot-meta {
      font-family: "IBM Plex Mono", ui-monospace, monospace;
      font-size: 11px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--mute);
      line-height: 1.7;
    }

    .site-foot {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      padding: 24px clamp(20px, 4vw, 48px) 36px;
      border-top: 1px solid var(--line);
      font-size: 12px;
      font-weight: 500;
      letter-spacing: 0.06em;
      color: var(--mute);
    }

    .site-foot .foot-links {
      display: flex;
      gap: 20px;
      flex-wrap: wrap;
    }

    .site-foot a {
      color: var(--ink);
      transition: color 0.2s ease;
    }

    .site-foot a:hover {
      color: var(--signal);
    }

    @keyframes fade-down {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes rise {
      from { opacity: 0; transform: translateY(22px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes chart-draw {
      to { stroke-dashoffset: 0; }
    }

    @keyframes beacon-fade {
      to { opacity: 1; }
    }

    @keyframes ring-pulse {
      0% { opacity: 0.7; transform: scale(0.6); }
      100% { opacity: 0; transform: scale(2.4); }
    }

    @keyframes pin-ring {
      0% { opacity: 0.75; transform: scale(0.7); }
      100% { opacity: 0; transform: scale(2.2); }
    }

    @keyframes heat-pulse {
      0%, 100% { opacity: 0.75; }
      50% { opacity: 1; }
    }

    @keyframes path-glow {
      0%, 100% { opacity: 0.55; }
      50% { opacity: 1; }
    }

    @keyframes cart-move {
      0%   { left: 14%; top: 72%; }
      25%  { left: 38%; top: 48%; }
      50%  { left: 58%; top: 28%; }
      75%  { left: 72%; top: 42%; }
      100% { left: 14%; top: 72%; }
    }

    @keyframes screen-float {
      0%, 100% { transform: translateX(50%) translateY(0); }
      50% { transform: translateX(50%) translateY(-8px); }
    }

    @media (max-width: 900px) {
      .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 40px;
        padding-bottom: 48px;
      }

      .hero-visual {
        height: 340px;
        min-height: 300px;
        order: -1;
      }

      .screen-frame {
        right: 12px;
        width: min(280px, 62%);
        transform: none;
        animation: none;
      }

      .hero h1 {
        max-width: none;
      }

      .cap {
        grid-template-columns: 48px 1fr;
        gap: 12px 20px;
      }

      .cap p {
        grid-column: 2 / -1;
      }

      .gap-grid,
      .value,
      .pilot {
        grid-template-columns: 1fr;
      }

      .viz-route,
      .viz-heat {
        padding-left: 16px;
        padding-right: 16px;
      }

      .nav .hide-sm {
        display: none;
      }

      .brand img {
        height: 20px;
        filter: brightness(0) invert(1);
      }
    }

    @media (max-width: 520px) {
      .site-header {
        padding: max(16px, env(safe-area-inset-top)) 16px 12px;
        flex-wrap: wrap;
        row-gap: 10px;
      }

      .nav {
        gap: 10px;
        font-size: 12px;
      }

      .brand img {
        height: 18px;
      }

      .hero,
      .gap,
      .cap,
      .formula,
      .value,
      .pilot,
      .site-foot {
        padding-left: 16px;
        padding-right: 16px;
      }

      .hero h1 {
        font-size: clamp(30px, 9.2vw, 40px);
      }

      .gap-cell {
        min-height: 0;
      }

      .gap-cell p {
        max-width: none;
      }

      .cap p {
        max-width: none;
      }

      /* let the floor plan keep its size and swipe sideways */
      .viz-route-map {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
      }

      .viz-route-map::-webkit-scrollbar {
        display: none;
      }

      .viz-route-map svg {
        min-width: 620px;
      }

      .screen-frame {
        width: min(230px, 74%);
        right: 10px;
        bottom: 12px;
        transform: none;
        animation: none;
      }

      .viz-route-meta {
        flex-wrap: wrap;
        row-gap: 4px;
      }

      .viz-route-meta .sep:last-of-type {
        display: none;
      }

      .formula-chain {
        gap: 8px 4px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation: none !important;
        transition: none !important;
      }

      .cap {
        opacity: 1;
        transform: none;
      }

      .cart-dot {
        left: 48%;
        top: 40%;
      }

      .chart .line {
        stroke-dashoffset: 0;
      }

      .chart .dot {
        opacity: 1;
      }

      .viz-route .path-line {
        stroke-dashoffset: 0;
      }

      .viz-route .pin-ring {
        opacity: 0.7;
        animation: none !important;
      }
    }
}

/* Standalone platform page: grain stays pinned while the body scrolls. */
body.platform-doc::before,
body.platform-doc::after {
  position: fixed;
}
