/*
Purpose: public Nova frontpage styling.
Scope: global public chrome, page sections, legal/error pages, responsive behavior, and
shared visual language outside the protected account/admin console.
*/

:root {
  --bg: #070a0f;
  --bg-soft: #091018;
  --panel: rgba(12, 18, 24, 0.86);
  --panel-2: rgba(17, 24, 32, 0.78);
  --line: #24313b;
  --line-soft: rgba(156, 178, 190, 0.14);
  --text: #edf3f5;
  --muted: #a9b6be;
  --dim: #6e7c85;
  --primary: #35cce6;
  --flow: #7bf5ac;
  --amber: #d8a348;
  --shadow: rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(53, 204, 230, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 204, 230, 0.022) 1px, transparent 1px),
    linear-gradient(180deg, #05080c 0%, #081018 52%, #05080c 100%);
  background-size: 64px 64px, 64px 64px, auto;
  letter-spacing: 0;
}

.site-header,
.site-footer {
  flex: 0 0 auto;
}

body > main,
body > .account-shell {
  flex: 1 0 auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(108deg, rgba(53, 204, 230, 0.08), transparent 34%),
    linear-gradient(252deg, rgba(123, 245, 172, 0.07), transparent 40%);
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 76px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(36, 49, 59, 0.72);
  background: rgba(5, 8, 12, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand-wordmark {
  width: 142px;
  height: auto;
}

.brand-sub {
  color: var(--dim);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.site-nav a {
  position: relative;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.site-nav a::after {
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--primary), var(--flow), transparent);
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-color: rgba(53, 204, 230, 0.28);
  background: rgba(53, 204, 230, 0.055);
}

.site-nav a:hover {
  transform: translateY(-1px);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(216, 163, 72, 0.16);
}

.account-login-link {
  margin-left: 6px;
}

body.is-app-mode .account-login-link {
  display: none;
}

.language-switcher {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.site-nav .language-switcher {
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid rgba(156, 178, 190, 0.16);
}

.language-switcher a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-width: 34px;
  padding: 0 9px;
  border: 1px solid rgba(156, 178, 190, 0.18);
  border-radius: 8px;
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.language-switcher a span {
  display: inline-flex;
  align-items: center;
  height: 12px;
  line-height: 12px;
}

.language-flag {
  display: block;
  flex: 0 0 auto;
  width: 17px;
  height: 12px;
  border: 1px solid rgba(237, 243, 245, 0.28);
  border-radius: 2px;
  background: #05080c;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(5, 8, 12, 0.72);
}

.site-nav .language-switcher a {
  padding: 0 9px;
}

.site-nav .language-switcher a::after {
  display: none;
}

.language-switcher a:hover,
.language-switcher a[aria-current="true"] {
  color: var(--text);
  border-color: rgba(123, 245, 172, 0.38);
  background: rgba(123, 245, 172, 0.075);
}

.language-switcher a:hover {
  transform: translateY(-1px);
}

.account-menu {
  position: relative;
  margin-left: 6px;
}

.account-trigger {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(156, 178, 190, 0.18);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(5, 8, 12, 0.52);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.account-trigger:hover,
.account-menu.is-open .account-trigger {
  color: var(--text);
  border-color: rgba(123, 245, 172, 0.42);
  background: rgba(123, 245, 172, 0.075);
  transform: translateY(-1px);
}

.account-avatar {
  display: block;
  width: 34px;
  height: 34px;
  max-width: none;
  aspect-ratio: 1;
  border: 1px solid rgba(123, 245, 172, 0.34);
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(5, 8, 12, 0.8),
    0 0 18px rgba(53, 204, 230, 0.22);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: none;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(36, 49, 59, 0.9);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.account-dropdown-user {
  display: grid;
  gap: 3px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(156, 178, 190, 0.12);
  color: var(--muted);
}

.account-dropdown-user strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown-user span {
  color: var(--dim);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.account-menu.is-open .account-dropdown {
  display: grid;
  gap: 4px;
}

.account-dropdown a,
.account-dropdown button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
}

.account-logout-form {
  margin: 0;
}

.account-dropdown a::after {
  display: none;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  color: var(--text);
  border-color: rgba(53, 204, 230, 0.22);
  background: rgba(53, 204, 230, 0.055);
}

.footer .language-switcher {
  margin-top: 2px;
}

.footer .language-switcher a:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(53, 204, 230, 0.24);
  border-radius: 8px;
  color: var(--text);
  background: rgba(12, 18, 24, 0.8);
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
}

.page {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 0.62fr);
  gap: 52px;
  align-items: start;
  padding: 96px 0 78px;
}

.hero::before {
  position: absolute;
  inset: 24px max(-40px, -4vw) 0;
  z-index: -1;
  content: "";
  border-bottom: 1px solid rgba(36, 49, 59, 0.64);
  background:
    linear-gradient(90deg, rgba(5, 8, 12, 0.96) 0%, rgba(5, 8, 12, 0.72) 42%, rgba(5, 8, 12, 0.18) 100%),
    var(--hero-image, none) center / cover no-repeat;
  opacity: 0.96;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 800px;
  margin-bottom: 18px;
  font-size: 82px;
  font-weight: 260;
  line-height: 0.96;
}

h2 {
  margin-bottom: 14px;
  font-size: 44px;
  font-weight: 300;
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 520;
}

.lead {
  max-width: 720px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.58;
}

.hero h1 {
  max-width: 720px;
  font-size: 76px;
}

.hero .lead {
  max-width: 710px;
  color: #c2ccd2;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(53, 204, 230, 0.35);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(53, 204, 230, 0.14), rgba(123, 245, 172, 0.06));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.button.secondary {
  border-color: rgba(156, 178, 190, 0.18);
  color: var(--muted);
  background: rgba(12, 18, 24, 0.54);
}

.button::after {
  width: 14px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--primary), var(--flow));
  transition: width 180ms ease;
}

.button::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, transparent 0%, rgba(123, 245, 172, 0.14) 48%, transparent 62%);
  opacity: 0;
  transform: translateX(-110%);
}

