/* TabNorth — polar night chart.
   Ground #04121F, brand navy panels #082741, one accent: ice #82CFFF.
   Display: Archivo (expanded, heavy). Utility: Spline Sans Mono. */

:root {
  --night: #04121F;
  --navy: #082741;
  --navy-2: #0B3252;
  --line: rgba(130, 207, 255, 0.14);
  --line-strong: rgba(130, 207, 255, 0.28);
  --ice: #82cfff;
  --ice-bright: #c4e8ff;
  --text: #eaf6ff;
  --muted: #93aec4;
  --aurora: #6fe7c8;

  /* Chrome tab-group colors (dark theme) */
  --g-blue: #8ab4f8;
  --g-yellow: #fdd663;
  --g-purple: #d7aefb;
  --g-red: #f28b82;
  --g-green: #81c995;
  --g-cyan: #78d9ec;
  --g-orange: #fcad70;
  --g-grey: #dadce0;

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 14px;
  --container: 1120px;

  --tab-active: #143f5e;
  /* Motion (Kowalski/easings.co): quint for UI, expo for hero entrances */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--night);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ice); color: var(--navy); }

:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; border-radius: 4px; }

img, svg { display: block; max-width: 100%; }

a { color: var(--ice); text-decoration: none; }
a:hover { color: var(--ice-bright); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--sans);
  font-variation-settings: "wdth" 116;
  font-weight: 780;
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.22rem; line-height: 1.25; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: none;
  color: var(--ice);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--ice); opacity: 0.6; }

.lede { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.18rem); max-width: 56ch; }

kbd {
  font-family: var(--mono);
  font-size: 0.82em;
  padding: 0.18em 0.55em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--ice-bright);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 640;
  font-size: 0.98rem;
  padding: 13px 24px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--ice);
  color: var(--navy);
}
.btn-primary:hover {
  background: var(--ice-bright);
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(130, 207, 255, 0.25);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ice-bright);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ice); color: var(--ice-bright); }
.btn-sm { padding: 9px 17px; font-size: 0.9rem; border-radius: 9px; }
.btn:active { transform: scale(0.97); transition-duration: 0.12s; }

/* Sheen sweep across the primary button on hover */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 55%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-130%) skewX(-18deg);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn-primary:hover::before { transform: translateX(300%) skewX(-18deg); transition: transform 0.55s ease; }
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 18, 31, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 26px; width: auto; }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin-right: auto;
  font-size: 0.94rem;
}
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav > .nav-inner > .btn { margin-left: auto; }
.nav-links + .btn { margin-left: 0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 92px 0 40px;
  overflow: hidden;
}

