/* Theme Architecture v1 — semantic token contract and fallback values. */
:root {
  --color-page: #151218;
  --color-page-soft: #100e13;
  --color-surface: #1f1721;
  --color-surface-raised: #2a202c;

  --color-text: #f7e5ec;
  --color-text-muted: #c7acb9;
  --color-text-dim: #927984;
  --color-text-inverse: #21141c;

  --color-accent: #f6a6c2;
  --color-accent-strong: #ed9cba;
  --color-accent-soft: #362630;
  --color-on-accent: #ffffff;
  --nav-chat-active: var(--color-accent-strong);
  /* The central Chat glyph is a stable white line across every palette. */
  --nav-chat-icon: #ffffff;
  --color-chrome: var(--color-surface-raised);
  --color-panel-solid: var(--color-surface-raised);
  /* Derived component surfaces. Future themes inherit these automatically;
     palettes only need to provide the core semantic colours above. */
  --surface-note-paper: var(--color-panel-solid);
  --surface-sticky-chrome: var(--color-chrome);
  --surface-detail-row: transparent;
  --surface-continuous-stage: var(--color-surface-raised);
  --color-highlight: var(--color-accent-strong);
  --brand-gradient: linear-gradient(118deg, var(--color-accent), var(--color-accent-strong));
  /* Ornament is deliberately separate from interaction colour.  It is used
     for section rules, editorial labels and the Home monogram; controls keep
     consuming --color-accent. */
  --color-ornament: var(--color-accent);
  --color-ornament-soft: color-mix(in srgb, var(--color-ornament) 14%, transparent);
  --home-mark-fill: var(--brand-gradient);

  --color-border: rgba(255, 214, 232, 0.16);
  --color-border-strong: rgba(255, 214, 232, 0.32);
  --color-overlay: rgba(10, 7, 11, 0.62);
  --shadow-card: 0 16px 42px rgba(0, 0, 0, 0.24);
  --shadow-modal: 0 28px 78px rgba(0, 0, 0, 0.46);

  --color-success: #67c99a;
  --color-warning: #f0b454;
  --color-error: #ef728d;
  --color-info: #8e9ff5;

  /* Little Fund paper semantics. Income follows the active theme while
     expenses keep their own stable gold identity. */
  --piggy-paper: #fffdfb;
  --piggy-paper-soft: #f8eff2;
  --piggy-paper-text: #3f2a32;
  --piggy-paper-muted: #806f76;
  --piggy-paper-line: rgba(63, 42, 50, 0.12);
  --piggy-income: var(--color-accent);
  --piggy-income-soft: var(--color-accent-soft);
  --piggy-expense: #b8892f;
  --piggy-expense-amount: var(--piggy-expense);
  --piggy-expense-soft: #fbf5e8;
  --piggy-receipt-border: rgba(63, 42, 50, 0.12);

  /* Stable product identities. These are deliberately outside theme
     palettes so future blue/green themes cannot recolour Between Us. */
  --between-us-lavender: #8e6fc6;
  --between-us-lavender-soft: rgba(171, 139, 224, 0.14);
  --between-us-lavender-line: rgba(171, 139, 224, 0.22);
  --between-us-rose: #d986a3;
  --between-us-rose-soft: rgba(217, 134, 163, 0.15);
  --between-us-rose-line: rgba(217, 134, 163, 0.24);
  --between-us-gold: #b98627;
  --between-us-gold-soft: rgba(221, 169, 73, 0.18);
  --between-us-gold-line: rgba(221, 169, 73, 0.26);
  --between-us-blue: #3f7fbd;
  --between-us-blue-soft: rgba(125, 183, 255, 0.18);
  --between-us-blue-line: rgba(125, 183, 255, 0.26);

  --interest-cloud-stage-min-height: calc(var(--app-vvh, 100vh) - var(--bottom-nav-space) - 128px);
  /* Stable source identities; themes must not recolour provenance. */
  --source-github: #6ea8e8;
  --source-paper: #9c84d8;
  --source-huggingface: #d6a44f;
  --source-xhs: #d35b68;
}
