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

:root {
  color-scheme: light;
  --blue: #2563EB;
  --blue-deep: #1D4ED8;
  --blue-soft: #EFF6FF;
  --ink: #0B1220;
  --muted: #475569;
  --grey: #64748B;
  --bg: #F4F7FB;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --line: #E2E8F0;
  --success: #16A34A;
  --display: "Outfit", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --header-h: 58px;
  --strip-h: 52px;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  font-size: 16px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 0.12em 0.38em;
  border-radius: 4px;
}

/* ── Header (matches marketing site) ─────────────────────────────────────── */

.site-header {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(16px, 3vw, 28px);
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand img { border-radius: 9px; }
.brand:hover { color: var(--blue); text-decoration: none; }

.nav {
  display: none;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}
.nav a { color: inherit; text-decoration: none; }
.nav a:hover { color: var(--ink); }

.header-cta { flex-shrink: 0; }

@media (min-width: 780px) {
  .nav { display: flex; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff !important;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--blue-deep); transform: translateY(-1px); text-decoration: none !important; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; box-shadow: none; }
.btn-block { width: 100%; margin-top: 12px; }
.btn-sm-gap { margin-top: 8px; }
.btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue) !important;
  background: #fff;
}

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

.hero-strip {
  flex: 0 0 auto;
  padding: 10px clamp(16px, 3vw, 28px);
  background:
    radial-gradient(ellipse 70% 120% at 0% 50%, rgba(37, 99, 235, 0.14), transparent 55%),
    linear-gradient(90deg, #EEF4FF 0%, #F8FAFC 100%);
  border-bottom: 1px solid var(--border);
}

.hero-strip-kicker {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.hero-strip-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ── Main layout ───────────────────────────────────────────────────────── */

.wrap {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(14px, 2vh, 22px) clamp(16px, 3vw, 32px) clamp(16px, 2vh, 24px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.guide-head {
  flex: 0 0 auto;
  margin-bottom: clamp(10px, 1.5vh, 16px);
}

.guide-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

h1 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.5vh, 2rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.1;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
  font-size: clamp(0.9rem, 1.7vh, 1.05rem);
  line-height: 1.4;
}

.progress {
  flex-shrink: 0;
  margin: 4px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.progress-dots {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease, transform 0.2s ease;
}
.progress-dot.is-active {
  background: var(--blue);
  transform: scale(1.2);
}
.progress-dot.is-done { background: #93C5FD; }

.order {
  list-style: none;
  margin: 0 0 clamp(10px, 1.5vh, 14px);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
}

.order-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: var(--body);
  font-size: clamp(11px, 1.4vh, 14px);
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.order-btn:hover { border-color: var(--blue); color: var(--blue); }
.order-btn.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.panel {
  display: none;
  flex: 1;
  min-height: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(16px, 2.2vh, 24px);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.panel.is-open {
  display: flex;
  flex-direction: column;
}

.panel-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: clamp(16px, 2.5vw, 28px);
  /* Cap screenshot column — intrinsic 1024px images were starving the copy column */
  grid-template-columns: minmax(260px, 1fr) minmax(0, 460px);
  align-items: start;
}

.panel-grid--start {
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.55fr);
}

.copy {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.where {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.copy h2 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.8vh, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.time-est {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey);
}

.subhead {
  margin: 18px 0 8px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.note {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
}

.copy ul {
  margin: 0;
  padding-left: 1.15em;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.7vh, 1.02rem);
}
.copy li { margin-bottom: 5px; }
.copy li:last-child { margin-bottom: 0; }

.checklist li { margin-bottom: 8px; }

.map-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.map-table th,
.map-table td {
  padding: 8px 10px;
  text-align: left;
  border: 1px solid var(--border);
}
.map-table th {
  background: var(--blue-soft);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.75rem;
}
.map-table td { color: var(--muted); }

.faq {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  background: #FAFCFF;
}
.faq summary {
  padding: 12px 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--ink);
}
.faq dl { margin: 0 0 14px; }
.faq dt {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  margin-top: 10px;
}
.faq dt:first-child { margin-top: 0; }
.faq dd {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.shot {
  margin: 0;
  min-width: 0;
  width: 100%;
  max-width: 460px;
  justify-self: end;
}

.shot-frame {
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  line-height: 0;
  background: #fff;
}

.shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(52vh, 520px);
}

.shot figcaption {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--grey);
  text-align: center;
  line-height: 1.35;
}

.start-card {
  flex: 1;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.08), transparent 45%),
    var(--card);
}

.start-card-title {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}
.timeline li:last-child { border-bottom: none; }
.timeline span { color: var(--ink); font-weight: 600; }
.timeline em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ── Lost band protocol (tab 8) ─────────────────────────────────────────── */

.panel-grid--protocol {
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 0.42fr);
  align-items: start;
}

