/*
 * Valakes page. Colours are the app's own Graphite tokens (D:\ssh_valakes\src\renderer\styles\tokens.css)
 * and keep their meaning: teal passes, red is production and stop, amber is staging and waiting.
 * Type: Martian Mono (display and code, its width axis is animated), Instrument Sans (text).
 */

:root {
  color-scheme: dark;

  --void: #0d0f14;
  --s0: #111319;
  --s1: #161920;
  --s2: #1b1f27;
  --s3: #232831;
  --s4: #2b313b;
  --line: #2a2f38;
  --line-2: #3a414d;

  --text: #e3e6eb;
  --muted: #a0a7b2;
  --faint: #7d8591;

  --teal: #2dd4bf;
  --teal-2: #5eead4;
  --teal-fill: #14b8a6;
  --teal-bg: #173a39;
  --teal-line: #1f6f68;
  --on-teal: #04211d;

  --red: #f0504f;
  --red-text: #ff8f8a;
  --red-fill: #cf3a3e;
  --red-bg: #2f1d21;
  --red-line: #7a2f35;

  --amber: #f5a524;
  --amber-text: #f7b955;
  --amber-bg: #2b2318;
  --amber-line: #875d1e;

  --green: #4ade80;
  --green-text: #86efac;
  --green-bg: #1b3324;
  --blue: #60a5fa;
  --blue-text: #8fbfff;
  --blue-bg: #1d2f45;

  --syn-option: #93c5fd;
  --syn-string: #fcd34d;
  --syn-operator: #f9a8d4;

  --mono: 'Martian Mono', 'JetBrains Mono', Consolas, monospace;
  --sans: 'Instrument Sans', system-ui, 'Segoe UI', sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--void);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
  overflow-x: hidden;
}

a {
  color: var(--teal-2);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

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

code {
  font-family: var(--mono);
  font-stretch: 87.5%;
  font-size: .84em;
  color: var(--text);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--teal-fill);
  color: var(--on-teal);
  border-radius: 6px;
}

.skip:focus {
  top: 12px;
}

/* ============================ Hero ============================ */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
  position: relative;
  overflow: hidden;
}

/* A faint measuring grid, the only texture on the page */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / .028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 80% at 55% 70%, #000 30%, transparent 75%);
  pointer-events: none;
}

.bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 22px 0;
  font-size: 15px;
}

.bar a {
  color: var(--muted);
  text-decoration: none;
}

.bar a:hover {
  color: var(--text);
}

.bar .home {
  color: var(--text);
  font-weight: 600;
}

.bar ul {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-copy {
  position: relative;
  max-width: var(--maxw);
  width: 100%;
  margin: clamp(16px, 4vh, 56px) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 36rem) minmax(0, 1fr);
  align-items: end;
  gap: 22px 56px;
}

.wordmark {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: clamp(54px, 12.4vw, 184px);
  line-height: .9;
  font-weight: 640;
  font-stretch: 112.5%;
  letter-spacing: -.055em;
  white-space: nowrap;
  /* The padding lets the clipped gradient reach the ascenders and the cursor below the line */
  justify-self: start;
  padding: .1em .06em .16em;
  margin: -.1em 0 -.16em -.1em;

  /* Alarm: a calm teal word, the colour of "safe" in the app. Every 7 seconds a red wave, the
     production colour, runs through it with a glow, then the word is calm again. The wave's
     edges are teal, so it enters and leaves without a seam. */
  background-image:
    linear-gradient(90deg, #2dd4bf 0%, #f5a524 22%, #f0504f 40%, #ff8f8a 50%, #f0504f 60%, #f5a524 78%, #2dd4bf 100%),
    linear-gradient(90deg, #5eead4, #2dd4bf 55%, #5eead4);
  background-size: 55% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: -125% 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: alarm 7s cubic-bezier(.45, 0, .2, 1) infinite;
}

@keyframes alarm {
  0%,
  50% {
    background-position: -125% 0, 0 0;
    filter: drop-shadow(0 0 0 rgb(240 80 79 / 0));
  }

  72% {
    filter: drop-shadow(0 0 28px rgb(240 80 79 / .45));
  }

  95%,
  100% {
    background-position: 225% 0, 0 0;
    filter: drop-shadow(0 0 0 rgb(240 80 79 / 0));
  }
}

.js .wordmark {
  font-weight: 200;
  font-stretch: 75%;
  transition: font-stretch 1.6s var(--ease), font-weight 1.6s var(--ease);
}

.js .wordmark.on {
  font-weight: 640;
  font-stretch: 112.5%;
}

/* The prompt cursor of the app icon, after the name */
.wordmark::after {
  content: '_';
  margin-left: .04em;
  /* visibility, not opacity: an opacity animation puts the cursor on its own layer, and
     Chrome then leaves it out of the gradient that is clipped to the text */
  animation: blink-v 1.1s steps(1) infinite;
}

.lead {
  margin: 0 0 6px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--text);
}

/* ---- Release note and the notify forms ---- */

.hero-release {
  justify-self: end;
  width: min(100%, 27rem);
  margin-bottom: 4px;
}

.release-line {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.pulse {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  transform: translateY(-1px);
}

.pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--teal);
  animation: ping 2.4s ease-out infinite;
}

.notify {
  position: relative;
}

.notify-row {
  display: flex;
  gap: 8px;
}

