/* ─────────────────────────────────────────────────────────────────────────
   docs.css — shared design system for PingBack doc pages
   Loaded AFTER the inline <style> in each page; overrides via cascade order.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --bg:      #ffffff;
  --surface: #f2f4f7;
  --border:  #e2e5eb;
  --accent:  #4262ff;
  --text:    #050038;
  --muted:   #717b8c;
  --radius:  8px;
  --yellow:  #f7b509;
}

/* ── Page ────────────────────────────────────────────────────────────────── */
body {
  background: #1a1acc;
  background-image:
    linear-gradient(to right, #1414bb 3px, transparent 3px),
    linear-gradient(to bottom, #1414bb 3px, transparent 3px);
  background-size: 40px 40px;
  padding: 48px 20px 80px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.container {
  max-width: 740px;
  border-top: 3px solid var(--yellow);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.04),
    0 2px 8px  rgba(0,0,0,0.05),
    0 12px 40px rgba(0,0,0,0.07);
  padding: 0 56px 60px;
  gap: 0;
}

@media (max-width: 600px) {
  body { padding: 0 0 60px; }
  .container {
    border-radius: 0;
    border-top: none;
    box-shadow: none;
    padding: 0 20px 48px;
  }
}

/* ── Header: brand left · back-btn right · hero full-width below ─────────── */
.header {
  display: grid;
  grid-template-areas:
    "brand nav"
    "hero  hero";
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px 0;
  padding: 28px 0 32px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--border);
  flex-direction: unset;
}

.brand        { grid-area: brand; }
.back-btn     { grid-area: nav;   }
.hero,
.page-meta    { grid-area: hero;  }

/* ── Brand ───────────────────────────────────────────────────────────────── */
.logo-img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.brand-name {
  font-size: 14.5px;
}

/* ── Back button — text link, no border box ──────────────────────────────── */
.back-btn {
  border: none;
  background: none;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12.5px;
  border-radius: 6px;
  margin-left: 8px;
  align-self: unset;
  transition: color 0.12s, background 0.12s;
}
.back-btn:hover {
  border-color: transparent;
  background: var(--surface);
  color: var(--text);
}
.back-btn svg { width: 13px; height: 13px; }

/* ── Hero title ──────────────────────────────────────────────────────────── */
.hero        { gap: 10px; }
.page-meta   { gap: 6px; flex-direction: column; display: flex; }

.hero-title,
.page-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.7px;
  line-height: 1.14;
}

.hero-tagline {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.78;
  max-width: 480px;
}

.last-updated {
  font-size: 12.5px;
  color: var(--muted);
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.sections { gap: 44px; }

.section  { gap: 14px; }

/* Section titles: left yellow rule for hierarchy */
.section-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  padding-left: 11px;
  border-left: 3px solid var(--yellow);
  line-height: 1.3;
}

.section-body {
  font-size: 14px;
  color: #383b4a;
  line-height: 1.85;
}

.section-body p + p { margin-top: 14px; }

/* ── Dividers — hidden; spacing handled by section gap + header border ───── */
.divider { display: none; }

/* ── Callout ─────────────────────────────────────────────────────────────── */
.callout {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  gap: 8px;
}

.callout-label {
  letter-spacing: 0.9px;
  color: var(--muted);
}
.callout-label img {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.callout-body {
  font-size: 13.5px;
  line-height: 1.8;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  padding-top: 32px;
  margin-top: 20px;
  color: var(--muted);
}

footer img {
  width: 18px;
  height: 18px;
}

/* ── Callout inside .section-body (not a flex sibling, needs explicit margin) */
.section-body .callout          { margin-top: 20px; }
.section-body .callout + .callout { margin-top: 12px; }

/* ── TOC (privacy.html) — gap before the sections below it ──────────────── */
.toc { margin-bottom: 32px; }

/* ── Doc-page hamburger nav ──────────────────────────────────────────────── */
.doc-ham-wrap {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
}

.doc-ham-btn {
  background: #050038;
  border: none;
  border-radius: 14px;
  width: 51px;
  height: 51px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.doc-ham-btn:hover { background: #1a1255; }
.doc-ham-btn:focus-visible { outline: 2.5px solid var(--yellow); outline-offset: 2px; }

.doc-nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #050038;
  border-radius: 12px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 170px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
}
.doc-nav-dropdown.open { display: flex; }

.doc-nav-link {
  display: block;
  padding: 9px 14px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.12s;
  white-space: nowrap;
}
.doc-nav-link:hover { background: rgba(255,255,255,0.10); }
.doc-nav-link.active { background: rgba(255,255,255,0.08); font-weight: 600; pointer-events: none; }

.doc-nav-divider { height: 1px; background: rgba(255,255,255,0.10); margin: 4px 6px; }

/* X icon toggle */
.doc-ham-btn .x-icon  { display: none; }
.doc-ham-btn.is-open .ham-icon { display: none; }
.doc-ham-btn.is-open .x-icon  { display: block; }

/* Page fade-out on navigation */
body { transition: opacity 0.25s ease; }
body.pb-fade-out { opacity: 0; }

/* ── Support — numbered steps ────────────────────────────────────────────── */
.step-num {
  background: var(--accent);
}

/* ── Privacy — TOC ───────────────────────────────────────────────────────── */
.toc {
  background: var(--surface);
  border-color: var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  gap: 8px;
}

.toc-label {
  letter-spacing: 0.9px;
}
