:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --panel: rgba(30, 41, 59, 0.72);
  --panel-strong: rgba(30, 41, 59, 0.84);
  --panel-soft: rgba(15, 23, 42, 0.52);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-strong: #22d3ee;
  --danger: #f87171;
  --success: #86efac;
  --warning: #fbbf24;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 22%),
    linear-gradient(180deg, #0f172a 0%, #111c31 48%, #0f172a 100%);
  color: var(--text);
}

.marketing-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.marketing-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.marketing-brand {
  margin-bottom: 18px;
}

.marketing-title {
  margin: 0 0 10px;
  font-size: 1.85rem;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: -0.03em;
}

.marketing-body {
  margin: 0;
  max-width: 30rem;
  color: #c3d3df;
  font-size: 0.9rem;
  line-height: 1.55;
}

.marketing-actions {
  margin-top: 18px;
}

.marketing-status {
  margin: 12px 0 0;
  min-height: 1rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.72rem;
  color: var(--muted);
}

.legal-links a {
  color: inherit;
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--text);
}

.teaser-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.76) 0%, rgba(15, 23, 42, 0.8) 100%);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.teaser-window-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.44);
}

.teaser-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.2);
}

.teaser-window-body {
  padding: 14px 16px 16px;
}

.teaser-window-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.teaser-window-header h2 {
  margin: 0;
  font-size: 1rem;
}

.teaser-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.teaser-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 8px;
}

.teaser-overview-grid {
  column-gap: 10px;
}

a {
  color: inherit;
}

.page-shell {
  display: grid;
  grid-template-columns: 212px 1fr;
  min-height: 100vh;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.sidebar {
  padding: 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84) 0%, rgba(16, 24, 39, 0.72) 100%);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #eff6ff;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: 0.82rem;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.18);
}

.brand h1,
.panel-header h3 {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-weight: 600;
}

.panel-header h3 {
  font-size: 0.92rem;
}

.brand h1 {
  font-size: 1rem;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.64rem;
}

.control-panel {
  padding: 8px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--line);
}

.control-panel h2 {
  margin: 0 0 8px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.sidebar-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.sidebar-links {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.sidebar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(134, 239, 172, 0.22);
  border-radius: 7px;
  background: rgba(34, 197, 94, 0.1);
  color: #dcfce7;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
}

.main-content {
  padding: 8px 10px;
}

.content-frame {
  width: min(900px, 100%);
  margin: 0 auto;
}

.legal-page {
  min-height: 100vh;
  padding: 32px 20px 48px;
}

.legal-shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

.legal-card {
  padding: 24px;
}

.legal-card h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.legal-card h3 {
  margin: 18px 0 6px;
  font-size: 0.98rem;
}

.legal-card p,
.legal-card li {
  color: #c3d3df;
  font-size: 0.86rem;
  line-height: 1.6;
}

.legal-card ul {
  margin: 0;
  padding-left: 18px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 6px;
  padding: 0 0 5px;
  border-bottom: 1px solid var(--line);
}

.hero h2 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.15;
  font-weight: 600;
}

.hero-copy {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.hero-badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--muted);
  font-size: 0.68rem;
  backdrop-filter: blur(14px);
}

.hero-onboarding {
  margin-bottom: 10px;
}

.panel-onboarding {
  max-width: 760px;
}

.checkout-panel-header h3 {
  font-size: 1rem;
}

.checkout-copy {
  max-width: 44rem;
}

.checkout-success-card,
.checkout-wait-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.42) 0%, rgba(15, 23, 42, 0.24) 100%);
}

.checkout-success-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 600;
}

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

.step-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.3);
}

.step-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.72rem;
}

.step-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.45;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #dbeafe;
  font-size: 0.68rem;
  font-weight: 700;
}

.metrics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 4px;
}

.metric-card,
.panel,
.data-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.metric-card {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 5px 7px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.76) 0%, rgba(30, 41, 59, 0.62) 100%);
}

.metric-label {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
}

