:root {
  --bg: #07110f;
  --panel: rgba(245, 239, 220, 0.08);
  --panel-strong: rgba(245, 239, 220, 0.14);
  --text: #f4ecd3;
  --muted: #b7b095;
  --line: rgba(244, 236, 211, 0.18);
  --gold: #d6ff6b;
  --cyan: #8ef6ff;
  --orange: #ff8d58;
  --red: #ff5b5b;
  --green: #5cffb0;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(214, 255, 107, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 16%, rgba(142, 246, 255, 0.14), transparent 30rem),
    linear-gradient(135deg, #07110f 0%, #11201d 48%, #1d1a12 100%);
  font-family: "Microsoft YaHei UI", "HarmonyOS Sans SC", "Noto Sans CJK SC", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.45;
  pointer-events: none;
  z-index: -1;
}

.ambient-a {
  width: 22rem;
  height: 22rem;
  left: -8rem;
  top: 18rem;
  background: rgba(214, 255, 107, 0.2);
}

.ambient-b {
  width: 28rem;
  height: 28rem;
  right: -10rem;
  top: 42rem;
  background: rgba(255, 141, 88, 0.15);
}

.hero {
  padding: 28px min(5vw, 72px) 64px;
}

.nav,
.hero-grid,
main,
.footer {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 54px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: #0e1614;
  background: var(--gold);
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 34px;
  align-items: stretch;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.hero-text {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--panel-strong);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 255, 107, 0.65);
}

.button.primary {
  color: #0b1511;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 800;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.04);
}

.button.danger {
  background: rgba(255, 91, 91, 0.16);
  border-color: rgba(255, 91, 91, 0.38);
}

.button.compact {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-card,
.panel,
.agent-strip article,
.footer {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  border-radius: 34px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -50px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(142, 246, 255, 0.16);
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.pulse {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(92, 255, 176, 0.6);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 16px rgba(92, 255, 176, 0);
  }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  position: relative;
  z-index: 1;
}

.metric-grid div {
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.15);
}

.metric-value,
.metric-label {
  display: block;
}

.metric-value {
  font-size: 34px;
  font-weight: 900;
  color: var(--gold);
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.mini-log {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
  color: var(--muted);
}

.mini-log strong {
  color: var(--text);
}

main {
  display: grid;
  gap: 28px;
}

.panel {
  border-radius: 34px;
  padding: clamp(22px, 4vw, 36px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
}

.hint {
  max-width: 380px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.intent-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 18px;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.2);
  outline: none;
  line-height: 1.7;
}

textarea:focus {
  border-color: rgba(214, 255, 107, 0.72);
}

.fault-banner {
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 141, 88, 0.5);
  border-radius: 18px;
  color: #ffe0cf;
  background: rgba(255, 141, 88, 0.14);
}

.hidden {
  display: none;
}

.console-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.card {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  background: rgba(0, 0, 0, 0.16);
}

.compact-card {
  min-height: 260px;
}

.steps {
  display: grid;
  gap: 12px;
}

.step {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.step h4 {
  margin: 0;
  color: var(--gold);
}

.step small {
  color: var(--muted);
}

.step p,
.report p {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.kv {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(142, 246, 255, 0.08);
  font-size: 12px;
}

.empty {
  color: var(--muted);
}

.report {
  color: var(--text);
  line-height: 1.8;
}

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

.evidence-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.evidence-head strong {
  color: var(--gold);
  font-size: 14px;
}

.evidence-head span {
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
}

.evidence-item small {
  color: var(--muted);
  line-height: 1.5;
  word-break: break-all;
}

.report-status {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #092015;
  background: var(--green);
  font-weight: 800;
}

.report-status.fail {
  color: #260909;
  background: var(--red);
}

.topology-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.topology {
  position: relative;
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
}

.topology svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.topo-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 118px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(214, 255, 107, 0.35);
  border-radius: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  background: rgba(10, 25, 21, 0.92);
  transform: translate(-50%, -50%);
}

.topo-node.down {
  border-color: rgba(255, 91, 91, 0.7);
  color: #ffc9c9;
}

.telemetry-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  background: rgba(0, 0, 0, 0.16);
}

.link-metrics {
  display: grid;
  gap: 10px;
}

.link-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.link-row strong {
  font-size: 14px;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.bar.warn span {
  background: var(--orange);
}

.bar.danger span {
  background: var(--red);
}

.agent-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.agent-strip article {
  min-height: 210px;
  border-radius: 26px;
  padding: 18px;
}

.agent-strip span {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--gold);
  font-weight: 900;
}

.agent-strip p,
.deliverable-grid span {
  color: var(--muted);
  line-height: 1.6;
}

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

.deliverable-grid div {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  margin-bottom: 28px;
  padding: 20px 24px;
  border-radius: 24px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero-grid,
  .console-grid,
  .evidence-grid,
  .topology-layout,
  .intent-form {
    grid-template-columns: 1fr;
  }

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

  .intent-form .button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .nav,
  .section-head,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .metric-grid,
  .agent-strip,
  .deliverable-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 360px;
  }

  .topology {
    min-height: 420px;
  }
}
