/* tutorial.php — compact Apple UI */

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

html.ab-tut-html {
  overflow-x: clip;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
}

body.ab-tut-page {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, system-ui, sans-serif;
  font-size: 0.9375rem;
  -webkit-font-smoothing: antialiased;
  color: #1d1d1f;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  margin: 0;
  background:
    radial-gradient(ellipse 42% 70% at 0% 8%, rgba(191, 219, 254, 0.18), transparent 68%),
    radial-gradient(ellipse 36% 60% at 100% 12%, rgba(199, 210, 254, 0.12), transparent 65%),
    linear-gradient(180deg, #fcfcfd 0%, #f8f9fb 48%, #fafbfc 100%);
  min-height: 100dvh;
}

body.ab-tut-page main {
  display: block !important;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
  overflow-x: clip;
}

/* ── Layout shell ── */
.ab-tut-shell {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  padding-inline: 1rem;
  min-width: 0;
  overflow-x: clip;
}

@media (min-width: 768px) {
  .ab-tut-shell {
    max-width: 52rem;
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .ab-tut-shell {
    max-width: 58rem;
  }
}

.ab-tut-shell--narrow {
  max-width: 36rem;
}

/* ── Nav ── */
.ab-tut-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.ab-tut-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 58rem;
  margin-inline: auto;
  padding: 0.5rem 1rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .ab-tut-nav__inner {
    padding: 0.5625rem 1.5rem;
  }
}

.ab-tut-nav__logo {
  height: 1.375rem;
  width: auto;
}

@media (min-width: 768px) {
  .ab-tut-nav__logo {
    height: 1.5rem;
  }
}

.ab-tut-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  padding: 0.3125rem 0.6875rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #52525b;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ab-tut-nav-pill:hover {
  border-color: rgba(15, 23, 42, 0.12);
  background: #fafafa;
}

/* ── Typography ── */
.ab-tut-eyebrow {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #86868b;
}

.ab-tut-eyebrow--sky { color: #0284c7; }
.ab-tut-eyebrow--violet { color: #7c3aed; }

.ab-tut-title {
  margin-top: 0.5rem;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #1d1d1f;
}

.ab-tut-lead {
  margin-top: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6e6e73;
}

.ab-tut-h2 {
  margin-top: 0.375rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1d1d1f;
}

@media (min-width: 768px) {
  .ab-tut-h2 {
    font-size: 1.125rem;
  }
}

.ab-tut-sub {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #6e6e73;
}

/* ── Surfaces ── */
.ab-tut-surface {
  border-radius: 0.875rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(30, 64, 175, 0.04);
  max-width: 100%;
  min-width: 0;
}

.ab-tut-surface--flat {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ab-tut-pad {
  padding: 1rem;
}

@media (min-width: 768px) {
  .ab-tut-pad {
    padding: 1.125rem 1.25rem;
  }
}

/* ── Buttons ── */
.ab-tut-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.375rem;
  border-radius: 0.625rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ab-tut-btn:active { transform: scale(0.98); }

.ab-tut-btn--sky {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.22);
}

.ab-tut-btn--sky:hover { box-shadow: 0 6px 18px rgba(14, 165, 233, 0.3); }

.ab-tut-btn--emerald {
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.22);
}

.ab-tut-btn--emerald:hover { box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3); }

.ab-tut-btn--violet {
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.22);
}

.ab-tut-btn--violet:hover { box-shadow: 0 6px 18px rgba(139, 92, 246, 0.3); }

.ab-tut-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.125rem;
  border-radius: 0.5625rem;
  border: 1px solid rgba(15, 23, 42, 0.09);
  background: #fff;
  padding: 0.4375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1d1d1f;
  transition: background 0.15s ease;
}

.ab-tut-btn-ghost:hover { background: #f8fafc; }
.ab-tut-btn-ghost:active { transform: scale(0.98); }

/* ── Hero + video (desktop split) ── */
.ab-tut-intro {
  padding-top: 1.5rem;
}

@media (min-width: 768px) {
  .ab-tut-intro {
    padding-top: 2rem;
  }
}

.ab-tut-intro-grid {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.ab-tut-intro-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 900px) {
  .ab-tut-intro-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 2rem;
    align-items: start;
  }

  .ab-tut-intro-grid .ab-tut-video-block {
    margin-top: 0;
  }
}

.ab-tut-video-block {
  margin-top: 0.25rem;
  min-width: 0;
  max-width: 100%;
}

.ab-tut-video {
  width: 100%;
  max-width: 100%;
  margin-top: 0.5rem;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: #000;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05), 0 12px 28px rgba(30, 58, 138, 0.07);
}

.ab-tut-video video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* ── Stats ── */
.ab-tut-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.ab-tut-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.04);
  padding: 0.25rem 0.5625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #52525b;
}