.button:hover {
  border-color: rgba(123, 245, 172, 0.45);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.button:hover::after {
  width: 24px;
}

.error-page {
  position: relative;
  display: grid;
  align-content: center;
  padding: clamp(72px, 9vh, 120px) 0;
}

.error-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.7fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: center;
}

.error-copy {
  max-width: 760px;
}

.error-copy h1 {
  max-width: 760px;
  margin-bottom: 18px;
}

.error-note {
  max-width: 620px;
  margin: -8px 0 28px;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.7;
}

.error-visual {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid rgba(53, 204, 230, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 18, 24, 0.92), rgba(5, 8, 12, 0.92)),
    linear-gradient(rgba(53, 204, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 204, 230, 0.04) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.error-visual::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, rgba(53, 204, 230, 0.14), transparent 34%),
    linear-gradient(240deg, rgba(123, 245, 172, 0.12), transparent 42%);
  opacity: 0.78;
}

.error-visual-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(156, 178, 190, 0.14);
  color: var(--dim);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.error-visual-top strong {
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
}

.error-canvas {
  position: relative;
  z-index: 1;
  min-height: 270px;
  margin: 18px;
  border: 1px solid rgba(156, 178, 190, 0.12);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.42);
}

.error-route {
  position: absolute;
  left: 12%;
  width: 76%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53, 204, 230, 0.45), rgba(123, 245, 172, 0.5), transparent);
  transform-origin: left center;
}

.error-route--one {
  top: 32%;
}

.error-route--two {
  top: 52%;
  opacity: 0.58;
  transform: scaleX(0.82);
}

.error-route--three {
  top: 72%;
  opacity: 0.4;
  transform: scaleX(0.62);
}

.error-route::after {
  position: absolute;
  top: -3px;
  right: 18%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(123, 245, 172, 0.72);
  border-radius: 2px;
  content: "";
  background: rgba(123, 245, 172, 0.22);
  box-shadow: 0 0 18px rgba(123, 245, 172, 0.22);
}

.error-tab {
  position: absolute;
  top: 25%;
  left: 12%;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: center;
  width: 118px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(53, 204, 230, 0.34);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  animation: error-tab-route 5.8s cubic-bezier(0.66, 0, 0.28, 1) infinite;
}