.notify-field {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--s1);
  color: var(--text);
  font: 16px var(--sans);
  transition: border-color .2s, box-shadow .2s;
}

.notify-field::placeholder {
  color: var(--faint);
}

.notify-field:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgb(45 212 191 / .18);
}

.notify-field[aria-invalid='true'] {
  border-color: var(--red);
}

.notify-button {
  position: relative;
  flex: none;
  height: 46px;
  padding: 0 20px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--teal-fill);
  color: var(--on-teal);
  font: 600 15.5px var(--sans);
  cursor: pointer;
  transition: background .2s;
}

.notify-button:hover {
  background: var(--teal);
}

.notify-button:disabled {
  cursor: default;
  opacity: .75;
}

.notify-button:focus-visible {
  outline: 2px solid var(--teal-2);
  outline-offset: 3px;
}

/* A light crosses the button now and then */
.notify-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgb(255 255 255 / .45) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sheen 6s ease-in-out 2s infinite;
  pointer-events: none;
}

@keyframes sheen {
  0%,
  75% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

.wake-status {
  min-height: 1.5em;
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.wake-status[data-kind='ok'] {
  color: var(--teal-2);
}

.wake-status[data-kind='error'] {
  color: var(--red-text);
}

.notify.is-done .notify-row {
  display: none;
}

.notify.is-done .wake-status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--teal-line);
  border-radius: 8px;
  background: rgb(23 58 57 / .5);
  font-size: 15.5px;
  animation: ln-in .5s ease-out both;
}

/* Hidden from people, filled in by form bots */
.wake-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Release section: the order of the platforms ---- */

.track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  max-width: 52rem;
  margin: 0 0 44px;
  padding: 0;
  list-style: none;
}

/* The road from the first stop to the next, not travelled yet */
.track::before {
  content: '';
  position: absolute;
  left: 9px;
  width: calc(50% + 12px);
  top: 9px;
  height: 1px;
  background: linear-gradient(90deg, var(--teal-line) 50%, transparent 50%) 0 0 / 8px 1px repeat-x;
}

/* A signal travelling from the first stop to the next */
.track::after {
  content: '';
  position: absolute;
  left: 9px;
  top: 7px;
  width: 22px;
  height: 5px;
  border-radius: 3px;
  background: var(--teal-2);
  box-shadow: 0 0 12px var(--teal);
  animation: signal 3.6s ease-in-out infinite;
  opacity: 0;
}

@keyframes signal {
  0% {
    left: 9px;
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    left: calc(50% - 4px);
    opacity: 0;
  }
}

.track-stop {
  position: relative;
  padding-top: 36px;
}

.track-node {
  position: absolute;
  left: 0;
  top: 0;
  width: 19px;
  height: 19px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--void);
}

.track-stop.now .track-node {
  border-color: var(--teal);
  background: var(--teal-bg);
  box-shadow: 0 0 18px rgb(45 212 191 / .55);
}

.track-stop.now .track-node::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--teal);
  animation: ping 2.4s ease-out infinite;
}

.track-when {
  margin: 0;
  font: 500 13px/1.4 var(--mono);
  font-stretch: 87.5%;
  color: var(--faint);
}

.track-stop.now .track-when {
  color: var(--teal);
}

.track-what {
  margin: 4px 0 0;
  font: 600 clamp(20px, 2.3vw, 28px)/1.2 var(--sans);
  letter-spacing: -.01em;
}

.notify-wide {
  max-width: 34rem;
}

.release .fine a {
  color: var(--muted);
}

/* ---- FAQ: short answers that stand on their own ---- */

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
  border-top: 1px solid var(--line);
}

.faq-item {
  padding: 26px 0 24px;
  border-bottom: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.005em;
}

.faq-item p {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 16px;
}

@media (max-width: 860px) {
  .faq-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.foot .updated {
  margin-top: 8px;
  font-size: 13px;
}

/* ---- valakes-list.html: confirm and unsubscribe from the emails ---- */

.list-page {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
}

.list-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / .028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80% 60% at 50% 20%, #000 20%, transparent 75%);
  pointer-events: none;
}

.list-main {
  position: relative;
  flex: 1;
  width: min(100%, 40rem);
  margin: clamp(24px, 7vh, 88px) auto 72px;
}

.wordmark-sm {
  display: inline-block;
  margin-bottom: 28px;
  font-size: clamp(40px, 7vw, 68px);
}

.list-main h1 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 500;
  font-stretch: 87.5%;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.list-text {
  margin: 0 0 22px;
  color: var(--muted);
}

.unsub-button {
  background: var(--s2);
  color: var(--text);
  border: 1px solid var(--line-2);
}

.unsub-button:hover {
  background: var(--red-bg);
  border-color: var(--red-line);
}

.unsub-button::after {
  display: none;
}

.keep {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--muted);
}

.keep h2 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 19px;
  font-stretch: 87.5%;
  color: var(--text);
}

.keep ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.keep li {
  margin-bottom: 6px;
}

.keep p {
  margin: 0 0 12px;
}

.list-page .foot {
  width: min(100%, var(--maxw));
}

@keyframes ping {
  from {
    opacity: .9;
    transform: scale(.5);
  }

  to {
    opacity: 0;
    transform: scale(1.8);
  }
}

.gate {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  width: 100%;
  margin: 12px auto 0;
  min-height: 0;
}

.gate canvas {
  display: block;
  width: 100%;
  height: clamp(320px, 50svh, 580px);
}

