/* ─────────────────────────────────────────────────────────────────────────────
 * Vellum & Vermilion — the default BYI theme, in one place.
 *
 * The palette used to be written out three separate times: inline in
 * index.html's theme picker, inline in login.html and again in admin.html —
 * with different values each time (the admin page was #FBF7EE cream against the
 * app's #EDE3CB). The new landing page then made it four, in the dark palette.
 * This file is the single definition; the values here are the app's, which is
 * the surface users spend their day in and therefore the reference.
 *
 * It defines the palette in BOTH vocabularies used across the product:
 *   --ns-*   theme-neural.css tokens (login, landing page)
 *   --bg/--text/--accent/...  app tokens (index.html, admin.html)
 * so a page gets the right colours whichever set it was written against.
 *
 * Load order matters: after theme-neural.css, before page-specific CSS.
 * ────────────────────────────────────────────────────────────────────────── */

:root,
.ns-scope,
[data-theme="vellum-vermilion"] {
  /* ── Paper ─────────────────────────────────────────────────────────────── */
  --bg:  #EDE3CB;   --bg2: #F4ECD8;   --bg3: #E7DBBF;   --bg4: #DAC8A6;
  --ns-bg: #EDE3CB; --ns-bg-1: #EDE3CB; --ns-bg-2: #F4ECD8; --ns-bg-3: #E7DBBF;

  /* Solid parchment rather than glass — this theme has no blur anywhere. */
  --glass:      rgba(244, 236, 216, 0.94);
  /* The floating AI-notes card rules itself in amber; the translucent amber the
     dark themes use is invisible on parchment, so go burnt. */
  --note-accent: #B45309;
  --ns-glass:   rgba(255, 253, 247, 0.78);
  --ns-glass-2: rgba(255, 253, 247, 0.92);
  --ns-glass-3: rgba(231, 219, 191, 0.90);

  /* ── Rules and edges ───────────────────────────────────────────────────── */
  --border:  rgba(42, 35, 32, 0.14);  --border2: rgba(42, 35, 32, 0.26);
  --ns-stroke: rgba(42, 35, 32, 0.16); --ns-stroke-2: rgba(42, 35, 32, 0.28);

  /* ── Ink ───────────────────────────────────────────────────────────────── */
  --text:  #2A2320; --text2:  #574C40; --text3:  #8C7B66;
  --ns-fg: #2A2320; --ns-fg-2: #574C40; --ns-fg-muted: #7C6E5C;
  --ns-fg-dim: #9A8B76; --ns-fg-faint: #C9B89C;

  /* ── Ultramarine ink for actions, gold-ochre for highlights ────────────── */
  --accent: #1E4B8F; --accent2: #2A5FA8; --accent-fg: #F6EFDC;
  --accent-secondary: #C79A3A;
  --accent-glow: rgba(30, 75, 143, 0.28);
  --ns-indigo: #1E4B8F; --ns-indigo-2: #2A5FA8;
  --ns-indigo-dim: rgba(30, 75, 143, 0.14);
  --ns-indigo-glow: rgba(30, 75, 143, 0.28);
  --ns-cyan: #C79A3A; --ns-cyan-glow: rgba(199, 154, 58, 0.35);
  --ns-violet: #C0361F;

  /* ── Vermilion for danger, viridian for success ────────────────────────── */
  --danger: #C0361F; --success: #1F6B4E; --warn: #C79A3A;
  --ns-danger: #C0361F; --ns-success: #1F6B4E; --ns-warn: #C79A3A;

  /* ── Reading surfaces ──────────────────────────────────────────────────── */
  --read-bg: #F4ECD8; --read-card: #EDE3CB;
  --read-text: #2A2320; --read-text2: #574C40;
  --orb-1: #E3D5B0; --orb-2: #DACBA4; --orb-3: #C79A3A;

  /* ── Shadows: warm brown, never blue-black ─────────────────────────────── */
  --shadow-sm: 0 1px 3px rgba(74, 54, 32, 0.12);
  --shadow-md: 0 6px 22px rgba(74, 54, 32, 0.14);
  --shadow-lg: 0 16px 48px rgba(74, 54, 32, 0.20);
  --shadow: 0 16px 48px rgba(74, 54, 32, 0.20), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  --ns-shadow-card:  0 10px 40px rgba(74, 54, 32, 0.16), 0 1px 3px rgba(74, 54, 32, 0.10);
  --ns-shadow-cta:   0 0 0 1px rgba(30, 75, 143, 0.35), 0 10px 28px rgba(30, 75, 143, 0.22);
  --ns-shadow-hover: 0 0 0 1px rgba(30, 75, 143, 0.60), 0 14px 44px rgba(30, 75, 143, 0.30);

  /* ── Type: Didone titles, old-style book body, typewriter for data ─────── */
  --editor-font:     'EB Garamond', Georgia, 'Times New Roman', serif;
  --ns-font-display: 'Playfair Display', Georgia, serif;
  --ns-font-body:    'EB Garamond', Georgia, 'Times New Roman', serif;
  --ns-font-mono:    'IBM Plex Mono', ui-monospace, monospace;
}

/* Warm paper grain plus a soft edge vignette. Fixed attachment so the texture
   belongs to the sheet rather than scrolling with the content. */
body {
  background-color: #EDE3CB;
  background-image:
    radial-gradient(ellipse 120% 92% at 50% 50%, transparent 60%, rgba(120, 95, 60, .10) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23p)' opacity='0.05'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed;
  color: var(--text);
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: .005em;
  font-weight: 600;
}

code, .ns-mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

/* No glassmorphism in this theme — surfaces are solid paper. */
* { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* theme-neural.css paints several headings as a white gradient clipped to the
   text. On parchment that renders as invisible text, so force solid ink. */
.ns-display, .ns-brand-title, .ns-bento-cell .cell-value {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--ns-fg) !important;
}
