/* YouTube Mentor — shared theme (light default, dark via [data-theme="dark"])
   v1.0  2026-05-19  Used by public pages + blog. Dashboard uses its own theme.ts. */

:root {
  /* LIGHT THEME (default) — chosen for parental-trust aesthetic
     (matches Bark / Qustodio / Family Link conventions) */
  --bg: #ffffff;
  --card: #f8fafc;        /* slate-50 — subtle off-white for cards */
  --fg: #0f172a;          /* slate-900 — primary text */
  --muted: #64748b;       /* slate-500 — secondary text */
  --border: #e2e8f0;      /* slate-200 — borders */
  --accent: #ef4444;      /* red-500 — brand */
  --accent-hover: #dc2626;
  --accent-bg-soft: #fef2f2;  /* red-50 — soft accent bg */
  --blue: #2563eb;
  --green: #15803d;       /* green-700 (darker for white-bg contrast) */
  --green-bg: #dcfce7;
  --purple: #7c3aed;
  --amber: #b45309;       /* amber-700 (darker for white-bg) */
  --warn-bg: #fffbeb;     /* amber-50 */
  --warn-border: #fbbf24; /* amber-400 */
  --code-bg: #f1f5f9;     /* slate-100 */
  --code-fg: #b45309;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);

  /* Draft banner (legal pages) */
  --draft-bg: #fef2f2;
  --draft-fg: #991b1b;
  --draft-border: #ef4444;

  /* Pricing tier highlight */
  --tier-featured-bg: #fef2f2;
  --tier-featured-border: #ef4444;
}

:root[data-theme="dark"] {
  --bg: #0f172a;
  --card: #1e293b;
  --fg: #e2e8f0;
  --muted: #94a3b8;
  --border: #334155;
  --accent: #ef4444;
  --accent-hover: #dc2626;
  --accent-bg-soft: #1e1818;
  --blue: #2563eb;
  --green: #16a34a;
  --green-bg: #14532d;
  --purple: #7c3aed;
  --amber: #fbbf24;
  --warn-bg: #1e293b;
  --warn-border: #fbbf24;
  --code-bg: #1e293b;
  --code-fg: #fbbf24;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);

  --draft-bg: #7f1d1d;
  --draft-fg: #fee2e2;
  --draft-border: #ef4444;

  --tier-featured-bg: #1e293b;
  --tier-featured-border: #ef4444;
}

/* ============================================================
   GLOBAL BASE — applied to every public page to match dashboard.
   Each page's inline <style> should NOT override these.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 16px;
  scrollbar-gutter: stable;  /* prevent horizontal jump between pages with/without scrollbar */
  transition: background-color .15s, color .15s;
}
body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  font-size: 0.875rem;  /* 14px — same as Tailwind text-sm used by dashboard */
}
body, .card, .tier, .step, .result, .note, table, code, blockquote {
  transition: background-color .15s, color .15s, border-color .15s;
}

/* Theme toggle button — appears in lang-switch area */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85em;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  user-select: none;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--fg); }
.theme-toggle .icon { display: inline-block; width: 1.1em; text-align: center; }

/* ============================================================
   SHARED COMPONENTS — used by both public HTML and React dashboard
   to keep visual identity consistent across /install (child) and
   /students etc. (parent). React side uses Tailwind classes that
   target the same look (see FieldRow component).
   ============================================================ */

/* Audience badge — small chip at top of a page indicating who it's for.
   .audience-parent = blue (you, the parent)
   .audience-child  = green (your child) */
.audience-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 0 0 12px;
  border: 1px solid;
}
.audience-parent {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}
:root[data-theme="dark"] .audience-parent {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.35);
}
.audience-child {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
:root[data-theme="dark"] .audience-child {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

/* SectionHint — info banner. Match React component look. */
.section-hint {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #eff6ff;
  border-left: 4px solid #60a5fa;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
  color: #1e3a8a;
  font-size: 0.95em;
  line-height: 1.5;
}
.section-hint.warn {
  background: var(--warn-bg);
  border-left-color: var(--warn-border);
  color: var(--fg);
}
.section-hint.success {
  background: #f0fdf4;
  border-left-color: #4ade80;
  color: #14532d;
}
:root[data-theme="dark"] .section-hint {
  background: rgba(59, 130, 246, 0.1);
  color: #dbeafe;
}
:root[data-theme="dark"] .section-hint.warn {
  background: rgba(251, 191, 36, 0.1);
  color: var(--fg);
}
:root[data-theme="dark"] .section-hint.success {
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
}
.section-hint .icon {
  font-size: 1.2em;
  flex-shrink: 0;
  line-height: 1;
}
.section-hint .body { flex: 1; }
.section-hint h3 {
  margin: 0 0 6px;
  font-size: 1em;
  color: inherit;
  border: 0;
  padding: 0;
}
.section-hint p { margin: 4px 0; }
.section-hint p:first-child { margin-top: 0; }
.section-hint p:last-child { margin-bottom: 0; }