/* The WebGL particle core sits under the 2D canvas with the commands, wires and labels */
.gate .gate-gl {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.gate #gate {
  position: relative;
  z-index: 1;
}

.gate-fallback {
  display: block;
  width: 220px;
  height: auto;
  margin: 24px auto;
}

.gate.live .gate-fallback {
  display: none;
}

.gate:not(.live) canvas {
  display: none;
}

.gate figcaption {
  max-width: 40rem;
  margin: 4px auto 28px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

/* ============================ Sections ============================ */

.section {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  padding-block: clamp(72px, 11vw, 148px);
  border-top: 1px solid var(--line);
}

.head {
  max-width: 44rem;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.head h2 {
  font-family: var(--mono);
  font-size: clamp(26px, 3.3vw, 42px);
  line-height: 1.14;
  font-weight: 500;
  font-stretch: 87.5%;
  letter-spacing: -.035em;
  margin-bottom: 18px;
  text-wrap: balance;
}

.head p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

/* Wide screens: heading and its paragraph side by side, so the demo fits one screen */
@media (min-width: 1100px) {
  .head {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 31rem);
    gap: 0 72px;
    align-items: end;
  }

  .head h2 {
    margin-bottom: 0;
  }
}

.fine {
  margin: 20px 0 0;
  max-width: 44rem;
  font-size: 14px;
  line-height: 1.55;
  color: var(--faint);
}

/* ============================ Demo ============================ */

.scenes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 4px;
  margin-bottom: 18px;
}

.scenes button {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 2px 14px;
  border: 0;
  background: none;
  color: var(--faint);
  font: 500 15px/1.3 var(--sans);
  text-align: left;
  cursor: pointer;
}

.scenes button:hover {
  color: var(--muted);
}

.scenes button[aria-selected='true'] {
  color: var(--text);
}

.scenes .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.scenes [aria-selected='true'] .n {
  color: var(--teal);
}

.scenes button::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--line);
}

.bar-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  height: 2px;
  width: 100%;
  background: var(--teal);
  box-shadow: 0 0 10px rgb(45 212 191 / .6);
  transform-origin: left;
  transform: scaleX(0);
}

[aria-selected='true'] .bar-fill {
  transform: scaleX(1);
}

.playing [aria-selected='true'] .bar-fill {
  animation: fill var(--dur, 10s) linear both;
}

@keyframes fill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

/* --- The app replica (Graphite, built from the app's screenshots) --- */

.app {
  --cmp-h: 80px;
  position: relative;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 26px;
  height: clamp(480px, 44vw, 600px);
  background: var(--s0);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  font: 13px/1.45 var(--sans);
  color: var(--text);
  container-type: inline-size;
  box-shadow:
    0 1px 0 rgb(255 255 255 / .04) inset,
    0 50px 120px -60px rgb(45 212 191 / .35),
    0 30px 80px -30px rgb(0 0 0 / .8);
  transition: box-shadow .6s ease;
}

.app.m5 {
  box-shadow:
    0 1px 0 rgb(255 255 255 / .04) inset,
    0 50px 120px -60px rgb(240 80 79 / .4),
    0 30px 80px -30px rgb(0 0 0 / .8);
}

.app-side {
  grid-row: 1 / 3;
  background: var(--s1);
  border-right: 1px solid var(--line);
  padding: 12px 8px;
  overflow: hidden;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 6px 12px;
  font-weight: 600;
}

.app-brand img {
  border-radius: 5px;
}

.app-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 5px 6px 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--muted);
}

.app-search kbd,
.app kbd {
  padding: 1px 5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font: 11px var(--mono);
  font-stretch: 75%;
  color: var(--muted);
}

.app-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 6px 4px;
  font-weight: 600;
}

.app-group span {
  color: var(--faint);
  font-weight: 500;
}

.app-group::before {
  content: '';
  width: 14px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px 3px 3px 3px;
}

.g-prod::before {
  color: var(--red);
}

.g-stg::before {
  color: var(--blue);
}

.g-dev::before {
  color: var(--green);
}

.host {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 28px;
  padding: 0 6px 0 8px;
  border-radius: 6px;
  color: var(--text);
  white-space: nowrap;
  transition: background .3s ease;
}

.host .env {
  margin-left: auto;
}

.host.sel {
  background: var(--teal-bg);
}

.srv,
.key-ico,
.warn-ico,
.run-ico {
  display: inline-block;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}

.srv {
  position: relative;
  width: 15px;
  height: 15px;
  color: var(--muted);
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='8' x='2' y='2' rx='2'/%3E%3Crect width='20' height='8' x='2' y='14' rx='2'/%3E%3Cpath d='M6 6h.01M6 18h.01'/%3E%3C/svg%3E");
}

.host.open::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 17px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--s1);
}

.host.sel.open::after {
  box-shadow: 0 0 0 2px var(--teal-bg);
}

.key-ico {
  width: 12px;
  height: 12px;
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z'/%3E%3Ccircle cx='16.5' cy='7.5' r='.5'/%3E%3C/svg%3E");
}

.warn-ico {
  width: 17px;
  height: 17px;
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
}

.run-ico {
  width: 13px;
  height: 13px;
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z'/%3E%3Cpath d='m21.854 2.147-10.94 10.939'/%3E%3C/svg%3E");
}

