:root {
  --bg-0: #03060f;
  --bg-1: #070d1e;
  --bg-2: #0b1430;
  --panel: rgba(8, 14, 34, 0.86);
  --panel-soft: rgba(12, 19, 46, 0.74);
  --line: rgba(132, 178, 255, 0.18);
  --line-strong: rgba(144, 217, 255, 0.46);
  --text: #e8f0ff;
  --muted: #9caed9;
  --blue: #9fc3ff;
  --cyan: #7ef0ff;
  --violet: #b993ff;
  --green: #2ef7b1;
  --orange: #ffbf64;
  --red: #ff6f98;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 0 0 1px rgba(132, 178, 255, 0.1), 0 30px 70px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 100vw;
  min-height: 100%;
}

html {
  overflow-x: hidden;
  background: #03060f;
}

body {
  font-family: "Space Grotesk", "Rajdhani", "Segoe UI", sans-serif;
  color: var(--text);
  width: 100%;
  min-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: #03060f;
  background:
    radial-gradient(circle at 12% 10%, rgba(150, 194, 255, 0.24), transparent 28%),
    radial-gradient(circle at 84% 9%, rgba(180, 142, 255, 0.2), transparent 30%),
    radial-gradient(circle at 88% 82%, rgba(126, 240, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #02050f 0%, #061024 52%, #02050f 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 32%, transparent 94%);
}

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

code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  color: #d6e5ff;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2px 6px;
}

.app-shell {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 14px 16px 20px;
  overflow-x: clip;
}

.site-top {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  backdrop-filter: blur(16px);
  background: rgba(4, 8, 20, 0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.site-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  min-width: 0;
}

.site-brand {
  display: grid;
  gap: 2px;
  min-width: 220px;
  max-width: 100%;
}

.site-brand small {
  color: var(--blue);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
}

.site-brand strong {
  font-size: 15px;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.site-nav a {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(126, 240, 255, 0.1);
  box-shadow: 0 0 20px rgba(126, 240, 255, 0.16);
}

.site-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.platform-shell {
  width: 100%;
  margin-top: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 24% 0%, rgba(156, 193, 255, 0.12), transparent 46%),
    linear-gradient(160deg, rgba(6, 12, 30, 0.96), rgba(6, 10, 24, 0.98));
  padding: 18px;
  min-height: calc(100vh - 112px);
}

.hero-banner {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(8, 14, 36, 0.96), rgba(6, 10, 26, 0.96));
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 240, 255, 0.2), transparent 72%);
}

.hero-header {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.hero-kicker {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}

.hero-title {
  margin: 8px 0 8px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.hero-pill-stack {
  display: grid;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.ok {
  color: var(--green);
}

.info {
  color: var(--cyan);
}

.warn {
  color: var(--orange);
}

.err {
  color: var(--red);
}

button,
.btn {
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(157, 195, 255, 0.32), rgba(127, 214, 255, 0.2));
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  box-shadow: 0 0 20px rgba(126, 240, 255, 0.16);
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(126, 240, 255, 0.24);
  filter: brightness(1.07);
}

button.secondary,
.btn.secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-color: var(--line);
  box-shadow: none;
}

button.ghost,
.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--muted);
  box-shadow: none;
}

.window-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.window-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(5, 10, 26, 0.88);
  box-shadow: var(--shadow);
  padding: 14px;
  min-width: 0;
}

.window-card h3 {
  margin: 0;
  font-size: clamp(24px, 2.7vw, 50px);
  letter-spacing: 0.02em;
}

.window-card .status-block {
  margin-top: 8px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 15px;
}

.window-card p {
  margin: 10px 0 0;
  color: #d7e4ff;
  font-size: 17px;
}

.window-card .meta-line {
  color: var(--muted);
  font-size: 14px;
}

.main-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.span-12 { grid-column: span 12; }
.span-9 { grid-column: span 9; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.section-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 15px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.section-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(126, 240, 255, 0.52), transparent);
}

.project-progress-strip {
  margin-top: 14px;
}

.project-progress-card {
  padding-bottom: 18px;
}

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

.progress-tile,
.progress-subcard {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  min-width: 0;
}

.progress-emphasis {
  background:
    radial-gradient(circle at top right, rgba(126, 240, 255, 0.16), transparent 45%),
    rgba(255, 255, 255, 0.05);
}

.progress-tile span,
.progress-subcard > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.progress-tile strong,
.progress-subcard strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
}

.progress-tile small,
.progress-subcard small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.progress-meter {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(126, 240, 255, 0.78), rgba(157, 195, 255, 0.92));
  box-shadow: 0 0 18px rgba(126, 240, 255, 0.32);
}