.error-tab span,
.error-tab i,
.error-tab b {
  display: block;
  border-radius: 3px;
}

.error-tab span {
  width: 24px;
  height: 18px;
  border: 1px solid rgba(123, 245, 172, 0.42);
  background:
    linear-gradient(90deg, rgba(53, 204, 230, 0.42), transparent 42%),
    rgba(12, 18, 24, 0.92);
}

.error-tab i,
.error-tab b {
  grid-column: 2;
  height: 3px;
  background: rgba(156, 178, 190, 0.42);
}

.error-tab b {
  width: 54%;
  background: rgba(216, 163, 72, 0.62);
}

.error-signal {
  position: absolute;
  width: 42px;
  height: 3px;
  border-radius: 2px;
  background: rgba(53, 204, 230, 0.58);
  animation: error-signal-blink 1.8s ease-in-out infinite;
}

.error-signal--a {
  top: 24%;
  right: 18%;
}

.error-signal--b {
  top: 56%;
  right: 12%;
  width: 28px;
  background: rgba(123, 245, 172, 0.62);
  animation-delay: 0.28s;
}

.error-signal--c {
  bottom: 18%;
  left: 22%;
  width: 34px;
  background: rgba(216, 163, 72, 0.62);
  animation-delay: 0.54s;
}

.error-scanline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(123, 245, 172, 0.74), transparent);
  opacity: 0.7;
  animation: error-scan 4.6s linear infinite;
}

.error-console {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  padding: 0 22px 24px;
}

.error-console span {
  display: block;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(156, 178, 190, 0.24), rgba(53, 204, 230, 0.44), transparent);
  animation: error-console-pulse 2.4s ease-in-out infinite;
}

.error-console span:nth-child(2) {
  width: 72%;
  animation-delay: 0.24s;
}

.error-console span:nth-child(3) {
  width: 46%;
  background: linear-gradient(90deg, rgba(216, 163, 72, 0.48), rgba(123, 245, 172, 0.34), transparent);
  animation-delay: 0.48s;
}

.error-page--500 .error-tab {
  animation-name: error-tab-reboot;
}

.error-page--500 .error-visual-top span {
  color: rgba(123, 245, 172, 0.78);
}

@keyframes error-tab-route {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  36% {
    transform: translate3d(210%, 0, 0) rotate(0deg);
  }

  48% {
    transform: translate3d(210%, 78px, 0) rotate(8deg);
  }

  72% {
    transform: translate3d(72%, 78px, 0) rotate(-4deg);
  }
}

@keyframes error-tab-reboot {
  0%,
  100% {
    transform: translate3d(0, 38px, 0);
  }

  35% {
    transform: translate3d(118%, 38px, 0);
  }

  50% {
    transform: translate3d(118%, 38px, 0) scale(0.96);
  }

  70% {
    transform: translate3d(218%, 38px, 0);
  }
}

@keyframes error-scan {
  from {
    left: 8%;
  }

  to {
    left: 92%;
  }
}

@keyframes error-signal-blink {
  0%,
  100% {
    opacity: 0.28;
  }

  50% {
    opacity: 1;
  }
}

@keyframes error-console-pulse {
  0%,
  100% {
    opacity: 0.34;
    transform: scaleX(0.86);
    transform-origin: left center;
  }

  50% {
    opacity: 0.88;
    transform: scaleX(1);
  }
}

.hero-panel {
  position: relative;
  overflow: hidden;
  align-self: start;
  height: 520px;
  max-height: calc(100svh - 150px);
  min-height: 430px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  align-content: start;
  padding: 24px;
  border: 1px solid rgba(53, 204, 230, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(5, 8, 12, 0.24) 0%, rgba(5, 8, 12, 0.74) 100%),
    var(--panel-image, none) center / cover no-repeat,
    rgba(12, 18, 24, 0.72);
  box-shadow: 0 28px 72px var(--shadow);
}

.hero-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(135deg, rgba(53, 204, 230, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(123, 245, 172, 0.1), transparent 44%);
  opacity: 0.42;
}

.hero-panel::after {
  display: none;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.hero-panel p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.55;
}

