/* Petak colour tokens — v1.5. Colour identifies a DOMAIN, never a character.
   Never #000000 or #FFFFFF anywhere. */
:root{
/* Core — structural */
--ink:#20242E;--indigo:#2A4A7B;--kapur:#F7F2E7;--batu:#DED8CB;
/* Named surfaces */
--susu:#FDFBF4;   /* cards, inputs */
--rendam:#F0EADC; /* insets, photo wells, quotes */

/* DOMAIN ACCENTS — closed set of eight. Identity only: an accent answers WHO
   (including who is currently working). It never answers what state, or how urgent.
   Fills are the accent at 12% over the ground — never a hand-mixed tint.
   RESERVED / UNASSIGNABLE: --domain-system (Teal) is app-level routing only, and
   Indigo is the interaction colour. Neither is available to a future neighbour. */
--domain-system:#2E9D8F;        /* Teal        · RESERVED */
--domain-money:#E0A32E;         /* Gold        */
--domain-body:#E2683F;          /* Terracotta  */
--domain-mind:#8B5FA8;          /* Plum        */
--domain-shared-money:#5F7A4B;  /* Moss        */
--domain-home:#2F6B4E;          /* Daun        · dark mode lifts to #46966F */
--domain-relationships:#C25E85; /* Rose        */
--domain-documents:#7A6E58;     /* Kertas      */

/* TEXT ON A FULL-STRENGTH ACCENT — measured, v1.5.
   RULE: a full-strength accent carries NO body copy. Swatches, 2px rules and lit
   panes only. Text on an accent is >=24px regular — that is the whole rule.
   WCAG's 3:1 large-text allowance also covers bold at >=18.66px, but that branch
   requires weight 700 and Petak caps Plus Jakarta Sans at 500, so it is
   unreachable here: 500 is normal text to WCAG and must clear 4.5:1.
   Body text always sits on the 12% fill.
   The AA flag below is part of the pairing: four of eight are conditional. */
--on-domain-system:var(--ink);          /* 4.68:1 — AA at body size */
--on-domain-money:var(--ink);           /* 6.98:1 — AA at body size */
--on-domain-body:var(--ink);            /* 4.64:1 — AA at body size */
--on-domain-mind:var(--kapur);          /* 4.37:1 — CONDITIONAL: >=24px only */
--on-domain-shared-money:var(--kapur);  /* 4.30:1 — CONDITIONAL: >=24px only */
--on-domain-home:var(--kapur);          /* 5.64:1 — AA at body size */
--on-domain-relationships:var(--ink);   /* 3.87:1 — CONDITIONAL: >=24px only.
        Rose has no AA body pairing (Kapur is 3.59:1); both clear 3:1, Ink is the
        better of the two. Value deliberately unchanged — moving it would cost
        perceptual separation from Terracotta and Plum. */
--on-domain-documents:var(--kapur);     /* 4.48:1 — CONDITIONAL: >=24px only.
        KNOWINGLY 0.02 UNDER 4.5:1, not an oversight. #796D57 would clear it at
        dE 0.4 if Documents ever needs body copy on a full-strength surface. */

/* Domain fills — accent at 12% over the ground. The only permitted lightening,
   and the only surface that carries body copy. Ink on 12%-over-Kapur measures
   11.81:1 (Daun, worst case) to 12.88:1 (Gold): AAA across all eight. */
--fill-system:color-mix(in srgb,var(--domain-system) 12%,var(--surface-page));
--fill-money:color-mix(in srgb,var(--domain-money) 12%,var(--surface-page));
--fill-body:color-mix(in srgb,var(--domain-body) 12%,var(--surface-page));
--fill-mind:color-mix(in srgb,var(--domain-mind) 12%,var(--surface-page));
--fill-shared-money:color-mix(in srgb,var(--domain-shared-money) 12%,var(--surface-page));
--fill-home:color-mix(in srgb,var(--domain-home) 12%,var(--surface-page));
--fill-relationships:color-mix(in srgb,var(--domain-relationships) 12%,var(--surface-page));
--fill-documents:color-mix(in srgb,var(--domain-documents) 12%,var(--surface-page));

/* Semantic — icon-plus-text only: never a fill, never a border.
   Hue-distinctness from eight domains + Indigo is impossible; shape carries
   the meaning, colour reinforces. Info is Ink, never Indigo — aliasing info onto
   the interaction colour teaches users that information banners are tappable. */
--success:#3A7D3F;--warning:#A8701F;--error:#B03535;--info:var(--ink);

/* Aliases — light theme */
--surface-page:var(--kapur);
--surface-card:var(--susu);
--surface-inset:var(--rendam);
--text-primary:var(--ink);
--text-secondary:rgba(32,36,46,.62); /* Ink 62%, never a separate grey */
--text-on-interactive:var(--kapur);
--border-structure:var(--batu); /* 1px */
--border-emphasis:var(--ink);   /* 2px */
--interactive:var(--indigo);    /* the ONLY interactive colour */
--interactive-pressed:#1F3A63;
--focus-ring:var(--indigo);
--disabled-fg:rgba(32,36,46,.38);
--disabled-bg:var(--batu);
--state-departed:grayscale(1);  /* moved-out neighbours: pair with opacity .55 */
}
/* Dark mode — Ink ground, warm ramp, Kapur text. */
[data-theme="dark"]{
--surface-page:#20242E;
--surface-card:#272C38;
--surface-inset:#2D3341;
--grid-texture:#2E3542; /* hairline chat wallpaper, dark */
--text-primary:var(--kapur);
--text-secondary:rgba(247,242,231,.62);
--text-on-interactive:#20242E;
--border-structure:#3A4150;
--border-emphasis:var(--kapur);
--interactive:#8FADD6; /* Indigo lifted to clear 4.5:1 on Ink */
--interactive-pressed:#A9C1E2;
--focus-ring:#8FADD6;
--disabled-fg:rgba(247,242,231,.38);
--disabled-bg:#3A4150;
--domain-home:#46966F; /* Daun lifted: 2.46:1 → 4.32:1 on Ink. Property of the token, not a new colour. */
/* Fills MUST be re-declared here: var() inside a custom property substitutes at the
   DECLARATION site, so the :root fills bake the light ground permanently and would
   never pick up the dark --surface-page. Same expressions, resolved against Ink. */
--fill-system:color-mix(in srgb,var(--domain-system) 12%,var(--surface-page));
--fill-money:color-mix(in srgb,var(--domain-money) 12%,var(--surface-page));
--fill-body:color-mix(in srgb,var(--domain-body) 12%,var(--surface-page));
--fill-mind:color-mix(in srgb,var(--domain-mind) 12%,var(--surface-page));
--fill-shared-money:color-mix(in srgb,var(--domain-shared-money) 12%,var(--surface-page));
--fill-home:color-mix(in srgb,var(--domain-home) 12%,var(--surface-page));
--fill-relationships:color-mix(in srgb,var(--domain-relationships) 12%,var(--surface-page));
--fill-documents:color-mix(in srgb,var(--domain-documents) 12%,var(--surface-page));
--success:#7CBF80;--warning:#E0A94E;--error:#E08A7E;--info:var(--kapur);
}
