/* ══════════════════════════════════════════════════════════════════════════
   WRITTEN SETUP GUIDE — STYLESHEET

   Self-contained, hand-written CSS for /setup-guide.html. The guide is a
   static page outside the app bundle, so it cannot use the homepage's
   Tailwind build — but it uses the same tokens, the same hairlines and the
   same restraint, so the two pages read as one site.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --ink: #05070f;
  --midnight: #080c1a;
  --navy: #0c1226;
  --line: #1b2340;
  --line-bright: #2a3459;
  --bright: #f2f4fd;
  --dim: #a9b2d0;
  --faint: #7a85a8;
  --violet: #7c5cff;
  --violet-soft: #a693ff;
  --blue: #3d7bff;
  --amber: #ffc46b;

  --wrap: 75rem;
  --radius: 1.25rem;
  --shadow-panel: 0 1px 0 0 rgb(255 255 255 / 0.04) inset, 0 24px 60px -32px rgb(0 0 0 / 0.9);
  --shadow-glow: 0 12px 40px -12px rgb(124 92 255 / 0.55);
  color-scheme: dark;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
  /* The sticky header must never cover the step you jumped to. */
  scroll-padding-top: 5.25rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bright);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

/* Nothing replaced, and no long unbroken string, can push the page wider
   than the phone it is being read on. */
img,
svg,
iframe {
  max-width: 100%;
}

a,
p,
li,
h1,
h2,
h3,
code {
  overflow-wrap: break-word;
}

:focus-visible {
  outline: 2px solid var(--violet-soft);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

::selection {
  background: rgb(124 92 255 / 0.45);
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  /* ~18px on a phone, clear of notches and rounded corners. */
  padding-inline: calc(1.125rem + env(safe-area-inset-left))
    calc(1.125rem + env(safe-area-inset-right));
}

@media (min-width: 480px) {
  .wrap {
    padding-inline: calc(1.25rem + env(safe-area-inset-left))
      calc(1.25rem + env(safe-area-inset-right));
  }
}

@media (min-width: 640px) {
  .wrap {
    padding-inline: calc(2rem + env(safe-area-inset-left))
      calc(2rem + env(safe-area-inset-right));
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 90;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--violet);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

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

/* ── Background detail ─────────────────────────────────────────────────── */

.veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

.bloom {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.45;
  background-image: radial-gradient(circle, var(--violet) 0%, transparent 68%);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  /* 46px — above the 44px touch minimum. */
  min-height: 2.875rem;
  max-width: 100%;
  padding: 0.7rem 1.15rem;
  text-align: center;
  border: 0;
  border-radius: 0.7rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

@media (min-width: 480px) {
  .btn {
    padding-inline: 1.35rem;
    white-space: nowrap;
  }
}

.btn-lg {
  min-height: 3rem;
  font-size: 0.9375rem;
}

@media (min-width: 480px) {
  .btn-lg {
    min-height: 3.125rem;
    padding-inline: 1.6rem;
    font-size: 1rem;
  }
}

.btn-primary {
  position: relative;
  color: #fff;
  background-image: linear-gradient(135deg, var(--violet) 0%, var(--blue) 100%);
  box-shadow: var(--shadow-glow);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.btn-secondary {
  color: var(--bright);
  background-color: rgb(255 255 255 / 0.04);
  border: 1px solid var(--line-bright);
  backdrop-filter: blur(6px);
}

.btn-ghost {
  color: var(--dim);
  background: transparent;
  border: 1px solid var(--line);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 50px -12px rgb(124 92 255 / 0.7);
  }
  .btn-primary:hover::after {
    opacity: 1;
  }
  .btn-secondary:hover {
    transform: translateY(-2px);
    background-color: rgb(255 255 255 / 0.075);
    border-color: rgb(124 92 255 / 0.55);
  }
  .btn-ghost:hover {
    color: var(--bright);
    border-color: var(--line-bright);
  }
}

.btn:active {
  transform: translateY(0);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.03);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── Header ────────────────────────────────────────────────────────────── */

.header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.header.is-stuck {
  background: rgb(8 12 26 / 0.85);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem; /* full tap height inside the 69px bar */
  gap: 0.65rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border-radius: 0.65rem;
  background-image: linear-gradient(135deg, var(--violet), var(--blue));
  box-shadow: 0 8px 24px -8px rgb(124 92 255 / 0.8);
}

.brand-mark svg {
  width: 1.15rem;
  height: 1.15rem;
  color: #fff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-by {
  margin-top: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--faint);
}

.nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--dim);
  text-decoration: none;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.nav a:hover {
  color: var(--bright);
  background: rgb(255 255 255 / 0.05);
}

.nav a[aria-current='page'] {
  color: var(--bright);
  background: rgb(255 255 255 / 0.05);
}

.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .nav,
  .header-cta {
    display: inline-flex;
  }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 6.25rem 2.25rem;
}

@media (min-width: 640px) {
  .hero {
    padding-block: 8rem 3.25rem;
  }
}

.hero-inner {
  position: relative;
  max-width: 46rem;
}

.hero h1 {
  margin-top: 1.05rem;
  /* Caps at ~41px until there is tablet width to justify more. */
  font-size: clamp(1.9rem, 1.35rem + 2.6vw, 3.1rem);
  letter-spacing: -0.025em;
}

