/* ==========================================================================
   FLEET — 04 "Under the hood" (deep navy). Owned by Agent FLEET.
   Every rule is scoped under .fleet.
   Beats: headline → 1 the exploded stack (the device facts, once each, on its
   cards) → 1b one phone used from the browser, a real recording (2026-10-27)
   → 2 the multistreamer recording with the pre-post checks beside it.
   Diagram language: foam 2px strokes, flood blue = the device, white = the one
   example account, dotted = browser control, dashed = only when needed.
   ========================================================================== */

.fleet {
  --fl-gap: 1.5rem;
  /* tones mixed from the tokens (flat fills, no gradients) */
  --st-slab: var(--surface-2);
  --st-slab-2: var(--surface);
  --st-slab-3: var(--bg-2);
  --st-edge: var(--foam);
  --st-chip: var(--fg-3);
  --t-on: var(--surface-2);
  --t-crest: var(--link);
}
@supports (color: color-mix(in srgb, red, blue)) {
  .fleet {
    --st-slab: color-mix(in srgb, var(--flood) 54%, var(--deep));
    --st-slab-2: color-mix(in srgb, var(--flood) 36%, var(--deep));
    --st-slab-3: color-mix(in srgb, var(--flood) 22%, var(--deep));
    --st-edge: color-mix(in srgb, var(--flood) 38%, var(--white));
    --st-chip: color-mix(in srgb, var(--foam) 72%, var(--surface));
    --t-on: color-mix(in srgb, var(--flood) 36%, var(--surface));
    --t-crest: color-mix(in srgb, var(--flood) 62%, var(--white));
  }
}

.fleet .wrap { position: relative; }

/* ---------- Head ---------- */

.fleet .fleet-head { display: grid; row-gap: clamp(1.375rem, 2.6vw, 2.25rem); }
.fleet .fleet-title { max-width: 16ch; }

/* The page's one scroll-scrubbed statement */
.fleet .fleet-say {
  max-width: 26ch;
  font-stretch: 112%;
  font-weight: 560;
  font-size: clamp(1.375rem, 2.05vw, 1.875rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fg);
  text-wrap: balance;
}
.fleet .fleet-say .mw { will-change: opacity; }
.mf-motion .fleet .fleet-say:not(.is-split) { opacity: 0.3; }

/* ---------- 1 · the stack ---------- */

.fleet .stack { position: relative; margin-top: clamp(2.25rem, 4.6vw, 4rem); }
.fleet .stack-fig { margin: 0; }
.fleet .stack-body { position: relative; }
.fleet .stack-art { position: relative; }

.fleet .st-svg { display: block; width: 100%; height: auto; overflow: visible; }
.fleet .st-flat { display: none; }

/* plates */
.fleet .pl-top { fill: var(--surface); }
.fleet .pl-side { fill: var(--bg-2); }
.fleet .pl-side2 { fill: var(--abyss); }
.fleet .pl-edge { fill: none; stroke: var(--foam); stroke-width: 2; stroke-linejoin: round; }
.fleet .pl-edge2 { stroke: var(--foam); stroke-width: 2; }
.fleet .st-base .pl-top { fill: var(--bg-2); }
.fleet .st-svg pattern circle { fill: var(--foam); opacity: 0.34; }

/* the one blue layer: the devices */
.fleet .st-dev .pl-top { fill: var(--st-slab); }
.fleet .st-dev .pl-side { fill: var(--st-slab-2); }
.fleet .st-dev .pl-side2 { fill: var(--st-slab-3); }
.fleet .ph-body { fill: var(--st-edge); transition: fill 0.4s ease; }
.fleet .ph-face { fill: var(--flood); transition: fill 0.4s ease; }
.fleet .st-ph.is-spec .ph-face,
.fleet .st-ph.is-pair .ph-face { fill: var(--white); }
.fleet .st-ph.is-spec .ph-body,
.fleet .st-ph.is-pair .ph-body { fill: var(--foam); }

/* accounts: handle cells */
.fleet .st-cell {
  fill: var(--surface-2);
  stroke: var(--foam);
  stroke-opacity: 0.5;
  stroke-width: 1.5;
  transition: fill 0.4s ease, stroke-opacity 0.4s ease;
}
.fleet .st-at {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.7812rem;
  text-anchor: middle;
  fill: var(--foam);
  fill-opacity: 0.86;
}
.fleet .st-cell.is-spec,
.fleet .st-cell.is-pair { fill: var(--white); stroke-opacity: 1; stroke: var(--white); }
.fleet .st-at.is-spec { fill: var(--abyss); fill-opacity: 1; }

