:root {
  --page: #f6f7f9;
  --ink: #111318;
  --muted: #626a73;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --red: #ff4d57;
  --red-deep: #d92d3d;
  --blue: #1c74f5;
  --green: #1f8a5b;
  --shadow: 0 24px 80px rgba(25, 33, 47, 0.14);
  --radius: 8px;
  --radius-lg: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(255, 77, 87, 0.08), transparent 34%),
    linear-gradient(210deg, rgba(28, 116, 245, 0.1), transparent 42%),
    var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(17, 19, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 24, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

button,
input {
  font: inherit;
}

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

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

code {
  padding: 0;
  color: inherit;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  word-break: break-word;
}

.nowrap {
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid rgba(28, 116, 245, 0.35);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 32px));
  margin: 14px auto 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 60px rgba(31, 42, 58, 0.12);
  backdrop-filter: blur(22px) saturate(160%);
}

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

.brand {
  gap: 10px;
  padding: 7px 10px;
  font-weight: 760;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.44);
}

.brand-mark::before {
  position: absolute;
  inset: 7px;
  border: 2px solid white;
  border-radius: 50%;
  content: "";
}

.brand-mark::after {
  position: absolute;
  right: 5px;
  bottom: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  content: "";
}

.topbar__links {
  gap: 4px;
}

.topbar__links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease;
}

.topbar__links a:hover {
  color: var(--ink);
  background: rgba(17, 19, 24, 0.06);
}

.section-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  gap: 34px;
  align-items: start;
  min-height: calc(100vh - 96px);
  padding: clamp(44px, 7vw, 96px) 0 54px;
}

.hero__copy {
  position: sticky;
  top: 112px;
  align-self: start;
  padding-top: 28px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--red-deep);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 790px;
  margin-bottom: 20px;
  font-size: clamp(3rem, 7vw, 6.9rem);
  line-height: 0.93;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  line-height: 1.48;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 760;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(17, 19, 24, 0.18);
}

.button--primary {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
}

.button--quiet {
  background: rgba(17, 19, 24, 0.08);
  color: var(--ink);
}

.button--full {
  width: 100%;
  margin-top: 18px;
  background: linear-gradient(135deg, var(--blue), #0e5dcc);
}

.setup-panel,
.selected-card,
.step-card,
.reference-group {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(170%);
}

.setup-panel {
  padding: 18px;
}

.panel-heading,
.selected-card__top,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h2,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.status-pill {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(31, 138, 91, 0.12);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 760;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.055);
}

.segment {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 740;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.segment.is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(28, 37, 51, 0.1);
}

.device-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.device-option {
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.device-option:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.92);
}

.device-option.is-active {
  border-color: rgba(255, 77, 87, 0.52);
  background: white;
  box-shadow: 0 14px 36px rgba(255, 77, 87, 0.16);
}

.device-option[hidden] {
  display: none;
}

.device-option span,
.device-option small {
  color: var(--muted);
}

.device-option strong {
  font-size: 1.05rem;
}

.selected-card {
  padding: 16px;
  background: var(--panel-strong);
  box-shadow: 0 14px 44px rgba(25, 33, 47, 0.12);
}

.selected-card__top {
  margin-bottom: 14px;
}

.selected-card__top strong {
  font-size: 1.28rem;
}

.copy-grid,
.reference-list {
  display: grid;
  gap: 8px;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.72fr) minmax(0, 1.25fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: var(--radius);
  background: #f7f9fb;
}

.copy-row span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 690;
}

.copy-btn {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(28, 116, 245, 0.1);
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 780;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.copy-btn:hover {
  transform: translateY(-1px);
  background: rgba(28, 116, 245, 0.16);
}

.credential-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.credential-grid label {
  display: grid;
  gap: 7px;
}

.credential-grid span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 720;
}

.credential-grid input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: 0;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.credential-grid input:focus {
  border-color: rgba(28, 116, 245, 0.42);
  box-shadow: 0 0 0 4px rgba(28, 116, 245, 0.1);
}

.signal-band {
  padding: 34px 0;
  background:
    linear-gradient(90deg, rgba(17, 19, 24, 0.9), rgba(37, 45, 59, 0.92)),
    #1c222d;
  color: white;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.check-item {
  min-height: 140px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.check-item span {
  display: inline-flex;
  margin-bottom: 18px;
  color: #98c3ff;
  font-weight: 820;
}

.check-item strong {
  display: block;
  margin-bottom: 7px;
  font-size: 1.08rem;
}

.check-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.steps,
.reference {
  padding: clamp(54px, 8vw, 96px) 0;
}

.section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 24px;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
}

.step-card__image {
  aspect-ratio: 0.46;
  overflow: hidden;
  background: #e9edf2;
}

.step-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.step-card:hover img {
  transform: scale(1.035);
}

.step-card__body {
  padding: 17px;
}

.step-card__body span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--red-deep);
  font-weight: 820;
}

.step-card__body h3 {
  margin-bottom: 9px;
  font-size: 1.14rem;
  line-height: 1.18;
}

.step-card__body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.reference {
  padding-top: 10px;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.reference-group {
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.reference-group h3 {
  margin-bottom: 14px;
  font-size: 1.35rem;
}

.reference-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr) 58px;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.reference-row:hover {
  transform: translateY(-2px);
  border-color: rgba(28, 116, 245, 0.28);
  background: white;
}

.reference-row span {
  font-weight: 760;
}

.reference-row strong {
  justify-self: end;
  color: var(--red-deep);
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 0.95rem;
}

.copy-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 760;
  box-shadow: 0 18px 44px rgba(17, 19, 24, 0.22);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__copy {
    position: static;
  }

  .setup-panel {
    max-width: 680px;
  }

  .checklist,
  .step-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .step-card:nth-child(even) {
    margin-top: 34px;
  }
}

@media (max-width: 720px) {
  .topbar {
    width: min(100% - 20px, var(--max));
    margin-top: 10px;
  }

  .topbar__links a {
    padding: 8px 9px;
  }

  .section-shell {
    width: min(100% - 20px, var(--max));
  }

  .hero {
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 4.2rem);
  }

  .setup-panel,
  .selected-card,
  .reference-group,
  .step-card {
    border-radius: 14px;
  }

  .panel-heading,
  .selected-card__top,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

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

  .copy-row span {
    grid-column: 1 / -1;
  }

  .credential-grid,
  .checklist,
  .step-grid,
  .reference-grid {
    grid-template-columns: 1fr;
  }

  .step-card__image {
    aspect-ratio: 0.72;
  }

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

  .reference-row code {
    grid-column: 1 / -1;
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .topbar,
  .setup-panel,
  .selected-card,
  .step-card,
  .reference-group {
    background: rgba(255, 255, 255, 0.96);
  }
}
