:root {
  color-scheme: dark;
  --bg: #05070a;
  --surface: #0b1117;
  --surface-strong: #111923;
  --line: rgba(175, 196, 214, 0.18);
  --line-bright: rgba(185, 219, 255, 0.34);
  --text: #f5f7f8;
  --muted: #92a2b2;
  --soft: #c8d4df;
  --green: #67e7a7;
  --amber: #f2b45f;
  --red: #ff766d;
  --blue: #7eb7ff;
  --shadow: rgba(0, 0, 0, 0.36);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: linear-gradient(180deg, #070b10 0%, var(--bg) 46%, #030507 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 30;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 760;
  opacity: 0;
  padding: 10px 12px;
  text-decoration: none;
  transform: translateY(-140%);
  transition: opacity 160ms ease, transform 160ms ease;
}

.skip-link:focus {
  opacity: 1;
  transform: translateY(0);
}

svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  fill: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  max-width: 100vw;
  min-height: 100svh;
  overflow-x: hidden;
}

.rail {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(6, 9, 13, 0.82);
  backdrop-filter: blur(24px);
  min-width: 0;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.mark-grid {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(103, 231, 167, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(103, 231, 167, 0.4) 47% 53%, transparent 54%),
    linear-gradient(0deg, transparent 46%, rgba(126, 183, 255, 0.34) 47% 53%, transparent 54%),
    #0b1516;
  box-shadow: 0 0 28px rgba(103, 231, 167, 0.16);
}

.rail nav {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.rail nav a {
  border-radius: 8px;
  color: var(--muted);
  padding: 10px 12px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.rail nav a:hover,
.rail nav a.active {
  background: rgba(126, 183, 255, 0.08);
  color: var(--text);
}

.rail nav a:hover {
  transform: translateX(3px);
}

.rail-status {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-top: 18px;
}

.rail-status span,
.eyebrow,
.section-title span,
.metrics-band span,
.demo-meta,
.demo-note {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-status strong {
  color: var(--green);
}

main {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 22px;
}

.command-hero {
  width: 100%;
  max-width: 100%;
  min-height: min(600px, calc(100svh - 150px));
  display: grid;
  grid-template-columns: minmax(430px, 0.95fr) minmax(420px, 1.05fr);
  gap: 24px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(15, 25, 35, 0.92), rgba(7, 11, 16, 0.62) 45%, rgba(8, 13, 18, 0.9)),
    var(--surface);
  box-shadow: 0 24px 80px var(--shadow);
}

.command-hero > *,
.workspace-grid > * {
  min-width: 0;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  min-width: 0;
  padding: clamp(28px, 4vw, 46px);
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.5rem, 4.1vw, 4.08rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-text {
  max-width: 520px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.hero-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action,
.ghost-action,
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--green);
  color: #04110a;
  font-weight: 760;
}

.primary-action:hover,
.ghost-action:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-action:hover {
  background: #8cf5bf;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--text);
}

.ghost-action:hover {
  border-color: var(--line-bright);
  background: rgba(126, 183, 255, 0.08);
}

.signal-stage {
  position: relative;
  min-height: 420px;
  background:
    linear-gradient(90deg, rgba(126, 183, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(126, 183, 255, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(103, 231, 167, 0.14), transparent 46%);
  background-size: 42px 42px, 42px 42px, auto;
  border-left: 1px solid var(--line);
  isolation: isolate;
}

#signal-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: stage-in 700ms ease forwards 180ms;
}

.signal-readout {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: min(340px, calc(100% - 48px));
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid rgba(103, 231, 167, 0.24);
  border-radius: 8px;
  background: rgba(7, 12, 15, 0.72);
  backdrop-filter: blur(20px);
}

.signal-readout span {
  color: var(--muted);
}

.signal-readout strong {
  color: var(--green);
  font-size: 1.18rem;
}

.signal-readout small {
  color: var(--soft);
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metrics-band div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 18px;
  background: rgba(10, 15, 21, 0.92);
}

.metrics-band strong {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.lens-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.lens-grid div {
  min-width: 0;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(126, 183, 255, 0.055), transparent 58%),
    rgba(9, 14, 20, 0.94);
}

.lens-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lens-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 1.08rem;
}

.lens-grid p {
  margin: 8px 0 0;
  color: var(--soft);
  line-height: 1.5;
}

.workspace-grid,
.focus-lab,
.request-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 17, 23, 0.82);
}

.focus-lab {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.focus-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.46fr);
  gap: 24px;
  align-items: end;
}