.panel {
  padding: 7px 8px;
  margin-bottom: 4px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82) 0%, rgba(27, 38, 54, 0.74) 100%);
}

.access-panel.is-hidden {
  display: none;
}

.panel-copy {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
  margin-bottom: 3px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  display: grid;
  gap: 4px;
  font-size: 0.68rem;
}

.auth-form span {
  color: var(--muted);
}

.auth-form input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.42);
  color: var(--text);
  font: inherit;
}

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

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border-radius: 7px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #eff6ff;
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.38);
  color: var(--text);
}

.button-danger {
  border-color: rgba(248, 113, 113, 0.26);
  background: rgba(248, 113, 113, 0.12);
  color: #fee2e2;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  border-top: 1px solid var(--line);
}

.overview-grid > .empty-state {
  grid-column: 1 / -1;
}

.overview-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 4px;
  align-items: center;
  padding: 2px 0;
  border-bottom: 1px solid var(--line);
}

.overview-item dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.overview-item dd {
  margin: 0;
  line-height: 1.15;
  font-size: 0.66rem;
  color: #d8e3ea;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 3px;
}

.status-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 150px;
  gap: 1px;
  min-width: 0;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.status-label {
  color: var(--muted);
  font-size: 0.54rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.inline-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #dce6ed;
  font-size: 0.62rem;
  font-weight: 600;
}

.status-detail {
  color: var(--muted);
  max-width: 100%;
  font-size: 0.54rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.status-dot.online {
  background: var(--success);
}

.status-dot.offline {
  background: var(--danger);
}

.status-dot.warn {
  background: var(--warning);
}

.runtime-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  align-items: stretch;
}

.runtime-grid .panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
}

.runtime-grid .card-list {
  flex: 1 1 auto;
  min-height: 128px;
  max-height: 320px;
  overflow-y: auto;
}

.card-list {
  display: grid;
  gap: 2px;
}

.data-card {
  padding: 5px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.34);
  box-shadow: none;
}

.data-card h4 {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
}

.data-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.2;
}

.mini-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: #dce6ed;
  font-size: 0.58rem;
  font-weight: 600;
}

.mini-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.mini-status.online::before {
  background: var(--success);
}

.mini-status.offline::before {
  background: var(--danger);
}

.mini-status.warn::before {
  background: var(--warning);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 4px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.57rem;
}

.tag.success {
  color: #d9fbe7;
  background: rgba(134, 239, 172, 0.12);
  border-color: rgba(134, 239, 172, 0.24);
}

.tag.warn {
  color: #f8e3a0;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.24);
}

.tag.danger {
  color: #fee2e2;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.24);
}

.is-hidden {
  display: none;
}

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

.success {
  color: var(--success);
}

.warn {
  color: #7dd3fc;
}

.danger {
  color: var(--danger);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 6px;
  color: var(--muted);
  text-align: center;
  font-size: 0.66rem;
  background: rgba(15, 23, 42, 0.24);
}

.card-list.empty-state {
  align-content: center;
}

.stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin-top: 3px;
  font-size: 0.64rem;
}

.stack strong {
  color: var(--muted);
  font-weight: 500;
  margin-right: 4px;
}

.list-grid {
  display: grid;
  gap: 8px;
}

.list-grid dl {
  margin: 0;
  display: grid;
  gap: 4px;
}

.list-grid dt {
  color: var(--muted);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.list-grid dd {
  margin: 0;
  font-size: 0.68rem;
}

.loading-block {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px 12px 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.18);
  border-top-color: var(--accent-strong);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

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

  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics-grid,
  .status-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card,
  .status-card {
    min-width: 0;
  }

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

  .runtime-grid .card-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .marketing-page {
    padding: 20px 14px;
  }

  .marketing-title {
    font-size: 1.45rem;
  }

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

  .main-content,
  .sidebar {
    padding: 20px;
  }

  .metrics-grid,
  .status-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: start;
  }

  .overview-item,
  .list-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .action-row {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
