:root {
  --bg: #07111f;
  --bg-soft: #0d1a2b;
  --panel: rgba(11, 23, 39, 0.82);
  --panel-strong: #0d1728;
  --panel-float: rgba(15, 28, 46, 0.92);
  --line: rgba(158, 186, 227, 0.14);
  --line-strong: rgba(158, 186, 227, 0.24);
  --text: #edf4ff;
  --muted: #92a5c4;
  --accent: #6fe7c8;
  --accent-strong: #22c7a0;
  --accent-warm: #9dd2ff;
  --danger: #ff8a7a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Consolas, monospace;
  --sans: "Segoe UI", "PingFang SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(27, 90, 152, 0.34), transparent 30%),
    radial-gradient(circle at 90% 16%, rgba(29, 177, 139, 0.16), transparent 24%),
    linear-gradient(180deg, #07111f 0%, #091220 36%, #050b15 100%);
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(125, 161, 206, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 161, 206, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 94%);
}

.page-shell {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(111, 231, 200, 0.28);
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(111, 231, 200, 0.36), rgba(111, 231, 200, 0)),
    rgba(12, 28, 44, 0.9);
  box-shadow: inset 0 0 20px rgba(111, 231, 200, 0.08);
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.82rem;
}

.topnav {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topnav a {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.topnav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.console-card,
.insight-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-copy,
.console-card {
  border-radius: var(--radius-xl);
}

.hero-copy {
  overflow: hidden;
  padding: 34px;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: auto auto -90px -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 231, 200, 0.14), transparent 72%);
}

.hero-copy::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -20px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 210, 255, 0.16), transparent 68%);
}

.hero-badge,
.eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-badge {
  padding: 10px 14px;
  border: 1px solid rgba(111, 231, 200, 0.18);
  border-radius: 999px;
  background: rgba(111, 231, 200, 0.06);
}

.hero-copy h1,
.console-head h2,
.section-head h3 {
  position: relative;
  z-index: 1;
  margin: 0;
}

.hero-copy h1 {
  margin-top: 22px;
  max-width: 10ch;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.93;
  letter-spacing: -0.05em;
}

.hero-text,
.section-copy,
.point-card p,
.constraint-list {
  position: relative;
  z-index: 1;
  color: var(--muted);
}

.hero-text {
  max-width: 62ch;
  margin: 22px 0 0;
  font-size: 1.04rem;
  line-height: 1.8;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-points {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.point-card {
  padding: 16px;
  border: 1px solid rgba(157, 210, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.point-index {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent-warm);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.point-card strong {
  display: block;
  font-size: 1rem;
}

.point-card p {
  margin: 8px 0 0;
  font-size: 0.94rem;
  line-height: 1.7;
}

.console-card {
  display: grid;
  gap: 22px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(14, 29, 48, 0.96), rgba(8, 17, 30, 0.96)),
    var(--panel);
}

.console-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.console-head h2 {
  margin-top: 8px;
  font-size: 1.9rem;
  line-height: 1.05;
}

.signal-pill,
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(111, 231, 200, 0.7);
}

.console-form,
.field,
.insight-card {
  display: grid;
}

.console-form {
  gap: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-button,
.button {
  font: inherit;
}

.chip-button {
  padding: 9px 12px;
  border: 1px solid rgba(157, 210, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.chip-button:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(111, 231, 200, 0.24);
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid-tight {
  grid-template-columns: 1fr 1fr 0.8fr;
}

.field {
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(5, 12, 22, 0.86);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(111, 231, 200, 0.34);
  box-shadow: 0 0 0 4px rgba(111, 231, 200, 0.08);
}

textarea {
  resize: vertical;
  min-height: 146px;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.6;
}

.console-actions {
  display: flex;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #02110f;
  font-weight: 600;
}

.button-secondary {
  background: linear-gradient(135deg, #b8d9ff, #72b6ff);
  color: #04111d;
  font-weight: 600;
}

.button-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.button-block {
  width: 100%;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.insight-card {
  gap: 16px;
  grid-column: span 4;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--panel-float);
}

.insight-card-wide {
  grid-column: span 6;
}

.insight-card-notes {
  background:
    linear-gradient(180deg, rgba(15, 28, 46, 0.96), rgba(10, 21, 37, 0.96)),
    var(--panel-float);
}

.section-head h3 {
  margin-top: 8px;
  font-size: 1.4rem;
}

.section-copy {
  margin: 0;
  line-height: 1.75;
}

.output {
  margin: 0;
  padding: 18px;
  min-height: 170px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(3, 8, 15, 0.96);
  color: #dfe9f8;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.output-compact {
  min-height: 126px;
}

.constraint-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.status-ok {
  color: var(--accent);
  border-color: rgba(111, 231, 200, 0.24);
  background: rgba(111, 231, 200, 0.08);
}

.status-busy {
  color: var(--accent-warm);
  border-color: rgba(157, 210, 255, 0.24);
  background: rgba(157, 210, 255, 0.08);
}

.status-error {
  color: var(--danger);
  border-color: rgba(255, 138, 122, 0.22);
  background: rgba(255, 138, 122, 0.08);
}

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

  .hero-copy h1 {
    max-width: 12ch;
  }

  .hero-points {
    grid-template-columns: 1fr;
  }

  .insight-card,
  .insight-card-wide {
    grid-column: span 6;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(calc(100vw - 20px), 1220px);
    padding-top: 16px;
  }

  .topbar,
  .console-head,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .field-grid-tight {
    grid-template-columns: 1fr;
  }

  .insight-card,
  .insight-card-wide {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .hero-copy,
  .console-card,
  .insight-card {
    padding: 20px;
    border-radius: 22px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  .hero-actions,
  .chip-row {
    flex-direction: column;
  }

  .button,
  .chip-button {
    width: 100%;
    justify-content: center;
  }
}
