/*
 * rivo Help Guide — Shared Styles
 *
 * Each page sets two custom properties for its accent color:
 *   --page-accent     (foreground: text, icons, bullets)
 *   --page-accent-bg  (background: hero gradient, section-label bg)
 *
 * Usage in each page:
 *   <link rel="stylesheet" href="assets/css/help-shared.css">
 *   <style>:root { --page-accent: var(--red); --page-accent-bg: var(--red-bg); }</style>
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Design tokens ── */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #1e293b;
  --text-dim: #64748b;
  --text-muted: #94a3b8;

  /* Shared palette — always available */
  --accent: #4f6ef7;
  --accent-light: #eef2ff;
  --accent-dark: #3b5ce4;
  --green: #22c55e;
  --green-bg: #f0fdf4;
  --amber: #f59e0b;
  --amber-bg: #fffbeb;
  --red: #ef4444;
  --red-bg: #fef2f2;
  --blue: #3b82f6;
  --blue-bg: #eff6ff;
  --purple: #8b5cf6;
  --purple-bg: #f5f3ff;

  /* Defaults (overridden per page) */
  --page-accent: var(--accent);
  --page-accent-bg: var(--accent-light);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

/* ── Base ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: 96px;
}

/* ── Layout ── */
.page { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 64px 24px 48px;
  background: linear-gradient(180deg, var(--page-accent-bg) 0%, var(--bg) 100%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--page-accent);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 12px;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto;
}

/* ── Sections ── */
section { margin-bottom: 48px; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--page-accent);
  background: var(--page-accent-bg);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* ── Typography ── */
h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}
h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  margin-top: 32px;
}
p { margin-bottom: 14px; color: var(--text-dim); }
p strong { color: var(--text); font-weight: 600; }

/* ── Screenshot container ── */
.screenshot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 24px 0;
}
.screenshot img {
  width: 100%;
  display: block;
}
.screenshot-caption {
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.screenshot-caption .dot {
  width: 6px; height: 6px;
  background: var(--page-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Side-by-side screenshots ── */
.screenshot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.screenshot-pair .screenshot { margin: 0; }
@media (max-width: 640px) {
  .screenshot-pair { grid-template-columns: 1fr; }
}

/* ── Mobile screenshot (narrow) ── */
.screenshot-mobile {
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Callout boxes ── */
.callout {
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 0.92rem;
  line-height: 1.6;
  display: flex;
  gap: 12px;
}
.callout-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.callout p { margin-bottom: 0; }
.callout p + p { margin-top: 8px; }

.callout-tip {
  background: var(--green-bg);
  border: 1px solid #bbf7d0;
  color: #166534;
}
.callout-tip .callout-icon { color: var(--green); }

.callout-info {
  background: var(--blue-bg);
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.callout-info .callout-icon { color: var(--blue); }

.callout-warning {
  background: var(--amber-bg);
  border: 1px solid #fde68a;
  color: #92400e;
}
.callout-warning .callout-icon { color: var(--amber); }

/* ── Steps ── */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 20px 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin-bottom: 16px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  background: var(--page-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li strong { color: var(--text); }

/* ── Feature grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
}
.feature-card-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 10px;
}
.feature-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.feature-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ── Inline entity types ── */
.entity-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

/* ── TOC ── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 32px 0;
  box-shadow: var(--shadow);
}
.toc h3 {
  margin-top: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.toc ul { list-style: none; }
.toc li { margin-bottom: 6px; }
.toc a {
  color: var(--page-accent);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}
.toc a:hover { text-decoration: underline; }

/* ── Comparison / priority table ── */
.compare-table,
.priority-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.88rem;
}
.compare-table th,
.priority-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
  font-size: 0.82rem;
}
.compare-table td,
.priority-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: top;
}
.compare-table tr:nth-child(even) td,
.priority-table tr:nth-child(even) td {
  background: var(--surface);
}

/* ── Annotation overlay ── */
.annotated { position: relative; }
.annotation {
  position: absolute;
  background: var(--page-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 2;
}
.annotation-list {
  list-style: none;
  margin: 16px 0;
  font-size: 0.9rem;
}
.annotation-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-dim);
}
.annotation-list .num {
  background: var(--page-accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 32px 24px 48px;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.footer a {
  color: var(--page-accent);
  text-decoration: none;
}
