/* Original TwinX startup: https://twinx.sixdx.ai/ */

      /* Original wordmark, progress bar and spring curtain timing. */
      #twinx-brand-intro {
        --boot-bg: #03060b;
        --boot-ink: #e6edf5;
        --boot-mute: #5d6d80;
        --boot-accent: #3ab7e8;
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 clamp(16px, 4vw, 56px);
        background: var(--boot-bg);
        color: var(--boot-ink);
        font-family: Inter, ui-sans-serif, system-ui, sans-serif;
        -webkit-font-smoothing: antialiased;
        /* Damped spring (ζ≈0.55, ~12% overshoot); cubic-bezier fallback for older browsers. */
        --boot-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        --boot-spring: linear(0, 0.057, 0.195, 0.374, 0.561, 0.733, 0.877, 0.987, 1.063, 1.107, 1.125, 1.124, 1.11, 1.089, 1.065, 1.042, 1.023, 1.007, 0.996, 0.988, 0.985, 0.984, 0.985, 0.988, 0.991, 0.993, 0.996, 0.998, 1, 1.001, 1.002, 1.002, 1.002, 1.002, 1.001, 1.001, 1);
        /* Small downward dip before the curtain whips up. */
        --boot-lift: cubic-bezier(0.68, -0.18, 0.24, 1);
        transition: transform 0.95s var(--boot-lift), border-radius 0.95s var(--boot-lift);
      }
      /* Lit leading edge, visible as the curtain lifts off the twin. */
      #twinx-brand-intro::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--boot-accent) 30%, var(--boot-accent) 70%, transparent);
        box-shadow: 0 0 24px 2px rgba(58, 183, 232, 0.45);
        opacity: 0;
        transition: opacity 0.3s ease;
      }
      #twinx-brand-intro.is-done {
        transform: translateY(-100%);
        border-radius: 0 0 28px 28px;
        pointer-events: none;
      }
      #twinx-brand-intro.is-done::after {
        opacity: 1;
      }
      /* Content lifts a beat ahead of the curtain for a little parallax. */
      #twinx-brand-intro .boot-row,
      #twinx-brand-intro .boot-by,
      #twinx-brand-intro .boot-foot {
        transition: transform 0.8s var(--boot-lift), opacity 0.5s ease;
      }
      #twinx-brand-intro.is-done .boot-row,
      #twinx-brand-intro.is-done .boot-by {
        transform: translateY(-14vh);
        opacity: 0;
      }
      #twinx-brand-intro.is-done .boot-foot {
        opacity: 0;
      }
      /* The twin waits just below and springs up into place. Translate only:
         scaling would skew the canvas size R3F measures on mount. */
      .twinx-brand-starting #twin-explorer-root {
        transform: translateY(9vh);
      }
      .twinx-brand-revealing #twin-explorer-root {
        transition: transform 1.15s var(--boot-spring) 0.18s;
      }
      #twinx-brand-intro svg {
        display: block;
        overflow: visible;
        fill: none;
        stroke: currentColor;
        stroke-linecap: square;
        stroke-linejoin: miter;
      }
      .boot-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: clamp(16px, 3vw, 40px);
      }
      .boot-mark {
        height: clamp(22px, 2.6vw, 32px);
        width: auto;
        stroke-width: 1.4;
      }
      .boot-mark path {
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        animation: boot-draw 1.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
      }
      .boot-mark path:nth-child(2) { animation-delay: 0.08s; }
      .boot-mark path:nth-child(3) { animation-delay: 0.16s; }
      .boot-mark path:nth-child(4) { animation-delay: 0.24s; }
      .boot-mark path:nth-child(5) { animation-delay: 0.32s; }
      @keyframes boot-draw {
        to { stroke-dashoffset: 0; }
      }
      .boot-track {
        position: relative;
        height: 1px;
        background: rgba(230, 237, 245, 0.08);
        overflow: hidden;
      }
      .boot-fill {
        position: absolute;
        inset: 0;
        transform-origin: left center;
        transform: scaleX(0);
        background: linear-gradient(90deg, rgba(58, 183, 232, 0.15), var(--boot-accent));
      }
      .boot-pct {
        min-width: 4ch;
        text-align: right;
        font: 500 13px/1 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
        font-variant-numeric: tabular-nums;
        color: var(--boot-ink);
      }
      .boot-by {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 18px;
        color: var(--boot-mute);
        opacity: 0;
        animation: boot-in 0.8s ease 0.7s forwards;
      }
      .boot-by span {
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.32em;
        text-transform: uppercase;
      }
      .boot-by svg {
        height: 10px;
        width: auto;
        stroke-width: 3;
        color: #c3cfdc;
      }
      @keyframes boot-in {
        to { opacity: 1; }
      }
      .boot-foot {
        position: absolute;
        left: clamp(16px, 4vw, 56px);
        right: clamp(16px, 4vw, 56px);
        bottom: clamp(16px, 3vw, 32px);
        display: flex;
        justify-content: space-between;
        gap: 16px;
        font: 400 11px/1.4 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--boot-mute);
      }
      @media (max-width: 520px) {
        .boot-foot span:last-child { display: none; }
      }
      #twinx-brand-intro.is-error .boot-fill { background: #d03b3b; }
      #twinx-brand-intro.is-error #boot-status { color: #ec835a; }
      @media (prefers-reduced-motion: reduce) {
        #twinx-brand-intro, .boot-by { animation: none; opacity: 1; }
        .boot-mark path { animation: none; stroke-dashoffset: 0; }
        #twinx-brand-intro { transition: opacity 0.3s ease; }
        #twinx-brand-intro.is-done { transform: none; opacity: 0; }
        #twinx-brand-intro.is-done .boot-row, #twinx-brand-intro.is-done .boot-by { transform: none; }
        .twinx-brand-starting #twin-explorer-root { transform: none; }
      }

#twinx-brand-intro .boot-skip{position:absolute;top:clamp(16px,3vw,32px);right:clamp(16px,4vw,56px);border:0;background:transparent;color:var(--boot-mute);font:11px system-ui;cursor:pointer;padding:12px}
#twinx-brand-intro .boot-skip:focus-visible,.tx-replay-intro:focus-visible{outline:1px solid #3ab7e8;outline-offset:4px}
.tx-replay-intro{margin-left:auto;padding:8px 0;border:0;background:none;color:#7c939f;font:11px system-ui;cursor:pointer}