/* Aurora — two blurred gradient ribbons drifting behind the star field */
.hero-aurora { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-aurora::before,
.hero-aurora::after {
  content: "";
  position: absolute;
  will-change: transform;
}
.hero-aurora::before {
  inset: -25% -20% auto;
  height: 85%;
  background: radial-gradient(55% 45% at 26% 34%, rgba(130, 207, 255, 0.6), transparent 72%);
  filter: blur(70px);
  opacity: 0.22;
  mix-blend-mode: screen;
  animation: aurora-a 26s ease-in-out infinite alternate;
}
.hero-aurora::after {
  inset: -15% -20% auto;
  height: 95%;
  background:
    radial-gradient(50% 42% at 74% 22%, rgba(111, 231, 200, 0.55), transparent 72%),
    radial-gradient(42% 34% at 48% 44%, rgba(138, 180, 248, 0.5), transparent 72%);
  filter: blur(90px);
  opacity: 0.16;
  mix-blend-mode: screen;
  animation: aurora-b 34s ease-in-out -8s infinite alternate;
}
@keyframes aurora-a {
  from { transform: translate3d(-9%, 0, 0) rotate(-6deg); opacity: 0.15; }
  to { transform: translate3d(9%, 3%, 0) rotate(4deg); opacity: 0.27; }
}
@keyframes aurora-b {
  from { transform: translate3d(6%, -3%, 0) scale(1); opacity: 0.1; }
  to { transform: translate3d(-6%, 4%, 0) scale(1.1); opacity: 0.21; }
}

/* Shooting stars — brief streaks on long cycles, mostly waiting */
.shoot {
  position: absolute;
  width: 110px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(196, 232, 255, 0.9), rgba(130, 207, 255, 0));
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.shoot-1 { top: 16%; left: 62%; animation: shoot-1 15s linear 4s infinite; }
@keyframes shoot-1 {
  0% { opacity: 0; transform: rotate(206deg) translateX(0); }
  2.5% { opacity: 0.55; }
  9% { opacity: 0; transform: rotate(206deg) translateX(340px); }
  100% { opacity: 0; transform: rotate(206deg) translateX(340px); }
}

/* Load choreography — atmosphere, then copy word by word, then the demo.
   Hidden states only exist when JS runs AND motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-aurora { animation: fade-in 1.8s ease 0.05s both; }
  .js .sky { animation: fade-in 1.6s ease 0.3s both; }
  .js .astro { animation: fade-in 2.2s ease 0.2s both; }
  .js .hero-seq { animation: rise-in 0.6s var(--ease-out-expo) var(--d, 0s) both; }
  .js .hero h1 .w {
    display: inline-block;
    animation: word-in 0.65s var(--ease-out-expo) calc(0.2s + var(--i) * 80ms) both;
  }
  .js .demo { animation: demo-in 0.9s var(--ease-out-expo) 0.7s both; }
  .js .btn-hero { animation: cta-pulse 1s ease 1.7s 1; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes word-in {
  from { opacity: 0; transform: translateY(0.45em); filter: blur(6px); }
}
@keyframes demo-in {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
}
@keyframes cta-pulse {
  from { box-shadow: 0 0 0 0 rgba(130, 207, 255, 0.45); }
  to { box-shadow: 0 0 0 20px rgba(130, 207, 255, 0); }
}

/* Astrolabe — the hero's centerpiece. Hairline rings turning on very long
   cycles, a softly pulsing north star at apex, gentle pointer drift via JS. */
.astro {
  position: absolute;
  top: -170px;
  left: 50%;
  width: min(1060px, 150vw);
  aspect-ratio: 1;
  margin-left: calc(min(1060px, 150vw) / -2);
  pointer-events: none;
  color: var(--ice);
  transition: transform 0.9s var(--ease-out);
  will-change: transform;
}
.astro-ticks,
.astro-dash { transform-origin: 600px 600px; }
.astro-ticks { animation: astro-turn 180s linear infinite; }
.astro-dash { animation: astro-turn 260s linear infinite reverse; }
@keyframes astro-turn { to { transform: rotate(360deg); } }
.astro-star { transform-origin: 600px 270px; animation: star-breathe 6s ease-in-out infinite; }
@keyframes star-breathe {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* Baked grain (feTurbulence data-URI) — static texture, no live filters */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.05;
}

.sky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1200px; /* fixed: hero content changes must never rescale the stars */
  pointer-events: none;
  color: var(--ice);
}
.sky .stars { animation: sky-drift 90s ease-in-out infinite alternate; }
@keyframes sky-drift {
  from { transform: translateX(-9px); }
  to { transform: translateX(9px); }
}
.sky .tw { animation: twinkle 5.5s ease-in-out infinite; }
.sky .tw2 { animation-delay: 1.6s; }
.sky .tw3 { animation-delay: 3.1s; }
.sky .tw4 { animation-delay: 2.3s; animation-duration: 3.4s; }
.sky .tw5 { animation-delay: 0.7s; animation-duration: 6.2s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}
.hero-inner .eyebrow { justify-content: center; }
.hero-inner .eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--ice); opacity: 0.6; }
.hero h1 { max-width: 17ch; }
.hero .lede { margin-inline: auto; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-note {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- Demo ---------- */

.demo {
  position: relative;
  margin: 56px auto 0;
  max-width: 980px;
}
.demo::before {
  content: "";
  position: absolute;
  inset: -80px -60px auto;
  height: 340px;
  background: radial-gradient(closest-side, rgba(130, 207, 255, 0.13), rgba(111, 231, 200, 0.05) 60%, transparent);
  pointer-events: none;
}

/* Story cards — icon, headline, subtitle, and a per-card progress bar */
.demo-tabs { display: flex; gap: 10px; margin-bottom: 14px; align-items: stretch; }
.demo-tab {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  text-align: left;
  background: rgba(8, 39, 65, 0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 13px 19px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.demo-tab svg { flex-shrink: 0; color: var(--ice); opacity: 0.85; margin-bottom: 2px; }
.demo-tab .dt-label {
  font-family: var(--sans);
  font-weight: 640;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.demo-tab .dt-sub {
  font-size: 0.66rem;
  line-height: 1.4;
  color: var(--muted);
}
.demo-tab:hover { border-color: var(--line-strong); }
.demo-tab.is-active { border-color: var(--line-strong); background: rgba(11, 50, 82, 0.9); }
.demo-tab .dt-bar {
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 9px;
  height: 2.5px;
  border-radius: 2px;
  background: rgba(130, 207, 255, 0.15);
  overflow: hidden;
}
.demo-tab .dt-bar b {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--ice);
  transform: scaleX(0);
  transform-origin: left;
  /* No CSS transition here: transitions racing the WAAPI fills' cancels can
     strand a bar at a stale computed value. The restart sweep eases via a
     one-off WAAPI animation in scene4 instead. */
}
.demo-tab.is-done .dt-bar b { transform: scaleX(1); opacity: 0.4; }

/* Connector lines from group cards to their detail blocks (real UI has these) */
.dw-connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}
.dw-connectors path { fill: none; stroke-width: 1.5; opacity: 0.55; }


/* Quick-switcher overlay (scene 3) */
.dw-qs {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 72px;
  background: rgba(4, 18, 31, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.demo.is-qs .dw-qs { opacity: 1; }
.dw-qs-panel {
  width: min(400px, 76%);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #061d33;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.demo.is-qs .dw-qs-panel { animation: card-in 0.35s var(--ease-out) both; }
.dw-qs-input {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
}
.dw-qs-input svg { color: var(--muted); flex-shrink: 0; }
.dw-qs .caret {
  width: 1.5px;
  height: 14px;
  margin-left: -7px;
  background: var(--ice);
  animation: caret-blink 1.1s step-end infinite;
}
.dw-qs-results { list-style: none; padding: 6px; }
.dw-qs-results li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.dw-qs-results li .fav { flex-shrink: 0; width: 12px; height: 12px; display: grid; place-items: center; color: var(--c, var(--muted)); }
.dw-qs-results li.is-active { background: rgba(130, 207, 255, 0.12); color: var(--text); }
.dw-qs-results li.is-active em { font-style: normal; margin-left: auto; font-family: var(--mono); font-size: 0.66rem; color: var(--ice); }
.dw-qs-results .dw-qs-g { font-family: var(--mono); font-size: 0.7rem; }
.dw-qs-results .chip { width: 8px; height: 8px; border-radius: 3px; background: var(--gc); flex-shrink: 0; }
.dw-qs mark { background: none; color: var(--ice); font-weight: 640; }

/* Wiki lookalike page — the "switched tab" destination (scene 3) */
.dw-wiki {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #f6f7f9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.demo.is-wiki .dw-wiki { opacity: 1; }
.dw-wiki-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-bottom: 1px solid #d9dee3;
  background: #ffffff;
}
.dw-wiki-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.85rem;
  width: 24px;
  height: 24px;
  border: 1px solid #c8cdd2;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: #1a1a1a;
}
.dw-wiki-name { font-family: Georgia, "Times New Roman", serif; font-size: 0.95rem; color: #1a1a1a; }
.dw-wiki-searchbar { margin-left: auto; width: 170px; height: 22px; border: 1px solid #c8cdd2; border-radius: 4px; background: #fff; }
.dw-wiki-body { padding: 18px 26px; }
.dw-wiki-body h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-variation-settings: normal;
  font-weight: 400;
  font-size: 1.5rem;
  color: #1a1a1a;
  border-bottom: 1px solid #d9dee3;
  padding-bottom: 6px;
  letter-spacing: 0;
}
.dw-wiki-sub { font-size: 0.7rem; color: #54595d; font-style: italic; margin: 6px 0 16px; }
.dw-wiki-cols { display: grid; grid-template-columns: 1fr 150px; gap: 20px; align-items: start; }
.dw-wiki .ln { display: block; height: 8px; border-radius: 4px; background: #e2e6ea; margin-bottom: 9px; }
.dw-wiki .ln.gap { margin-top: 18px; }
.dw-wiki .w60 { width: 60%; } .dw-wiki .w70 { width: 70%; } .dw-wiki .w75 { width: 75%; }
.dw-wiki .w80 { width: 80%; } .dw-wiki .w85 { width: 85%; } .dw-wiki .w88 { width: 88%; }
.dw-wiki .w90 { width: 90%; } .dw-wiki .w92 { width: 92%; } .dw-wiki .w95 { width: 95%; }
.dw-wiki .w97 { width: 97%; }
.dw-wiki-box { border: 1px solid #d9dee3; background: #f8f9fa; padding: 10px; border-radius: 2px; }
.dw-wiki-img { display: block; height: 76px; border-radius: 2px; background: linear-gradient(160deg, #0b2b46, #14705f 55%, #6fe7c8); margin-bottom: 10px; }
/* the wiki tab lights up in the strip while reading */
.demo.is-wiki .seg-read i:nth-child(3) { background: var(--tab-active); }

/* Mail lookalike page — the second "switched tab" destination */
.dw-mail {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #eef1f5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.demo.is-mail .dw-mail { opacity: 1; }
.dw-mail-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff;
  border-bottom: 1px solid #dbe0e6;
  font-weight: 640;
  font-size: 0.85rem;
  color: #22303c;
}
.dw-mail-cols { display: grid; grid-template-columns: 118px 1fr; min-height: 100%; }
.dw-mail-rail { padding: 12px 8px; border-right: 1px solid #dbe0e6; font-size: 0.7rem; color: #54606c; }
.dw-mail-rail .r { display: flex; justify-content: space-between; padding: 5px 9px; border-radius: 6px; }
.dw-mail-rail .r em { font-style: normal; }
.dw-mail-rail .r.on { background: #dce7fb; color: #1d3f8f; font-weight: 640; }
.dw-mail-list { background: #fff; }
.dw-mail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #e7ebf0;
  font-size: 0.72rem;
  color: #54606c;
  white-space: nowrap;
  overflow: hidden;
}
.dw-mail-row b { color: #22303c; font-weight: 480; flex-shrink: 0; width: 84px; overflow: hidden; text-overflow: ellipsis; }
.dw-mail-row.unread b { font-weight: 700; }
.dw-mail-row.unread span { color: #22303c; font-weight: 600; }
.dw-mail-row span { overflow: hidden; text-overflow: ellipsis; }
.dw-mail-row em { font-style: normal; margin-left: auto; font-size: 0.64rem; flex-shrink: 0; }
.dw-mail-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mc); flex-shrink: 0; }
/* the mail tab lights up in the strip while reading */
.demo.is-mail .seg-work i:nth-child(4) { background: var(--tab-active); }

/* Video-player lookalike ("YT") — the double-clicked tab's destination */
.dw-video {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #0f0f0f;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
}
.demo.is-video .dw-video { opacity: 1; }
.dw-yt-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 18px;
  background: #0f0f0f;
  border-bottom: 1px solid #272727;
}
.dw-yt-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: -0.02em;
  color: #f1f1f1;
}
.dw-yt-logo i {
  width: 24px;
  height: 17px;
  border-radius: 4px;
  background: #f00000;
  color: #fff;
  display: grid;
  place-items: center;
}
.dw-yt-search {
  flex: 0 1 300px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #303030;
  border-radius: 999px;
  padding: 5px 12px;
  color: #aaaaaa;
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
}
.dw-yt-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #82cfff, #6fe7c8);
  flex-shrink: 0;
}
.dw-yt-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 16px 24px;
}
.dw-video-stage { width: min(500px, 82%); }
.dw-video-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: linear-gradient(155deg, #071a2e, #0e5a4c 55%, #6fe7c8);
  display: grid;
  place-items: center;
}
.dw-video-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.75);
  color: #fff;
  display: grid;
  place-items: center;
  padding-left: 3px;
}
.dw-video-bar { height: 3px; margin-top: 8px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.dw-video-bar b { display: block; height: 100%; width: 36%; border-radius: inherit; background: #f00000; }
.dw-video-title { width: min(500px, 82%); font-size: 0.85rem; font-weight: 640; color: #f1f1f1; }
.dw-yt-channel {
  width: min(500px, 82%);
  display: flex;
  align-items: center;
  gap: 9px;
}
.dw-yt-ch-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0e5a4c;
  color: #eaf6ff;
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.dw-yt-ch-name { display: flex; flex-direction: column; font-size: 0.7rem; font-weight: 640; color: #f1f1f1; line-height: 1.3; }
.dw-yt-ch-name em { font-style: normal; font-family: var(--mono); font-size: 0.6rem; font-weight: 400; color: #aaaaaa; }
.dw-yt-sub {
  margin-left: auto;
  background: #f1f1f1;
  color: #0f0f0f;
  font-size: 0.66rem;
  font-weight: 640;
  border-radius: 999px;
  padding: 5px 12px;
}
/* the time-lapse tab lights up while watching */
.demo.is-video .seg-video i:nth-child(2) { background: var(--tab-active); }

/* "Want to go back?" prompt — fades in, out, then the keys appear */
.dw-ask {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.demo.is-ask .dw-ask { opacity: 1; }
.dw-ask span {
  background: var(--navy);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 640;
  color: var(--text);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

/* "double-click" callout riding next to the cursor */
.dw-dbl {
  position: absolute;
  z-index: 8;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--ice-bright);
  background: var(--navy);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 3px 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}
.dw-dbl.show { opacity: 1; }

/* Alt+O keypress overlay (scene 4) */
.dw-keys {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.demo.is-keys .dw-keys { opacity: 1; }
.dw-keys kbd[hidden] { display: none; }
.dw-keys kbd {
  font-size: 1.1rem;
  padding: 0.5em 0.85em;
  border-radius: 10px;
  border-color: var(--line-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

/* Fake cursor that "clicks" Organize before the sort plays */
.dw-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
  will-change: transform;
}
.click-ring {
  position: absolute;
  z-index: 4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--ice);
  opacity: 0;
  pointer-events: none;
}

.demo-window {
  position: relative;
  background: var(--navy);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.dw-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 0;
  background: #061d33;
}
.dw-dots { display: flex; gap: 7px; padding-bottom: 10px; }
.dw-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }

.dw-strip { position: relative; flex: 1; height: 34px; overflow: hidden; }
.strip-before, .strip-after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}
.strip-before .sl {
  flex: 1 1 40px;
  max-width: 110px;
  min-width: 22px;
  height: 26px;
  background: #0e2c47;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  padding-left: 9px;
  color: var(--c, var(--muted));
  overflow: hidden;
}
.strip-before .sl svg { flex-shrink: 0; opacity: 0.9; }
.strip-before .sl span {
  flex: 1;
  min-width: 0;
  margin-left: 6px;
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent 96%);
  mask-image: linear-gradient(90deg, #000 55%, transparent 96%);
}

/* The organizer's own pinned tab, far left in both strip states */
.strip-pin {
  flex: 0 0 30px;
  height: 26px;
  background: #0e2c47;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.strip-pin img { width: 11px; height: auto; }
.demo:not(.is-wiki):not(.is-mail):not(.is-video) .strip-pin { background: var(--tab-active); }
.strip-after { gap: 8px; }
.strip-after .seg {
  display: flex;
  align-items: flex-end;
  gap: 3px;
}
.strip-after .seg b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: #06202f;
  background: var(--gc);
  border-radius: 7px;
  padding: 3px 8px;
  margin-bottom: 5px;
  white-space: nowrap;
}
.strip-after .seg i {
  width: 30px;
  height: 26px;
  background: #0e2c47;
  border-radius: 8px 8px 0 0;
  border-bottom: 2.5px solid var(--gc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c, var(--muted));
}
.strip-after .seg i svg { opacity: 0.9; }
.demo:not(.is-open) .strip-after { opacity: 0; transform: translateY(6px); }
.demo.is-open .strip-before { opacity: 0; transform: translateY(-6px); }
.strip-after .seg { max-width: 300px; overflow: hidden; transition: max-width 0.5s var(--ease-out), opacity 0.3s ease; }
.demo.is-trip-closed .seg-trip { max-width: 0; opacity: 0; }

.dw-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  background: var(--tab-active);
  border-bottom: 1px solid rgba(4, 18, 31, 0.55);
}
.dw-nav-btns { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.dw-nav-btns .dim { opacity: 0.4; }
.dw-addr {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(4, 18, 31, 0.5);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
}
.dw-addr .dw-url {
  display: none;
  font-family: var(--mono);
  font-size: 0.64rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo:not(.is-wiki):not(.is-mail):not(.is-video) .u-home { display: block; }
.demo.is-wiki .u-wiki { display: block; }
.demo.is-mail .u-mail { display: block; }
.demo.is-video .u-video { display: block; }
.dw-nav-menu { display: flex; flex-direction: column; gap: 2.5px; padding: 0 2px; }
.dw-nav-menu i { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: 0.7; }

.dw-body {
  position: relative;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  background: #061a2d;
  height: 540px;
  overflow: hidden;
}

/* Left: Workspace pane (saved groups & folders) — context, not the show */
.dw-work {
  border-right: 1px solid var(--line);
  background: var(--navy);
  padding: 12px 8px 12px 6px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dw-work-title,
.dw-groups-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  padding: 2px 8px 8px;
}
.dw-lp { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dw-lp-body { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; min-width: 0; }
.dw-lp-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 6px;
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--text);
  white-space: nowrap;
  min-width: 0;
}
.dw-lp-row:hover { background: rgba(130, 207, 255, 0.06); }
.dw-lp-saved-head { margin-top: 9px; }
.dw-chev {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.dw-chev svg { transform: rotate(90deg); }
.dw-chev.empty { visibility: hidden; }
.dw-lp-ic { flex-shrink: 0; display: flex; color: var(--muted); }
.dw-lp-swatch {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin: 0 2px;
  border-radius: 3px;
  background: var(--gc, var(--muted));
}
.dw-lp-row .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.dw-lp-row em {
  flex-shrink: 0;
  font-style: normal;
  min-width: 14px;
  text-align: right;
  font-size: 0.62rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* Live groups appear once organized; unsaved names render italic + muted,
   exactly like .lp-group-unsaved in the real pane. */
.dw-lp-group { display: none; }
.demo.is-sorted .dw-lp-group { display: flex; animation: card-in 0.4s var(--ease-out) both; }
.demo.is-trip-closed .dw-lp-group[data-g="trip"] { display: none; }
.dw-lp-group .nm { font-style: italic; color: var(--muted); }
.demo.is-saved .dw-lp-group[data-g="trip"] { opacity: 0.75; }
.demo.is-saved .dw-lp-group[data-g="trip"] .nm { font-style: normal; color: var(--g-blue); }
/* Saved cloud groups: dimmed + blue, like the real saved-dim rows */
.dw-lp-row.saved { opacity: 0.75; }
.dw-lp-row.saved .nm { color: var(--g-blue); }
.dw-lp-row.dw-work-saved { display: none; }
.demo.is-saved .dw-lp-row.dw-work-saved { display: flex; animation: card-in 0.5s var(--ease-out) both; }

.dw-work-foot {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 6px 2px;
  color: var(--muted);
  opacity: 0.75;
  border-top: 1px solid var(--line);
}

/* Center: toolbar + a two-column content grid (tab list | group details),
   matching the real .scroll-content — columns, not a separate pane */
.dw-main { padding: 10px 12px; min-width: 0; }
.dw-content {
  display: grid;
  grid-template-columns: 1fr 0fr;
  column-gap: 0px;
  align-items: start;
  transition: grid-template-columns 0.55s var(--ease-out), column-gap 0.55s var(--ease-out);
}
.demo.is-open .dw-content { grid-template-columns: 1fr 1fr; column-gap: 16px; }
.dw-content.snap { transition: none !important; }
.dw-groupcol { min-width: 0; overflow: hidden; }
.demo.is-flying .dw-groupcol,
.demo.is-flying .dw-detail,
.demo.is-flying .dw-list { overflow: visible; }
.demo.is-flying .dw-row { position: relative; z-index: 6; }
.dw-toolbar { display: flex; align-items: center; gap: 8px; padding: 2px 2px 10px; }
.dw-count { font-family: var(--mono); font-size: 0.64rem; color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.dw-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.dw-search em {
  font-style: normal;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.58rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
}
.dw-organize {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-weight: 640;
  font-size: 0.72rem;
  color: var(--navy);
  background: var(--ice);
  border-radius: 8px;
  padding: 5px 11px;
  pointer-events: none;
  transition: background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

/* Site filter chips under the toolbar — the real organizer's #tag-row: one
   pill per host (favicon, host, count), pinned × clear chip while filtering. */
.dw-tagrow {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 2px 10px;
  overflow: hidden;
}
.dw-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 2.5px 8px;
  border-radius: 999px;
  background: rgba(130, 207, 255, 0.06);
  font-size: 0.6rem;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}
.dw-chip .fav {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--c, var(--muted));
  opacity: 0.95;
  transition: color 0.25s ease;
}
.dw-chip em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.54rem;
  color: var(--muted);
  transition: color 0.25s ease;
}
.dw-chip.active { background: var(--ice); color: var(--navy); font-weight: 640; }
.dw-chip.active .fav { color: var(--navy); }
.dw-chip.active em { color: rgba(8, 39, 65, 0.72); }
.dw-chip-clear {
  display: none;
  width: 17px;
  height: 17px;
  padding: 0;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  color: var(--muted);
}
.demo.is-filtered .dw-chip-clear { display: inline-flex; }
/* Trip's hosts leave the row with the group — counts stay honest. */
.demo.is-trip-closed .dw-tagrow [data-trip] { display: none; }

/* Active site filter (yt.com — one tab in Reading, one in Video) —
   non-matching rows drop out, groups with zero matches dim to look disabled
   (the organizer's .filtered-empty treatment). */
.demo.is-filtered .dw-detail-list .dw-row:not([data-h="yt"]) { display: none; }
.demo.is-filtered .dw-card:not([data-g="read"]):not([data-g="video"]),
.demo.is-filtered .dw-detail:not([data-g="read"]):not([data-g="video"]) {
  opacity: 0.35;
  transition: opacity 0.15s;
}
.demo.is-busy .dw-organize {
  background: var(--navy-2);
  color: var(--ice);
  animation: busy-pulse 1.1s ease-in-out infinite;
}
@keyframes busy-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(130, 207, 255, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(130, 207, 255, 0); }
}

.dw-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }

.dw-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(130, 207, 255, 0.05);
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}
.dw-row span { overflow: hidden; text-overflow: ellipsis; }
.dw-row { transition: background 0.35s ease; }
/* Matches the real organizer: persistent ice-bright outline on the last
   non-organizer tab, pulsing twice on arrival (.blink), then holding steady. */
.dw-row.last-active { outline: 1px solid rgba(196, 232, 255, 0.55); }
@keyframes dw-row-blink {
  0%, 100% { outline-color: rgba(196, 232, 255, 0.55); }
  50% { outline-color: transparent; }
}
.dw-row.blink { animation: dw-row-blink 0.6s ease-in-out 2; }

/* Grabbed row or group card while the cursor drags it */
.dw-row.is-grabbed,
.dw-card.is-grabbed {
  position: relative;
  z-index: 7;
  background: var(--navy-2);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--ice);
}
.dw-row .fav {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  color: var(--c, var(--muted));
  opacity: 0.95;
}
.dw-list .dw-row { order: var(--chaos, 0); }

/* Group cards — a grouped run collapses into one of these in the list */
.dw-card {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: color-mix(in oklab, var(--gc) 21%, #061a2d);
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 640;
  white-space: nowrap;
  overflow: hidden;
}
.dw-card .swatch { width: 11px; height: 11px; border-radius: 3px; background: var(--gc); flex-shrink: 0; }
.dw-card em { font-style: normal; margin-left: auto; font-family: var(--mono); font-size: 0.62rem; color: var(--muted); }
.demo.is-sorted .dw-card { display: flex; animation: card-in 0.45s var(--ease-out) both; }
.demo.is-sorted .dw-card[data-g="work"] { animation-delay: 90ms; }
.demo.is-sorted .dw-card[data-g="read"] { animation-delay: 180ms; }
.demo.is-sorted .dw-card[data-g="video"] { animation-delay: 270ms; }
.demo.is-trip-closed .dw-card[data-g="trip"] { display: none; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
}

/* Expanded group details, second column */
.dw-detail {
  border: 1px solid transparent;
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  background: color-mix(in oklab, var(--gc) 21%, #061a2d);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.demo.is-open .dw-detail { opacity: 1; }
.demo.is-open .dw-detail[data-g="work"] { transition-delay: 80ms; }
.demo.is-open .dw-detail[data-g="read"] { transition-delay: 160ms; }
.demo.is-open .dw-detail[data-g="video"] { transition-delay: 240ms; }
.demo.is-trip-closed .dw-detail[data-g="trip"] { display: none; }

.dw-detail-actions { margin-left: auto; display: inline-flex; gap: 8px; color: var(--muted); }
.dw-detail-actions .dw-ic { opacity: 0.7; }
.demo.is-saved #dw-save-trip { color: var(--ice); opacity: 1; }
.demo.is-saved #dw-save-trip .slash { display: none; }
.dw-detail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 0.74rem;
  font-weight: 640;
  background: transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--gc) 20%, transparent);
  white-space: nowrap;
}
.dw-detail-head em { font-style: normal; margin-left: auto; font-family: var(--mono); font-size: 0.62rem; color: var(--muted); }
.dw-detail-list { list-style: none; padding: 5px; display: flex; flex-direction: column; gap: 4px; min-height: 4px; }
.dw-detail-list .dw-row { font-size: 0.7rem; padding: 4px 8px; order: 0; background: rgba(4, 18, 31, 0.22); }

/* ---------- Scroll reveals ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js [data-reveal="fade"] { transform: none; transition-delay: calc(var(--i, 0) * 60ms); }
  .js [data-reveal].is-revealed { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */

.section { padding: 110px 0 0; }
.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 46px;
  max-width: 640px;
}

/* ---------- Features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(8, 39, 65, 0.85), rgba(8, 39, 65, 0.45));
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.tile:hover { border-color: var(--line-strong); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tile:hover { transform: translateY(-3px); }
}

/* Cursor-tracking spotlight wash on cards (JS writes --mx/--my) */
.tile::after,
.plan::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(130, 207, 255, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .tile:hover::after,
  .plan:hover::after { opacity: 1; }
}
.tile p { color: var(--muted); font-size: 0.95rem; }
.tile-wide { grid-column: span 7; }
.tile-slim { grid-column: span 5; }
.tile .mock { margin-top: auto; padding-top: 18px; }

/* drag mockup */
.mock-list { display: flex; flex-direction: column; gap: 6px; }
.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(130, 207, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}
.mock-row .fav { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); }
.mock-row .grip { margin-left: auto; color: var(--muted); opacity: 0.5; font-size: 0.9rem; letter-spacing: 1px; }
.mock-row.is-dragging {
  transform: rotate(-1.4deg) translateX(10px);
  border: 1px solid var(--ice);
  background: var(--navy-2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}
.mock-drop {
  height: 0;
  border-top: 2px dashed var(--line-strong);
  border-radius: 2px;
  margin: 2px 6px;
}

/* quick switcher mockup */
.mock-qs {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #061d33;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.mock-qs-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
}
.mock-qs-input .caret {
  width: 1.5px;
  height: 15px;
  background: var(--ice);
  animation: caret-blink 1.1s step-end infinite;
}
@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.mock-qs-rows { list-style: none; padding: 6px; }
.mock-qs-rows li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}
.mock-qs-rows li .fav { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); }
.mock-qs-rows li.is-active { background: rgba(130, 207, 255, 0.12); color: var(--text); }
.mock-qs-rows li.is-active .hint { margin-left: auto; font-family: var(--mono); font-size: 0.68rem; color: var(--ice); }
.mock-qs-rows .qs-group { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; }
.mock-qs-rows .qs-group .chip { width: 8px; height: 8px; border-radius: 3px; background: var(--gc); flex-shrink: 0; }
.mock-qs mark { background: none; color: var(--ice); font-weight: 640; }

/* AI plan chips mockup */
.mock-plan { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 13px;
  background: #061d33;
}
.plan-chip i { width: 8px; height: 8px; border-radius: 3px; background: var(--gc); }
.plan-chip em { font-style: normal; color: var(--muted); }

/* saved group card mockup */
.mock-saved {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #061d33;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mock-saved-head { display: flex; align-items: center; gap: 9px; font-size: 0.84rem; font-weight: 640; }
.mock-saved-head .chip { width: 9px; height: 9px; border-radius: 3px; background: var(--g-blue); }
.mock-saved-head em { font-style: normal; margin-left: auto; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.mock-saved-favs { display: flex; gap: 6px; }
.mock-saved-favs i { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--muted)); opacity: 0.9; }
.mock-saved-open {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ice);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 5px 11px;
}

/* keyboard strip */
.kbd-strip {
  grid-column: span 12;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 28px;
  background: rgba(8, 39, 65, 0.45);
  font-size: 0.9rem;
  color: var(--muted);
}
.kbd-strip .pair { display: flex; align-items: center; gap: 10px; }
kbd { transition: transform 0.12s ease, border-bottom-color 0.12s ease; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .kbd-strip .pair:hover kbd { transform: translateY(1.5px); border-bottom-color: var(--ice); }
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  border-top: 1px solid var(--line-strong);
  padding: 22px 8px 0;
}
.step::before {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: var(--ice);
  opacity: 0.85;
  display: block;
  margin-bottom: 12px;
}
.step:nth-child(1)::before { content: "one"; }
.step:nth-child(2)::before { content: "two"; }
.step:nth-child(3)::before { content: "three"; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 880px;
}
.plan {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(8, 39, 65, 0.85), rgba(8, 39, 65, 0.45));
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.plan.is-pro { border-color: var(--line-strong); position: relative; }
.plan.is-pro::before {
  content: "7-day free trial";
  position: absolute;
  top: -12px;
  left: 28px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--ice);
  border-radius: 999px;
  padding: 4px 12px;
}
.plan-name { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.plan-price { font-size: 2.3rem; font-weight: 780; font-variation-settings: "wdth" 112; line-height: 1; }
.plan-price small { font-size: 0.95rem; font-weight: 480; color: var(--muted); font-variation-settings: "wdth" 100; }
.plan-alt { font-size: 0.86rem; color: var(--muted); margin-top: 6px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: 0.94rem; color: var(--text); }
.plan ul li { display: flex; gap: 11px; align-items: baseline; }
.plan ul li::before { content: "→"; color: var(--ice); font-family: var(--mono); font-size: 0.8rem; flex-shrink: 0; }
.plan ul li.dim { color: var(--muted); }
.plan .btn { margin-top: auto; justify-content: center; }
.pricing-note { margin-top: 22px; font-size: 0.85rem; color: var(--muted); }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  font-weight: 640;
  font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--ice);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 22px; color: var(--muted); font-size: 0.96rem; max-width: 62ch; }
.faq details p + p { margin-top: -10px; }

/* ---------- Closing CTA ---------- */

.closing {
  margin-top: 120px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 50% 100%, rgba(130, 207, 255, 0.1), transparent 70%),
    var(--night);
  text-align: center;
  padding: 100px 0;
}
.closing-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.closing img { height: 54px; width: auto; opacity: 0.95; }
.closing h2 { max-width: 20ch; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 48px 0 56px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 64px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand img { height: 22px; width: auto; }
.footer-brand p { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--muted); }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }
.footer-col strong {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--text); }
.footer-meta {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Legal docs ---------- */

.doc { max-width: 720px; margin-inline: auto; padding: 72px 24px 110px; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: 10px; }
.doc .doc-date { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 42px; }
.doc h2 { font-size: 1.35rem; margin: 44px 0 14px; }
.doc h3 { font-size: 1.05rem; margin: 26px 0 10px; }
.doc p, .doc li { color: var(--muted); font-size: 0.98rem; }
.doc p { margin-bottom: 14px; }
.doc ul { margin: 0 0 14px 22px; display: flex; flex-direction: column; gap: 8px; }
.doc strong { color: var(--text); font-weight: 640; }
.doc .doc-summary {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(8, 39, 65, 0.6);
  padding: 22px 26px;
  margin-bottom: 36px;
}
.doc .doc-summary p { margin-bottom: 0; color: var(--text); }
.doc .doc-summary strong { color: var(--ice); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .tile-wide, .tile-slim { grid-column: span 12; }
  .dw-work { display: none; }
  .dw-body { grid-template-columns: minmax(0, 1fr); }
  .dw-search em { display: none; }
  .demo.is-open .dw-content { grid-template-columns: 0fr 1fr; column-gap: 0px; }
  .dw-list { min-width: 0; overflow: hidden; }
  .demo-tabs { flex-wrap: wrap; }
  .demo-tab { flex: 1 1 30%; padding: 10px 10px 15px; gap: 5px; }
  .demo-tab .dt-sub { display: none; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .sky .s-top { display: none; }
  .dw-search { display: none; }
  .dw-tagrow { display: none; }
  .dw-toolbar { justify-content: space-between; }
  .astro { top: -100px; width: 175vw; margin-left: -87.5vw; }
  .hero { padding-top: 64px; }
  .section { padding-top: 84px; }
  .closing { padding: 76px 0; margin-top: 90px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-aurora::before,
  .hero-aurora::after { animation: none; }
  .dw-cursor { display: none; }
  .shoot { display: none; }
  .demo-tabs { display: none; }
  .astro-ticks, .astro-dash, .astro-star { animation: none; }
}