.agent-loop {
  position: relative;
  min-height: 292px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  align-self: stretch;
  padding: 20px;
  border: 1px solid rgba(53, 204, 230, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(5, 8, 12, 0.72), rgba(5, 8, 12, 0.46)),
    rgba(12, 18, 24, 0.6);
  box-shadow: inset 0 0 0 1px rgba(123, 245, 172, 0.05);
}

.agent-loop::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(53, 204, 230, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 204, 230, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.42;
}

.agent-loop > * {
  position: relative;
  z-index: 1;
}

.agent-loop-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--dim);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.agent-loop-lane {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 132px;
}

.agent-loop-line {
  position: absolute;
  right: 7%;
  left: 7%;
  top: 50%;
  height: 2px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(53, 204, 230, 0.18), rgba(123, 245, 172, 0.22));
  transform: translateY(-50%);
}

.agent-loop-line::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 128px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--primary), var(--flow), transparent);
  transform: translateX(-100%);
}

.agent-loop-node {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px 10px;
  border: 1px solid rgba(53, 204, 230, 0.2);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(5, 8, 12, 0.76);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.agent-loop-node::before {
  content: none;
}

.agent-loop-node strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 620;
  text-transform: none;
}

.agent-loop-node em {
  color: var(--dim);
  font-style: normal;
  font-size: 10px;
}

.agent-loop-node.is-active {
  border-color: rgba(123, 245, 172, 0.62);
  color: var(--text);
  background: rgba(22, 36, 38, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(123, 245, 172, 0.12),
    0 0 34px rgba(123, 245, 172, 0.12);
}

.agent-loop-status {
  display: grid;
  grid-template-columns: 9px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
  line-height: 1.45;
}

.agent-loop-status strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 14px;
}

.agent-loop-status span:last-child {
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--flow);
  box-shadow: 0 0 18px rgba(123, 245, 172, 0.68);
}

.hero-panel .metric-strip {
  margin-top: 0;
}

.runtime-flow {
  width: min(420px, 100%);
  margin: 0 0 24px;
}

.runtime-track {
  position: relative;
  height: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(53, 204, 230, 0.18), rgba(123, 245, 172, 0.2), transparent);
}

.runtime-track::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 92px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--primary), var(--flow), transparent);
  transform: translateX(-100%);
}

.runtime-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.runtime-step {
  position: relative;
  padding-top: 12px;
  color: var(--dim);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
  transition:
    color 220ms ease,
    text-shadow 220ms ease;
}

.runtime-step::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: #30414b;
  box-shadow: 0 0 0 1px rgba(53, 204, 230, 0.18);
  transition:
    background-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.runtime-step.is-active {
  color: var(--text);
  text-shadow: 0 0 16px rgba(123, 245, 172, 0.3);
}

.runtime-step.is-active::before {
  background: var(--flow);
  box-shadow: 0 0 0 1px rgba(123, 245, 172, 0.72), 0 0 22px rgba(123, 245, 172, 0.7);
  transform: scale(1.22);
}

.agent-loop-node {
  padding: 14px 10px;
  color: var(--muted);
  text-transform: none;
}

.agent-loop-node::before,
.agent-loop-node.is-active::before {
  display: none;
  content: none;
}

.agent-loop-node.is-active {
  border-color: rgba(123, 245, 172, 0.62);
  color: var(--text);
  background: rgba(22, 36, 38, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(123, 245, 172, 0.12),
    0 0 34px rgba(123, 245, 172, 0.12);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.metric {
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(36, 49, 59, 0.8);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.66);
}

.metric strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 20px;
  font-weight: 360;
}

.metric span {
  color: var(--dim);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section {
  padding: 66px 0;
  border-top: 1px solid rgba(36, 49, 59, 0.62);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.5fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head p {
  color: var(--muted);
  line-height: 1.6;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.route-card,
.info-panel,
.image-frame,
.concept-card,
.timeline-item {
  border: 1px solid rgba(36, 49, 59, 0.78);
  border-radius: 8px;
  background: rgba(12, 18, 24, 0.66);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.18);
}

.route-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.route-card::before,
.info-panel::before,
.concept-card::before,
.timeline-item::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(115deg, transparent 0%, rgba(53, 204, 230, 0.09) 48%, rgba(123, 245, 172, 0.06) 58%, transparent 72%);
  opacity: 0;
  transform: translateX(-120%);
}

.route-card:hover {
  border-color: rgba(53, 204, 230, 0.42);
  background: rgba(14, 23, 31, 0.82);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.26);
  transform: translateY(-4px);
}

