:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-strong: #e7eef8;
  --ink: #172033;
  --muted: #617086;
  --primary: #1f63cc;
  --primary-strong: #16479e;
  --accent: #00a878;
  --warn: #c78314;
  --danger: #c22e1e;
  --info: #416fe0;
  --line: #d7e2f1;
  --shadow: 0 26px 60px rgba(18, 40, 80, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  padding: 10px 12px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 32px;
  background: rgba(246, 248, 252, 0.86);
  border-bottom: 1px solid rgba(215, 226, 241, 0.82);
  backdrop-filter: blur(16px);
}

.brand,
.site-nav,
.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
}

.site-nav {
  margin-left: auto;
  gap: 8px;
}

.site-nav a,
.nav-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--surface-strong);
  color: var(--ink);
}

.nav-action {
  background: var(--ink);
  color: #fff;
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 120px 32px 72px;
  border-bottom: 1px solid var(--line);
}

.signal-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 99, 204, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 99, 204, 0.08) 1px, transparent 1px),
    linear-gradient(124deg, transparent 0 54%, rgba(0, 168, 120, 0.13) 54% 56%, transparent 56% 100%),
    linear-gradient(34deg, transparent 0 38%, rgba(199, 131, 20, 0.10) 38% 40%, transparent 40% 100%);
  background-size: 68px 68px, 68px 68px, 100% 100%, 100% 100%;
}

.hero-visual {
  position: absolute;
  right: -84px;
  bottom: -52px;
  width: 65vw;
  max-width: 1080px;
  min-width: 700px;
  opacity: 0.98;
  filter: drop-shadow(0 34px 58px rgba(18, 40, 80, 0.18));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding-top: 44px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 5.2rem;
  line-height: 0.96;
  font-weight: 900;
}

h2 {
  margin: 0;
  font-size: 2.55rem;
  line-height: 1.05;
  font-weight: 880;
}

h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.hero-text {
  max-width: 580px;
  margin: 24px 0 0;
  color: #334154;
  font-size: 1.15rem;
}

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