/* ── Steps ── */
.ab-tut-steps {
  margin-top: 0.875rem;
  margin-inline: 0;
  padding: 0;
  list-style: none;
}

.ab-tut-step {
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin-inline: 0;
}

.ab-tut-step + .ab-tut-step {
  margin-top: 0.5rem;
}

@media (min-width: 900px) {
  .ab-tut-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
  }

  .ab-tut-step {
    flex-direction: column;
  }

  .ab-tut-step + .ab-tut-step {
    margin-top: 0;
  }

  .ab-tut-step-rail {
    display: none;
  }

  .ab-tut-step-card {
    height: 100%;
  }
}

.ab-tut-step-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 1.5rem;
  flex-shrink: 0;
}

.ab-tut-step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 0.625rem;
  font-weight: 700;
  color: #1d1d1f;
}

.ab-tut-step-dot--done {
  background: linear-gradient(135deg, #10b981, #0d9488);
  border-color: transparent;
  color: #fff;
}

.ab-tut-step-line {
  flex: 1;
  width: 1px;
  min-height: 0.5rem;
  margin: 0.25rem 0;
  background: rgba(15, 23, 42, 0.1);
}

.ab-tut-step-card {
  flex: 1;
  min-width: 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  padding: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ab-tut-step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.ab-tut-step-kicker {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d9488;
}

.ab-tut-step-title {
  margin-top: 0.125rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #1d1d1f;
}

.ab-tut-step-body {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #6e6e73;
}

.ab-tut-step-list {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.3125rem;
  list-style: none;
  padding: 0;
}

.ab-tut-step-list li {
  display: flex;
  gap: 0.4375rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #6e6e73;
}

.ab-tut-step-list li::before {
  content: '';
  width: 0.3125rem;
  height: 0.3125rem;
  margin-top: 0.4rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: #34d399;
}

.ab-tut-app-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.ab-tut-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.ab-tut-code {
  border-radius: 0.25rem;
  background: #f4f4f5;
  padding: 0.0625rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #0d9488;
}

/* ── Split cards (vCard, profile) ── */
.ab-tut-split {
  display: grid;
  min-width: 0;
  max-width: 100%;
  height: 100%;
}

@media (min-width: 640px) {
  .ab-tut-split {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
  }
}

.ab-tut-split__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem 0.75rem;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}

.ab-tut-split__visual img {
  display: block;
  width: auto;
  max-width: min(78vw, 13.75rem);
  height: auto;
}

@media (min-width: 640px) {
  .ab-tut-split__visual {
    padding: 1.25rem;
  }

  .ab-tut-split__visual img {
    max-width: 10.5rem;
  }
}

.ab-tut-split__visual--brand {
  background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%);
}

.ab-tut-split__visual--brand img {
  width: 100%;
  max-width: min(72vw, 11rem);
  border-radius: 0.625rem;
}

@media (min-width: 640px) {
  .ab-tut-split__visual--brand img {
    max-width: 9.5rem;
  }
}

.ab-tut-split__body {
  padding: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.ab-tut-split__body .ab-tut-btn {
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .ab-tut-split__body {
    display: flex;
    flex-direction: column;
    border-top: none;
    border-left: 1px solid rgba(15, 23, 42, 0.06);
  }

  .ab-tut-split__body .ab-tut-btn {
    margin-top: auto;
    align-self: flex-start;
  }
}

.ab-tut-checklist {
  margin-top: 0.625rem;
  display: grid;
  gap: 0.375rem;
  list-style: none;
  padding: 0;
  font-size: 0.8125rem;
  color: #52525b;
}

.ab-tut-checklist li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.ab-tut-checklist i {
  font-size: 0.5625rem;
  color: #8b5cf6;
}

/* ── Destinations ── */
.ab-tut-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-top: 0.75rem;
  max-width: 100%;
  padding-bottom: 0.125rem;
}

.ab-tut-scroll::-webkit-scrollbar { display: none; }

.ab-tut-scroll-card {
  scroll-snap-align: start;
  flex: 0 0 min(42vw, 8.5rem);
  border-radius: 0.625rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  padding: 0.625rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ab-tut-scroll-card img {
  width: 2rem;
  height: 2rem;
  margin-inline: auto;
  margin-bottom: 0.375rem;
  border-radius: 0.4375rem;
  object-fit: cover;
}

.ab-tut-scroll-card h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1d1d1f;
}

.ab-tut-scroll-card p {
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #86868b;
}