.env {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 1px 6px;
  border: 1px solid;
  border-radius: 3px;
  font: 700 10.5px/1.5 var(--sans);
  letter-spacing: .03em;
  white-space: nowrap;
}

.env-prod {
  background: var(--red-fill);
  border-color: var(--red-fill);
  color: #fff;
}

.env-stg {
  background: var(--blue-bg);
  border-color: #3a679c;
  color: var(--blue-text);
}

.env-dev {
  background: var(--green-bg);
  border-color: #2f7046;
  color: var(--green-text);
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.app-tabs {
  display: flex;
  align-items: stretch;
  height: 34px;
  flex: none;
  background: var(--s1);
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.tab.active {
  background: var(--s0);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--teal);
}

.tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.tab-x {
  margin-left: 6px;
  color: var(--faint);
}

.tab-prod {
  display: none;
}

.app.prodtab .tab-prod {
  display: flex;
  animation: tab-in .45s var(--ease) both;
}

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

.app.m1 .tab-prod::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

.tab-prod .env {
  opacity: .25;
  transition: opacity .4s;
}

.app.m1 .tab-prod .env {
  opacity: 1;
}

.tab-add {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--faint);
  font-size: 17px;
}

.app-area {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.topline {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--red);
  box-shadow: 0 0 14px rgb(240 80 79 / .8);
  transition: transform .7s var(--ease);
}

.app.m2 .topline {
  transform: scaleX(1);
}

/* Terminal */
.term {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 10px 12px 6px;
  font: 400 12.5px/1.62 var(--mono);
  font-stretch: 75%;
  color: #d6dae0;
}

.ln {
  white-space: pre;
  min-height: 1.62em;
}

.ln.in {
  animation: ln-in .18s ease-out both;
}

@keyframes ln-in {
  from {
    opacity: 0;
  }
}

.pu {
  color: var(--green);
  font-weight: 600;
}

.pp {
  color: var(--blue);
  font-weight: 600;
}

.blk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -12px;
  padding: 0 12px;
  background: var(--s3);
}

.blk .cmd {
  flex: 1;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bchip {
  flex: none;
  padding: 0 7px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font: 11px/1.55 var(--sans);
  color: var(--muted);
}

.bchip.exit {
  border-color: var(--teal-line);
  color: var(--teal);
  background: rgb(23 58 57 / .5);
}

.term .fill {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border: 1px solid var(--teal-line);
  border-radius: 999px;
  background: var(--teal-bg);
  color: var(--teal-2);
  font: 600 11px/1.5 var(--sans);
  animation: pop-in .35s var(--ease) both;
}

.tcaret {
  display: inline-block;
  width: .62em;
  height: 1.2em;
  vertical-align: -.22em;
  border: 1px solid var(--teal);
}

/* Composer */
.composer {
  position: relative;
  flex: none;
  height: var(--cmp-h);
  margin: 0 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--s2);
  border: 1.5px solid var(--teal);
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgb(45 212 191 / .1);
  transition: border-color .4s, box-shadow .4s;
}

.app.m5 .composer {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgb(240 80 79 / .14);
}

.cmp-line {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 12px 0;
  font: 400 13px/20px var(--mono);
  font-stretch: 75%;
  white-space: pre;
  overflow: hidden;
}

.cmp-ph {
  display: none;
  position: absolute;
  left: 12px;
  color: var(--faint);
}

.cmp-text:empty~.cmp-ph {
  display: block;
}

.cmp-text:empty~.caret {
  margin-left: 0;
}

.caret {
  display: inline-block;
  width: 1.5px;
  height: 17px;
  margin-left: 1px;
  background: var(--teal-2);
  animation: blink 1.05s steps(1) infinite;
}

.app.m5 .composer .caret {
  background: var(--red-text);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes blink-v {
  50% {
    visibility: hidden;
  }
}

.s-cmd {
  color: var(--teal);
}

.s-opt {
  color: var(--syn-option);
}

.s-str {
  color: var(--syn-string);
}

.s-op {
  color: var(--syn-operator);
}

.s-cred {
  color: var(--teal-2);
}

.cmp-text.risky {
  text-decoration: underline wavy var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.cmp-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 8px 12px;
  white-space: nowrap;
  min-width: 0;
}

.cmp-env,
.cmp-host,
.seg-prod {
  display: none;
}

.app.m3 .cmp-env,
.app.m3 .cmp-host {
  display: inline-flex;
}

.cmp-host {
  font: 12px var(--mono);
  font-stretch: 75%;
  color: var(--text);
}

.env-solid {
  font-size: 11px;
  text-transform: none;
  padding: 1px 7px;
}

.chips {
  display: flex;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font: 11.5px/1.6 var(--mono);
  font-stretch: 75%;
  color: var(--muted);
  animation: pop-in .35s var(--ease) both;
}

.chip.cred {
  border-color: var(--teal-line);
  background: var(--teal-bg);
  color: var(--teal-2);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(.85);
  }
}

.cmp-hint {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--faint);
  font-size: 12px;
}

.cmp-raw {
  color: var(--muted);
  font-size: 12.5px;
  padding: 0 8px;
}

.cmp-run {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 14px;
  border-radius: 6px;
  background: var(--teal-fill);
  color: var(--on-teal);
  font-weight: 600;
  font-size: 13px;
  transition: background .4s, transform .12s;
}

.app.m6 .cmp-run {
  background: var(--red-fill);
  color: #fff;
}