/* network: one US SIM card per phone, one wire each */
.fleet .st-sim path { fill: var(--st-chip); transition: fill 0.4s ease; }
.fleet .st-sim line { stroke: var(--st-chip); stroke-width: 1.5; transition: stroke 0.4s ease; }
.fleet .st-sim circle { fill: var(--surface); stroke: var(--st-chip); stroke-width: 1.5; transition: fill 0.4s ease, stroke 0.4s ease; }
.fleet .st-sim.is-spec path,
.fleet .st-sim.is-spec circle,
.fleet .st-sim.is-pair path,
.fleet .st-sim.is-pair circle { fill: var(--white); stroke: var(--white); }
.fleet .st-sim.is-spec line,
.fleet .st-sim.is-pair line { stroke: var(--white); }
.fleet .st-wire { stroke: var(--foam); stroke-opacity: 0.6; stroke-width: 1.5; stroke-linecap: round; transition: stroke-opacity 0.4s ease; }
.fleet .st-wire.is-spec { stroke: var(--white); stroke-opacity: 1; stroke-width: 2.5; }
.fleet .st-wire.is-pair { stroke-opacity: 1; }

/* the example: one account → exactly one phone */
.fleet .st-link { stroke: var(--white); stroke-width: 2.5; stroke-linecap: round; }
.fleet .st-pill rect { fill: var(--white); }
.fleet .st-pill text {
  font-family: var(--font-mono);
  font-size: 0.7812rem;
  font-weight: 500;
  text-anchor: middle;
  fill: var(--abyss);
}

/* browser satellite on a dotted control line */
.fleet .st-ctl { fill: none; stroke: var(--white); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 0.1 7.5; }
.fleet .st-svg.is-live .st-ctl { animation: fleet-march 1.5s linear infinite; }
.fleet .br-body { fill: var(--white); }
.fleet .br-bar { stroke: var(--navy); stroke-opacity: 0.2; stroke-width: 1.5; }
.fleet .br-dot { fill: var(--navy); fill-opacity: 0.36; }
.fleet .br-tile { fill: var(--flood); }
@keyframes fleet-march { to { stroke-dashoffset: -7.6; } }

/* leaders and (stacked layouts only) numbered badges */
.fleet .st-lead { stroke: var(--foam); stroke-opacity: 0.55; stroke-width: 2; stroke-linecap: round; }
.fleet .st-lead-dot { fill: var(--foam); }
.fleet .st-badge { display: none; }
.fleet .st-badge circle { fill: var(--bg); stroke: var(--foam); stroke-width: 1.5; }
.fleet .st-badge text {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 650;
  text-anchor: middle;
  fill: var(--fg);
}

/* cards: the seven device facts, once each */
.fleet .stack-cards { margin: 0; padding: 0; list-style: none; }
.fleet .stack-k {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  font-size: 0.8438rem;
  font-weight: 600;
  line-height: 1.25rem;
  color: var(--fg-3);
}
.fleet .stack-n {
  display: none;
  flex: none;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--foam);
  font-size: 0.7812rem;
  font-weight: 650;
  line-height: 1;
  color: var(--fg);
}
.fleet .stack-n--i { padding: 0.2812rem; stroke-width: 2; }
.fleet .stack-t {
  margin-top: 0.375rem;
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(1.25rem, 1.75vw, 1.5625rem);
  letter-spacing: -0.02em;
  line-height: 1.16;
  color: var(--fg);
  text-wrap: balance;
}
.fleet .stack-d {
  margin-top: 0.375rem;
  max-width: 38ch;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--fg-2);
  text-wrap: pretty;
}
.fleet .stack-d .t-mono { font-size: 0.8125rem; color: var(--fg); white-space: nowrap; }

/* Wide: cards hang off the leaders, right of the stack; the statement sits above them */
@media (min-width: 1280px) {
  .fleet .stack-art { width: 57%; }
  .fleet .fleet-say {
    position: absolute;
    z-index: 1;
    top: 0;
    left: calc(57% + 1.125rem);
    right: 0;
  }
  .fleet .stack-card {
    position: absolute;
    left: calc(57% + 1.125rem);
    right: 0;
    top: calc(var(--y) * 1%);
    margin-top: -0.625rem;
  }
  .fleet .stack-card--ctl {
    left: 0;
    right: auto;
    width: calc(57% * var(--w) / 100);
  }
  .fleet .stack-card--ctl .stack-t { font-size: clamp(1.1875rem, 1.5vw, 1.375rem); }
  .fleet .stack-card--ctl .stack-d { max-width: 22ch; }
}

/* Stacked (tablet and narrow laptop): figure, then numbered cards */
@media (max-width: 1279.98px) {
  .fleet .fleet-say { max-width: 30ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
  .fleet .stack-art { max-width: min(53.75rem, 62svh * 840 / 724); margin-inline: auto; }
  .fleet .st-badge { display: block; }
  .fleet .stack-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.625rem, 3.6vw, 2.5rem) var(--fl-gap);
    margin-top: clamp(1.75rem, 4vw, 2.75rem);
  }
  .fleet .stack-n { display: grid; }
  .fleet .stack-t { margin-top: 0.625rem; }
}