.focus-head p {
  margin: 0;
  color: var(--soft);
  line-height: 1.55;
}

.focus-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.focus-tab {
  min-width: 0;
  min-height: 50px;
  border: 0;
  background: rgba(9, 14, 20, 0.92);
  color: var(--soft);
  cursor: pointer;
  font-weight: 720;
  padding: 12px;
  transition: background 160ms ease, color 160ms ease;
}

.focus-tab:hover,
.focus-tab[aria-selected="true"] {
  background: rgba(103, 231, 167, 0.1);
  color: var(--text);
}

.focus-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.focus-visual,
.focus-content {
  min-width: 0;
  background: rgba(7, 11, 16, 0.94);
}

.focus-visual {
  min-height: 430px;
  padding: 18px;
}

.system-schematic {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(242, 180, 95, 0.13) 1px, transparent 1px),
    linear-gradient(0deg, rgba(126, 183, 255, 0.11) 1px, transparent 1px),
    linear-gradient(145deg, rgba(103, 231, 167, 0.12), rgba(242, 180, 95, 0.05) 46%, transparent 72%),
    #071016;
  background-size: 34px 34px, 34px 34px, auto, auto;
}

.system-schematic::before,
.system-schematic::after {
  position: absolute;
  border: 1px solid rgba(175, 196, 214, 0.18);
  content: "";
}

.system-schematic::before {
  inset: 22%;
}

.system-schematic::after {
  left: 18%;
  right: 18%;
  top: 50%;
}

.schematic-node {
  position: absolute;
  z-index: 1;
  max-width: min(210px, 42%);
  border: 1px solid rgba(103, 231, 167, 0.3);
  border-radius: 8px;
  background: rgba(5, 9, 12, 0.86);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 740;
  padding: 10px 12px;
}

.schematic-node[data-slot="1"] {
  left: 8%;
  top: 14%;
}

.schematic-node[data-slot="2"] {
  right: 9%;
  top: 24%;
}

.schematic-node[data-slot="3"] {
  left: 16%;
  bottom: 21%;
}

.schematic-node[data-slot="4"] {
  right: 12%;
  bottom: 13%;
}

.focus-content {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(20px, 3vw, 34px);
}

.focus-content h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.focus-summary {
  max-width: 780px;
  margin: 0;
  color: var(--soft);
  font-size: 1.02rem;
  line-height: 1.6;
}

.focus-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(175, 196, 214, 0.12);
  border-radius: 8px;
  background: rgba(175, 196, 214, 0.12);
}

.focus-proof div {
  min-width: 0;
  padding: 14px;
  background: rgba(9, 14, 20, 0.84);
}

.focus-proof span,
.review-detail-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-proof p,
.review-detail-grid li {
  margin: 0;
  color: var(--soft);
  line-height: 1.5;
}

.review-details {
  border-top: 1px solid rgba(175, 196, 214, 0.12);
  padding-top: 2px;
}

.review-details summary {
  min-height: 38px;
  color: var(--text);
  cursor: pointer;
  font-weight: 740;
  list-style-position: inside;
  padding: 8px 0;
}

.review-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 8px;
}

.focus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.34fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.workspace-main,
.workspace-side,
.request-section {
  padding: 18px;
}

.workspace-main,
.workspace-side {
  background: rgba(11, 17, 23, 0.92);
}

