:root {
  --panel: #121934;
  --panel-2: #1a2347;
  --text: #eef2ff;
  --muted: #b9c2e3;
  --line: #2b376c;
  --accent: #79a8ff;
  --accent-2: #cfe0ff;
  --ok: #92e6a7;
  --warning: #ffd58a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

button, input { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, summary:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid rgba(121, 168, 255, 0.35);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.hero, .card {
  background: rgba(18, 25, 52, 0.96);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.hero { padding: 28px; }
.card { padding: 22px; margin-top: 16px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { margin-top: 8px; font-size: 2rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 9px 0 0; color: var(--muted); }
a { color: var(--accent); }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.setup-header { margin-bottom: 20px; }
.header-top-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
  width: 100%;
  margin-bottom: 24px;
}

.home-link {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(18, 25, 52, 0.5);
  color: var(--accent);
  text-decoration: none;
}
.home-link svg { width: 19px; height: 19px; }
.home-link:hover, .faq-link:hover { background: rgba(121, 168, 255, 0.1); border-color: var(--accent); }

.faq-link, .back-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(18, 25, 52, 0.5);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.mode-btn {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}
.mode-btn svg { width: 19px; height: 19px; }
.mode-btn.active { border-color: transparent; background: linear-gradient(180deg, var(--accent), #5a8fff); color: #071226; }

.section-heading { display: flex; align-items: flex-start; gap: 12px; }
.section-heading > div { min-width: 0; }
.section-heading p { margin-top: 5px; }
.section-number {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 700;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}
.device-btn {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0d1430;
  color: var(--text);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 650;
  text-align: center;
}
.device-btn img, .generic-phone-icon { width: 29px; height: 29px; border-radius: 8px; }
.generic-phone-icon { display: grid; place-items: center; color: var(--accent-2); }
.generic-phone-icon svg { width: 26px; height: 26px; }
.device-btn.active { border-color: var(--accent); background: rgba(90, 143, 255, 0.18); box-shadow: inset 0 0 0 1px rgba(121, 168, 255, 0.25); }

.recommended-label {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--ok);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.forward-number-label { display: block; margin-top: 20px; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.forward-number-input {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1430;
  color: var(--text);
}

.code-action { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: stretch; margin-top: 16px; }
.code-box { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #0a1126; }
.code-box.compact { display: flex; align-items: center; margin: 0; min-width: 0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; color: #d7e6ff; overflow-wrap: anywhere; user-select: all; }

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent), #5a8fff);
  color: #071226;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.btn svg { width: 18px; height: 18px; }
.btn.secondary { border: 1px solid var(--line); background: transparent; color: var(--text); }
.btn:hover { filter: brightness(1.06); }
.copy-status { min-height: 21px; margin-top: 7px; color: var(--accent-2); font-size: 0.87rem; }

.journey-steps { display: grid; gap: 13px; margin: 14px 0 0; padding: 0; list-style: none; }
.journey-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; color: var(--text); }
.step-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--accent-2); }
.step-icon svg { width: 18px; height: 18px; }
.journey-steps li > span:last-child { padding-top: 5px; }

.timing-note {
  margin-top: 18px;
  padding: 11px 14px;
  border: 1px solid rgba(90, 143, 255, 0.3);
  border-radius: 13px;
  background: rgba(90, 143, 255, 0.07);
}
.timing-note strong { color: var(--text); }
.timing-note p { margin: 0; }

.alternative-path { margin-top: 20px; border-top: 1px solid var(--line); }
.alternative-path summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}
.alternative-path summary::-webkit-details-marker { display: none; }
.alternative-path summary span { display: flex; align-items: center; gap: 8px; }
.alternative-path summary svg { width: 18px; height: 18px; }
.summary-chevron { transition: transform 0.2s ease; }
.alternative-path[open] .summary-chevron { transform: rotate(180deg); }
.secondary-device-picker { padding: 10px 0 14px; }
.secondary-device-picker > p { margin-top: 4px; }
.alternative-content { padding: 4px 0 2px 34px; color: var(--muted); }
.alternative-content ol { margin: 8px 0 0; padding-left: 19px; }
.alternative-content li { margin: 7px 0; }

.test-outcome { margin-top: 16px; color: var(--muted); }
.test-outcome strong { color: var(--text); }
.inline-help-link { display: inline-flex; margin-top: 11px; color: var(--accent); font-weight: 650; }

.login-cta { text-align: center; }
.login-cta-btn { margin-top: 14px; }
.busy-forwarding-note { margin-top: 20px; padding: 14px; border: 1px solid rgba(255, 213, 138, 0.28); border-radius: 13px; background: rgba(255, 213, 138, 0.05); }
.busy-forwarding-note p { margin-top: 5px; }
.busy-forwarding-note code { color: var(--warning); }
.footer { margin: 16px 4px 0; color: var(--muted); font-size: 0.9rem; }

/* FAQ page compatibility */
ul { padding-left: 18px; color: var(--muted); }
li { margin: 6px 0; }
.pill { display: inline-flex; padding: 6px 10px; border: 1px solid rgba(121, 168, 255, 0.3); border-radius: 999px; background: rgba(121, 168, 255, 0.12); color: var(--accent-2); }
.success { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(146, 230, 167, 0.35); border-radius: 14px; color: var(--text); }

@media (max-width: 620px) {
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-btn { min-height: 68px; flex-direction: row; justify-content: flex-start; padding: 10px 12px; text-align: left; }
  .device-btn img, .generic-phone-icon { width: 26px; height: 26px; }
}

@media (max-width: 480px) {
  .wrap { padding: 14px 10px 30px; }
  .hero, .card { padding: 18px; border-radius: 18px; }
  h1 { font-size: 1.65rem; }
  .header-top-row { margin-bottom: 18px; }
  .mode-btn { min-height: 48px; padding: 9px 10px; }
  .code-action { grid-template-columns: 1fr; }
  .copy-btn { width: 100%; }
  .alternative-content { padding-left: 0; }
}

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