/* App Store User Guide Layout & Cards (IDEA-193 / IDEA-196 / IDEA-197 / IDEA-198)
   Uses only site-wide :root typography tokens (--fs-xs..--fs-h2) and color tokens */
.guide-sections-wrap {
  margin-top: 6px;
  padding-top: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  scroll-margin-top: 16px;
}

.guide-whats-new-wrap {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.guide-main-header {
  margin-bottom: 12px;
}

.guide-main-header h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

/* Embedded visual brochure screenshots inside each outcome card */
.guide-card-media {
  margin: 0 0 14px;
}

.guide-card-media.is-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guide-shot {
  margin: 0;
  background: rgba(10, 14, 23, 0.72);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.guide-shot img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
}

.guide-shot figcaption {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

/* 4-Outcome Index Grid (matches IDEA-194 account menu tiles & iPhone 2x2 grid) */
.guide-outcome-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.guide-outcome-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--border-card);
  text-decoration: none;
  color: var(--text-primary);
  min-width: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.guide-outcome-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-primary);
}

.guide-outcome-head svg {
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.guide-outcome-sub {
  font-size: var(--fs-sm);
  line-height: 1.35;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-outcome-tile:hover,
.guide-outcome-tile:focus-visible {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--border-focus);
  outline: none;
}

.guide-outcome-tile:hover .guide-outcome-head svg,
.guide-outcome-tile:focus-visible .guide-outcome-head svg {
  color: var(--accent-hover);
}

/* Bottom card action pills (iPhone thumb-friendly links to real app pages) */
.guide-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.guide-section-card a.guide-action-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: var(--text-primary);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.guide-section-card a.guide-action-pill:hover,
.guide-section-card a.guide-action-pill:focus-visible {
  background: rgba(99, 102, 241, 0.22);
  border-color: var(--accent-hover);
  outline: none;
}

.guide-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.guide-section-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 18px 20px;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  scroll-margin-top: 16px;
}

.guide-section-card [id] {
  scroll-margin-top: 16px;
}

.guide-h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.guide-section-card a.guide-back-to-index {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.guide-section-card a.guide-back-to-index:hover {
  color: var(--accent-hover);
  border-color: var(--border-focus);
}

.guide-h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--text-primary);
  margin: 16px 0 8px;
}

.guide-p {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.6;
  margin: 0 0 12px;
}

.guide-list {
  margin: 0 0 12px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-secondary);
}

.guide-list li {
  font-size: var(--fs-body);
  line-height: 1.6;
}

.guide-list li strong,
.guide-p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.guide-list ul.guide-sublist {
  margin-top: 6px;
  margin-bottom: 2px;
  padding-left: 18px;
  gap: 6px;
  color: var(--text-secondary);
}

.guide-inline-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-card);
}

.guide-blockquote {
  background: rgba(99, 102, 241, 0.07);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin: 12px 0;
}

.guide-blockquote p {
  margin: 4px 0;
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-code {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.guide-pre {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  background: rgba(10, 14, 23, 0.85);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-primary);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.5;
  margin: 12px 0 4px;
}

.guide-section-card a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
  border-radius: 8px;
  border: 1px solid var(--border-card);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--fs-md);
}

.guide-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: var(--fs-xs);
  padding: 8px 10px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
}

.guide-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  line-height: 1.45;
  vertical-align: top;
}

.guide-table tr:last-child td {
  border-bottom: none;
}

.guide-details {
  margin-top: 12px;
  background: rgba(10, 14, 23, 0.45);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.guide-details summary {
  cursor: pointer;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--accent-hover);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}

.guide-details summary::-webkit-details-marker {
  display: none;
}

.guide-details summary::after {
  content: '▾';
  font-size: var(--fs-md);
  color: var(--accent-hover);
  transition: transform var(--transition-fast);
}

.guide-details[open] summary::after {
  transform: rotate(180deg);
}

.guide-details[open] summary {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 640px) {
  .guide-outcome-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .guide-outcome-tile {
    padding: 10px;
  }
  .guide-card-media.is-pair {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
  }
  .guide-card-media.is-pair::-webkit-scrollbar {
    display: none;
  }
  .guide-card-media.is-pair .guide-shot {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }
  .guide-shot img {
    max-height: 300px;
  }
  .guide-section-card {
    padding: 16px 14px;
  }
}
