/* Browser Extension (stub) — a "coming in v2" splash, not a doc page.
   The whole page is one centered teaser: an SVG scene (browser window → a
   knowledge graph flowing into a docked extension panel) crowned by a display
   headline and ambient motion — so opening the stub reads as an
   invitation, not a placeholder list. Bespoke to this one page.
   Loaded by modules/extension.html on top of module.css.
   Placement convention: a stub's bespoke visuals live in modules/<stub>.css. §Styling */

/* ── Stage — centered splash, atmospheric backdrop ── */
.ext-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  min-height: calc(100vh - 9rem);
  padding: 1rem 0 3rem;
  background:
    radial-gradient(60% 50% at 50% 36%, var(--tint-15), transparent 70%),
    radial-gradient(40% 40% at 78% 22%, var(--tint-8), transparent 70%);
}

/* ── The scene ── */
.ext-art-wrap {
  width: 100%;
  max-width: 600px;
  margin: 0.2rem 0 1.4rem;
}

.ext-art {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* window shell */
.ext-art__win {
  fill: var(--paper);
  stroke: var(--border);
  stroke-width: 1.5;
}
.ext-art__divider {
  stroke: var(--border);
  stroke-width: 1.5;
}
.ext-art__tdot {
  fill: var(--dot);
}
.ext-art__url {
  fill: var(--s2-pale);
}

/* knowledge graph */
.ext-art__edge {
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0.3;
}
.ext-art__node {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 2;
}
.ext-art__node--hub {
  fill: var(--accent);
}

/* extension side panel */
.ext-art__panel {
  fill: var(--tint-6);
  stroke: var(--tint-25);
  stroke-width: 1.5;
}
.ext-art__piece {
  fill: var(--accent);
}
.ext-art__tag {
  fill: var(--accent);
  opacity: 0.65;
}
.ext-art__line {
  fill: var(--text-muted);
  opacity: 0.4;
}
.ext-art__bubble {
  fill: var(--accent);
}
.ext-art__bubble-line {
  fill: #fff;
}
.ext-art__bubble-line--soft {
  opacity: 0.55;
}
.ext-art__input {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
}
.ext-art__send {
  fill: var(--accent);
  opacity: 0.7;
}

/* the flow — knowledge feeding the answer */
.ext-art__flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 5 7;
  animation: ext-march 1.1s linear infinite;
}

/* ambient sparks around the window */
.ext-art__spark {
  fill: var(--accent);
}

/* node breathing + spark twinkle */
.ext-nodes circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: ext-pulse 3.4s ease-in-out infinite;
}
.ext-nodes circle:nth-child(2) {
  animation-delay: 0.6s;
}
.ext-nodes circle:nth-child(3) {
  animation-delay: 1.2s;
}
.ext-nodes circle:nth-child(4) {
  animation-delay: 0.4s;
}
.ext-nodes circle:nth-child(5) {
  animation-delay: 1.7s;
}
.ext-nodes circle:nth-child(6) {
  animation-delay: 0.9s;
}

.ext-sparks circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: ext-twinkle 4s ease-in-out infinite;
}
.ext-sparks circle:nth-child(2) {
  animation-delay: 1.3s;
}
.ext-sparks circle:nth-child(3) {
  animation-delay: 0.5s;
}
.ext-sparks circle:nth-child(4) {
  animation-delay: 2.1s;
}
.ext-sparks circle:nth-child(5) {
  animation-delay: 0.9s;
}
.ext-sparks circle:nth-child(6) {
  animation-delay: 1.7s;
}
.ext-sparks circle:nth-child(7) {
  animation-delay: 2.6s;
}

/* ── Headline & supporting copy ── */
.ext-title {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 16ch;
  margin: 0;
}

.ext-sub {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 44ch;
  margin: 0.9rem 0 0;
}

.ext-foot {
  margin-top: 2.2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Entrance — staggered rise on load ── */
.ext-stage > * {
  animation: ext-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.ext-art-wrap {
  animation-delay: 0.15s;
}
.ext-title {
  animation-delay: 0.3s;
}
.ext-sub {
  animation-delay: 0.42s;
}
.ext-foot {
  animation-delay: 0.66s;
}

@keyframes ext-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes ext-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.14);
    opacity: 1;
  }
}
@keyframes ext-march {
  to {
    stroke-dashoffset: -24;
  }
}
@keyframes ext-twinkle {
  0%,
  100% {
    opacity: 0.18;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ext-stage > *,
  .ext-nodes circle,
  .ext-sparks circle,
  .ext-art__flow {
    animation: none;
  }
  .ext-sparks circle {
    opacity: 0.5;
  }
}