.section-title {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.08rem;
}

.demo-list {
  display: grid;
  gap: 12px;
}

.demo-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(175, 196, 214, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  align-items: center;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.demo-row:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(103, 231, 167, 0.22);
  transform: translateY(-1px);
}

.demo-index {
  align-self: start;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(103, 231, 167, 0.26);
  border-radius: 8px;
  color: var(--green);
  font-weight: 760;
}

.demo-body {
  min-width: 0;
}

.demo-row h3,
.request-section h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.demo-row p,
.feature-list,
.stack-list,
.request-section p,
.approval-list p {
  margin: 0;
  color: var(--soft);
  line-height: 1.5;
}

.demo-outcome {
  margin-top: 10px !important;
  color: var(--text) !important;
}

.demo-role {
  margin-top: 8px !important;
  color: var(--green) !important;
  font-weight: 680;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.stack-list li {
  border: 1px solid rgba(126, 183, 255, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(126, 183, 255, 0.06);
  color: var(--soft);
  font-size: 0.78rem;
}

.feature-list {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 18px;
}

.feature-list li::before {
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  content: "";
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.proof-grid div {
  min-width: 0;
  border-top: 1px solid rgba(175, 196, 214, 0.12);
  padding-top: 10px;
}

.proof-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.demo-actions .ghost-action {
  min-width: 134px;
}

.approval-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.approval-list span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 760;
}

.request-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.request-section p {
  max-width: 680px;
  margin-top: 8px;
}

dialog {
  width: min(680px, calc(100vw - 28px));
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  color: var(--text);
  background: rgba(10, 16, 22, 0.96);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.6);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(8px);
}

.request-form {
  display: grid;
  gap: 16px;
  padding: 10px;
}

.dialog-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.dialog-top h2 {
  margin: 4px 0 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--text);
}

label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--text);
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(103, 231, 167, 0.6);
  box-shadow: 0 0 0 3px rgba(103, 231, 167, 0.1);
}

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

.privacy-note {
  margin: -2px 0 0;
  border-left: 2px solid rgba(126, 183, 255, 0.42);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  padding-left: 12px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(103, 231, 167, 0.34);
  border-radius: 8px;
  background: rgba(7, 12, 15, 0.9);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.46);
  color: var(--text);
  opacity: 0;
  padding: 14px 16px;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    height: auto;
    grid-template-columns: 1fr;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow-x: visible;
  }

  .rail nav a {
    flex: 0 0 auto;
  }

  .rail-status {
    display: none;
  }

  .command-hero,
  .workspace-grid,
  .focus-head,
  .focus-panel,
  .lens-grid,
  .review-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .command-hero {
    min-height: auto;
  }

  .signal-stage {
    min-height: 300px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  main {
    padding: 14px;
  }

  .hero-copy {
    gap: 12px;
    padding: 20px;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(1.72rem, 7.4vw, 1.98rem);
    line-height: 1;
    overflow-wrap: break-word;
  }

  .hero-actions,
  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .primary-action,
  .ghost-action {
    width: 100%;
  }

  .signal-stage {
    min-height: 168px;
  }

  .signal-readout {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    padding: 12px;
  }

  .signal-readout small {
    font-size: 0.8rem;
  }

  .rail nav a {
    padding: 8px 9px;
    font-size: 0.92rem;
  }

  .hero-text {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .metrics-band,
  .focus-tabs,
  .focus-proof,
  .lens-grid,
  .form-row,
  .demo-row,
  .review-detail-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .focus-lab,
  .focus-content,
  .focus-visual {
    padding: 14px;
  }

  .focus-visual {
    min-height: 280px;
  }

  .focus-content h3 {
    font-size: clamp(1.7rem, 8vw, 2.1rem);
  }

  .demo-index,
  .demo-actions {
    grid-column: 1;
  }

  .demo-actions .ghost-action {
    width: 100%;
  }
}

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