/* ============================================================
   Lingual — Color tokens
   "Rubric on paper": a warm liturgical palette taken from the
   illuminated manuscript — ink on aged paper, with the scribe's
   rubric red reserved for the sacred and the live.
   Light is the canonical brand surface. Dark is the attendee
   reading mode (and operator OS-preference dark).
   ============================================================ */
:root {
  /* — Base palette (light) — */
  --paper:      #FAF6EE;   /* aged-paper background */
  --ink:        #1A1612;   /* deep warm ink — primary text */
  --ink-muted:  #6B5D52;   /* secondary text, metadata */
  --rubric:     #8B1A1A;   /* the scribe's red — sacred & live accent */
  --rubric-deep:#6D1313;   /* rubric hover / pressed */
  --rule:       #C9BDA8;   /* hairline rules, borders */
  --highlight:  #F2E9D5;   /* tinted fill — cards, active chips */

  /* — Status palette (operator + caption states) — */
  --status-idle:       var(--ink-muted);
  --status-connecting: #C8951E;   /* amber — connecting / stopping */
  --status-live:       var(--rubric);
  --status-error:      #5A0F0F;   /* deep oxblood — error */
  --status-ok:         #2E7D32;   /* readiness pass */

  /* — Semantic aliases — */
  --bg-page:        var(--paper);
  --bg-surface:     var(--paper);
  --bg-raised:      var(--highlight);
  --text-strong:    var(--ink);
  --text-body:      var(--ink);
  --text-muted:     var(--ink-muted);
  --text-accent:    var(--rubric);
  --border-hairline:var(--rule);
  --accent:         var(--rubric);
  --accent-hover:   var(--rubric-deep);

  /* — Shadow tints (warm, never neutral-gray) — */
  --shadow-card:    0 1px 2px rgba(26,22,18,0.04);
  --shadow-raised:  0 16px 44px rgba(26,22,18,0.13);
  --shadow-rubric:  0 2px 6px rgba(139,26,26,0.18);

  /* @lingual-liturgy-tokens begin */
  /* Phase 0 (#962): additive liturgical text-type aliases (leaf/rail/seal/chip).
     Every value is a var() of an existing base token — no literal color, no new
     hue; rubric stays the only accent. Aliasing base tokens means dark mode
     follows automatically. A literal here fails
     scripts/check_design_principles.py (invariant 4). */
  --rail-color:       var(--rubric);
  --rail-color-muted: var(--rule);
  --leaf-border:      var(--rule);
  --leaf-bg:          var(--highlight);
  --leaf-accent:      var(--rubric);
  --seal-fg:          var(--ink-muted);
  --seal-border:      var(--rule);
  --chip-fg:          var(--ink-muted);
  --chip-border:      var(--rule);
  /* @lingual-liturgy-tokens end */
}

/* Dark = the attendee night-reading mode. Triggered by html.dark
   (app sets this from a saved pref) and mirrored for OS preference. */
html.dark,
:root.dark {
  --paper:      #14110D;
  --ink:        #ECE6D8;
  --ink-muted:  #8A8273;
  --rubric:     #D9886A;   /* rubric warms to terracotta on dark paper */
  --rubric-deep:#C2725A;
  --rule:       #2F2A23;
  --highlight:  #211D18;

  --status-error: #B25656;
  --status-ok:    #6FBF73;

  --shadow-card:   0 1px 2px rgba(0,0,0,0.40);
  --shadow-raised: 0 16px 44px rgba(0,0,0,0.45);
  --shadow-rubric: 0 2px 6px rgba(0,0,0,0.45);
}
