/* The home is removed from rendering until handoff: its original CSS animations
   and JS acquisition start together, rather than running behind the intro. */
body.is-link-intro { overflow: hidden; }
body.is-link-intro #home-interface { display: none; }
.link-intro[hidden] { display: none; }
.link-intro {
  --energy: 0;
  --color-charge: 0;
  --signal-violet: #8b7cff;
  --signal-lavender: #a99cff;
  --signal-highlight: #d8d2ff;
  --signal-core: #f4f1ff;
  position: fixed;
  z-index: 20;
  inset: 0;
  overflow: hidden;
  background: #000;
  isolation: isolate;
  transition: opacity 260ms ease;
}
.link-network { position: absolute; width: 100%; height: 100%; }
.link-cables path {
  stroke: #6c6985;
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
  opacity: .3;
}
.link-cables path:nth-child(3n) { opacity: .14; }
.link-cables path:nth-child(4n) { opacity: .22; }
.link-energy { fill: none; stroke-linecap: butt; }
.link-energy-path {
  stroke: color-mix(in srgb, #7066a8 calc(var(--color-charge) * 100%), #c3b8da);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.link-impulses { fill: none; stroke-linecap: butt; }
.link-impulse {
  stroke: var(--signal-core);
  stroke-width: 1.65;
  vector-effect: non-scaling-stroke;
}
.link-impulse-wake {
  stroke: var(--signal-violet);
  stroke-width: 2.6;
  vector-effect: non-scaling-stroke;
  opacity: .65;
  /* This path contains only the local 72px wake, never the entire cable. */
  filter: drop-shadow(0 0 4px var(--signal-violet));
}
.link-assembly {
  position: absolute;
  top: 48.8889%;
  left: 50%;
  width: 286px;
  height: 294px;
  margin: -110px 0 0 -143px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c4c2cb;
  text-align: center;
  pointer-events: none;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.link-command { display: block; position: relative; margin: 37px auto 0; }
.link-control {
  position: absolute; inset: -3px 0 auto; width: 100%; height: 44px;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  pointer-events: auto; touch-action: none;
}
.link-control:focus-visible { outline: none; }
.link-control:focus-visible + .link-prompt { color: #dedbe3; --bracket-shift: 8px; --bracket-color: #b0a2d8; }
@media (hover: hover) and (pointer: fine) {
  .link-control:hover + .link-prompt { color: #dedbe3; --bracket-shift: 8px; --bracket-color: #b0a2d8; }
}
.link-intro:is([data-state="wake"], [data-state="charge"], [data-state="synchronize"], [data-state="align"], [data-state="lock"]) .link-prompt {
  color: #dedbe3; --bracket-shift: 12px; --bracket-color: var(--violet);
}
.link-node { display: block; width: 220px; height: 220px; margin: 0 auto; overflow: visible; }
.link-node-dark { fill: #000; }
.link-node-rim { fill: none; stroke: #aaa7ba; stroke-width: .8; opacity: .58; }
.node-fragments {
  fill: none; stroke: #65636e; stroke-width: .65;
  transform-origin: 120px 120px;
}
.node-calibration, .node-data-ring, .node-energy-sectors { transform-origin: 120px 120px; }
.link-intro[data-state="blackout"] .link-node { opacity: 0; }
.node-fragment-heavy { stroke-width: 2; opacity: calc(.12 + var(--energy) * .5); }
.node-calibration { fill: none; stroke: #b0acbb; stroke-width: .7; }
.node-tick-group--one { opacity: calc(.04 + var(--ticks-one, 0) * .58); }
.node-tick-group--two { opacity: calc(.02 + var(--ticks-two, 0) * .52); }
.node-tick-group--three { opacity: calc(.02 + var(--ticks-three, 0) * .66); }
.node-tick-group--four { opacity: calc(.02 + var(--ticks-four, 0) * .4); }
.node-data-ring { fill: none; stroke: #a79bc7; stroke-width: 1; opacity: var(--data-reveal, 0); }
.node-data-gap { stroke: #000; stroke-width: 4; }
.node-energy-sectors { fill: none; stroke: var(--signal-violet); }
.node-sector {
  transform-origin: 120px 120px;
  stroke-width: 2.4; stroke-dasharray: 100 100;
  filter: drop-shadow(0 0 2px var(--signal-violet));
}
.node-sector--one { opacity: var(--sector-one, 0); stroke-dashoffset: calc(100 - var(--sector-one, 0) * 100); }
.node-sector--two { opacity: var(--sector-two, 0); stroke-dashoffset: calc(100 - var(--sector-two, 0) * 100); stroke: var(--signal-lavender); stroke-width: 3; }
.node-sector--three { opacity: var(--sector-three, 0); stroke-dashoffset: calc(100 - var(--sector-three, 0) * 100); stroke-width: 1.5; }
.node-markers { fill: #a19aa9; stroke: #a19aa9; stroke-width: .65; opacity: calc(.03 + var(--markers-reveal, 0) * .55); }
.node-core-trace { fill: none; stroke: #7f748e; stroke-width: .65; opacity: calc(.04 + var(--energy) * .5); }
.link-node-ring {
  fill: none;
  stroke: #c2bbc9;
  stroke-width: 1.65;
  opacity: var(--ring-one, 0);
  transform-origin: 120px 120px;
}
.link-node-ring--two { opacity: var(--ring-two, 0); }
.node-sync-end { stroke-width: .75; }
.link-node-point {
  fill: var(--signal-core);
  opacity: calc(.35 + var(--energy) * .65);
  filter: drop-shadow(0 0 5px var(--signal-violet));
}
.link-prompt {
  position: relative;
  display: block;
  margin: 0 auto;
  width: 270px;
  padding: 10px 0;
  font-size: 12px;
  letter-spacing: .27em;
  white-space: nowrap;
  transition: color 180ms ease;
}
.link-prompt::before, .link-prompt::after {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 5px;
  width: 8px;
  border-top: 1px solid var(--bracket-color, #65646c);
  border-bottom: 1px solid var(--bracket-color, #65646c);
  transition: transform 180ms ease, border-color 180ms ease;
}
.link-prompt::before { left: 0; border-left: 1px solid var(--bracket-color, #65646c); transform: translateX(var(--bracket-shift, 0px)); }
.link-prompt::after { right: 0; border-right: 1px solid var(--bracket-color, #65646c); transform: translateX(calc(-1 * var(--bracket-shift, 0px))); }
.link-progress { display: block; height: 15px; margin-top: 8px; color: #85808f; font-size: 9px; letter-spacing: .16em; }
.link-console {
  position: absolute; top: calc(100% + 28px); left: 50%;
  width: 230px; height: 32px; transform: translateX(-50%);
  text-align: left; font-size: 9px; line-height: 14px; letter-spacing: .06em;
  color: #77747f; pointer-events: none; opacity: 0;
  transition: opacity 160ms ease;
}
.link-console-previous, .link-console-active { position: absolute; left: 0; white-space: nowrap; }
.link-console-previous { top: 0; padding-left: 2ch; }
.link-console-active { top: 18px; }
.link-console-active::before { content: '> '; color: #9b8fc8; }
.link-console-active::after { content: '_'; opacity: .65; }
.link-intro:is([data-state="wake"], [data-state="charge"], [data-state="synchronize"], [data-state="align"], [data-state="lock"]) .link-console { opacity: 1; }
.link-intro:is([data-state="departing"], [data-state="blackout"]) .link-console { opacity: 0; transition-duration: 650ms; }
.link-corner { position: absolute; z-index: 1; pointer-events: none; }
.link-corner:where(:not(.gs-system-id)) { color: #89888f; font-size: 9px; line-height: 1.45; letter-spacing: .18em; }
.link-corner--address {
  top: var(--gs-location-top); left: var(--gs-location-left);
}
.link-location-text {
  display: inline-block; overflow: hidden; width: 0;
  /* One monospaced glyph plus its tracking per step: 14 × 60ms. */
  animation: link-location-write 840ms steps(14, end) both;
}
.link-corner--address::after {
  content: '_';
  animation: gs-system-cursor-blink var(--gs-system-cursor-cycle) steps(1, end) 840ms infinite;
}
@keyframes link-location-write {
  to { width: calc(14ch + 14 * .17em); }
}
.link-corner--signature {
  bottom: 6px; right: 8px;
  display: inline-flex; align-items: center; gap: 12px;
  color: #505058; font-size: 9.5px; line-height: 1; letter-spacing: .045em; white-space: nowrap;
}
/* Persist the fade into blackout: changing state must never restore paint.
   Keep the black node mask opaque while its locked details disappear. */
.link-intro:is([data-state="departing"], [data-state="blackout"]) .link-cables { opacity: 0; transition: opacity 700ms ease; }
.link-intro:is([data-state="departing"], [data-state="blackout"]) .link-node > :not(.link-node-dark),
.link-intro:is([data-state="departing"], [data-state="blackout"]) .link-corner,
.link-intro:is([data-state="departing"], [data-state="blackout"]) .link-prompt { opacity: 0; transition: opacity 650ms ease; }
.link-intro[data-state="blackout"] { opacity: 0; }
@media (max-width: 640px) {
  /* Crop the network, keep the node touch sized rather than scaling the scene. */
  .link-assembly { width: 260px; height: 270px; margin: -90px 0 0 -130px; }
  .link-node { width: 180px; height: 180px; }
  .link-command { margin-top: 32px; }
  .link-prompt { width: 250px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .link-prompt, .link-prompt::before, .link-prompt::after { transition: none; }
  .link-console-previous { transform: none !important; }
  .link-location-text { width: auto; animation: none; }
  .link-corner--address::after { animation: none; }
  .link-energy, .link-impulses { display: none; }
  .link-node-ring { transform: none !important; filter: none; }
  .node-fragments, .node-calibration, .node-data-ring, .node-energy-sectors { transform: none !important; }
  .node-sector { transform: none !important; }
}
