:root {
  color-scheme: dark;
  --bg: #0d1422;
  --surface: #151d2d;
  --surface-muted: #111a29;
  --surface-elevated: rgba(21, 29, 45, 0.92);
  --surface-emphasis: #1a2843;
  --text: #edf3ff;
  --muted: #99a8c2;
  --border: #283650;
  --border-strong: #354766;
  --primary: #7ea2ff;
  --primary-soft: #1b2a46;
  --success: #84e1b1;
  --success-bg: rgba(18, 42, 32, 0.78);
  --danger: #ffb5bf;
  --danger-bg: rgba(49, 25, 34, 0.84);
  --danger-soft: rgba(138, 66, 80, 0.18);
  --night: #c7d4ef;
  --night-bg: rgba(32, 42, 62, 0.84);
  --night-soft: rgba(112, 130, 166, 0.18);
  --shadow: 0 16px 30px rgba(2, 6, 23, 0.34);
  --glow-primary: rgba(126, 162, 255, 0.14);
  --glow-secondary: rgba(2, 6, 23, 0.32);
  --radius-large: 18px;
  --radius-medium: 14px;
  --radius-small: 10px;
  --container-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(circle at top left, var(--glow-primary), transparent 34%),
    radial-gradient(circle at bottom right, var(--glow-secondary), transparent 30%),
    var(--bg);
  color: var(--text);
}

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

p,
h1 {
  margin-top: 0;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(8px);
  opacity: 0.9;
}

.ambient-primary {
  top: 11%;
  right: -6rem;
  width: 18rem;
  height: 18rem;
  background:
    radial-gradient(circle, rgba(126, 162, 255, 0.24) 0%, rgba(126, 162, 255, 0.08) 44%, transparent 72%);
}

.ambient-secondary {
  bottom: -4rem;
  left: -4rem;
  width: 16rem;
  height: 16rem;
  background:
    radial-gradient(circle, rgba(41, 68, 112, 0.24) 0%, rgba(12, 19, 33, 0.04) 56%, transparent 76%);
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.brand-chip,
.status-chip,
.eyebrow,
.panel-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.brand-chip {
  background: var(--primary-soft);
  color: var(--primary);
}

.status-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
}

.status-chip-offline {
  background: var(--danger-soft);
  border-color: rgba(138, 66, 80, 0.5);
  color: var(--danger);
}

.status-chip-night {
  background: var(--night-soft);
  border-color: rgba(112, 130, 166, 0.45);
  color: var(--night);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(280px, 0.92fr);
  gap: 20px;
  align-items: stretch;
  flex: 1 1 auto;
}

.hero-copy,
.status-panel {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy {
  padding: clamp(24px, 4vw, 38px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(620px, calc(100vh - 180px));
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -10% -18% auto;
  width: 15rem;
  height: 15rem;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(126, 162, 255, 0.18) 0%, rgba(126, 162, 255, 0.05) 48%, transparent 74%);
  pointer-events: none;
}

.eyebrow,
.panel-label {
  width: fit-content;
  margin-bottom: 18px;
  background: var(--primary-soft);
  color: var(--primary);
}

.eyebrow-offline,
.panel-label-offline {
  background: var(--danger-soft);
  color: var(--danger);
}

.eyebrow-night,
.panel-label-night {
  background: var(--night-soft);
  color: var(--night);
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
  max-width: 11ch;
}

.lead {
  margin-bottom: 12px;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  color: var(--text);
}

.description {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.notice {
  margin-top: 22px;
  width: fit-content;
  max-width: 42rem;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--muted);
}

.notice-offline {
  border-color: rgba(138, 66, 80, 0.5);
  background: var(--danger-bg);
  color: var(--danger);
}

.notice-night {
  border-color: rgba(112, 130, 166, 0.45);
  background: var(--night-bg);
  color: var(--night);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-small);
  border: 1px solid transparent;
  font-weight: 600;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(126, 162, 255, 0.22);
}

.button-primary:hover,
.button-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(126, 162, 255, 0.28);
}

.button:focus-visible {
  outline: 2px solid rgba(126, 162, 255, 0.35);
  outline-offset: 2px;
}

.status-panel {
  padding: clamp(20px, 3vw, 26px);
  display: grid;
  gap: 16px;
  align-content: start;
}

.signal-card,
.panel-item {
  border-radius: var(--radius-medium);
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.signal-card {
  padding: 16px;
}

.signal-card-offline {
  border-color: rgba(138, 66, 80, 0.5);
  background: var(--danger-bg);
}

.signal-card-night {
  border-color: rgba(112, 130, 166, 0.45);
  background: var(--night-bg);
}

.signal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 600;
}

.signal-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(132, 225, 177, 0.12);
  flex: 0 0 auto;
}

.signal-dot-offline {
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(255, 181, 191, 0.12);
}

.signal-dot-night {
  background: var(--night);
  box-shadow: 0 0 0 6px rgba(199, 212, 239, 0.1);
}

.signal-card p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.panel-item {
  padding: 14px 15px;
}

.panel-item span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--muted);
}

.panel-item strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.footer {
  padding-bottom: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

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

  .hero-copy {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 16px;
    gap: 18px;
  }

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

  .hero-copy,
  .status-panel {
    border-radius: 16px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2rem, 11vw, 2.8rem);
  }

  .notice,
  .actions,
  .button {
    width: 100%;
  }

  .button {
    justify-content: center;
  }
}
