:root {
  --bg: #0d1114;
  --panel: rgba(16, 24, 31, 0.82);
  --panel-border: rgba(191, 228, 243, 0.2);
  --text: #e5f4fa;
  --muted: #9cc2d1;
  --primary: #5fd1ff;
  --primary-strong: #1aa0d8;
  --alert: #ff8664;
  --ok: #66da8f;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 10% 20%, #18242b 0%, var(--bg) 40%, #07090a 100%);
  color: var(--text);
  font-family: "Chivo", sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.bg-orb-a {
  background: #2db2d6;
  top: -10rem;
  left: -8rem;
}

.bg-orb-b {
  background: #f47e5d;
  right: -8rem;
  bottom: -10rem;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1100px, 92%);
  margin: 2.4rem auto 4rem;
}

.hero h1 {
  margin: 0.35rem 0 0.8rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.01em;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
}

.subhead {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
}

.archive-note {
  margin-top: 0.95rem;
  max-width: 74ch;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(246, 204, 149, 0.28);
  background: linear-gradient(145deg, rgba(67, 42, 23, 0.46), rgba(18, 19, 23, 0.72));
  color: #ffd9a6;
  box-shadow: inset 0 1px 0 rgba(255, 241, 217, 0.06);
}

.archive-note strong {
  color: #fff1d9;
}

.hero-disclaimer {
  margin: 0.7rem 0 0;
  max-width: 74ch;
  color: #f6cc95;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

.hero-cta-wrap {
  margin: 0.95rem 0 0;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.46rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(95, 209, 255, 0.32);
  color: var(--text);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  background: rgba(11, 28, 37, 0.72);
  transition: transform 220ms ease, border-color 220ms ease;
}

.hero-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(95, 209, 255, 0.58);
}

.tool-panel,
.ops {
  margin-top: 1.6rem;
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(6px);
}

.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tool-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.pill {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #001018;
  background: var(--primary);
  padding: 0.25rem 0.55rem;
  border-radius: 99px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.pane {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  color: var(--muted);
}

textarea {
  width: 100%;
  min-height: 16rem;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(164, 210, 228, 0.2);
  padding: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
  background: rgba(7, 15, 20, 0.8);
}

textarea:focus {
  outline: 2px solid rgba(95, 209, 255, 0.55);
  border-color: transparent;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 0.58rem 0.92rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.83rem;
  background: linear-gradient(120deg, var(--primary), var(--primary-strong));
  color: #02131b;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.06);
}

button.ghost {
  color: var(--text);
  background: rgba(38, 63, 75, 0.6);
  border: 1px solid rgba(164, 210, 228, 0.2);
}

.meta {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--muted);
}

#status[data-state="ok"] {
  color: var(--ok);
}

#status[data-state="error"] {
  color: var(--alert);
}

.ops h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
}

.pipeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pipeline-pulse {
  margin: 0.1rem 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: #8de9a9;
  letter-spacing: 0.03em;
}

.pipeline-track {
  position: relative;
  margin-top: 0.9rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: rgba(8, 18, 24, 0.72);
  border: 1px solid rgba(95, 209, 255, 0.2);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  overflow: hidden;
}

.pipeline-beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    95deg,
    rgba(95, 209, 255, 0) 0%,
    rgba(95, 209, 255, 0.16) 26%,
    rgba(95, 209, 255, 0) 52%
  );
  transform: translateX(-70%);
  animation: beam-scan 7.5s linear infinite;
}

.pipeline-node {
  position: relative;
  z-index: 1;
  padding: 0.78rem;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(20, 34, 43, 0.94), rgba(7, 13, 18, 0.92));
  border: 1px solid rgba(164, 210, 228, 0.24);
  transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}

.pipeline-node.is-active {
  transform: translateY(-4px);
  border-color: rgba(96, 218, 144, 0.7);
  box-shadow: 0 0 0 1px rgba(96, 218, 144, 0.2), 0 16px 30px rgba(0, 0, 0, 0.35);
}

.pipeline-role {
  display: inline-flex;
  margin: 0;
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-family: "JetBrains Mono", monospace;
}

.pipeline-node h3 {
  margin: 0.24rem 0 0;
  font-size: 0.96rem;
}