.panel-grid--protocol .copy {
  overflow-y: auto;
  max-height: min(68vh, 720px);
  padding-right: 4px;
}

.protocol-steps {
  margin: 0 0 16px;
  padding-left: 1.35em;
  color: var(--muted);
  font-size: 0.92rem;
}
.protocol-steps li {
  margin-bottom: 8px;
  padding-left: 2px;
}
.protocol-steps li:last-child { margin-bottom: 0; }

.protocol-callout {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}
.protocol-callout--info {
  background: var(--blue-soft);
  border: 1px solid rgba(37, 99, 235, 0.2);
}
.protocol-callout--warn {
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #78350F;
}

.protocol-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  vertical-align: top;
  width: 34%;
}

.protocol-flow {
  flex: 1;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 0% 100%, rgba(37, 99, 235, 0.06), transparent 50%),
    var(--card);
}

.protocol-flow-title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.protocol-flow-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.protocol-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--grey);
}
.protocol-flow-item:last-child { border-bottom: none; }

.protocol-flow-num {
  flex: 0 0 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--bg);
  color: var(--grey);
  border: 1px solid var(--border);
}

.protocol-flow-item--done .protocol-flow-num {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: var(--success);
}

.protocol-flow-item--active {
  color: var(--ink);
  font-weight: 600;
}
.protocol-flow-item--active .protocol-flow-num {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.protocol-flow-foot {
  margin: 14px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey);
  text-align: center;
}

@media (max-width: 900px) {
  .panel-grid--protocol {
    grid-template-columns: 1fr;
  }

  .panel-grid--protocol .copy {
    max-height: none;
    overflow: visible;
  }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  flex: 0 0 auto;
  margin-top: clamp(12px, 2vh, 18px);
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink);
}
.footer-brand img { border-radius: 7px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: var(--blue); }

.site-footer .copy {
  margin: 0;
  width: 100%;
  font-size: 0.78rem;
  color: var(--grey);
}

/* ── Desktop: fit viewport, no page scroll ───────────────────────────────── */

@media (min-width: 900px) and (min-height: 700px) {
  html, body { height: 100%; overflow: hidden; }

  .wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .site-footer {
    margin-top: auto;
    padding-top: 10px;
  }
}

/* ── Mobile / narrow: allow scroll ───────────────────────────────────────── */

@media (max-width: 820px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  body { min-height: 100dvh; }

  .wrap { overflow: visible; }

  .panel { overflow: visible; }

  .panel-grid,
  .panel-grid--start {
    grid-template-columns: 1fr;
  }

  .shot {
    max-width: 100%;
    justify-self: stretch;
  }

  .copy { overflow: visible; }

  .guide-head-row { flex-direction: column; }

  .progress { align-self: flex-start; }

  .order-btn { font-size: 11px; padding: 6px 10px; }
}

@media (max-width: 480px) {
  .hero-strip-text { font-size: 0.85rem; }

  .footer-links { gap: 10px; }
}

@media (max-height: 640px) and (min-width: 821px) {
  .lede { font-size: 0.85rem; }

  .shot figcaption { display: none; }
}
