/* EnaChat — citizen-facing public chat site tokens.
   Source of truth: the Claude Design project «Xat public — entrada 1c a
   resposta 1e» (enachat/design/Xat public - entrada 1c a resposta 1e.dc.html)
   distilled in DESIGN.md → «Citizen-facing public chat». This is the ONLY
   file on the public surface allowed to hold bare hex; components reference
   var(--…). Per-town theming: the page sets --primary/--on-primary/
   --primary-ink inline from theme_vars(town.primary_color) (contrast-safe).

   Fonts are self-hosted (zero third-party requests on citizen pages):
   Libre Franklin (UI, variable 400–700) + Source Serif 4 (ONLY the question
   heading: a static weight-600 instance subset with fonttools — 41 KB, not the
   122 KB variable font). */

@font-face{
  font-family:'Libre Franklin';font-style:normal;font-weight:400 700;font-display:swap;
  src:url("fonts/libre-franklin-latin-ext.50db3ad6b326.woff2") format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:'Libre Franklin';font-style:normal;font-weight:400 700;font-display:swap;
  src:url("fonts/libre-franklin-latin.bc34823f42d5.woff2") format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Source Serif 4';font-style:normal;font-weight:600;font-display:swap;
  src:url("fonts/source-serif-4-latin-ext.d7c709008dfe.woff2") format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:'Source Serif 4';font-style:normal;font-weight:600;font-display:swap;
  src:url("fonts/source-serif-4-latin.b911bca88b79.woff2") format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root{
  color-scheme:light;

  /* Surfaces — warm paper for the answer, cool paper for the entry */
  --paper:#fdfcfa;          /* answer page ground */
  --paper-cool:#fbfbfc;     /* entry screen ground */
  --white:#ffffff;
  --rail:#f8f6f2;           /* sources rail */
  --hover-warm:#f6f3ee;

  /* Ink (cool, entry + chrome) */
  --ink-950:#14171a;
  --ink-800:#3a3f45;
  --ink-500:#5f666d;        /* 5.4:1 on --paper-cool */

  /* Ink (warm, answer page) */
  --wink-900:#1a1c1e;
  --wink-800:#2b2f34;
  --wink-600:#6b6459;       /* 5.3:1 on --rail */
  --wink-500:#6d675c;       /* 5.0:1 on --paper */

  /* Lines */
  --line-cool:#eceef2;
  --line-warm:#e8e4dc;
  --line-warm-soft:#eee9e0;
  --line-input:#ded9d0;

  /* Hand-off / refusal card (warning family, warm) */
  --warn-bg:#fdf6e6;
  --warn-line:#e3d9c2;
  --warn-line-soft:#e0d5bb;
  --warn-ink:#6b4f12;       /* 6.6:1 on --warn-bg */

  /* Placeholder text: 4.6:1 on white */
  --placeholder:#6f6a60;

  /* Per-town brand — overridden inline by the page (theme_vars) */
  --primary:#0f2557;
  --on-primary:#ffffff;
  --primary-ink:#0f2557;    /* the primary darkened to AA on white: links */
  --primary-underline:color-mix(in srgb, var(--primary-ink) 30%, transparent);

  /* Type */
  --font-ui:'Libre Franklin',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-serif:'Source Serif 4',Georgia,'Times New Roman',serif;

  /* Shape */
  --radius-sm:7px;
  --radius-md:9px;
  --radius-lg:12px;

  /* Focus ring: visible on every ground (WCAG 2.4.7) */
  --ring:0 0 0 3px var(--paper), 0 0 0 5px var(--primary-ink);
}

/* The shared AI-transparency chip partial (templates/panel/_ai_chip.html,
   DESIGN.md) reads the brand green tokens — the only brand green on this
   page. Values = DESIGN.md green-50/200/800. */
:root{
  --green-50:#e9fdf3;
  --green-200:#9cf1cc;
  --green-800:#17745e;
  --ink-100:#eef0f2;
  --ink-600:#565d67;
}