.cmp-run.press,
.btn.press {
  transform: scale(.93);
  filter: brightness(1.25);
}

/* Credentials popover and risk card */
.pop,
.risk {
  position: absolute;
  z-index: 3;
  left: 22px;
  right: 22px;
  bottom: calc(var(--cmp-h) + 18px);
  border-radius: 8px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s .4s;
}

.pop.show,
.risk.show {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}

.pop {
  padding: 12px 12px 10px;
  background: var(--s2);
  border: 1px solid var(--line-2);
  box-shadow: 0 8px 24px rgb(0 0 0 / .45);
}

.pop p {
  margin: 0;
}

.pop-title {
  font-weight: 600;
  margin-bottom: 8px !important;
}

.pop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--teal-bg);
  color: var(--text);
}

.pop-row .key-ico {
  color: var(--muted);
}

.pop-check {
  margin-left: auto;
  color: var(--teal);
}

.pop-note {
  margin-top: 8px !important;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.risk {
  padding: 14px 18px 14px;
  background: var(--red-bg);
  border: 1px solid var(--red-line);
  box-shadow: 0 8px 24px rgb(0 0 0 / .45), 0 0 60px -20px rgb(240 80 79 / .5);
}

.risk.show::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom, transparent, rgb(240 80 79 / .18) 50%, transparent);
  background-size: 100% 40%;
  background-repeat: no-repeat;
  animation: sweep 1.1s ease-out .1s both;
  pointer-events: none;
}

@keyframes sweep {
  from {
    background-position: 0 -60%;
  }

  to {
    background-position: 0 160%;
  }
}

.risk p {
  margin: 0;
}

.risk-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--red-text);
  font-weight: 600;
  font-size: 14px;
}

.risk ul {
  margin: 8px 0 10px;
  padding-left: 22px;
}

.risk-radius b {
  font-weight: 600;
}

#radius {
  font-variant-numeric: tabular-nums;
}

#radius.counting {
  color: var(--muted);
}

.risk-ask {
  margin-top: 10px !important;
  color: var(--muted);
}

.risk-input {
  display: flex;
  align-items: center;
  height: 30px;
  margin-top: 6px;
  padding: 0 10px;
  background: var(--s0);
  border: 1px solid var(--control, #6b7381);
  border-radius: 6px;
  font: 13px var(--mono);
  font-stretch: 75%;
}

.risk-input .caret {
  display: none;
}

.risk-input.focus {
  border-color: var(--teal-2);
  box-shadow: 0 0 0 2px rgb(94 234 212 / .35);
}

.risk-input.focus .caret {
  display: inline-block;
}

.risk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.risk-link {
  margin-right: auto;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12.5px;
}

.btn {
  white-space: nowrap;
  padding: 4px 14px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  font-weight: 500;
  transition: background .3s, color .3s, box-shadow .3s, transform .12s;
}

.btn-cancel {
  background: var(--teal-fill);
  border-color: var(--teal-fill);
  color: var(--on-teal);
}

.btn-cancel.focus {
  box-shadow: 0 0 0 2px var(--s0), 0 0 0 4px var(--teal-2);
}

.btn-anyway {
  color: var(--faint);
  background: transparent;
}

.btn-anyway.ready {
  background: var(--red-fill);
  border-color: var(--red-fill);
  color: #fff;
}

/* Status bar */
.app-status {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  background: var(--s1);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: visible;
  position: relative;
}

.app.m4 .seg-prod {
  display: inline-flex;
  position: relative;
  padding: 0 6px;
  border-radius: 3px;
  background: var(--red-fill);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  animation: pop-in .35s var(--ease) both;
}

.st-host {
  color: var(--text);
}

.st-gap {
  flex: 1;
}

.st-conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.st-conn i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* Production markers: numbered pins that tie the legend to the screen */
.mk {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font: 700 10.5px/1 var(--sans);
  font-style: normal;
  opacity: 0;
  transform: scale(.4);
  pointer-events: none;
  transition: opacity .3s, transform .45s cubic-bezier(.3, 1.6, .5, 1);
}

.mk.on {
  opacity: 1;
  transform: none;
}

.mk.on::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid var(--red);
  animation: ping 1.6s ease-out 3;
}

.tab .mk {
  right: -8px;
  bottom: -9px;
}

.topline .mk {
  right: 28px;
  top: 6px;
}

.composer>.mk {
  left: -9px;
  top: -10px;
}

.cmp-env .mk {
  right: -12px;
  top: -14px;
}

.cmp-run .mk {
  right: -9px;
  top: -14px;
}

.seg-prod .mk {
  right: -14px;
  top: -14px;
}

/* Scene note under the replica */
.scene-note {
  min-height: 7.5em;
  margin-top: 22px;
  max-width: 50rem;
  color: var(--muted);
  font-size: 16px;
}

.scene-note p {
  margin: 0;
  animation: ln-in .5s ease-out both;
}

.legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 28px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  max-width: 62rem;
}

.legend li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  opacity: .35;
  transition: opacity .4s, color .4s;
}

.legend li.on {
  opacity: 1;
  color: var(--text);
}

.legend b {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font: 700 10.5px/1 var(--sans);
  transform: translateY(-1px);
}

@container (max-width: 760px) {
  .cmp-hint {
    display: none;
  }

  .cmp-foot .cmp-raw {
    margin-left: auto;
  }
}