.route-card:hover::before {
  opacity: 1;
}

.route-index {
  color: var(--flow);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}

.route-card p,
.info-panel p,
.timeline-item p,
.concept-card p {
  color: var(--muted);
  line-height: 1.55;
}

.route-card .line {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), rgba(123, 245, 172, 0.38), transparent);
}

.route-card .line::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 68px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, #edf3f5, transparent);
  opacity: 0.75;
  transform: translateX(-100%);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.72fr);
  gap: 28px;
  align-items: stretch;
}

.info-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.info-panel ul {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.info-panel li {
  display: grid;
  grid-template-columns: 9px 1fr;
  gap: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.info-panel li::before {
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  content: "";
  background: var(--flow);
  box-shadow: 0 0 18px rgba(123, 245, 172, 0.62);
}

.image-frame {
  position: relative;
  overflow: hidden;
  background: #05080c;
}

.image-frame::after,
.hero-visual::after,
.concept-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(115deg, transparent 0%, rgba(53, 204, 230, 0.08) 48%, rgba(123, 245, 172, 0.08) 54%, transparent 68%);
  opacity: 0;
  transform: translateX(-120%);
}

.image-frame img {
  width: 100%;
  height: 100%;
  min-height: 310px;
  object-fit: cover;
}

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

.rail-list a,
.rail-list div {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid rgba(36, 49, 59, 0.7);
  text-decoration: none;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.rail-list a::before,
.rail-list div::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: var(--primary);
  opacity: 0;
  transform: translate(-18px, -50%) scale(0.5);
  box-shadow: 0 0 18px rgba(53, 204, 230, 0.58);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.rail-list a:hover,
.rail-list div:hover {
  border-color: rgba(53, 204, 230, 0.45);
  transform: translateX(4px);
}

.rail-list a:hover::before,
.rail-list div:hover::before {
  opacity: 1;
  transform: translate(-14px, -50%) scale(1);
}

.rail-list strong {
  color: var(--text);
  font-size: 14px;
}

.rail-list span {
  color: var(--muted);
  line-height: 1.5;
}

.label {
  color: var(--dim);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.concept-card {
  position: relative;
  overflow: hidden;
}

.concept-card img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.concept-card:hover img {
  transform: scale(1.035);
}

.concept-card div {
  padding: 16px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 0.68fr);
  gap: 36px;
  align-items: center;
  min-height: 520px;
  padding: 64px 0 54px;
}

.page-hero h1 {
  font-size: 68px;
}

.hero-visual {
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(53, 204, 230, 0.22);
  border-radius: 8px;
  overflow: hidden;
  background: #05080c;
  box-shadow: 0 28px 72px var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.timeline-item {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 20px;
}

.timeline-item .label {
  margin-bottom: 42px;
  color: var(--flow);
}

.footer {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) auto;
  gap: 40px;
  align-items: start;
  padding: 38px 0 50px;
  border-top: 1px solid rgba(36, 49, 59, 0.72);
  color: var(--dim);
  font-size: 13px;
}

.footer-brand {
  width: 132px;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.footer-mark {
  width: 132px;
  height: auto;
}

.footer-brand p {
  max-width: 132px;
  margin: 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.55;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 42px;
}

.footer-group {
  display: grid;
  gap: 9px;
}

.footer-label {
  color: var(--amber);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.footer a:hover,
.footer a[aria-current="page"] {
  color: var(--text);
  transform: translateX(2px);
}

.legal-page .page-hero {
  min-height: 360px;
  grid-template-columns: minmax(0, 0.82fr);
  border-bottom: 1px solid rgba(36, 49, 59, 0.62);
}

.legal-page .lead {
  max-width: 780px;
}

.legal-document .page-hero {
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.68fr);
  gap: 34px;
  align-items: center;
  min-height: 480px;
}

.legal-hero-copy {
  display: grid;
  gap: 18px;
}

.legal-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.legal-meta-strip span {
  padding: 8px 10px;
  border: 1px solid rgba(156, 178, 190, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(8, 13, 18, 0.62);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}

.legal-hero-visual {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(53, 204, 230, 0.22);
  border-radius: 8px;
  background: #05080c;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.legal-hero-visual::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 8, 12, 0.62), transparent 38%),
    linear-gradient(180deg, transparent 42%, rgba(5, 8, 12, 0.42));
}

.legal-hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
}

.legal-document-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.38fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 12px;
}

.legal-sidebar-block,
.legal-fact,
.legal-section {
  border: 1px solid rgba(36, 49, 59, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(12, 18, 24, 0.78), rgba(6, 10, 15, 0.72)),
    radial-gradient(circle at 92% 6%, rgba(53, 204, 230, 0.09), transparent 34%),
    radial-gradient(circle at 8% 96%, rgba(123, 245, 172, 0.045), transparent 38%);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.18);
}

.legal-sidebar-block {
  padding: 18px;
}

.legal-anchor-list {
  display: grid;
  gap: 8px;
}

.legal-anchor-list a {
  padding: 9px 0;
  border-bottom: 1px solid rgba(156, 178, 190, 0.12);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.legal-anchor-list a:hover {
  color: var(--text);
  transform: translateX(3px);
}

.legal-fact {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.legal-fact span,
.legal-fact-list dt {
  color: rgba(53, 204, 230, 0.72);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.legal-fact strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.legal-content {
  display: grid;
  gap: 16px;
}

.legal-section {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 110px;
  padding: 26px;
}

.legal-section::before {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(53, 204, 230, 0.34), rgba(123, 245, 172, 0.16), transparent);
  opacity: 0.72;
}

.legal-section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.legal-section h2 {
  font-size: 28px;
}

.legal-section .eyebrow {
  color: var(--amber);
}

.legal-section p,
.legal-section li,
.legal-fact-list dd {
  color: var(--muted);
  line-height: 1.62;
}

.legal-section ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 20px;
}

.legal-fact-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.legal-fact-list div {
  display: grid;
  grid-template-columns: minmax(86px, 118px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(53, 204, 230, 0.13);
}

.legal-fact-list dd {
  margin: 0;
}

.legal-fact-list dd span {
  display: block;
}

.legal-fact-image {
  display: block;
  height: auto;
  filter:
    drop-shadow(0 12px 24px rgba(0, 0, 0, 0.22))
    drop-shadow(0 0 16px rgba(53, 204, 230, 0.08));
}

.legal-email-image {
  width: min(100%, 178px);
  height: auto;
}

.legal-identity-image {
  width: min(100%, 266px);
  height: auto;
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: atmosphere-drift 16s ease-in-out infinite alternate;
  }

  .button:hover::before {
    animation: surface-sweep 720ms ease forwards;
  }

  .runtime-track::after,
  .agent-loop-line::after {
    animation: track-run 3.7s cubic-bezier(0.42, 0, 0.18, 1) infinite;
  }

  .route-card:hover::before,
  .info-panel.is-visible::before,
  .timeline-item.is-visible::before,
  .concept-card:hover::before {
    animation: surface-sweep 980ms ease forwards;
  }

  .route-card .line::after {
    animation: track-run 3.4s ease-in-out infinite;
  }

  .image-frame.is-visible::after,
  .hero-visual.is-visible::after,
  .concept-card.is-visible::after {
    animation: surface-sweep 1.45s ease 250ms forwards;
  }

  .hero-visual img,
  .image-frame img {
    animation: visual-drift 18s ease-in-out infinite alternate;
  }

  .info-panel li::before {
    animation: node-pulse 3.2s ease-in-out infinite;
  }

  .reveal {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(18px);
    transition:
      opacity 680ms ease,
      filter 680ms ease,
      transform 680ms ease;
    transition-delay: var(--reveal-delay, 0ms);
  }

  .reveal.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@keyframes atmosphere-drift {
  from {
    opacity: 0.62;
  }

  to {
    opacity: 0.95;
  }
}

@keyframes panel-scan {
  0%,
  18% {
    opacity: 0;
    transform: translateY(-78%);
  }

  42% {
    opacity: 0.46;
  }

  72%,
  100% {
    opacity: 0;
    transform: translateY(82%);
  }
}

@keyframes rail-breathe {
  0%,
  100% {
    opacity: 0.2;
    transform: scaleX(0.72);
  }

  50% {
    opacity: 0.62;
    transform: scaleX(1);
  }
}

@keyframes track-run {
  0% {
    transform: translateX(-100%);
  }

  55%,
  100% {
    transform: translateX(560%);
  }
}

@keyframes surface-sweep {
  from {
    opacity: 0;
    transform: translateX(-120%);
  }

  30% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes visual-drift {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.024) translateY(-4px);
  }
}

@keyframes node-pulse {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(123, 245, 172, 0.42);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 24px rgba(123, 245, 172, 0.68);
    transform: scale(1.16);
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 22px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 76px;
    right: 16px;
    left: 16px;
    display: none;
    align-items: stretch;
    justify-content: stretch;
    padding: 12px;
    border: 1px solid rgba(36, 49, 59, 0.9);
    border-radius: 8px;
    background: #05080c;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
  }

  .site-nav > a {
    width: 100%;
  }

  body.nav-open .site-nav {
    display: grid;
  }

  .site-nav .language-switcher {
    width: 100%;
    margin: 6px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid rgba(156, 178, 190, 0.16);
    border-left: 0;
    justify-content: flex-start;
  }

  .site-nav .account-menu {
    width: 100%;
    margin: 8px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid rgba(156, 178, 190, 0.16);
    border-left: 0;
  }

  .account-trigger {
    width: 40px;
    justify-content: center;
  }

  .account-dropdown {
    position: static;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
  }

  .page {
    width: min(100% - 32px, 760px);
  }

  .hero,
  .page-hero,
  .error-hero,
  .legal-document .page-hero,
  .legal-document-grid,
  .section-head,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .hero-panel {
    height: auto;
    max-height: none;
    min-height: 420px;
  }

  .agent-loop-lane {
    grid-template-columns: repeat(2, 1fr);
  }

  .agent-loop-line {
    display: none;
  }

  h1 {
    font-size: 58px;
  }

  .hero h1 {
    font-size: 58px;
  }

  .hero .lead {
    max-width: 100%;
  }

  h2 {
    font-size: 36px;
  }

  .lead {
    font-size: 18px;
  }

  .page-hero h1 {
    font-size: 52px;
  }

  .error-page {
    align-content: start;
    padding: 54px 0 64px;
  }

  .error-copy h1 {
    font-size: 54px;
  }

  .error-visual {
    min-height: 360px;
  }

  .error-canvas {
    min-height: 220px;
  }

  .hero::before {
    inset: 0 -16px 36%;
    opacity: 0.72;
  }

  .route-grid,
  .concept-grid,
  .timeline,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .rail-list a,
  .rail-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .legal-sidebar {
    position: static;
    top: auto;
  }

  .footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .brand-wordmark {
    width: 112px;
  }

  .brand-sub {
    display: none;
  }

  h1 {
    font-size: 42px;
  }

  .hero h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 30px;
  }

  .page-hero h1 {
    font-size: 40px;
  }

  .error-page {
    padding-top: 42px;
  }

  .error-copy h1 {
    font-size: 40px;
  }

  .error-note {
    font-size: 14px;
  }

  .error-visual {
    min-height: 300px;
  }

  .error-visual-top {
    padding: 0 16px;
  }

  .error-canvas {
    min-height: 185px;
    margin: 14px;
  }

  .error-tab {
    width: 98px;
    min-height: 40px;
    grid-template-columns: 22px 1fr;
  }

  .error-tab span {
    width: 21px;
  }

  .error-console {
    padding: 0 16px 18px;
  }

  .agent-loop {
    min-height: auto;
    padding: 18px;
  }

  .agent-loop-header {
    display: none;
  }

  .agent-loop-lane {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .agent-loop-node {
    min-height: 72px;
  }

  .hero-panel,
  .info-panel {
    padding: 18px;
  }

  .page-hero {
    min-height: auto;
    padding-top: 42px;
  }

  .legal-meta-strip {
    display: grid;
  }

  .legal-section {
    padding: 20px;
  }

  .legal-section h2 {
    font-size: 24px;
  }

  .legal-fact-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
