:root {
  color-scheme: dark;
  --bg: #071018;
  --panel: #0d1824;
  --panel-strong: #111f2e;
  --line: rgba(164, 198, 214, 0.16);
  --text: #eef7f8;
  --muted: #9fb2bc;
  --accent: #42e8c4;
  --accent-2: #9cb7ff;
  --warn: #ffd166;
  --danger: #ff6b6b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 8%, rgba(66, 232, 196, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 2%, rgba(156, 183, 255, 0.14), transparent 30rem),
    linear-gradient(180deg, #071018 0%, #08111d 46%, #0a0d14 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    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: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

button,
input,
select {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(66, 232, 196, 0.75);
  outline-offset: 3px;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 720px;
  padding: 18px 0 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 16, 24, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.brand,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 18px;
  font-weight: 850;
}

.mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 30px rgba(66, 232, 196, 0.65);
}

.nav-actions a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  font-weight: 800;
}

.nav-actions a {
  padding: 0 12px;
  color: var(--muted);
}

.nav-actions a:hover {
  color: var(--text);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 48px;
  padding-top: 96px;
}

.hero-copy {
  animation: rise 700ms ease both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.93;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

h3 {
  margin-bottom: 18px;
  font-size: 22px;
  line-height: 1.15;
}

.hero-copy p:not(.eyebrow),
.note {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  border: 0;
  padding: 0 18px;
  cursor: pointer;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #7ef0ff);
  color: #041018;
}

.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.signal-panel,
.summary-card,
.task-card,
.task-form,
.endpoint-grid a,
.empty {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 31, 46, 0.92), rgba(8, 17, 28, 0.92));
  box-shadow: var(--shadow);
}

.signal-panel {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 30px;
  padding: 24px;
  animation: rise 700ms 120ms ease both;
}

.signal-panel::after {
  position: absolute;
  inset: auto -20% -36% -20%;
  height: 300px;
  content: "";
  background: radial-gradient(circle, rgba(66, 232, 196, 0.18), transparent 65%);
}

.panel-header,
.task-topline,
.section-heading,
.summary-card,
.endpoint-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-header {
  position: relative;
  z-index: 1;
  color: var(--muted);
}

.panel-header strong {
  color: var(--text);
  text-transform: capitalize;
}

.risk-orbit {
  position: relative;
  width: min(320px, 80vw);
  height: min(320px, 80vw);
  margin: 44px auto;
  border: 1px solid rgba(66, 232, 196, 0.28);
  border-radius: 50%;
}

.risk-orbit::before,
.risk-orbit::after,
.risk-orbit span {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.risk-orbit::before {
  inset: 24%;
  border: 1px solid rgba(156, 183, 255, 0.22);
}

.risk-orbit::after {
  inset: 41%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 60px rgba(66, 232, 196, 0.7);
}

.risk-orbit span {
  width: 12px;
  height: 12px;
  background: var(--accent);
  animation: orbit 6s linear infinite;
}

.risk-orbit span:nth-child(1) {
  left: 50%;
  top: -6px;
}

.risk-orbit span:nth-child(2) {
  right: 20px;
  bottom: 64px;
  animation-delay: -2s;
  background: var(--warn);
}

.risk-orbit span:nth-child(3) {
  left: 20px;
  bottom: 58px;
  animation-delay: -4s;
  background: var(--accent-2);
}

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

.signal-stats div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 900;
}

.section {
  padding: 56px 0;
}

.section-heading {
  margin-bottom: 24px;
}

.filters,
.task-form {
  display: grid;
  gap: 14px;
}

.filters {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(4, 10, 17, 0.72);
  color: var(--text);
}

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

.summary-card {
  min-height: 112px;
  align-items: flex-start;
  flex-direction: column;
  padding: 18px;
  border-radius: 20px;
}

.summary-card span,
.task-topline {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-card strong {
  font-size: 28px;
  text-transform: capitalize;
}

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

.task-card,
.empty {
  border-radius: 22px;
  padding: 20px;
}

.task-card {
  transition: transform 180ms ease, border-color 180ms ease;
}

.task-card:hover {
  transform: translateY(-4px);
  border-color: rgba(66, 232, 196, 0.42);
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  color: #061018;
  background: var(--accent);
}

.pill.medium {
  background: var(--warn);
}

.pill.high {
  background: #ff9f68;
}

.pill.critical {
  background: var(--danger);
}

.task-card dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0 0 16px;
}

.task-card dd {
  font-size: 15px;
  text-transform: capitalize;
}

.task-card ul {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

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

.tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 12px;
}

.create-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.task-form {
  grid-template-columns: repeat(3, 1fr);
  padding: 20px;
  border-radius: 24px;
}

.checkbox {
  grid-auto-flow: column;
  align-items: center;
  justify-content: start;
}

.checkbox input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.form-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--accent);
  font-weight: 800;
}

.api-section {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 24px;
  align-items: start;
}

.endpoint-grid {
  display: grid;
  gap: 12px;
}

.endpoint-grid a {
  min-height: 72px;
  border-radius: 18px;
  padding: 16px;
}

code {
  color: var(--accent);
  font-weight: 900;
}

.endpoint-grid span {
  color: var(--muted);
}

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

@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(120px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(120px) rotate(-360deg);
  }
}

@media (max-width: 920px) {
  .hero-grid,
  .api-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .summary-grid,
  .task-grid,
  .task-form {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 24px, 1180px);
  }

  .topbar,
  .section-heading,
  .nav-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-grid {
    padding-top: 54px;
  }

  .filters,
  .summary-grid,
  .task-grid,
  .task-form,
  .signal-stats {
    grid-template-columns: 1fr;
  }

  .signal-panel {
    min-height: auto;
  }
}

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