@container (max-width: 520px) {
  .term {
    font-size: 11px;
  }

  .app-status .st-user,
  .app-status .st-path,
  .app-status .st-agents {
    display: none;
  }

  .pop,
  .risk {
    left: 10px;
    right: 10px;
  }

  .risk {
    font-size: 12.5px;
    padding: 12px 14px;
  }
}

/* ============================ Parser ============================ */

.parse-list {
  border-top: 1px solid var(--line);
}

.parse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 17rem);
  gap: 18px 48px;
  align-items: start;
  padding: 30px 0 26px;
  border-bottom: 1px solid var(--line);
}

.parse-line {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: .62em;
  row-gap: 14px;
  font: 400 clamp(16px, 1.7vw, 20px)/1.4 var(--mono);
  font-stretch: 87.5%;
  overflow: hidden;
}

/* The scan beam that reads the line */
.parse-line::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--teal-2);
  box-shadow: 0 0 18px 4px rgb(45 212 191 / .5);
  opacity: 0;
  pointer-events: none;
}

.parse.run .parse-line::after {
  animation: beam 1s var(--ease) both;
}

@keyframes beam {
  0% {
    opacity: 1;
    transform: translateX(0);
  }

  85% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(min(60vw, 760px));
  }
}

.tok {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.tok-t {
  white-space: pre;
  color: var(--text);
  transition: color .4s calc(var(--i) * 120ms + 150ms), text-shadow .4s calc(var(--i) * 120ms + 150ms);
}

.tok-w {
  width: 1px;
  height: 16px;
  margin: 4px 0 0 .45em;
  background: var(--line-2);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform .35s var(--ease) calc(var(--i) * 120ms + 250ms);
}

.tok-l {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font: 13px/1.35 var(--sans);
  font-stretch: 100%;
  color: var(--muted);
  opacity: 0;
  transition: max-width .7s var(--ease) calc(var(--i) * 120ms + 300ms), opacity .4s ease calc(var(--i) * 120ms + 400ms);
}

.tok-l b {
  display: block;
  font: 500 11px/1.5 var(--mono);
  font-stretch: 87.5%;
  color: var(--rc, var(--muted));
}

.parse.run .tok-t {
  color: var(--rc, var(--text));
}

.parse.run .tok-w {
  transform: none;
}

.parse.run .tok-l {
  max-width: 18em;
  opacity: 1;
  padding-right: .4em;
}

.r-command,
.r-wrapper {
  --rc: var(--teal);
}

.r-flags,
.r-test {
  --rc: var(--syn-option);
}

.r-string,
.r-pattern {
  --rc: var(--syn-string);
}

.r-pipe {
  --rc: var(--syn-operator);
}

.r-action.danger,
.r-flags.danger {
  --rc: var(--red-text);
}

.r-target,
.r-path,
.r-unit,
.r-url,
.r-action {
  --rc: var(--text);
}

.verdict {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 2px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.lvl {
  flex: none;
  min-width: 4.6em;
  padding: 1px 8px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font: 600 12px/1.6 var(--mono);
  font-stretch: 87.5%;
  text-align: center;
  color: var(--muted);
  opacity: .3;
  transition: opacity .3s, color .3s, background .3s, border-color .3s;
}

.parse.run .lvl {
  opacity: 1;
  transition-delay: .9s;
}

.parse.run .lvl[data-lvl='high'] {
  color: var(--red-text);
  border-color: var(--red-line);
  background: var(--red-bg);
}

.parse.run .lvl[data-lvl='medium'] {
  color: var(--amber-text);
  border-color: var(--amber-line);
  background: var(--amber-bg);
}

.parse.run .lvl[data-lvl='low'] {
  color: var(--green-text);
  border-color: #2f7046;
  background: var(--green-bg);
}

.verdict span {
  opacity: 0;
  transition: opacity .5s 1s;
}

.parse.run .verdict span {
  opacity: 1;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--s2);
  transition: background .3s, border-color .3s;
}

.switch-track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .3s var(--ease), background .3s;
}

.switch input:checked+.switch-track {
  background: var(--red-bg);
  border-color: var(--red-line);
}

.switch input:checked+.switch-track i {
  transform: translateX(20px);
  background: var(--red);
}

.switch input:focus-visible+.switch-track {
  outline: 2px solid var(--teal-2);
  outline-offset: 3px;
}

/* ============================ Agents ============================ */

.route {
  display: flex;
  align-items: center;
  margin-bottom: 44px;
  font-size: 15px;
}

.node {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--s1);
  white-space: nowrap;
}

.node-core {
  padding: 8px 16px 8px 8px;
  border-color: var(--teal-line);
  background: linear-gradient(var(--s1), var(--s1)) padding-box;
  box-shadow: 0 0 40px -12px rgb(45 212 191 / .55);
  flex-wrap: wrap;
  row-gap: 0;
  font-weight: 600;
}

.node-core small {
  display: block;
  width: 100%;
  margin: -14px 0 0 50px;
  font-weight: 400;
  color: var(--muted);
  font-size: 12.5px;
}

.node-host::after {
  content: 'STAGING';
  margin-left: 10px;
  padding: 1px 6px;
  border: 1px solid var(--amber-line);
  border-radius: 3px;
  color: var(--amber-text);
  font: 700 10.5px/1.5 var(--sans);
}

