:root {
  --bg: #0b1220;
  --surface: #121a2a;
  --surface-alt: #162132;
  --text: #e8edf6;
  --muted: #a8b3c4;
  --line: #25324a;
  --line-strong: #33435f;
  --accent: #2fa7a0;
  --accent-dark: #24867f;
  --accent-soft: rgba(47, 167, 160, 0.16);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --radius: 10px;
  --radius-sm: 8px;
  --warning: #f59e0b;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #111a2d 0%, var(--bg) 240px, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.beta-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 16px;
  background: #09111e;
  color: #d9f6f2;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
}

main {
  padding-bottom: 64px;
}

a {
  color: #8fe2db;
}

a:hover {
  color: #b3f0ea;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(11, 18, 32, 0.94);
  border-bottom: 1px solid rgba(37, 50, 74, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a,
.nav .link-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  background: transparent;
  border: 1px solid transparent;
}

.nav a:hover,
.nav .link-button:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.nav form {
  margin: 0;
}

.link-button {
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.16);
}

.button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.button.secondary {
  background: transparent;
  color: var(--accent-dark);
  box-shadow: none;
}

.button.secondary:hover {
  background: rgba(47, 167, 160, 0.14);
  color: var(--accent-dark);
}

.button.small {
  min-height: 38px;
  padding: 0 14px;
}

.button:disabled {
  border-color: var(--line);
  background: #e8ebf0;
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

.messages {
  max-width: 1120px;
  margin: 20px auto 0;
  padding: 0 32px;
}

.message {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.04);
}

.hero,
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 32px;
  align-items: stretch;
  padding-top: 56px;
  padding-bottom: 36px;
}

.hero > div:first-child,
.status-panel {
  background: var(--surface);
  border: 1px solid rgba(37, 50, 74, 0.9);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
}

.hero > div:first-child {
  padding: 32px;
}

.status-panel {
  padding: 24px;
  align-self: start;
}

.hero h1,
.section h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero .eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.actions form {
  margin: 0;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.section {
  padding-top: 26px;
  padding-bottom: 26px;
}

.section.narrow {
  max-width: 860px;
}

.section h2 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
}

.grid {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

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

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

.section article,
.auth-panel,
.plan,
.device-form,
.instructions,
.table-wrap,
.page-heading + * {
  background: var(--surface);
  border: 1px solid rgba(37, 50, 74, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.section article,
.plan {
  padding: 22px;
}

.section article h3,
.plan h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading h1 {
  margin: 0;
}

.price {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 800;
}

.price span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.auth-panel {
  max-width: 520px;
  margin: 56px auto;
  padding: 28px;
}

.auth-panel input,
.device-form input,
.device-form select,
.auth-panel textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #0c1524;
  color: var(--text);
}

.auth-panel input:focus,
.device-form input:focus,
.device-form select:focus,
.auth-panel textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  outline-offset: 1px;
  border-color: var(--accent);
}

.device-form {
  margin: 24px 0;
  padding: 20px;
}

.instructions {
  margin: 24px 0;
  padding: 20px;
}

.device-form label,
.auth-panel label {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.device-form p {
  margin: 0 0 14px;
}

.auth-panel .helptext,
.auth-panel ul,
.muted {
  color: var(--muted);
  font-size: 0.94rem;
}

.auth-panel ul {
  margin-top: 8px;
  padding-left: 18px;
}

.instructions h2 {
  margin-top: 0;
}

.instructions ol,
.instructions ul {
  margin: 12px 0 0 20px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.tag.success {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.22);
  color: var(--accent-dark);
}

.tag.warning {
  background: rgba(180, 83, 9, 0.12);
  border-color: rgba(180, 83, 9, 0.22);
  color: var(--warning);
}

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

.error-page {
  padding: 28px;
  text-align: center;
}

.error-page .lead {
  margin-left: auto;
  margin-right: auto;
}

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

.metric {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

.hero + .section {
  margin-top: 12px;
}

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

  .grid.two,
  .grid.three,
  .grid.four,
  .grid.plans {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding: 16px 20px;
  }

  .hero,
  .section,
  .messages {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero > div:first-child,
  .status-panel,
  .auth-panel {
    padding: 22px;
  }

  .nav {
    gap: 8px;
  }

  .nav a,
  .nav .link-button {
    min-height: 36px;
    padding: 0 12px;
  }
}
