:root {
  color-scheme: light;
  --background: #f2f4f7;
  --foreground: #17212b;
  --muted: #617083;
  --panel: #ffffff;
  --panel-strong: #111927;
  --line: #d7dde6;
  --blue: #2368a2;
  --green: #207a63;
  --gold-soft: #fff4df;
  --shadow: 0 18px 48px rgba(23, 33, 43, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
}

button,
a {
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
}

.popup-lab {
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  background: var(--panel-strong);
  color: #ffffff;
  padding: 22px clamp(18px, 4vw, 56px) 64px;
}

.topbar,
.hero-grid,
.section {
  margin: 0 auto;
  max-width: 1180px;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 48px;
}

.brand,
.nav-links {
  align-items: center;
  display: flex;
}

.brand {
  font-size: 15px;
  font-weight: 800;
  gap: 10px;
}

.brand-mark {
  background: linear-gradient(135deg, var(--green), #7cc8ff);
  border-radius: 6px;
  display: inline-block;
  height: 26px;
  width: 26px;
}

.nav-links {
  color: #bdc8d4;
  font-size: 14px;
  gap: 22px;
}

.nav-links a:hover {
  color: #ffffff;
}

.hero-grid {
  align-items: end;
  display: grid;
  gap: clamp(28px, 5vw, 70px);
  grid-template-columns: minmax(0, 1fr) 340px;
  padding-top: 82px;
}

.eyebrow,
.tech {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.eyebrow {
  color: #7be0c0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: #ffffff;
  font-size: clamp(42px, 6vw, 78px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 22px;
  max-width: 840px;
}

h2 {
  color: var(--foreground);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.04;
  margin-bottom: 16px;
}

h3 {
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.18;
  margin-bottom: 10px;
}

.lead {
  color: #d3dce6;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 720px;
}

.status-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--foreground);
  display: grid;
  overflow: hidden;
}

.status-panel div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 70px;
  padding: 18px 20px;
}

.status-panel div + div {
  border-top: 1px solid var(--line);
}

.status-panel span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.status-panel strong {
  color: var(--green);
  font-family: Consolas, monospace;
  font-size: 13px;
}

.section {
  padding: 72px clamp(18px, 4vw, 56px);
}

.section .eyebrow {
  color: var(--green);
}

.section-heading {
  max-width: 760px;
}

.button-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 30px;
}

.popup-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 158px;
  padding: 22px;
}

.popup-card p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.popup-card .tech {
  color: var(--blue);
  margin-bottom: 8px;
}

.popup-card button,
.custom-modal button,
.native-dialog button {
  align-self: end;
  background: var(--panel-strong);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 800;
  min-height: 44px;
  min-width: 116px;
  padding: 0 16px;
}

.popup-card button:hover,
.custom-modal button:hover,
.native-dialog button:hover {
  background: var(--blue);
}

.split {
  align-items: start;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
}

.section-copy {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 650px;
}

.event-log {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  margin: 0;
  min-height: 236px;
  padding: 0;
}

.event-log li {
  display: grid;
  gap: 6px;
  grid-template-columns: 86px 130px minmax(0, 1fr);
  padding: 16px 18px;
}

.event-log li + li {
  border-top: 1px solid var(--line);
}

.event-log time {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 13px;
}

.event-log strong {
  color: var(--blue);
}

.event-log span {
  color: #2d3946;
  line-height: 1.35;
}

.event-log .empty {
  color: var(--muted);
  display: block;
}

.native-dialog,
.custom-modal,
.native-popover {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.native-dialog {
  max-width: min(440px, calc(100vw - 36px));
  padding: 24px;
}

.native-dialog::backdrop {
  background: rgba(17, 25, 39, 0.55);
}

.native-popover {
  background: var(--gold-soft);
  color: #3d2a0b;
  inset: auto 24px 24px auto;
  max-width: 320px;
  padding: 18px;
}

.native-popover strong,
.native-popover span,
.toast strong,
.toast span {
  display: block;
}

.native-popover span,
.toast span {
  line-height: 1.4;
  margin-top: 6px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(17, 25, 39, 0.62);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 20;
}

.custom-modal {
  background: #ffffff;
  max-width: 460px;
  padding: 26px;
  width: 100%;
}

.custom-modal p,
.native-dialog p {
  color: var(--muted);
  line-height: 1.55;
}

.toast {
  background: var(--green);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #ffffff;
  max-width: min(360px, calc(100vw - 36px));
  padding: 18px;
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 30;
}

.toast.snackbar {
  background: var(--panel-strong);
  bottom: 18px;
  left: 50%;
  max-width: min(520px, calc(100vw - 36px));
  right: auto;
  top: auto;
  transform: translateX(-50%);
  width: 100%;
}

.hidden {
  display: none;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .hero-grid,
  .split,
  .button-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-top: 54px;
  }

  .popup-card {
    grid-template-columns: 1fr;
  }

  .popup-card button {
    width: 100%;
  }

  .event-log li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 40px;
  }

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