.progress-subgrid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 12px;
}

.progress-subcard p {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

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

.progress-gate-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 8, 22, 0.54);
}

.progress-gate-list strong {
  margin-top: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 11px;
  min-width: 0;
}

.section-head > * {
  min-width: 0;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  white-space: nowrap;
  max-width: 100%;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  min-width: 0;
}

.meta-box {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  min-width: 0;
}

.meta-box span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-box strong {
  display: block;
  margin-top: 7px;
  font-size: 35px;
  line-height: 1;
}

.meta-box em {
  display: block;
  margin-top: 6px;
  color: #d8e6ff;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.toolbar.tight {
  gap: 6px;
}

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

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(132, 178, 255, 0.33);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(126, 240, 255, 0.16);
}

textarea {
  min-height: 260px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  line-height: 1.56;
}

.code-area {
  border-radius: var(--radius-md);
  border: 1px solid rgba(132, 178, 255, 0.22);
  background: rgba(3, 8, 20, 0.9);
  padding: 10px;
  min-width: 0;
}

.preview-stage {
  min-height: 300px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(126, 240, 255, 0.36);
  background: radial-gradient(circle at 50% 40%, rgba(126, 240, 255, 0.12), transparent 70%), rgba(4, 9, 23, 0.85);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  position: relative;
  overflow: hidden;
  padding: 10px;
}

.preview-stage::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px solid rgba(126, 240, 255, 0.16);
  box-shadow: 0 0 120px rgba(126, 240, 255, 0.14) inset;
}

.cube {
  width: 98px;
  height: 98px;
  border: 1px solid rgba(126, 240, 255, 0.32);
  background: linear-gradient(135deg, rgba(159, 195, 255, 0.36), rgba(185, 147, 255, 0.24));
  transform: rotateX(60deg) rotateZ(45deg);
  box-shadow: 0 0 78px rgba(126, 240, 255, 0.18);
  animation: cubeFloat 5.6s ease-in-out infinite;
}

@keyframes cubeFloat {
  0%,
  100% {
    transform: rotateX(60deg) rotateZ(45deg) translateY(0);
  }
  50% {
    transform: rotateX(60deg) rotateZ(45deg) translateY(-10px);
  }
}

.log-window,
.terminal {
  min-height: 220px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(132, 178, 255, 0.2);
  background: rgba(3, 7, 18, 0.92);
  padding: 12px;
  color: #cfe2ff;
  white-space: pre-wrap;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.52;
  max-width: 100%;
  overflow: auto;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

th {
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cyan);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid currentColor;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
}

.status-verified,
.status-ok {
  color: var(--green);
}

.status-running {
  color: var(--cyan);
}

.status-offline {
  color: var(--orange);
}

.status-standby {
  color: var(--muted);
}

.status-blocked {
  color: var(--red);
}

.notice {
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(126, 240, 255, 0.08);
  color: #dce9ff;
  font-size: 13px;
  line-height: 1.55;
}

.notice.warn {
  border-left-color: var(--orange);
  background: rgba(255, 191, 100, 0.1);
}

.notice.err {
  border-left-color: var(--red);
  background: rgba(255, 111, 152, 0.1);
}

.stack {
  display: grid;
  gap: 10px;
}

.footer-note {
  text-align: center;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

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

  .progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .progress-subgrid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1900px) {
  .site-top-inner {
    padding: 13px 16px;
  }

  .hero-banner {
    padding: 26px;
  }

  .window-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .progress-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .progress-subgrid {
    grid-template-columns: 1.35fr 0.65fr;
  }
}

@media (max-width: 1220px) {
  .span-9,
  .span-8,
  .span-7,
  .span-6,
  .span-5,
  .span-4,
  .span-3 {
    grid-column: span 12;
  }

  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .progress-subgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px;
  }

  .platform-shell {
    padding: 12px;
    overflow-x: clip;
  }

  .hero-banner {
    padding: 18px;
  }

  .hero-title {
    font-size: clamp(28px, 9vw, 44px);
  }

  .site-top-inner {
    align-items: flex-start;
  }

  .site-brand {
    min-width: 0;
  }

  .site-nav,
  .site-actions,
  .hero-actions,
  .hero-pill-stack,
  .toolbar {
    width: 100%;
  }

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

  .site-nav a,
  .hero-actions button,
  .hero-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .form-grid,
  .form-grid-3,
  .meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-header > *,
  .main-grid > *,
  .window-grid > * {
    min-width: 0;
  }
}