/* ---------- Figure furniture (shared) ---------- */

.fleet .fig-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem 1.5rem;
  margin-top: clamp(1.125rem, 2vw, 1.625rem);
}
.fleet .fig-cap { display: block; max-width: 74ch; line-height: 1.45; text-wrap: pretty; }

.fleet .fig-pause {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  color: var(--fg);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  transition: box-shadow var(--dur-1) ease, background-color var(--dur-1) ease, transform var(--dur-1) ease;
}
.fleet .fig-pause:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.fleet .fig-pause:active { transform: scale(0.94); }
.fleet .fig-pause:focus-visible { border-radius: 50%; }
.fleet .fig-pause .i { width: 0.875rem; height: 0.875rem; fill: currentColor; stroke-width: 0; }
.fleet .fig-pause .i-play { display: none; margin-left: 2px; }
.fleet .fig-pause[aria-pressed="true"] .i-play { display: block; }
.fleet .fig-pause[aria-pressed="true"] .i-pause { display: none; }
.fleet .fig-pause[hidden] { display: none; }
html:not(.js) .fleet .fig-pause { display: none; }

.fleet .fleet-block { margin-top: clamp(4rem, 7vw, 6rem); }

/* ---------- 1b · one phone (devices agent): the copy, then the real phone-page recording ----------
   A 16:10 window (the whole control page); the copy sits on the left, the wall below swaps sides. */

.fleet .fleet-one {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--fl-gap);
  align-items: center;
}
.fleet .fleet-one-copy { grid-column: 1 / span 4; display: grid; row-gap: 0.75rem; }
.fleet .fleet-one .fleet-p { max-width: 36ch; }
.fleet .fleet-one-clip { grid-column: 5 / -1; }

/* ---------- 2 · the phone wall (phase B): the wall clip, with the checks beside it ---------- */

.fleet .fleet-wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--fl-gap);
  align-items: center;
}
.fleet .fleet-wall-clip { grid-column: 1 / span 8; }
.fleet .fleet-wall-copy { grid-column: 9 / -1; display: grid; row-gap: clamp(2rem, 3.6vw, 3rem); }
.fleet .fleet-wall-item { display: grid; row-gap: 0.75rem; }
.fleet .fleet-wall-item + .fleet-wall-item { padding-top: clamp(2rem, 3.6vw, 3rem); box-shadow: inset 0 1px 0 var(--line); }
.fleet .fleet-wall .fleet-p { max-width: 36ch; }

/* ---------- 3 · many feeds (int1): five example accounts, five phones, each its own feed ---------- */

.fleet .fleet-feeds { margin-top: clamp(3.5rem, 6vw, 5rem); }
.fleet .fleet-feeds .feed-wall,
.fleet .fleet-feeds .feed-wall-foot { max-width: 62rem; margin-inline: auto; }

/* ---------- Tablet ---------- */

@media (max-width: 1279.98px) {
  .fleet .fleet-wall-clip { grid-column: 1 / span 7; }
  .fleet .fleet-wall-copy { grid-column: 8 / -1; }
  .fleet .fleet-one-copy { grid-column: 1 / span 5; }
  .fleet .fleet-one-clip { grid-column: 6 / -1; }
}
@media (max-width: 900px) {
  .fleet .fleet-one-copy,
  .fleet .fleet-one-clip { grid-column: 1 / -1; }
  .fleet .fleet-one-clip { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
  .fleet .fleet-wall-clip { grid-column: 1 / -1; }
  .fleet .fleet-wall-copy { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--fl-gap); margin-top: clamp(2rem, 4vw, 2.75rem); }
  .fleet .fleet-wall-item + .fleet-wall-item { padding-top: 0; box-shadow: none; }
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .fleet { --fl-gap: 1rem; }

  .fleet .st-iso { display: none; }
  .fleet .st-flat { display: block; }
  .fleet .stack-art { max-width: 27.5rem; }
  .fleet .stack-cards { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; }
  .fleet .stack-t { font-size: 1.3125rem; }
  .fleet .st-at { font-size: 0.8125rem; fill-opacity: 0.8; }
  .fleet .st-pill text { font-size: 0.75rem; }
  .fleet .st-badge text { font-size: 0.75rem; }
  .fleet .st-ctl { stroke-dasharray: 0.1 6.4; }
  .fleet .st-ph .ph-face { stroke: var(--st-edge); stroke-width: 1.5; }
  .fleet .st-ph.is-spec .ph-face { stroke: var(--white); }


  .fleet .fleet-wall-copy { grid-template-columns: minmax(0, 1fr); row-gap: 2rem; }

  .fleet .fleet-one-clip { margin-top: clamp(1.75rem, 6vw, 2.25rem); }
}

@media (prefers-reduced-motion: reduce) {
  .fleet .st-svg.is-live .st-ctl { animation: none; }
}
