/* ─── Help page styles (extends marketing site's style.css) ──────────────── */

/* ─── Help hero ──────────────────────────────────────────────────────────── */
.help-hero {
  padding: 100px 0 40px;
  text-align: center;
}

.help-hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  margin-bottom: 12px;
}

.help-hero .subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ─── Breadcrumb ─────────────────────────────────────────────────────────── */
.help-breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.help-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.help-breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  margin: 0 6px;
  color: var(--text-subtle);
}

/* ─── Topic grid (hub page) ──────────────────────────────────────────────── */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.topic-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.topic-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 8px;
}

.topic-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ─── Help content sections ──────────────────────────────────────────────── */
.help-content {
  padding: 40px 0 80px;
}

.help-section {
  margin-bottom: 60px;
}

.help-section:last-child {
  margin-bottom: 0;
}

.help-section-inner {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.help-section:nth-child(even) .help-section-inner {
  flex-direction: row-reverse;
}

.help-section-text {
  flex: 1;
  min-width: 0;
}

.help-section-text h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 16px;
}

.help-section-text .section-body {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
}

.help-section-text .section-body p {
  margin: 0 0 12px;
}

.help-section-text .section-body ul,
.help-section-text .section-body ol {
  margin: 0 0 12px;
  padding-left: 1.5em;
}

.help-section-text .section-body li {
  margin-bottom: 6px;
}

.help-section-screenshots {
  flex-shrink: 0;
}

/* ─── Device switcher ────────────────────────────────────────────────────── */
.device-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 0;
}

.device-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.device-tab:hover {
  border-color: var(--primary);
  color: var(--text-strong);
}

.device-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── Phone / tablet frames ──────────────────────────────────────────────── */
.phone-frame-iphone {
  width: 300px;
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  border: 4px solid var(--phone-bezel);
  background: var(--phone-screen);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.phone-frame-ipad {
  width: 380px;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  border: 4px solid var(--phone-bezel);
  background: var(--phone-screen);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.phone-frame-android {
  width: 300px;
  aspect-ratio: 9 / 20;
  border-radius: 32px;
  border: 4px solid var(--phone-bezel);
  background: var(--phone-screen);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.phone-frame-iphone img,
.phone-frame-ipad img,
.phone-frame-android img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Theme-aware screenshots */
[data-device]:not(.device-active) {
  display: none;
}

/* ─── Annotations ────────────────────────────────────────────────────────── */
.annotation {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.annotation.highlight {
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: rgba(29, 78, 216, 0.08);
}

.annotation.highlight .highlight-text {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--primary);
}

.highlight.label-below .highlight-text {
  top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
}
.highlight.label-above .highlight-text {
  bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
}
.highlight.label-left .highlight-text {
  right: calc(100% + 4px); top: 50%; transform: translateY(-50%);
}
.highlight.label-right .highlight-text {
  left: calc(100% + 4px); top: 50%; transform: translateY(-50%);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .help-hero {
    padding: 80px 0 24px;
  }

  .help-hero h1 {
    font-size: 28px;
  }

  .help-section-inner {
    flex-direction: column !important;
    align-items: center;
  }

  .phone-frame-iphone {
    width: 240px;
  }

  .phone-frame-ipad {
    width: 300px;
  }

  .phone-frame-android {
    width: 240px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }
}
