/* Shared onboarding layout for both manuals. */
html {
  scroll-padding-top: 0;
}

.hero {
  padding: 56px 24px 42px;
}

.hero-inner {
  display: block;
}

h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.1;
}

.eyebrow {
  margin-bottom: 18px;
}

.guide-intro {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.stage-one {
  padding-top: 56px;
}

main section {
  scroll-margin-top: 132px;
}

.stage-one .section-head {
  margin-bottom: 32px;
}

.stage-two {
  padding-top: 56px;
}

.stage-two .section-head {
  margin-bottom: 32px;
}

.stage-three {
  padding-top: 56px;
}

.stage-three .section-head {
  margin-bottom: 32px;
}

.guide-requirements {
  max-width: 600px;
  margin-bottom: 36px;
}

.guide-requirements h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.025em;
}

.guide-requirements-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 22px;
  padding: 0;
  list-style: none;
}

.guide-requirements-items li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.guide-requirements-items svg {
  width: 40px;
  height: 40px;
}

.guide-requirements p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

body:has(.welcome-dialog[open]) {
  overflow: hidden;
}

.welcome-dialog {
  width: min(560px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 32px;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: var(--bg);
}

.welcome-dialog::backdrop {
  background: rgba(0, 0, 0, .55);
}

.welcome-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.welcome-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
}

.welcome-close svg {
  width: 20px;
  height: 20px;
}

.welcome-dialog h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 32px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.welcome-dialog h2:focus,
.welcome-close:focus {
  outline: none;
}

.welcome-close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.welcome-copy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.welcome-features {
  display: grid;
  gap: 20px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.welcome-features li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.welcome-features svg {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--ink);
}

.welcome-features strong {
  display: block;
  color: var(--ink);
}

.welcome-features p {
  margin: 4px 0 0;
}

.welcome-features .welcome-feature-note {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.guide-steps {
  display: grid;
  gap: 24px;
}

.welcome-note {
  margin: -8px 0 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.welcome-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 24px;
}

.welcome-examples {
  padding: 10px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.welcome-examples:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.guide-try-start {
  margin-bottom: 24px;
  padding: 24px 28px;
  border-radius: 20px;
  background: #edf8f4;
}

.guide-try-start h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.guide-try-start p {
  margin: 8px 0 0;
  color: #36594e;
  line-height: 1.65;
}

.guide-demo-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.guide-demo-steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.guide-demo-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.guide-demo-steps li:last-child {
  padding-bottom: 0;
}

.guide-demo-number {
  display: grid;
  place-items: center;
  align-self: start;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #edf8f4;
  color: #36594e;
  font-size: 14px;
  font-weight: 600;
}

.guide-demo-steps h4 {
  margin: 4px 0 12px;
  font-size: 17px;
}

.guide-demo-command {
  margin: 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--card);
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.guide-demo-command p {
  margin: 0;
}

.guide-demo-result,
.guide-demo-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.guide-demo-note {
  font-size: 12px;
}

.guide-step {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  scroll-margin-top: 132px;
}

.guide-step-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.guide-context {
  margin: 0 0 12px;
  color: #4d6c68;
  font-size: 13px;
  font-weight: 600;
}

.guide-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.guide-image-link {
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}

.guide-image-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
}

.guide-image-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

body:has(.guide-image-dialog[open]) {
  overflow: hidden;
}

.guide-image-dialog {
  width: min(1200px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 20px;
  border: 0;
  border-radius: 18px;
  box-sizing: border-box;
}

.guide-image-dialog::backdrop {
  background: rgba(0, 0, 0, .75);
}

.guide-image-dialog-header {
  position: sticky;
  top: -20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  background: #fff;
}

.guide-image-dialog-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.guide-image-detail {
  max-height: calc(100dvh - 180px);
  overflow: auto;
}

.guide-image-dialog-header h2 {
  margin: 0;
  font-size: 16px;
}

.guide-image-dialog-header button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.guide-image-dialog img {
  display: block;
  margin: 0;
  max-width: 100%;
  height: auto;
}

.guide-image-preview-screen {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 12px auto;
}

.guide-image-preview-screen.portrait {
  width: min(100%, 480px);
}

.guide-image-preview-screen.portrait img {
  width: 100%;
}

.guide-image-dialog.is-zoomed .guide-image-preview-screen {
  width: max-content;
  max-width: none;
  margin: 0;
}

.guide-image-dialog.is-zoomed img {
  width: auto;
  max-width: none;
  margin: 0;
}

@media (max-width: 680px) {
  .guide-image-dialog-header {
    flex-wrap: wrap;
  }
}

#guideImageOriginal {
  display: block;
  text-align: center;
  color: var(--ink);
  font-size: 14px;
}

.guide-number {
  flex: 0 0 auto;
  color: #4d6c68;
  font-size: 17px;
  font-weight: 700;
}

.guide-step h3 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -.035em;
}