.pipeline-node p {
  margin: 0.38rem 0 0;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.pipeline-stats {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
}

.pipeline-stats p {
  margin: 0;
  padding: 0.52rem 0.6rem;
  border-radius: 9px;
  border: 1px solid rgba(164, 210, 228, 0.17);
  background: rgba(6, 14, 18, 0.58);
}

.pipeline-stats strong {
  color: #8de9a9;
  font-size: 0.92rem;
  margin-right: 0.2rem;
}

.health-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.health-card {
  position: relative;
  padding: 0.72rem 0.78rem;
  border-radius: 11px;
  border: 1px solid rgba(164, 210, 228, 0.2);
  background: linear-gradient(160deg, rgba(16, 30, 39, 0.9), rgba(7, 13, 18, 0.86));
}

.health-label {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.health-value {
  margin: 0.4rem 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: #9fe3ff;
}

.health-value[data-tone="success"] {
  color: #84ecaa;
}

.health-value[data-tone="warn"] {
  color: #f3ce72;
}

.health-value[data-tone="error"] {
  color: #ff9f86;
}

.health-value[data-tone="info"] {
  color: #9fe3ff;
}

.results-grid {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.62rem;
}

.result-card {
  border-radius: 11px;
  border: 1px solid rgba(164, 210, 228, 0.2);
  background: linear-gradient(160deg, rgba(16, 30, 39, 0.9), rgba(7, 13, 18, 0.86));
  padding: 0.72rem 0.78rem;
}

.result-label {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.result-value {
  margin: 0.38rem 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  color: #9fe3ff;
}

@keyframes beam-scan {
  0% {
    transform: translateX(-72%);
  }
  100% {
    transform: translateX(72%);
  }
}

.activity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.activity-status {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.activity-feed {
  position: relative;
  margin-top: 0.8rem;
  display: grid;
  gap: 0.62rem;
  padding-left: 0.5rem;
}

.activity-feed::before {
  content: "";
  position: absolute;
  left: 1.08rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(95, 209, 255, 0.3) 0%,
    rgba(95, 209, 255, 0.12) 45%,
    rgba(95, 209, 255, 0.03) 100%
  );
}

.activity-item {
  position: relative;
  overflow: hidden;
  padding: 0.82rem 0.92rem 0.82rem 2.35rem;
  border-radius: 11px;
  border: 1px solid rgba(164, 210, 228, 0.22);
  background: linear-gradient(160deg, rgba(17, 31, 40, 0.9), rgba(8, 14, 19, 0.84));
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(10px);
  animation: activity-rise 520ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--activity-delay, 0ms);
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.activity-item:hover {
  transform: translateY(-3px);
  border-color: rgba(95, 209, 255, 0.46);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
}

.activity-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 10%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0) 86%
  );
  transform: translateX(-110%);
  animation: activity-sheen 6.5s linear infinite;
  opacity: 0.6;
}

.activity-item::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 1rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(95, 209, 255, 0.9);
  box-shadow: 0 0 0 6px rgba(95, 209, 255, 0.14);
  animation: activity-pulse 2.3s ease-in-out infinite;
  animation-delay: var(--activity-delay, 0ms);
}

.activity-body h3 {
  margin: 0.19rem 0 0;
  font-size: 0.93rem;
}

.activity-body a {
  color: var(--text);
  text-decoration: none;
}

.activity-body a:hover {
  color: var(--primary);
}

.activity-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.activity-detail {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
}

.activity-success::before {
  background: rgba(96, 218, 144, 1);
  box-shadow: 0 0 0 6px rgba(96, 218, 144, 0.16);
}

.activity-warn::before {
  background: rgba(244, 197, 89, 1);
  box-shadow: 0 0 0 6px rgba(244, 197, 89, 0.18);
}

.activity-error::before {
  background: rgba(255, 134, 100, 1);
  box-shadow: 0 0 0 6px rgba(255, 134, 100, 0.2);
}

.activity-item-empty {
  opacity: 1;
  transform: none;
  animation: none;
  color: var(--muted);
}

@keyframes activity-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes activity-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
  50% {
    transform: scale(1.13);
    filter: saturate(1.15);
  }
}

@keyframes activity-sheen {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(110%);
  }
}

.generated-subhead {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.catalog-stats {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.84rem;
}

.catalog-group + .catalog-group {
  margin-top: 1.2rem;
}

.catalog-group-title {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}

.tool-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.tool-tile {
  position: relative;
  padding: 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(164, 210, 228, 0.25);
  background: linear-gradient(160deg, rgba(21, 40, 49, 0.88), rgba(8, 15, 20, 0.85));
  min-height: 8.5rem;
}

.tool-tile h3 {
  margin: 0;
  font-size: 1rem;
}

.tool-tile p {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.tool-tile.live {
  border-color: rgba(95, 209, 255, 0.45);
}

.tool-tile.upcoming {
  border-color: rgba(244, 126, 93, 0.4);
}

.tool-tile a {
  color: var(--text);
  text-decoration: none;
}

.tool-tile a:hover {
  color: var(--primary);
}

.tool-tile-meta {
  margin-top: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
}

.tile-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tile-status.live {
  background: rgba(96, 218, 144, 0.17);
  color: #7ceb9d;
}

.tile-status.upcoming {
  background: rgba(244, 126, 93, 0.2);
  color: #ffc0a8;
}

.tile-date {
  color: var(--muted);
}

.tile-countdown {
  margin-top: 0.55rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: #ffc0a8;
}

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

.reveal {
  animation: rise-in 440ms ease both;
}

.reveal:nth-child(2) {
  animation-delay: 80ms;
}

.reveal:nth-child(3) {
  animation-delay: 140ms;
}

@keyframes rise-in {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

  .pipeline-head {
    flex-direction: column;
  }

  .activity-head {
    flex-direction: column;
  }

  .activity-feed {
    padding-left: 0;
  }

  .activity-feed::before {
    left: 0.84rem;
  }

  .activity-item {
    padding-left: 2.08rem;
  }

  .activity-item::before {
    left: 0.6rem;
  }

  .pipeline-track {
    grid-template-columns: 1fr;
  }

  .pipeline-stats {
    grid-template-columns: 1fr;
  }

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

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

  .tool-tiles {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 13.5rem;
  }

  .container {
    margin-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .pipeline-beam,
  .activity-item,
  .activity-item::before,
  .activity-item::after {
    animation: none;
  }

  .pipeline-node,
  .activity-item {
    transition: none;
  }
}