.hero h1 em {
  font-style: normal;
  background-image: linear-gradient(90deg, var(--violet-soft), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-intro {
  margin-top: 1rem;
  max-width: 34rem;
  font-size: 1rem;
  color: var(--dim);
}

@media (min-width: 480px) {
  .hero-intro {
    font-size: 1.0625rem;
  }
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.6rem;
  font-size: 0.8125rem;
  color: var(--faint);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-meta svg {
  width: 1rem;
  height: 1rem;
  color: var(--violet-soft);
}

/* ── Sections ──────────────────────────────────────────────────────────── */

.band {
  position: relative;
  padding-block: 2.5rem;
}

@media (min-width: 640px) {
  .band {
    padding-block: 3.25rem;
  }
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-soft);
}

.glass {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.055), rgb(255 255 255 / 0.015));
  box-shadow: var(--shadow-panel);
}

/* ── Timeline ──────────────────────────────────────────────────────────── */

.steps {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1.05rem 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.045), rgb(255 255 255 / 0.012));
  transition:
    border-color 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 480px) {
  .step {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1.15rem 1.15rem 1.25rem;
  }
}

@media (min-width: 640px) {
  .step {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 1.35rem;
    padding: 1.5rem 1.75rem 1.6rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .step:hover {
    border-color: var(--line-bright);
  }
}

/* The progress rail: a hairline that runs from each number down to the
   next one, so the eight steps read as one sequence. */
.step-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

@media (min-width: 480px) {
  .step-num {
    width: 2.5rem;
    height: 2.5rem;
  }
}

.step-rail::after {
  content: '';
  position: absolute;
  top: 2.6rem;
  bottom: -2.35rem;
  width: 1px;
  background-image: linear-gradient(to bottom, var(--line-bright), transparent);
}

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

.step-num {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border-radius: 0.75rem;
  border: 1px solid rgb(124 92 255 / 0.35);
  background-image: linear-gradient(135deg, rgb(124 92 255 / 0.28), rgb(61 123 255 / 0.16));
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--violet-soft);
}

.step h2 {
  font-size: 1.125rem;
}

@media (min-width: 640px) {
  .step h2 {
    font-size: 1.25rem;
  }
}

.step-body > * + * {
  margin-top: 0.85rem;
}

.step p {
  color: var(--dim);
}

.step-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.step-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--dim);
}

.step-list li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.6rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background-image: linear-gradient(135deg, var(--violet-soft), var(--blue));
}

.step-body code {
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line-bright);
  border-radius: 0.4rem;
  background: rgb(124 92 255 / 0.12);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.9375rem;
  color: var(--violet-soft);
}

.step-lead {
  color: var(--bright) !important;
  font-weight: 500;
}

/* ── Notice ────────────────────────────────────────────────────────────── */

.notice {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgb(255 196 107 / 0.3);
  border-radius: 0.85rem;
  background: rgb(255 196 107 / 0.07);
}

.notice svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--amber);
}

.notice strong {
  display: block;
  color: var(--amber);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice p {
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  color: var(--dim);
}

/* ── Field rows (step 8) ───────────────────────────────────────────────── */

.fields {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
}

.field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.02);
}

.field-name {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.field-value {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--bright);
}

.field-value code {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line-bright);
  border-radius: 0.4rem;
  background: rgb(124 92 255 / 0.12);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--violet-soft);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line-bright);
  border-radius: 0.5rem;
  background: rgb(255 255 255 / 0.04);
  color: var(--dim);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.copy-btn svg {
  width: 0.9rem;
  height: 0.9rem;
}

.copy-btn:hover {
  color: var(--bright);
  border-color: rgb(124 92 255 / 0.5);
}

.copy-btn.is-copied {
  color: #7ff0c4;
  border-color: rgb(127 240 196 / 0.45);
  background: rgb(127 240 196 / 0.1);
}

/* ── Completion ────────────────────────────────────────────────────────── */

.done {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgb(127 240 196 / 0.3);
  border-radius: 1rem;
  background: rgb(127 240 196 / 0.07);
}

.done svg {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  color: #7ff0c4;
}

.done p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bright);
}

/* ── Support card ──────────────────────────────────────────────────────── */

.support {
  overflow: hidden;
  padding: 1.75rem 1.35rem;
  text-align: center;
}

@media (min-width: 640px) {
  .support {
    padding: 2.5rem 2rem;
  }
}

.support h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
}

.support p {
  margin: 0.75rem auto 0;
  max-width: 34rem;
  color: var(--dim);
}

.support-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 480px) {
  .support-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ── Disclosure + footer ───────────────────────────────────────────────── */

.disclosure {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .disclosure {
    grid-template-columns: 1fr 1fr;
  }
}

.disclosure p {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgb(255 255 255 / 0.02);
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--faint);
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--midnight);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  min-width: 0;
  font-size: 0.875rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem; /* comfortable tap row on a phone */
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

@media (min-width: 640px) {
  .footer-links a {
    min-height: 0;
  }
}

.footer-links a:hover {
  color: var(--violet-soft);
}

.footer-note {
  font-size: 0.8125rem;
  color: var(--faint);
}

/* ── Sticky mobile action bar ──────────────────────────────────────────── */

/* Always within thumb reach on a phone, and it never covers the last
   paragraph because the body carries matching bottom padding. */
.mobile-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  gap: 0.6rem;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgb(5 7 15 / 0.92);
  backdrop-filter: blur(18px);
}

.mobile-bar .btn {
  flex: 1;
  min-width: 0;
  padding-inline: 0.75rem;
  font-size: 0.875rem;
}

.mobile-bar .btn-secondary {
  flex: 0 0 auto;
}

body {
  padding-bottom: calc(5rem + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
  .mobile-bar {
    display: none;
  }
  body {
    padding-bottom: 0;
  }
}

/* ── Reveal ────────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