.wire {
  position: relative;
  flex: 1;
  min-width: 40px;
  height: 1px;
  margin: 0 4px;
  background: linear-gradient(to right, var(--line-2) 50%, transparent 50%) 0 0 / 8px 1px repeat-x;
}

.wire em {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  font: 12px var(--sans);
  font-style: normal;
  color: var(--faint);
  white-space: nowrap;
}

.wire i {
  position: absolute;
  top: -2px;
  left: 0;
  width: 18px;
  height: 5px;
  border-radius: 3px;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
  animation: travel 2.4s linear infinite;
  opacity: 0;
}

.wire i:nth-child(2) {
  animation-delay: .8s;
}

.wire i:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes travel {
  0% {
    left: 0;
    opacity: 0;
  }

  10%,
  90% {
    opacity: 1;
  }

  100% {
    left: calc(100% - 18px);
    opacity: 0;
  }
}

.policy {
  max-width: 62rem;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.seg legend {
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--muted);
}

.seg label {
  position: relative;
  cursor: pointer;
}

.seg input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.seg span {
  display: block;
  padding: 9px 18px;
  border: 1px solid var(--line-2);
  margin-left: -1px;
  background: var(--s1);
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: background .25s, color .25s, border-color .25s;
}

.seg label:first-of-type span {
  border-radius: 8px 0 0 8px;
  margin-left: 0;
}

.seg label:last-of-type span {
  border-radius: 0 8px 8px 0;
}

.seg input:checked+span {
  position: relative;
  z-index: 1;
  background: var(--teal-bg);
  border-color: var(--teal);
  color: var(--teal-2);
}

.seg input:focus-visible+span {
  outline: 2px solid var(--teal-2);
  outline-offset: 2px;
}

.policy-desc {
  min-height: 3.2em;
  margin: 16px 0 18px;
  max-width: 44rem;
  color: var(--text);
}

.calls {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.calls th {
  padding: 0 0 10px;
  text-align: left;
  font-weight: 500;
  color: var(--faint);
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}

.calls td {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

.calls td:first-child {
  width: 46%;
  padding-right: 24px;
}

.calls .tool {
  display: block;
  color: var(--teal);
  font: 12.5px/1.5 var(--mono);
  font-stretch: 87.5%;
}

.calls .arg {
  font: 13.5px/1.5 var(--mono);
  font-stretch: 75%;
  color: var(--text);
  word-break: break-word;
}

.out {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
}

.out.flip {
  animation: flip .5s var(--ease) both;
}

@keyframes flip {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
}

.o-chip {
  flex: none;
  min-width: 7.6em;
  padding: 1px 8px;
  border-radius: 4px;
  border: 1px solid;
  font: 600 12px/1.6 var(--mono);
  font-stretch: 87.5%;
  text-align: center;
}

.k-ok {
  color: var(--teal-2);
  border-color: var(--teal-line);
  background: rgb(23 58 57 / .6);
}

.k-wait {
  color: var(--amber-text);
  border-color: var(--amber-line);
  background: var(--amber-bg);
}

.k-no {
  color: var(--red-text);
  border-color: var(--red-line);
  background: var(--red-bg);
}

.k-off {
  color: var(--faint);
  border-color: var(--line-2);
  background: transparent;
}

.agents-low {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 56px;
  margin-top: clamp(56px, 8vw, 96px);
}

.agents-low h3 {
  font-family: var(--mono);
  font-size: clamp(19px, 1.7vw, 23px);
  font-stretch: 87.5%;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin-bottom: 16px;
}

.tools ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.tools li {
  display: grid;
  grid-template-columns: 11.5em minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--muted);
}

.tools li code {
  color: var(--teal);
  font-size: 13px;
}

.mask>p:not(.fine) {
  margin: 0 0 18px;
  color: var(--muted);
}

.mask-panes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.pane {
  position: relative;
  overflow: hidden;
  padding: 12px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--s0);
}

.pane-agent {
  border-color: var(--teal-line);
}

.pane-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--faint);
}

.pane-agent .pane-label {
  color: var(--teal);
}

.pane pre {
  margin: 0;
  font: 12.5px/1.7 var(--mono);
  font-stretch: 75%;
  white-space: pre-wrap;
  word-break: break-all;
  color: #d6dae0;
}

.pane .p {
  color: var(--green);
}

.pane .sec {
  color: var(--amber-text);
  background: rgb(245 165 36 / .1);
  border-radius: 2px;
}

.pane .sec.masked {
  color: var(--teal-2);
  background: rgb(45 212 191 / .12);
}

.pane-agent::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 36px;
  background: linear-gradient(to bottom, transparent, rgb(45 212 191 / .22) 70%, rgb(94 234 212 / .8) 96%, transparent);
  transform: translateY(-40px);
  opacity: 0;
  pointer-events: none;
}

.pane-agent.scan::after {
  animation: scan 1.4s var(--ease) both;
}

@keyframes scan {
  0% {
    opacity: 1;
    transform: translateY(-40px);
  }

  90% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(170px);
  }
}

/* ============================ Speed ============================ */

.meters {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.meters li {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) 7.5rem;
  align-items: center;
  gap: 8px 32px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.m-name {
  font-size: 15.5px;
  color: var(--text);
}

.m-track {
  position: relative;
  height: 14px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(to right, var(--s3) 0 6px, transparent 6px 8px);
}

.m-track::after {
  content: attr(data-budget);
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  font: 11px var(--mono);
  font-stretch: 75%;
  color: var(--faint);
}

.m-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--w);
  min-width: 3px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(to right, var(--teal) 0 6px, transparent 6px 8px);
  filter: drop-shadow(0 0 6px rgb(45 212 191 / .7));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.4s var(--ease) var(--d, 0s);
}

