/**
 * Neyham Design Tokens — Paper Research Desk
 * Mother theme: fee matrix (warm paper, restrained gold, editorial density)
 */
:root {
  /* —— Surface —— */
  --n-paper: #faf7f0;
  --n-paper-2: #f3efe6;
  --n-panel: #fffdf8;
  --n-panel-elevated: #ffffff;
  --n-cat-row: #f2ecdb;

  /* —— Ink —— */
  --n-ink: #2d2a26;
  --n-ink-2: #4c463d;
  --n-muted: #6e6558;
  --n-faint: #8a7f6f;

  /* —— Rules —— */
  --n-rule: #d6cdbb;
  --n-rule-soft: #e8e0d0;
  --n-rule-strong: #2d2a26;

  /* —— Brand gold (accent only) —— */
  --n-gold: #a8844c;
  --n-gold-ink: #7d5b24;
  --n-gold-bright: #c9a86a;
  --n-gold-soft: rgba(168, 132, 76, 0.10);
  --n-gold-line: rgba(168, 132, 76, 0.35);

  /* —— Semantic —— */
  --n-low: #3d6b4a;
  --n-high: #9c2b2b;
  --n-tier: #8a6a1a;
  --n-link: #3a6ea5;
  --n-public: #0f766e;
  --n-gated: #9a3412;
  --n-danger: #b42318;

  /* —— Type families (loaded in neyham-fonts.css) —— */
  --n-font-sans: "Source Sans 3", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --n-font-display: "Source Serif 4", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --n-font-brand: "Source Sans 3", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;

  /* —— Type scale (8pt rhythm) —— */
  --n-fs-2xs: 0.6875rem; /* 11 */
  --n-fs-xs: 0.75rem;    /* 12 */
  --n-fs-sm: 0.8125rem;  /* 13 */
  --n-fs-md: 0.875rem;   /* 14 */
  --n-fs-lg: 1rem;       /* 16 */
  --n-fs-xl: 1.25rem;    /* 20 */
  --n-fs-2xl: 1.5rem;    /* 24 */
  --n-fs-display: clamp(1.5rem, 2.8vw, 2rem);

  --n-lh-tight: 1.25;
  --n-lh-snug: 1.4;
  --n-lh-body: 1.65;
  --n-lh-loose: 1.8;

  --n-tracking-brand: 0.24em;
  --n-tracking-eyebrow: 0.2em;
  --n-tracking-label: 0.12em;

  /* —— Space / radius —— */
  --n-space-1: 4px;
  --n-space-2: 8px;
  --n-space-3: 12px;
  --n-space-4: 16px;
  --n-space-5: 24px;
  --n-space-6: 32px;
  --n-space-7: 48px;

  --n-radius-sm: 6px;
  --n-radius-md: 10px;
  --n-radius-lg: 14px;
  --n-radius-pill: 999px;

  /* —— Elevation (rare) —— */
  --n-shadow-sm: 0 1px 2px rgba(45, 42, 38, 0.04);
  --n-shadow-md: 0 12px 32px rgba(45, 42, 38, 0.08);

  /* —— Motion —— */
  --n-ease: cubic-bezier(0.22, 0.9, 0.3, 1);
  --n-duration: 160ms;
}

/* Base document helpers */
.n-paper-body {
  margin: 0;
  min-height: 100vh;
  background: var(--n-paper);
  color: var(--n-ink);
  font-family: var(--n-font-sans);
  font-size: var(--n-fs-md);
  line-height: var(--n-lh-body);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.n-brand {
  font-family: var(--n-font-brand);
  font-weight: 700;
  font-size: var(--n-fs-xs);
  letter-spacing: var(--n-tracking-brand);
  text-transform: uppercase;
  color: var(--n-gold-ink);
}

.n-eyebrow {
  font-family: var(--n-font-brand);
  font-weight: 600;
  font-size: var(--n-fs-2xs);
  letter-spacing: var(--n-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--n-gold-ink);
}

.n-display {
  font-family: var(--n-font-display);
  font-weight: 600;
  font-size: var(--n-fs-display);
  line-height: var(--n-lh-tight);
  letter-spacing: -0.01em;
  color: var(--n-ink);
}

.n-meta {
  font-size: var(--n-fs-xs);
  color: var(--n-muted);
  font-style: italic;
}
