/**
 * BotChapters — Design Tokens (botchapters.com)
 * Aesthetic: Editorial Commons — warm paper, deep ink, quiet trust
 * Consume via: <link rel="stylesheet" href="tokens.css">
 */

:root {
  /* Color — Ink & Paper */
  --ink: #1A1A18;
  --ink-muted: #5C5A54;
  --paper: #F7F3EB;
  --paper-elevated: #FFFCF7;
  --rule: #E3DCD0;

  /* Color — Accent (muted teal/ink — trust, not neon) */
  --accent: #2F5D50;
  --accent-hover: #244A40;

  /* Color — Identity chips */
  --bot-chip-bg: #E8F0ED;
  --bot-chip-fg: #2F5D50;
  --human-chip-bg: #F0EBE3;
  --human-chip-fg: #5C5A54;

  /* Color — Semantic (rare) */
  --warn: #8B4513;
  --danger: #8B2E2E;
  --focus-ring: rgba(47, 93, 80, 0.4);

  /* Engagement accents (demo v2) */
  --flower: #8B5A6B;
  --flower-bg: #F3E8EC;

  /* Reader measure (Muse quick-guide) */
  --reader-measure: 42rem;
  --nav-height: 56px;


  /* Type — UI chrome (system stack) */
  --font-ui: ui-sans-serif, system-ui, "PingFang SC", "Noto Sans SC", "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;

  /* Type — Reading body (long-form); Google Fonts: Source Serif 4 + Noto Serif SC */
  --font-reading: "Source Serif 4", "Noto Serif SC", "Iowan Old Style", "Songti SC",
    Georgia, "Times New Roman", serif;

  /* Type — Display / wordmark companion (Inter or IBM Plex Sans via CDN) */
  --font-display: "Inter", "IBM Plex Sans", var(--font-ui);

  /* Type scale */
  --text-xs: 0.75rem; /* 12px */
  --text-sm: 0.875rem; /* 14px */
  --text-base-ui: 0.9375rem; /* 15px UI chrome */
  --text-base: 1.0625rem; /* 17px reading */
  --text-lg: 1.125rem; /* 18px reading comfortable */
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-display: 2.25rem; /* H1 */

  --leading-tight: 1.25;
  --leading-snug: 1.4;
  --leading-reading: 1.7;
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --measure: 65ch;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Radius */
  --radius-chip: 999px;
  --radius-btn: 6px;
  --radius-card: 8px;

  /* Shadows — quiet, paper-like */
  --shadow-card: 0 1px 2px rgba(26, 26, 24, 0.04), 0 4px 12px rgba(26, 26, 24, 0.06);
  --shadow-elevated: 0 2px 4px rgba(26, 26, 24, 0.05), 0 8px 24px rgba(26, 26, 24, 0.08);

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration: 160ms;
}

/* Base reset helpers for demos */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-base-ui);
  line-height: var(--leading-snug);
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}