.button,
.beta-form button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
.beta-form button {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 30px rgba(31, 99, 204, 0.24);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.status-strip div {
  min-height: 126px;
  padding: 24px 32px;
  background: var(--surface);
}

.status-strip strong,
.status-strip span {
  display: block;
}

.status-strip strong {
  margin-bottom: 6px;
  font-size: 1rem;
}

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

.section {
  padding: 92px 32px;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading p:not(.eyebrow),
.beta-section p {
  color: var(--muted);
}

.feature-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 252px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feature-card p {
  color: var(--muted);
}

.status-dot {
  width: 14px;
  height: 14px;
  display: inline-block;
  margin-bottom: 36px;
  border-radius: 50%;
}

.status-dot.live {
  background: var(--accent);
}

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

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

.stack-section {
  background: #172033;
  color: #fff;
}

.stack-section .eyebrow {
  color: #8bd9bd;
}

.stack-map {
  max-width: 1020px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.stack-map div {
  min-height: 144px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.stack-map b,
.stack-map span {
  display: block;
}

.stack-map b {
  margin-bottom: 12px;
  font-size: 1.08rem;
}

.stack-map span {
  color: #ccdae9;
}

.beta-section {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 42px;
  align-items: center;
}

.beta-form {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.beta-form label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 850;
}

.beta-form label:first-child {
  margin-top: 0;
}

.beta-form input,
.beta-form textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
}

.beta-form input {
  min-height: 48px;
  padding: 0 14px;
}

.beta-form textarea {
  min-height: 118px;
  padding: 12px 14px;
  resize: vertical;
}

.beta-form button {
  width: 100%;
  margin-top: 16px;
}

.beta-form button:disabled {
  cursor: progress;
  opacity: 0.72;
  box-shadow: none;
}

.form-note {
  min-height: 42px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-note[data-state="success"] {
  color: #0d7959;
}

.form-note[data-state="error"] {
  color: var(--danger);
}

.site-footer {
  flex-wrap: wrap;
  gap: 18px;
  padding: 28px 32px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.site-footer span {
  margin-right: auto;
  font-weight: 850;
}

.site-footer a {
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.doc-page {
  padding-top: 98px;
}

.doc-shell {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 84px;
}

.doc-shell h1 {
  margin-bottom: 22px;
  font-size: 3rem;
}

.doc-shell h2 {
  margin-top: 34px;
  font-size: 1.5rem;
}

.doc-shell p,
.doc-shell li {
  color: var(--muted);
}

.doc-shell li + li {
  margin-top: 8px;
}

.dashboard-page {
  background:
    linear-gradient(180deg, rgba(231, 238, 248, 0.82), rgba(246, 248, 252, 0.96) 360px),
    var(--bg);
}

.admin-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 118px 0 72px;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 26px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-hero h1 {
  font-size: clamp(2.7rem, 7vw, 5.2rem);
}

.admin-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.06rem;
}

.ops-status-grid,
.dashboard-grid {
  display: grid;
  gap: 12px;
}

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

.ops-status-grid div,
.metric-card,
.admin-panel,
.event-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.ops-status-grid div {
  min-height: 138px;
  padding: 18px;
}

.ops-status-grid span,
.metric-card span,
.ops-status-grid small,
.metric-card small,
.event-row small {
  color: var(--muted);
}

.ops-status-grid span,
.metric-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.ops-status-grid strong,
.metric-card strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.08;
}

.admin-panel {
  margin-top: 14px;
  padding: 22px;
  box-shadow: 0 18px 48px rgba(18, 40, 80, 0.10);
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.panel-heading.compact {
  align-items: start;
  margin-bottom: 14px;
}

.panel-heading h2 {
  font-size: 1.45rem;
}

.panel-heading p[role="status"] {
  max-width: 420px;
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.panel-heading p[data-state="success"] {
  color: #0d7959;
}

.panel-heading p[data-state="error"] {
  color: var(--danger);
}

.panel-heading p[data-state="loading"] {
  color: var(--primary-strong);
}

.admin-control-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) repeat(2, minmax(150px, 0.8fr));
  gap: 12px;
  align-items: end;
}

.admin-control-grid label,
.stacked-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.admin-control-grid input,
.stacked-form input,
.stacked-form select,
.stacked-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.admin-control-grid input,
.stacked-form input,
.stacked-form select {
  min-height: 46px;
  padding: 0 12px;
}

.stacked-form textarea {
  min-height: 92px;
  padding: 11px 12px;
  resize: vertical;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.admin-actions button,
.stacked-form button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform 140ms ease-out, background-color 160ms ease;
}

.admin-actions button:active,
.stacked-form button:active,
.button:active,
.beta-form button:active {
  transform: scale(0.98);
}

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

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

.metric-card {
  min-height: 140px;
  padding: 20px;
}

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

.event-row {
  padding: 14px;
}

.event-row strong,
.event-row small,
.event-row p {
  display: block;
}

.event-row p,
.empty-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.stacked-form {
  display: grid;
  gap: 12px;
}

:focus-visible {
  outline: 3px solid #00a878;
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .site-header {
    position: sticky;
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .hero {
    min-height: auto;
    padding: 54px 20px 36px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-visual {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    min-width: 0;
    margin: 28px 0 -22px;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2rem;
  }

  .status-strip,
  .feature-grid,
  .stack-map,
  .beta-section,
  .admin-hero,
  .dashboard-grid,
  .dashboard-grid.two-column {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 20px;
  }

  .beta-section {
    display: grid;
  }

  .admin-shell {
    width: min(900px, calc(100% - 28px));
    padding-top: 34px;
  }

  .ops-status-grid,
  .admin-control-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    display: grid;
  }

  .panel-heading p[role="status"] {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .nav-action {
    width: 100%;
  }

  h1 {
    font-size: 2.7rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .button,
  .beta-form button {
    width: 100%;
  }
}
