@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500;1,600&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --ink: #182320;
  --ink-soft: #354642;
  --muted: #75827e;
  --faint: #a6b2ad;
  --line: rgba(30, 96, 96, 0.1);
  --paper: rgba(255, 255, 255, 0.9);
  --panel: rgba(255, 255, 255, 0.82);
  --mist: #f4f8f4;
  --teal: #40b8b1;
  --teal-dark: #236f6e;
  --blue: #3f7fa7;
  --blue-soft: #e5f1f4;
  --sage: #e5ece4;
  --warm: #f3ece0;
  --shadow: rgba(20, 43, 40, 0.08);
  --bg: #f7f8f4;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(30, 96, 96, 0.12);
  --tech-line: rgba(35, 111, 110, 0.085);
  --tech-line-soft: rgba(35, 111, 110, 0.045);
  --tech-glow: rgba(64, 184, 177, 0.18);
  --text: #182320;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --premium-shadow:
    0 24px 80px rgba(32, 50, 48, 0.075),
    0 3px 18px rgba(32, 50, 48, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --premium-shadow-lift:
    0 30px 96px rgba(32, 50, 48, 0.095),
    0 4px 22px rgba(32, 50, 48, 0.052),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, rgba(64, 184, 177, 0.14), transparent 27%),
    radial-gradient(circle at 83% 16%, rgba(63, 127, 167, 0.11), transparent 29%),
    linear-gradient(118deg, rgba(232, 248, 245, 0.56) 0%, rgba(252, 253, 248, 0.98) 40%, rgba(244, 250, 251, 0.66) 100%),
    linear-gradient(180deg, #f9fbf6 0%, #f3f8f4 56%, #edf4ef 100%);
  background-attachment: fixed, fixed, fixed, fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  display: none;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(64, 184, 177, 0.08), transparent 25%, transparent 74%, rgba(63, 127, 167, 0.08)),
    radial-gradient(ellipse at 50% 8%, rgba(255, 255, 255, 0.82), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 48%, rgba(236, 245, 241, 0.62));
  background-size:
    auto,
    auto,
    auto;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  display: none;
  z-index: 5;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image:
    linear-gradient(108deg, transparent 0%, transparent 42%, rgba(64, 184, 177, 0.08) 49%, transparent 57%, transparent 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, 200px 200px;
}

button,
textarea {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100vw - 44px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.shell::before {
  content: "";
  position: fixed;
  inset: -18vh -12vw;
  display: none;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background:
    linear-gradient(115deg, transparent 6%, rgba(64, 184, 177, 0.08) 18%, transparent 34%),
    linear-gradient(72deg, transparent 30%, rgba(63, 127, 167, 0.07) 46%, transparent 63%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.32), transparent 38%, rgba(229, 241, 244, 0.24));
  filter: blur(12px);
  transform: translate3d(-2vw, -1vh, 0) rotate(-1deg);
}

.matrix-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
  width: 100vw;
  height: 100vh;
  opacity: 0.95;
  transition: opacity 220ms ease;
}

body.is-modeling .matrix-rain,
body.is-report-ready .matrix-rain {
  opacity: 0;
}

