:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f7fb;
  font-synthesis: none;
  --blue: #1769e0;
  --blue-dark: #0d4fb6;
  --ink: #172033;
  --muted: #647188;
  --line: #dbe3ef;
  --panel: #ffffff;
  --success: #137a4f;
  --warning: #9a5b06;
  --danger: #b72c36;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(23, 105, 224, 0.1), transparent 32rem),
    #f4f7fb;
}

button,
input {
  font: inherit;
}

button,
.file-button {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(30px, env(safe-area-inset-bottom));
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--blue);
  font-size: 21px;
}

.spike-label {
  padding: 7px 10px;
  border: 1px solid #cbd8eb;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

main {
  width: min(100%, 720px);
  margin: 0 auto;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.step {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8792a5;
  font-size: 13px;
  font-weight: 700;
}

.step::after {
  content: "";
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: #dce4f0;
}

.step:last-child::after {
  display: none;
}

.step span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #ccd7e6;
  border-radius: 50%;
  background: white;
}

.step.active,
.step.complete {
  color: var(--blue);
}

.step.active span,
.step.complete span {
  border-color: var(--blue);
  color: white;
  background: var(--blue);
}

.step.complete::after {
  background: var(--blue);
}

.card,
.technical-card {
  border: 1px solid rgba(208, 219, 233, 0.9);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(31, 54, 91, 0.1);
}

.card {
  padding: clamp(22px, 5vw, 46px);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.status-pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.neutral {
  color: #53627a;
  background: #edf2f8;
}

.status-pill.success {
  color: #0e6942;
  background: #e5f6ee;
}

.status-pill.warning {
  color: #8b5103;
  background: #fff3d9;
}

.status-pill.danger {
  color: #9d202b;
  background: #fde9eb;
}

.network-status {
  color: var(--muted);
  font-size: 12px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  max-width: 610px;
  margin: 0;
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 600px;
  margin: 18px 0 26px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.lede.small {
  margin-bottom: 20px;
  font-size: 15px;
}

.action-stack {
  display: grid;
  gap: 11px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 780;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.28);
  outline-offset: 3px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  color: white;
  background: var(--blue);
}

.primary:hover:not(:disabled) {
  background: var(--blue-dark);
}

.secondary {
  border-color: #c4d2e5;
  color: #24416d;
  background: #f8faff;
}

.ghost {
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

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

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

.button-row .button {
  flex: 1 1 150px;
}

.privacy-list {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.notice {
  min-height: 46px;
  padding: 13px 14px;
  border: 1px solid #d9e3f0;
  border-radius: 13px;
  color: #526278;
  background: #f7f9fc;
  font-size: 14px;
  line-height: 1.45;
}

.notice:empty {
  display: none;
}

.notice.compact {
  margin-top: 14px;
}

.notice.success {
  border-color: #bfe7d2;
  color: #126b45;
  background: #ecf9f3;
}

.notice.warning {
  border-color: #ecd298;
  color: #86520a;
  background: #fff8e9;
}

.notice.danger {
  border-color: #efbec3;
  color: #992731;
  background: #fff0f1;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-height: 540px;
  margin: 18px auto 0;
  border-radius: 18px;
  background: #0a101a;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a101a;
}

.live-frame video {
  object-fit: cover;
}

.recording-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  color: white;
  background: rgba(8, 15, 27, 0.7);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px);
}

.recording-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff4b55;
  box-shadow: 0 0 0 4px rgba(255, 75, 85, 0.18);
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.metadata-grid div {
  min-width: 0;
  padding: 13px;
  border: 1px solid #e0e7f0;
  border-radius: 13px;
  background: #fafbfd;
}

.metadata-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metadata-grid dd {
  overflow-wrap: anywhere;
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 780;
}

.thumbnail-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.thumbnail-row canvas {
  width: 100%;
  border-radius: 12px;
  background: #e7edf5;
}

.thumbnail-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.progress-shell {
  overflow: hidden;
  height: 13px;
  margin-top: 28px;
  border-radius: 999px;
  background: #e2e9f3;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #49a1ff);
  transition: width 160ms ease;
}

.progress-text {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.technical-card {
  margin-top: 14px;
  padding: 17px 20px;
  border-radius: 17px;
  box-shadow: none;
}

.technical-card summary {
  color: #495b75;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.technical-card pre {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  margin: 14px 0 0;
  color: #596982;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
}

footer {
  margin-top: 22px;
  color: #7a879a;
  font-size: 12px;
  text-align: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .page-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand-row {
    margin-bottom: 20px;
  }

  .brand {
    font-size: 14px;
  }

  .step {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 5px;
    font-size: 11px;
  }

  .step::after {
    grid-column: 1 / -1;
  }

  .step span {
    width: 24px;
    height: 24px;
  }

  .card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .status-row {
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .video-frame {
    max-height: 460px;
  }

  .thumbnail-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