.meters.in .m-fill {
  transform: none;
}

.m-val {
  text-align: right;
  font: 500 19px/1 var(--mono);
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  color: var(--teal-2);
  white-space: nowrap;
}

.m-val small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 3px;
}

.throughput {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 40px 0 0;
  max-width: 56rem;
}

.throughput b {
  font: 500 clamp(44px, 6vw, 72px)/1 var(--mono);
  font-stretch: 100%;
  letter-spacing: -.04em;
  color: var(--teal-2);
  font-variant-numeric: tabular-nums;
}

.throughput span {
  flex: 1;
  min-width: 16rem;
  color: var(--muted);
}

/* ============================ Progress ============================ */

.stages {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 50rem;
}

.stages::before,
.stages::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 16px;
  width: 1px;
  bottom: 16px;
  background: var(--line-2);
}

.stages::after {
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  bottom: auto;
  height: calc(var(--done, 75%) - 16px);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 2s var(--ease);
}

.stages.in::after {
  transform: none;
}

.stages li {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 22px;
  padding: 0 0 26px;
}

.s-n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--void);
  font: 500 13px/1 var(--mono);
  color: var(--muted);
}

.done .s-n {
  border-color: var(--teal-line);
  color: var(--teal-2);
  background: var(--s0);
}

.now .s-n {
  border-color: var(--amber);
  color: var(--amber-text);
}

.now .s-n::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--amber);
  animation: ping 2.4s ease-out infinite;
}

.stages h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 32px;
}

.now h3::after {
  content: 'in progress';
  margin-left: 12px;
  padding: 1px 8px;
  border: 1px solid var(--amber-line);
  border-radius: 4px;
  font: 500 12px/1.6 var(--sans);
  color: var(--amber-text);
  vertical-align: 2px;
}

.stages p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

.next {
  margin-top: 40px;
  max-width: 62rem;
}

.next h3 {
  font-family: var(--mono);
  font-stretch: 87.5%;
  font-size: 19px;
  margin-bottom: 14px;
}

.next ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 22rem;
  column-gap: 48px;
}

.next li {
  break-inside: avoid;
  position: relative;
  padding: 0 0 10px 22px;
  color: var(--muted);
  font-size: 15.5px;
}

.next li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .75em;
  width: 10px;
  height: 1px;
  background: var(--teal);
}

/* ============================ Footer ============================ */

.foot {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin: 0 auto;
  padding: 36px 0 56px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--faint);
}

.foot p {
  margin: 0;
  max-width: 44rem;
}

/* ============================ Narrow screens ============================ */

@media (max-width: 980px) {
  .hero-copy {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-release {
    justify-self: start;
    width: min(100%, 32rem);
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
    height: 560px;
  }

  .app-side {
    display: none;
  }

  .app-status {
    grid-column: 1;
  }

  .parse {
    grid-template-columns: minmax(0, 1fr);
  }

  .agents-low {
    grid-template-columns: minmax(0, 1fr);
  }

  .legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meters li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .m-track {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-bottom: 14px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .bar ul {
    display: none;
  }

  .scenes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }

  .scenes button {
    font-size: 14px;
  }

  .app {
    height: 520px;
    border-radius: 10px;
  }

  .legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .route {
    flex-direction: column;
    align-items: stretch;
  }

  .route .node {
    justify-content: center;
  }

  .wire {
    width: 1px;
    height: 46px;
    min-width: 0;
    flex: none;
    margin: 4px auto;
    background: linear-gradient(to bottom, var(--line-2) 50%, transparent 50%) 0 0 / 1px 8px repeat-y;
  }

  .wire em {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
  }

  .wire i {
    width: 5px;
    height: 14px;
    left: -2px;
    animation-name: travel-v;
  }

  .node-core small {
    margin: 0;
    width: auto;
  }

  .calls td:first-child {
    width: 44%;
    padding-right: 14px;
  }

  .out {
    flex-direction: column;
    gap: 6px;
  }

  .tools li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .parse-line {
    flex-direction: column;
    row-gap: 6px;
  }

  .tok {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .tok-w {
    width: 14px;
    height: 1px;
    margin: 0;
    align-self: center;
    transform-origin: left;
    transform: scaleX(0);
  }

  .parse.run .tok-w {
    transform: none;
  }

  .tok-l b {
    display: inline;
    margin-right: 6px;
  }

  .parse.run .tok-l {
    max-width: 100%;
    white-space: normal;
  }

  .seg {
    gap: 6px;
  }

  .seg span,
  .seg label:first-of-type span,
  .seg label:last-of-type span {
    margin-left: 0;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 14.5px;
  }

  @keyframes beam {
    0% {
      opacity: 1;
      transform: translateX(0);
    }

    100% {
      opacity: 0;
      transform: translateX(90vw);
    }
  }
}

@keyframes travel-v {
  0% {
    top: 0;
    opacity: 0;
  }

  10%,
  90% {
    opacity: 1;
  }

  100% {
    top: calc(100% - 14px);
    opacity: 0;
  }
}

/* ============================ Less motion ============================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }

  .wire i {
    display: none;
  }

  .caret {
    animation: none;
  }
}