.top-nav {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: start;
  gap: 18px;
  animation: rise 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.top-brand {
  display: grid;
  justify-items: start;
  gap: 3px;
}

.top-nav a {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 1px solid rgba(52, 122, 118, 0.32);
}

.top-nav .nav-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(35, 111, 110, 0.12);
  border-radius: 999px;
  padding: 0 15px;
  color: rgba(53, 70, 66, 0.72);
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.025em;
  box-shadow:
    0 10px 28px rgba(32, 50, 48, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.top-nav .nav-pill-primary {
  color: var(--teal-dark);
  border-color: rgba(64, 184, 177, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(229, 241, 244, 0.76)),
    rgba(255, 255, 255, 0.7);
  box-shadow:
    0 14px 32px rgba(35, 111, 110, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body:not(.auth-ready) .nav-auth-only {
  display: none;
}

.top-nav .project-name {
  color: rgba(24, 35, 32, 0.58);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-bottom: 0;
}

.corner-byline {
  color: rgba(53, 70, 66, 0.58);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
}

.corner-byline strong {
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
}

.corner-byline span {
  color: rgba(96, 105, 102, 0.62);
}

.corner-byline em {
  color: rgba(74, 155, 142, 0.82);
  font-style: inherit;
  text-shadow: none;
}

.top-nav a:hover {
  color: var(--blue);
  border-color: rgba(47, 111, 147, 0.42);
}

.top-nav .nav-pill:hover {
  color: var(--teal-dark);
  border-color: rgba(35, 111, 110, 0.22);
  background: rgba(255, 255, 255, 0.86);
  transform: translateY(-1px);
}

.top-nav .nav-pill-primary:hover {
  color: var(--blue);
  border-color: rgba(63, 127, 167, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(229, 241, 244, 0.9)),
    rgba(255, 255, 255, 0.84);
  box-shadow:
    0 16px 36px rgba(35, 111, 110, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.auth-panel {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 7px;
  padding: 4px 4px 4px 12px;
  border: 1px solid rgba(35, 111, 110, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 10px 28px rgba(32, 50, 48, 0.06);
}

.auth-panel img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.auth-panel span {
  max-width: 210px;
  color: rgba(53, 70, 66, 0.7);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-panel button {
  min-height: 28px;
  padding: 0 12px;
  font-size: 11px;
  box-shadow: none;
}

.auth-panel .nav-pill {
  min-height: 28px;
  padding: 0 11px;
  font-size: 10.5px;
  box-shadow: none;
}

.hero {
  --brand-optical-x: 0px;
  min-height: 74vh;
  display: grid;
  justify-items: center;
  align-items: center;
  align-content: center;
  gap: 30px;
}

.hero.compact {
  min-height: 42vh;
}

.prompt-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: min(980px, 100%);
  margin-inline: auto;
  animation: rise 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-mark {
  justify-self: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  margin-right: 0;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  box-shadow: none;
  pointer-events: none;
  transform: translateX(var(--brand-optical-x));
}

.brand-mark img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  opacity: 0.6;
  filter: saturate(0.78) contrast(0.94) brightness(1.08) drop-shadow(0 2px 5px rgba(74, 155, 142, 0.08));
  transform: scale(1.04);
}

h1 {
  justify-self: center;
  width: max-content;
  max-width: 100%;
  margin: 14px 0 0;
  color: #8f9693;
  font-size: clamp(38px, 5vw, 74px);
  font-family: var(--serif);
  font-style: italic;
  line-height: 0.94;
  letter-spacing: 0.005em;
  font-weight: 500;
  text-align: center;
}

.prompt-intro h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 44px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
}

.composer {
  position: relative;
  overflow: hidden;
  width: min(740px, 100%);
  padding: 34px 34px 26px;
  border: 1px solid var(--glass-border);
  border-top-color: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 253, 251, 0.84)),
    rgba(255, 255, 255, 0.82);
  box-shadow:
    0 34px 110px rgba(24, 50, 47, 0.1),
    0 10px 28px rgba(24, 50, 47, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 0 0 1px rgba(35, 111, 110, 0.035);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  animation: rise 720ms cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
  transition: transform 240ms ease, box-shadow 240ms ease, background 240ms ease;
}

.composer::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(64, 184, 177, 0.42), rgba(63, 127, 167, 0.26), transparent);
}

.composer:hover,
.composer:focus-within {
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(252, 254, 253, 0.9)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 40px 128px rgba(24, 50, 47, 0.12),
    0 12px 34px rgba(24, 50, 47, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 0 0 1px rgba(35, 111, 110, 0.05);
}

.prompt-presets {
  width: min(740px, 100%);
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0;
  align-items: start;
  animation: rise 720ms cubic-bezier(0.22, 1, 0.36, 1) 170ms both;
}

.preset-group {
  position: relative;
}

.preset-group summary {
  min-height: 38px;
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(35, 111, 110, 0.11);
  border-top-color: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 10px 17px;
  color: rgba(24, 35, 32, 0.68);
  background: rgba(255, 255, 255, 0.72);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.015em;
  box-shadow:
    0 1px 5px rgba(24, 50, 47, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.preset-group summary::-webkit-details-marker {
  display: none;
}

.preset-group summary::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.72;
  transition: transform 160ms ease;
}

.preset-group[open] summary,
.preset-group summary:hover {
  color: var(--teal-dark);
  border-color: rgba(35, 111, 110, 0.22);
  border-top-color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 10px 24px rgba(24, 50, 47, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
}

.preset-group[open] summary::after {
  transform: translateY(1px) rotate(225deg);
}

.preset-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 8;
  width: min(310px, calc(100vw - 44px));
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(35, 111, 110, 0.11);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 253, 251, 0.9)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 20px 58px rgba(24, 50, 47, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transform: translateX(-50%);
}

.prompt-preset {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(35, 111, 110, 0.08);
  border-radius: 11px;
  padding: 8px 11px;
  color: rgba(53, 70, 66, 0.78);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.prompt-preset:hover {
  color: var(--teal-dark);
  border-color: rgba(52, 122, 118, 0.22);
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

.prompt-preset:active {
  transform: translateY(0);
}

.hero-caption {
  width: min(740px, 100%);
  margin: -10px auto 0;
  color: rgba(53, 70, 66, 0.46);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.035em;
  animation: rise 720ms cubic-bezier(0.22, 1, 0.36, 1) 260ms both;
}

.site-contact {
  display: flex;
  justify-content: center;
  margin: 34px auto 0;
  text-align: center;
  animation: rise 720ms cubic-bezier(0.22, 1, 0.36, 1) 340ms both;
}

.site-contact a,
.site-contact a:visited {
  color: rgba(53, 70, 66, 0.58);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-contact a:hover,
.site-contact a:focus-visible {
  color: var(--teal-dark);
  outline: none;
}

@media (max-width: 720px) {
  .top-nav {
    position: static;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 34px;
  }

  .top-nav .project-name {
    font-size: 12px;
  }

  .nav-actions {
    align-items: stretch;
    justify-content: center;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .top-nav .nav-pill {
    padding: 0 10px;
    white-space: normal;
    text-align: center;
  }

  .site-contact {
    margin-top: 34px;
  }

  .auth-panel {
    justify-content: space-between;
    justify-self: stretch;
    width: 100%;
  }

  .auth-panel span {
    max-width: calc(100vw - 190px);
  }

  .prompt-intro {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .prompt-intro h1 {
    width: 100%;
    font-size: clamp(30px, 10vw, 40px);
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .composer {
    width: 100%;
    padding: 24px 18px 20px;
    border-radius: 18px;
  }

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

  .cabinet {
    padding: 18px;
  }

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

  .cabinet-grid,
  .cabinet-run {
    grid-template-columns: 1fr;
  }

  .cabinet-run footer {
    justify-items: stretch;
  }

  .file-pill span,
  .file-status,
  .composer > .composer-actions button {
    width: 100%;
  }

  .file-status {
    text-align: center;
  }

  .prompt-presets {
    width: 100%;
  }

  .hero-caption {
    width: 100%;
  }
}

.overview-shell {
  width: min(1180px, calc(100vw - 44px));
}

.overview-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 42px;
  color: rgba(53, 70, 66, 0.58);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-nav a {
  color: rgba(52, 122, 118, 0.82);
  text-decoration: none;
}

.overview-nav span {
  color: rgba(117, 128, 124, 0.66);
}

.overview-page {
  display: grid;
  gap: 22px;
}

.overview-header {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 8px;
  text-align: center;
}

.overview-header p {
  margin: 0;
  color: rgba(117, 128, 124, 0.78);
  font-size: 15px;
  line-height: 1.55;
}

.overview-viewer {
  min-height: min(78vh, 900px);
  overflow: hidden;
  border: 1px solid rgba(35, 111, 110, 0.1);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 253, 251, 0.88)),
    rgba(255, 255, 255, 0.88);
  box-shadow:
    0 30px 104px rgba(24, 50, 47, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.overview-viewer object {
  width: 100%;
  height: min(78vh, 900px);
  display: block;
}

.overview-viewer p {
  margin: 32px;
  color: var(--muted);
}

.overview-viewer a,
.overview-actions a {
  color: var(--teal-dark);
  font-weight: 500;
  text-decoration: none;
}

.overview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  font-size: 14px;
}

textarea {
  width: 100%;
  min-height: 95px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.01em;
  caret-color: var(--teal);
}

textarea::placeholder {
  color: rgba(53, 70, 66, 0.34);
  font-weight: 300;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(35, 111, 110, 0.085);
}

.file-pill input {
  display: none;
}

.file-pill span,
button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
}

.file-pill span {
  min-height: 40px;
  max-width: 100%;
  gap: 7px;
  border: 1px solid rgba(35, 111, 110, 0.12);
  background: rgba(255, 255, 255, 0.32);
  color: rgba(53, 70, 66, 0.62);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: none;
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.file-status {
  flex: 1;
  min-width: 120px;
  color: rgba(53, 70, 66, 0.48);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

button {
  border: 0;
  background: linear-gradient(135deg, #172724, #203d39 62%, #256864);
  color: #fff;
  padding: 0 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.015em;
  box-shadow:
    0 14px 34px rgba(35, 111, 110, 0.18),
    0 1px 4px rgba(24, 50, 47, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.file-pill span:hover {
  transform: translateY(-1px);
  border-color: rgba(35, 111, 110, 0.24);
  background: rgba(255, 255, 255, 0.82);
  color: var(--teal-dark);
}

.composer > .composer-actions button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #10201d, #1b3935 58%, #23756f);
  box-shadow:
    0 18px 42px rgba(35, 111, 110, 0.22),
    0 1px 4px rgba(24, 50, 47, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.composer > .composer-actions button:active,
.file-pill span:active {
  transform: translateY(0);
}

.hidden {
  display: none;
}

.cabinet {
  width: min(1120px, 100%);
  margin: -18px auto 42px;
  padding: 24px;
  border: 1px solid rgba(35, 111, 110, 0.1);
  border-top-color: rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(246, 252, 249, 0.58)),
    rgba(255, 255, 255, 0.64);
  box-shadow: var(--premium-shadow);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
}

body:not(.auth-ready) .cabinet {
  display: none;
}

body.cabinet-page:not(.auth-ready) .cabinet {
  display: block;
}

body.cabinet-page .shell {
  min-height: 100vh;
}

body.cabinet-page .cabinet {
  margin-top: 160px;
}

.cabinet-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.cabinet-header h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: 0;
}

.cabinet-header button,
.cabinet-run button {
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
  box-shadow: none;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
}

.cabinet-usage,
.cabinet-history {
  border: 1px solid rgba(35, 111, 110, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
}

.cabinet-usage {
  padding: 18px;
}

.cabinet-usage small,
.cabinet-history-head small,
.cabinet-run time {
  color: rgba(53, 70, 66, 0.52);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.cabinet-usage strong {
  display: block;
  margin: 10px 0 14px;
  color: var(--teal-dark);
  font-size: 34px;
  font-weight: 500;
}

.usage-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(35, 111, 110, 0.1);
}

.usage-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  transition: width 260ms ease;
}

.cabinet-usage p {
  margin: 12px 0 0;
  color: rgba(53, 70, 66, 0.62);
  font-size: 13px;
  line-height: 1.45;
}

.cabinet-history {
  min-height: 240px;
  overflow: hidden;
}

.cabinet-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(35, 111, 110, 0.08);
}

.cabinet-history-head span {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}

.cabinet-runs {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding: 12px;
}

.cabinet-empty {
  margin: 22px 6px;
  color: rgba(53, 70, 66, 0.58);
  font-size: 14px;
}

.cabinet-run {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(35, 111, 110, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.cabinet-run h3 {
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.cabinet-run p {
  margin: 0;
  color: rgba(53, 70, 66, 0.62);
  font-size: 12.5px;
}

.cabinet-run footer {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.run-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--teal-dark);
  background: rgba(64, 184, 177, 0.13);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.run-status.failed {
  color: #9d3f3f;
  background: rgba(157, 63, 63, 0.1);
}

.run-status.running {
  color: var(--blue);
  background: rgba(63, 127, 167, 0.12);
}

.modeling,
.report {
  margin-top: 28px;
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.modeling {
  width: calc(100vw - 32px);
  margin-left: 50%;
  padding: 22px 0 0;
  transform: translateX(-50%);
}

.modeling-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: 14px;
  align-items: stretch;
  contain: layout paint;
}

body.is-modeling {
  background:
    radial-gradient(circle at 18% 12%, rgba(64, 184, 177, 0.2), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(63, 127, 167, 0.16), transparent 30%),
    linear-gradient(118deg, rgba(230, 249, 246, 0.72) 0%, rgba(250, 253, 248, 0.98) 42%, rgba(239, 247, 249, 0.78) 100%),
    linear-gradient(180deg, #f7faf5 0%, #eef6f1 58%, #e8f0ec 100%);
}

body.is-modeling .shell {
  width: min(1760px, calc(100vw - 44px));
}

body.is-modeling .hero.compact {
  min-height: 28vh;
  opacity: 0.72;
  transform: scale(0.96);
  transform-origin: top center;
}

body.is-report-ready .hero.compact {
  display: none;
}

.stage-header,
.report-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 0 8px 34px;
}

.stage-header {
  align-items: end;
  position: relative;
  min-height: 108px;
  border-bottom: 1px solid rgba(35, 111, 110, 0.08);
  margin-bottom: 16px;
}

.stage-header::before {
  content: "MODEL FIELD / LIVE AGENT ITERATION";
  position: absolute;
  left: 8px;
  bottom: 10px;
  padding-right: 12px;
  background: transparent;
  color: rgba(35, 111, 110, 0.46);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.eyebrow {
  color: var(--teal-dark);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

h2 {
  margin: 7px 0 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.stage-header h2 {
  max-width: min(1040px, 72vw);
  color: rgba(24, 35, 32, 0.86);
  font-size: clamp(22px, 2.35vw, 38px);
  line-height: 1.12;
  font-weight: 450;
  overflow-wrap: anywhere;
}

.report-header h2 {
  font-family: var(--serif);
  font-size: clamp(31px, 3.4vw, 54px);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.stage-meter {
  min-width: 190px;
  text-align: right;
  color: rgba(53, 70, 66, 0.62);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  padding: 10px 12px;
  border: 1px solid rgba(35, 111, 110, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.stage-meter div {
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(35, 111, 110, 0.08);
}

.compute-console {
  display: grid;
  grid-template-rows: minmax(210px, 1fr) minmax(210px, auto) minmax(250px, 1.15fr);
  gap: 12px;
  min-height: 720px;
}

.compute-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(35, 111, 110, 0.1);
  border-top-color: rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 252, 249, 0.62)),
    rgba(255, 255, 255, 0.54);
  box-shadow:
    0 22px 72px rgba(24, 50, 47, 0.065),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.compute-card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(64, 184, 177, 0.42), transparent);
}

.compute-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  color: rgba(35, 111, 110, 0.82);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.compute-card-head b {
  color: rgba(53, 70, 66, 0.45);
  font-weight: 500;
}

#compute-rail {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#compute-rail li {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: start;
  padding: 9px 0 0;
  border-top: 1px solid rgba(35, 111, 110, 0.075);
}

#compute-rail li:first-child {
  padding-top: 0;
  border-top: 0;
}

#compute-rail span,
#compute-rail small {
  font-family: var(--mono);
}

#compute-rail span {
  color: rgba(35, 111, 110, 0.86);
  min-width: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

#compute-rail em {
  color: rgba(53, 70, 66, 0.66);
  min-width: 0;
  font-size: 12px;
  font-style: normal;
  font-weight: 300;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#compute-rail small {
  color: rgba(53, 70, 66, 0.34);
  font-size: 9px;
  letter-spacing: 0;
  justify-self: end;
  line-height: 1.25;
  text-transform: none;
  white-space: nowrap;
}

#compute-rail li.running span::before,
#compute-rail li.done span::before,
#compute-rail li.stop span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: rgba(64, 184, 177, 0.9);
  box-shadow: 0 0 12px rgba(64, 184, 177, 0.38);
}

#compute-rail li.running span::before {
  animation: electricPulse 1000ms ease-out infinite;
}

#compute-rail li.stop span::before {
  background: rgba(167, 88, 78, 0.86);
  box-shadow: 0 0 12px rgba(167, 88, 78, 0.24);
}

.ti-board {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: rgba(53, 70, 66, 0.72);
  font-family: var(--mono);
  font-size: 10px;
}

.ti-board th,
.ti-board td {
  padding: 8px 6px;
  border-top: 1px solid rgba(35, 111, 110, 0.075);
  text-align: left;
  vertical-align: top;
}

.ti-board th {
  color: rgba(35, 111, 110, 0.68);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.ti-board td {
  font-weight: 400;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.ti-board th:nth-child(1),
.ti-board td:nth-child(1) {
  width: 31%;
}

.ti-board th:nth-child(2),
.ti-board td:nth-child(2) {
  width: 22%;
}

.ti-board th:nth-child(3),
.ti-board td:nth-child(3) {
  width: 18%;
}

.ti-board th:nth-child(4),
.ti-board td:nth-child(4) {
  width: 29%;
}

.ti-board tr.best td {
  color: rgba(24, 35, 32, 0.9);
  background: rgba(64, 184, 177, 0.075);
}

.ti-board td:nth-child(3) {
  color: var(--teal-dark);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ow-chain-viewer {
  display: grid;
  gap: 12px;
  max-height: 418px;
  overflow: auto;
  padding-right: 3px;
}

.ow-chain-viewer p {
  margin: 0;
  color: rgba(53, 70, 66, 0.58);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.4;
}

.ow-chain-viewer section {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(35, 111, 110, 0.075);
}

.ow-chain-viewer section:first-child {
  padding-top: 0;
  border-top: 0;
}

.ow-chain-viewer h4 {
  margin: 0;
  color: rgba(24, 35, 32, 0.76);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.ow-chain {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(35, 111, 110, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
}

.ow-chain b {
  color: rgba(35, 111, 110, 0.82);
  font-size: 11px;
  font-weight: 500;
}

.ow-chain div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.ow-chain span {
  max-width: 150px;
  overflow: hidden;
  border: 1px solid rgba(35, 111, 110, 0.09);
  border-radius: 999px;
  padding: 4px 7px;
  color: rgba(53, 70, 66, 0.72);
  background: rgba(255, 255, 255, 0.58);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ow-chain i {
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(35, 111, 110, 0.14), rgba(64, 184, 177, 0.48));
}

.stage-meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-dark), var(--teal), rgba(47, 111, 147, 0.72));
  transition: width 420ms ease;
}

.constellation {
  position: relative;
  height: clamp(720px, 76vh, 920px);
  min-height: 720px;
  overflow: hidden;
  contain: layout paint;
  border: 1px solid rgba(35, 111, 110, 0.08);
  border-top-color: rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.66), transparent 38%),
    radial-gradient(circle at 12% 20%, rgba(64, 184, 177, 0.12), transparent 30%),
    radial-gradient(circle at 86% 28%, rgba(63, 127, 167, 0.11), transparent 32%),
    linear-gradient(90deg, rgba(64, 184, 177, 0.075), transparent 34%, transparent 74%, rgba(63, 127, 167, 0.075)),
    linear-gradient(rgba(248, 250, 245, 0.92), rgba(242, 247, 243, 0.955)),
    linear-gradient(rgba(35, 111, 110, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 111, 110, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(35, 111, 110, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 111, 110, 0.018) 1px, transparent 1px),
    url("./algorithm-bg.png") center center / min(1800px, 130vw) auto no-repeat,
    linear-gradient(180deg, #f8faf5 0%, #edf4ef 100%);
  background-size: auto, auto, auto, auto, auto, 72px 72px, 72px 72px, 18px 18px, 18px 18px, min(1800px, 130vw) auto, auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 34px 118px rgba(24, 50, 47, 0.065);
}

.constellation::before,
.constellation::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.constellation::before {
  inset: 18px;
  border: 1px solid rgba(35, 111, 110, 0.075);
  border-radius: 17px;
  background:
    linear-gradient(90deg, rgba(35, 111, 110, 0.28), rgba(35, 111, 110, 0.28)) left top / 58px 1px no-repeat,
    linear-gradient(180deg, rgba(35, 111, 110, 0.28), rgba(35, 111, 110, 0.28)) left top / 1px 58px no-repeat,
    linear-gradient(90deg, rgba(35, 111, 110, 0.28), rgba(35, 111, 110, 0.28)) right top / 58px 1px no-repeat,
    linear-gradient(180deg, rgba(35, 111, 110, 0.28), rgba(35, 111, 110, 0.28)) right top / 1px 58px no-repeat,
    linear-gradient(90deg, rgba(35, 111, 110, 0.28), rgba(35, 111, 110, 0.28)) left bottom / 58px 1px no-repeat,
    linear-gradient(180deg, rgba(35, 111, 110, 0.28), rgba(35, 111, 110, 0.28)) left bottom / 1px 58px no-repeat,
    linear-gradient(90deg, rgba(35, 111, 110, 0.28), rgba(35, 111, 110, 0.28)) right bottom / 58px 1px no-repeat,
    linear-gradient(180deg, rgba(35, 111, 110, 0.28), rgba(35, 111, 110, 0.28)) right bottom / 1px 58px no-repeat;
}

.constellation::after {
  inset: 0;
  opacity: 0.68;
  mix-blend-mode: multiply;
  background:
    linear-gradient(180deg, transparent 0%, rgba(64, 184, 177, 0.08) 49%, transparent 52%) 0 0 / 100% 160px repeat-y,
    radial-gradient(ellipse at 50% -20%, rgba(255, 255, 255, 0.88), transparent 58%);
}

.constellation .speech,
.constellation .agents,
.constellation .pulse,
.constellation .threads {
  position: absolute;
}

.constellation[data-active]::before {
  box-shadow:
    inset 0 0 0 1px rgba(64, 184, 177, 0.035),
    0 0 44px rgba(64, 184, 177, 0.05);
}

.threads {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translateZ(0);
  z-index: 3;
}

.threads path {
  fill: none;
  stroke: rgba(35, 111, 110, 0.16);
  stroke-width: 1.35;
  stroke-linecap: round;
  transition: stroke 240ms ease, stroke-width 240ms ease;
}

.threads path.active {
  stroke: rgba(35, 111, 110, 0.74);
  stroke-width: 2.25;
  stroke-dasharray: 8 15;
  filter: drop-shadow(0 0 5px rgba(64, 184, 177, 0.18));
  animation: currentFlow 520ms linear infinite;
}

@keyframes currentFlow {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -76;
  }
}

.pulse {
  left: 0;
  top: 0;
  --pulse-x: 21%;
  --pulse-y: 34%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(248, 255, 253, 0.95);
  box-shadow:
    0 0 0 8px rgba(82, 183, 174, 0.08),
    0 0 26px rgba(64, 151, 145, 0.55),
    0 0 54px rgba(64, 151, 145, 0.28);
  transform: translate3d(var(--pulse-x), var(--pulse-y), 0) translate(-50%, -50%);
  transition: transform 560ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
  z-index: 6;
}

.pulse::before,
.pulse::after {
  content: "";
  position: absolute;
  inset: -11px;
  border-radius: inherit;
  border: 1px solid rgba(83, 176, 168, 0.28);
  animation: electricPulse 1200ms ease-out infinite;
  will-change: opacity, transform;
}

.pulse::after {
  animation-delay: 420ms;
}

@keyframes electricPulse {
  from {
    opacity: 0.9;
    transform: scale(0.35);
  }

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

.agents {
  inset: 0;
  z-index: 5;
}

.agent {
  position: absolute;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 28px 74px rgba(24, 50, 47, 0.08),
    0 0 0 1px rgba(35, 111, 110, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.agent {
  width: 156px;
  height: 156px;
  border-radius: 999px;
  padding: 18px;
  color: rgba(248, 248, 244, 0.9);
  opacity: 0.92;
  transition: transform 360ms ease, box-shadow 360ms ease, filter 360ms ease;
}

.agent::before,
.agent::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.agent::before {
  inset: -8px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    inset 0 0 0 1px rgba(35, 111, 110, 0.06),
    0 0 0 1px rgba(35, 111, 110, 0.025);
}

.agent::after {
  inset: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  opacity: 0.75;
}

.agent strong {
  position: relative;
  z-index: 1;
  color: inherit;
  font-family: var(--sans);
  font-size: clamp(12px, calc(19px - var(--label-length) * 0.22px), 17px);
  line-height: 1.12;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.agent.active {
  transform: scale(1.075);
  box-shadow:
    0 30px 92px rgba(45, 107, 97, 0.15),
    0 0 0 1px rgba(64, 184, 177, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  filter: saturate(1.02) brightness(1.02);
  opacity: 1;
}

.agent.active::before {
  border-color: rgba(64, 184, 177, 0.42);
  box-shadow:
    0 0 0 1px rgba(64, 184, 177, 0.12),
    0 0 38px rgba(64, 184, 177, 0.18);
  animation: agentScan 1800ms ease-in-out infinite;
}

@keyframes agentScan {
  0%, 100% {
    transform: scale(1);
    opacity: 0.72;
  }

  50% {
    transform: scale(1.045);
    opacity: 1;
  }
}

.agent:nth-child(4n + 1) {
  background: linear-gradient(145deg, rgba(152, 202, 197, 0.86), rgba(103, 164, 157, 0.86));
}

.agent:nth-child(4n + 2) {
  background: linear-gradient(145deg, rgba(126, 163, 184, 0.86), rgba(87, 123, 145, 0.86));
}

.agent:nth-child(4n + 3) {
  background: linear-gradient(145deg, rgba(153, 180, 146, 0.86), rgba(109, 139, 115, 0.86));
}

.agent:nth-child(4n + 4) {
  background: linear-gradient(145deg, rgba(180, 176, 190, 0.86), rgba(136, 134, 151, 0.86));
}

.speech {
  --speech-font-size: 16px;
  width: max-content;
  min-width: 280px;
  max-width: min(580px, calc(100% - 40px));
  max-height: min(31vh, 260px);
  left: 31%;
  top: 10%;
  padding: 18px 22px;
  border: 1px solid rgba(35, 111, 110, 0.12);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 253, 251, 0.9)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 24px 80px rgba(24, 50, 47, 0.08),
    0 6px 18px rgba(24, 50, 47, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  transition: left 420ms ease, top 420ms ease;
  will-change: left, top;
  overflow: visible;
  z-index: 5;
}

.speech::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(64, 184, 177, 0.46), rgba(63, 127, 167, 0.24), transparent);
}

.speech.speech-long {
  width: min(520px, calc(100% - 40px));
}

.speech.speech-xlong {
  width: min(560px, calc(100% - 40px));
  max-width: min(560px, calc(100% - 40px));
  padding: 14px 18px;
}

.speech::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid rgba(35, 111, 110, 0.12);
  border-bottom: 1px solid rgba(35, 111, 110, 0.12);
}

.speech.placement-above::after {
  left: 34px;
  bottom: -11px;
  transform: rotate(45deg);
}

.speech.placement-below::after {
  left: 34px;
  top: -11px;
  transform: rotate(225deg);
}

.speech.placement-right::after {
  left: -11px;
  top: calc(50% - 11px);
  transform: rotate(135deg);
}

.speech.placement-left::after {
  right: -11px;
  top: calc(50% - 11px);
  transform: rotate(-45deg);
}

.speech b {
  color: var(--teal-dark);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.speech b::before {
  content: "ACTIVE ACTOR / ";
  color: rgba(53, 70, 66, 0.42);
  font-weight: 500;
}

.speech p {
  margin: 8px 0 0;
  color: rgba(35, 111, 110, 0.9);
  font-size: var(--speech-font-size);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.36;
  max-width: 56ch;
  max-height: 156px;
  overflow: auto;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.report {
  position: relative;
  width: min(1480px, calc(100vw - 44px));
  margin-left: 50%;
  padding: 46px 0 72px;
  transform: translateX(-50%);
}

.report::before {
  content: "";
  position: absolute;
  inset: 18px -12px auto;
  height: 220px;
  z-index: -1;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 35%, rgba(64, 184, 177, 0.13), transparent 34%),
    radial-gradient(circle at 78% 20%, rgba(63, 127, 167, 0.11), transparent 32%),
    linear-gradient(rgba(35, 111, 110, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 111, 110, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 36px 36px, 36px 36px;
  opacity: 0.86;
}

.report-header {
  align-items: end;
  min-height: 118px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(35, 111, 110, 0.09);
}

.report-header h2 {
  font-family: var(--sans);
  font-size: clamp(30px, 3.2vw, 52px);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.report-header p {
  margin: 0;
  max-width: 440px;
  color: rgba(53, 70, 66, 0.62);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
}

.report-kernel-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.report-kernel-strip div {
  position: relative;
  min-height: 78px;
  overflow: hidden;
  border: 1px solid rgba(35, 111, 110, 0.1);
  border-top-color: rgba(255, 255, 255, 0.84);
  border-radius: 16px;
  padding: 15px 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(246, 252, 249, 0.62)),
    rgba(255, 255, 255, 0.54);
  box-shadow:
    0 18px 56px rgba(24, 50, 47, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.report-kernel-strip div::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(64, 184, 177, 0.42), transparent);
}

.report-kernel-strip strong {
  display: block;
  margin-top: 8px;
  color: rgba(24, 35, 32, 0.82);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.report-board {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 14px;
}

.report-note {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid rgba(35, 111, 110, 0.105);
  border-top-color: rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  padding: 22px;
  background:
    linear-gradient(rgba(35, 111, 110, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 111, 110, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 252, 249, 0.76)),
    rgba(255, 255, 255, 0.74);
  background-size: 24px 24px, 24px 24px, auto, auto;
  box-shadow:
    0 24px 82px rgba(24, 50, 47, 0.075),
    0 5px 18px rgba(24, 50, 47, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.report-note::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(64, 184, 177, 0.5), rgba(63, 127, 167, 0.22), transparent);
}

.report-note-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

h3 {
  margin: 0;
  color: rgba(24, 35, 32, 0.86);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.report-note-head span {
  color: var(--teal-dark);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-note p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 300;
  line-height: 1.55;
}

.output-note,
.actor-threat-report,
.scenario-report,
.timeline-report,
.trace-report {
  grid-column: span 2;
}

.output-note {
  min-height: 190px;
  background:
    radial-gradient(circle at 0% 0%, rgba(64, 184, 177, 0.09), transparent 34%),
    linear-gradient(rgba(35, 111, 110, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 111, 110, 0.024) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 252, 249, 0.78)),
    rgba(255, 255, 255, 0.76);
  background-size: auto, 24px 24px, 24px 24px, auto, auto;
}

.output-note .answer-body {
  color: rgba(24, 35, 32, 0.78);
  font-size: clamp(15.5px, 1.05vw, 18px);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.66;
  max-width: 980px;
}

.output-note .answer-body p {
  margin: 0;
}

.output-note .answer-body p + p {
  margin-top: 0.9em;
}

.output-note .answer-body h4 {
  margin: 1.05em 0 0.45em;
  color: rgba(24, 35, 32, 0.84);
  font-family: var(--sans);
  font-size: 0.98em;
  font-weight: 600;
  letter-spacing: 0;
}

.output-note .answer-body h4:first-child {
  margin-top: 0;
}

.output-note .answer-body ul,
.output-note .answer-body ol {
  margin: 0.75em 0 0;
  padding-left: 1.25em;
}

.output-note .answer-body li {
  margin: 0;
  padding-left: 0.15em;
}

.output-note .answer-body li + li {
  margin-top: 0.45em;
}

.output-note .answer-body strong {
  color: rgba(24, 35, 32, 0.88);
  font-weight: 600;
}

.output-note .answer-body em {
  color: rgba(24, 35, 32, 0.7);
  font-style: italic;
}

.risk-grid,
.scenario-score-grid {
  display: grid;
  gap: 12px;
}

.risk-grid {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}

.risk-grid div,
.scenario-score-grid article {
  border: 1px solid rgba(35, 111, 110, 0.095);
  border-radius: 12px;
  padding: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(248, 252, 250, 0.48)),
    rgba(255, 255, 255, 0.46);
}

small {
  display: block;
  color: rgba(53, 70, 66, 0.56);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.risk-grid strong,
.scenario-score-grid strong {
  display: block;
  margin-top: 5px;
  color: rgba(24, 35, 32, 0.86);
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.report-actors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.report-actor {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  border: 1px solid rgba(35, 111, 110, 0.075);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.44);
}

.report-actor i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(248, 248, 244, 0.9);
  background: #6f94aa;
  font-style: normal;
  font-weight: 500;
  font-family: var(--mono);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 10px 22px rgba(24, 50, 47, 0.08);
}

.report-actor:nth-child(3n + 1) i {
  background: #6eaaa5;
}

.report-actor:nth-child(3n + 2) i {
  background: #6f94aa;
}

.report-actor:nth-child(3n + 3) i {
  background: #7f9c78;
}

.report-actor strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  line-height: 1.2;
}

.report-actor span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.scenario-score-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 16px;
}

.scenario-score-grid article.selected {
  position: relative;
  background:
    linear-gradient(180deg, rgba(111, 219, 212, 0.14), rgba(255, 255, 255, 0.52)),
    rgba(100, 200, 196, 0.14);
  border-color: rgba(52, 122, 118, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 1px rgba(64, 184, 177, 0.06),
    0 14px 38px rgba(35, 111, 110, 0.08);
}

.scenario-score-grid article.selected::before {
  content: "MINIMAX SELECTED";
  position: absolute;
  right: 12px;
  top: 12px;
  color: rgba(35, 111, 110, 0.58);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.scenario-score-grid b {
  display: block;
  margin-bottom: 12px;
  color: rgba(24, 35, 32, 0.86);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.scenario-score-grid article div + div {
  margin-top: 10px;
}

.scenario-score-grid article p {
  margin-top: 13px;
  color: rgba(53, 70, 66, 0.64);
  font-size: 13px;
  line-height: 1.45;
}

.actor-threat-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.actor-threat-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(35, 111, 110, 0.08);
  border-radius: 14px;
  padding: 15px;
  background:
    linear-gradient(135deg, rgba(64, 184, 177, 0.07), transparent 45%),
    rgba(255, 255, 255, 0.46);
}

.actor-threat-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.actor-threat-head b {
  color: rgba(24, 35, 32, 0.86);
  font-size: 15px;
  font-weight: 600;
}

.actor-threat-head strong {
  color: var(--teal-dark);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
}

.threat-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.threat-types span,
.decision-status {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(111, 148, 170, 0.13);
  color: rgba(53, 70, 66, 0.72);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.2;
}

.decision-status.selected {
  background: rgba(110, 170, 165, 0.18);
  color: var(--teal-dark);
}

.decision-status.rejected {
  background: rgba(53, 70, 66, 0.08);
  color: rgba(53, 70, 66, 0.54);
}

.threat-meter,
.scenario-ti-row i {
  overflow: hidden;
  border-radius: 999px;
  background: rgba(35, 111, 110, 0.08);
}

.threat-meter {
  height: 7px;
}

.threat-meter i,
.scenario-ti-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-dark), var(--teal), rgba(63, 127, 167, 0.72));
}

.threat-ti-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.threat-ti-grid div {
  border: 1px solid rgba(35, 111, 110, 0.07);
  border-radius: 11px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.4);
}

.threat-ti-grid em {
  display: block;
  margin-top: 5px;
  color: rgba(24, 35, 32, 0.82);
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.actor-threat-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.scenario-ti-bars {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(35, 111, 110, 0.08);
}

.scenario-ti-row {
  display: grid;
  grid-template-columns: minmax(84px, 0.9fr) minmax(90px, 1fr) 54px;
  gap: 8px;
  align-items: center;
  color: rgba(53, 70, 66, 0.68);
  font-family: var(--mono);
  font-size: 10.5px;
}

.scenario-ti-row span {
  overflow-wrap: anywhere;
}

.scenario-ti-row i {
  height: 6px;
}

.scenario-ti-row em {
  color: rgba(24, 35, 32, 0.72);
  font-style: normal;
  text-align: right;
}

.run-timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.run-timeline li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.run-timeline li > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(110, 170, 165, 0.16);
  color: var(--teal-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.run-timeline div {
  border: 1px solid rgba(35, 111, 110, 0.075);
  border-radius: 13px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.44);
}

.run-timeline b {
  color: rgba(24, 35, 32, 0.84);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.run-timeline p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.calibration-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(111, 148, 170, 0.14);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.035em;
  font-style: normal;
  font-weight: 500;
}

.calibration-status.supported {
  background: rgba(110, 170, 165, 0.16);
  color: var(--teal-dark);
}

.calibration-status.weak {
  background: rgba(198, 114, 101, 0.13);
  color: #9b4e45;
}

.scenario-details {
  display: grid;
  gap: 10px;
}

.scenario-details details {
  border: 1px solid rgba(35, 111, 110, 0.075);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.42);
}

.scenario-details summary {
  cursor: pointer;
  color: rgba(24, 35, 32, 0.82);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.scenario-details p {
  margin-top: 10px;
  color: var(--muted);
}

.scenario-details small {
  margin-top: 9px;
  color: var(--muted);
  text-transform: none;
}

.source-list {
  display: grid;
  gap: 10px;
}

.chain-source-scenario {
  border: 1px solid rgba(35, 111, 110, 0.085);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.44);
}

.chain-source-scenario summary {
  cursor: pointer;
  color: rgba(24, 35, 32, 0.82);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.chain-source-actor {
  margin-top: 14px;
  padding-left: 14px;
  border-left: 2px solid rgba(64, 184, 177, 0.22);
}

.chain-source-actor h4,
.chain-source-chain h5 {
  margin: 0;
  color: rgba(24, 35, 32, 0.84);
}

.chain-source-actor h4 {
  font-size: 15px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.chain-source-chain {
  margin-top: 12px;
}

.chain-source-chain h5 {
  color: rgba(53, 70, 66, 0.62);
  font-size: 12px;
  font-weight: 500;
}

.chain-source-chain ol {
  display: grid;
  gap: 11px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.chain-transition {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(35, 111, 110, 0.07);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(64, 184, 177, 0.06), transparent 42%),
    rgba(255, 255, 255, 0.42);
}

.transition-title {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.transition-title i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(110, 170, 165, 0.16);
  color: var(--teal-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  font-family: var(--mono);
}

.transition-node-flow {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.transition-node-flow > b {
  align-self: center;
  color: rgba(24, 35, 32, 0.4);
  font-size: 13px;
  font-weight: 500;
}

.transition-node {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid rgba(35, 111, 110, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.transition-node strong {
  color: rgba(24, 35, 32, 0.82);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.transition-node small {
  color: rgba(24, 35, 32, 0.6);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.35;
}

.transition-node em {
  color: rgba(24, 35, 32, 0.42);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.chain-transition p {
  margin: 0 0 0 35px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.chain-source-links {
  display: grid;
  gap: 8px;
  margin-left: 35px;
}

.chain-source-links a {
  display: grid;
  gap: 3px;
  color: var(--teal-dark);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(35, 111, 110, 0.09);
  border-radius: 12px;
  padding: 10px 11px;
}

.chain-source-links a strong {
  color: var(--teal-dark);
  font-size: 13px;
  line-height: 1.3;
}

.chain-source-links a span,
.chain-source-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chain-source-empty {
  display: block;
  margin-left: 35px;
}

#report-trace {
  margin: 0;
  min-height: 210px;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(27, 53, 48, 0.86);
  border: 1px solid rgba(35, 111, 110, 0.1);
  border-radius: 14px;
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(64, 184, 177, 0.065), transparent 44%),
    linear-gradient(rgba(35, 111, 110, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 111, 110, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.58);
  background-size: auto, 22px 22px, 22px 22px, auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

@keyframes ambient-shift {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }

  100% {
    background-position: 2vw -1vh, -2vw 1vh, 0 0, 0 0;
  }
}

@keyframes grid-drift {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  100% {
    background-position: 0 0, 72px 72px, 72px 72px, 18px 18px, 18px 18px, 0 0, 0 0;
  }
}

@keyframes light-sweep {
  0% {
    opacity: 0.055;
    background-position: -18vw 0, 0 0;
  }

  100% {
    opacity: 0.1;
    background-position: 18vw 0, 36px 42px;
  }
}

@keyframes grain-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-1.5%, 1%, 0);
  }
}

@keyframes aurora-flow {
  0% {
    transform: translate3d(-2vw, -1vh, 0) rotate(-1deg) scale(1);
  }

  50% {
    opacity: 0.68;
  }

  100% {
    transform: translate3d(2vw, 1.5vh, 0) rotate(1deg) scale(1.03);
  }
}

.intro-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(252, 253, 250, 0.98), rgba(245, 249, 247, 0.98)),
    #f8faf7;
  animation: intro-out 980ms cubic-bezier(0.22, 1, 0.36, 1) 8900ms forwards;
}

.intro-skip {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 31;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(35, 111, 110, 0.12);
  border-radius: 999px;
  color: rgba(53, 70, 66, 0.52);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: intro-skip-out 520ms ease 8500ms forwards;
}

.intro-skip:hover {
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

body.intro-skipped .intro-layer,
body.intro-skipped .intro-skip {
  display: none;
}

body.intro-running .top-brand {
  opacity: 0;
}

body.intro-running .top-brand {
  transition: opacity 360ms ease;
}

.intro-sentence {
  position: relative;
  width: min(980px, calc(100vw - 48px));
  min-height: 300px;
  display: grid;
  place-items: center;
}

.intro-line {
  position: absolute;
  left: 50%;
  width: min(900px, 94vw);
  color: rgba(24, 35, 32, 0.58);
  font-family: var(--mono);
  font-size: clamp(16px, 2.3vw, 28px);
  font-style: normal;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-align: center;
  opacity: 0;
  text-transform: uppercase;
  transform: translate(-50%, 10px);
  --cursor-delay: 0ms;
  --cursor-duration: 0ms;
}

.intro-one {
  top: 102px;
  --cursor-delay: 420ms;
  --cursor-duration: 912ms;
  animation: intro-line-in 280ms ease 280ms forwards,
    intro-line-out 360ms ease 1860ms forwards;
}

.intro-many {
  top: 88px;
  font-size: clamp(15px, 2vw, 24px);
  --cursor-delay: 2280ms;
  --cursor-duration: 2064ms;
  animation: intro-line-in 260ms ease 2040ms forwards,
    intro-line-out 420ms ease 4860ms forwards;
}

.intro-same {
  top: 98px;
  font-size: clamp(14px, 1.8vw, 22px);
  --cursor-delay: 5240ms;
  --cursor-duration: 1416ms;
  animation: intro-line-in 260ms ease 5140ms forwards,
    intro-line-out 420ms ease 6860ms forwards;
}

.intro-line::after,
.intro-fly-title::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.92em;
  margin-left: 0.12em;
  background: rgba(35, 111, 110, 0.38);
  opacity: 0;
  transform: translateY(0.12em);
  animation: intro-cursor var(--cursor-duration) steps(1, end) var(--cursor-delay) forwards;
}

.intro-fly-title {
  position: fixed;
  left: 50vw;
  top: 50vh;
  z-index: 32;
  width: min(900px, 94vw);
  color: rgba(24, 35, 32, 0.58);
  font-family: var(--mono);
  font-size: clamp(18px, 2.6vw, 32px);
  font-style: normal;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, calc(-50% - 8px)) scale(1);
  transform-origin: left top;
  --cursor-delay: 6940ms;
  --cursor-duration: 984ms;
  animation:
    intro-fly-title-in 260ms ease 6740ms forwards,
    intro-fly-title-home 1200ms cubic-bezier(0.76, 0, 0.24, 1) 8200ms forwards;
}

.intro-domains {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.28em;
}

.intro-domains span {
  display: inline-block;
}

.intro-domains span:nth-child(1).intro-type {
  animation: intro-type-rules 552ms steps(6, end) 2280ms forwards;
}

.intro-domains span:nth-child(2).intro-type {
  animation: intro-type-disputes 768ms steps(9, end) 2960ms forwards;
}

.intro-domains span:nth-child(3).intro-type {
  animation: intro-type-actions 864ms steps(11, end) 3800ms forwards;
}

.intro-rule {
  position: absolute;
  left: 50%;
  top: 204px;
  width: min(520px, 72vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(35, 111, 110, 0.14), transparent);
  opacity: 0;
  transform: translateX(-50%) scaleX(0.7);
  animation: intro-rule-in 720ms cubic-bezier(0.22, 1, 0.36, 1) 7200ms forwards;
}

.intro-type {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  vertical-align: bottom;
  white-space: nowrap;
}

.intro-one .intro-type {
  animation: intro-type-one 912ms steps(11, end) 420ms forwards;
}

.intro-same .intro-type {
  animation: intro-type-same 1416ms steps(37, end) 5240ms forwards;
}

.intro-fly-title .intro-type {
  max-width: 0;
  animation: intro-type-title 984ms steps(16, end) 6940ms forwards;
}

@keyframes intro-phrase-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes intro-line-in {
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes intro-line-out {
  to {
    opacity: 0;
    transform: translate(-50%, -16px);
  }
}

@keyframes intro-rule-in {
  to {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes intro-fly-title-in {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes intro-cursor {
  0%,
  100% {
    opacity: 0;
  }

  8%,
  92% {
    opacity: 1;
  }
}

@keyframes intro-type-one {
  to {
    max-width: 11.5em;
  }
}

@keyframes intro-type-rules {
  to {
    max-width: 7em;
  }
}

@keyframes intro-type-disputes {
  to {
    max-width: 10em;
  }
}

@keyframes intro-type-actions {
  to {
    max-width: 12em;
  }
}

@keyframes intro-type-same {
  to {
    max-width: 38em;
  }
}

@keyframes intro-fly-title-type {
  to {
    opacity: 1;
  }
}

@keyframes intro-type-title {
  to {
    max-width: 18em;
  }
}

@keyframes intro-fly-title-home {
  from {
    left: 50vw;
    top: 50vh;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  to {
    left: max(22px, calc((100vw - 1240px) / 2));
    top: 28px;
    opacity: 0.88;
    transform: translate(0, 0) scale(0.54);
  }
}

@keyframes intro-out {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@keyframes intro-skip-out {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  body::before,
  body::after,
  .shell::before {
    animation: none;
  }

  .matrix-rain {
    display: none;
  }

  .intro-layer,
  .intro-skip {
    display: none;
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(1240px, calc(100% - 24px));
    padding-top: 34px;
  }

  .hero {
    min-height: auto;
    padding: 26px 0 52px;
  }

  .composer-actions,
  .stage-header,
  .report-header {
    align-items: stretch;
    flex-direction: column;
  }

  .report-board,
  .output-note,
  .actor-threat-report,
  .scenario-report,
  .timeline-report,
  .trace-report {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .scenario-score-grid,
  .risk-grid {
    grid-template-columns: 1fr;
  }

  .constellation {
    min-height: 660px;
  }

  .modeling-workbench {
    grid-template-columns: 1fr;
  }

  .compute-console {
    grid-template-rows: auto;
    min-height: 0;
  }

  .agent {
    width: 130px;
    height: 130px;
    padding: 14px;
  }

  .speech {
    left: 5% !important;
    top: 48% !important;
    width: 90%;
  }

  .intro-sentence {
    min-height: 460px;
  }

  .intro-line {
    width: min(420px, 90vw);
  }

  .intro-domains {
    grid-auto-flow: row;
    align-items: center;
    gap: 0.08em;
  }

}