@media (min-width: 768px) {
  .ab-tut-scroll {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
    overflow: visible;
  }

  .ab-tut-scroll-card {
    flex: none;
    padding: 0.875rem 0.75rem;
    text-align: left;
  }

  .ab-tut-scroll-card img {
    margin-inline: 0;
    width: 2.25rem;
    height: 2.25rem;
  }

  .ab-tut-scroll-card h3 {
    font-size: 0.8125rem;
  }

  .ab-tut-scroll-card p {
    font-size: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .ab-tut-scroll {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .ab-tut-scroll-card {
    text-align: center;
    padding: 0.75rem 0.5rem;
  }

  .ab-tut-scroll-card img {
    margin-inline: auto;
  }
}

/* ── Tips grid (even cards on desktop) ── */
.ab-tut-bento {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@media (min-width: 768px) {
  .ab-tut-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    align-items: stretch;
  }

  .ab-tut-bento-cell {
    min-height: 100%;
  }

  .ab-tut-bento-visual {
    grid-column: auto;
    grid-row: auto;
  }
}

.ab-tut-bento-cell {
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  padding: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ab-tut-bento-cell h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1d1d1f;
}

.ab-tut-bento-cell p {
  margin-top: 0.3125rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #6e6e73;
}

.ab-tut-bento-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(191, 219, 254, 0.28), transparent 70%), #fff;
  padding: 0.875rem;
}

.ab-tut-bento-visual span {
  margin-bottom: 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86868b;
}

.ab-tut-bento-visual img {
  width: 100%;
  max-width: 8rem;
  border-radius: 0.5rem;
}

@media (min-width: 768px) {
  .ab-tut-bento-visual img {
    max-width: 9.5rem;
  }
}

/* ── FAQ ── */
.ab-tut-faq-group {
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ab-tut-faq-row {
  padding: 0.75rem 0.875rem;
}

.ab-tut-faq-row + .ab-tut-faq-row {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.ab-tut-faq-q {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1d1d1f;
}

.ab-tut-faq-a {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #6e6e73;
}

/* ── Two-col desktop band ── */
.ab-tut-duo {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.ab-tut-duo__head {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .ab-tut-duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
  }

  .ab-tut-duo__col {
    display: flex;
    flex-direction: column;
  }

  .ab-tut-duo__head {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 5.25rem;
  }

  .ab-tut-duo__col > .ab-tut-faq-group,
  .ab-tut-duo__col > .ab-tut-fix-list {
    flex: 1;
  }

  .ab-tut-duo > .ab-tut-surface,
  .ab-tut-duo > .ab-tut-support-card {
    height: 100%;
  }
}

.ab-tut-duo__col {
  min-width: 0;
  max-width: 100%;
}

/* Troubleshooting uses the same list surface as FAQ */
.ab-tut-fix-list {
  margin-top: 0.75rem;
}

/* ── Privacy grid ── */
.ab-tut-privacy-grid {
  display: grid;
  gap: 0.625rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #6e6e73;
}

@media (min-width: 768px) {
  .ab-tut-privacy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
  }
}

.ab-tut-privacy-grid strong {
  color: #1d1d1f;
  font-weight: 600;
}

/* ── Support / privacy paired cards ── */
.ab-tut-support-card {
  display: flex;
  flex-direction: column;
}

.ab-tut-support-grid {
  display: grid;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .ab-tut-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .ab-tut-support-card .ab-tut-support-grid,
  .ab-tut-support-card .ab-tut-privacy-grid {
    margin-top: auto;
    padding-top: 0.75rem;
  }
}

.ab-tut-support-grid .ab-tut-btn-ghost {
  justify-content: flex-start;
}

/* ── Section spacing ── */
.ab-tut-section {
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .ab-tut-section {
    margin-top: 2.25rem;
  }
}

.ab-tut-section-head {
  margin-bottom: 0;
}

/* ── Sticky + footer ── */
.ab-tut-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-top: 0.625rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.ab-tut-sticky__inner {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  padding-inline: 1rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .ab-tut-sticky__inner {
    max-width: 52rem;
    padding-inline: 1.5rem;
  }
}

@media (min-width: 640px) {
  .ab-tut-sticky {
    display: none;
  }
}

.ab-tut-sticky .ab-tut-btn {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.ab-tut-sticky-note {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #86868b;
}

.ab-tut-sticky-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(15, 23, 42, 0.12);
}

body.ab-tut-page main {
  padding-bottom: 6.5rem;
}

@media (min-width: 640px) {
  body.ab-tut-page main {
    padding-bottom: 2.5rem;
  }
}

.ab-tut-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.6875rem;
  color: #86868b;
}

.ab-tut-footer a {
  color: #52525b;
  text-decoration: none;
}

.ab-tut-footer a:hover {
  color: #1d1d1f;
}

@media (prefers-reduced-motion: reduce) {
  .ab-tut-btn,
  .ab-tut-btn-ghost {
    transition: none;
  }
}