.guide-copy {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.guide-step .app-store-links {
  margin-top: 20px;
}

.guide-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  margin-top: 24px;
}

.guide-image {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fafbfc;
}

.guide-image-placeholder,
.guide-image-frame {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.guide-image-placeholder {
  background: linear-gradient(145deg, #f8fafb, #f0f5f5);
  color: #697a7d;
}

.guide-image-placeholder svg {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
}

.guide-image-placeholder span {
  font-size: 13px;
  font-weight: 700;
}

.guide-image-placeholder p {
  max-width: 420px;
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

.guide-image figcaption {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.guide-app {
  max-width: 260px;
}

.guide-image-frame img {
  width: auto;
  height: auto;
  max-height: 440px;
}

.guide-app .guide-image-frame img {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.guide-commands {
  margin: 20px 0 0;
  padding-left: 24px;
  line-height: 1.8;
}

.guide-success,
.guide-tip {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.guide-success {
  background: #edf8f4;
  color: #36594e;
}

.guide-tip {
  background: #fff8e6;
  color: #75551c;
}

.guide-tip strong {
  display: block;
  margin-bottom: 4px;
}

.guide-help {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.guide-help summary {
  width: fit-content;
  cursor: pointer;
  color: var(--ink);
}

.guide-help summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.guide-help p {
  max-width: 820px;
  margin: 12px 0 0;
}

.guide-help .help-list {
  max-width: 820px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.help-list li + li {
  margin-top: 10px;
}

.guide-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  padding: 28px 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, #edf8f4, #edf3fc);
}

.guide-next h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.guide-next p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.guide-next .btn {
  flex: 0 0 auto;
}

.guide-step .tabs-shell {
  margin-top: 22px;
  border-radius: 20px;
}

.guide-platform-support {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.guide-extras {
  margin-top: 32px;
  padding: 26px 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}

.guide-extras > summary {
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}

.guide-extras > summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.guide-extras-content {
  max-width: 860px;
  color: var(--muted);
  line-height: 1.7;
}

.guide-extras-content h3 {
  margin: 32px 0 12px;
  color: var(--ink);
  font-size: 23px;
}

.guide-extra-item {
  margin-top: 18px;
}

.guide-extra-item h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 16px;
}

.guide-extra-item p {
  margin: 6px 0;
}

.guide-images:has(.guide-image-wide) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-image-wide {
  grid-column: 1 / -1;
}

@media (max-width: 680px) {
  .page-tabs-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 0;
  }

  .page-tab {
    padding: 12px 8px;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }

  .hero {
    padding: 34px 18px 30px;
  }

  .hero-actions {
    display: flex;
  }

  .hero-actions > .btn {
    width: auto;
  }

  .stage-one {
    padding-top: 38px;
  }

  .guide-step {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .guide-step h3 {
    font-size: 22px;
  }

  .guide-images,
  .guide-images:has(.guide-image-wide) {
    grid-template-columns: 1fr;
  }

  .guide-next {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .guide-extras {
    padding: 22px 18px;
    border-radius: 20px;
  }
}

.guide-preparation {
  max-width: 700px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.guide-code {
  max-width: 260px;
}

.guide-code .guide-image-frame img {
  max-height: 200px;
}

.guide-image-screen {
  position: relative;
  max-width: 100%;
}

.guide-image-screen img {
  display: block;
}

.guide-image-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid #e4a525;
  border-radius: 10px;
  box-shadow: 0 0 0 1px #fff;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .guide-with-examples .nav-links {
    display: none;
  }

  .guide-with-examples .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 680px) {
  .guide-with-examples .page-tabs-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  }

  .guide-with-examples .page-tab {
    padding: 12px 6px;
    font-size: 12px;
  }

  .guide-with-examples main section {
    scroll-margin-top: 156px;
  }

  .guide-try-start {
    padding: 20px;
  }

  .guide-demo-steps li {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
  }

  .guide-demo-number {
    width: 26px;
    height: 26px;
  }

  .guide-demo-steps h4 {
    margin-top: 2px;
  }

  .guide-demo-command {
    padding: 14px;
    font-size: 16px;
  }
}
