/* REALITAS design tokens: the ONE place for colours, spacing, widths, type sizes, component metrics and status colours.
   Components never hardcode these values. Dark is the default theme (:root); [data-theme="light"] changes colours only.
   Standard breakpoints (max-width unless noted): 1279 rail folds · 1100 tablet-wide · 1079 header collapses · 900 single column
   · 760 icon-only header buttons · 650 phones · 420 small phones · 359 smallest · min 1180 two-column archive.
   Breakpoint-dependent token values are at the end of this file; prefer changing a token here over adding a media rule elsewhere. */

/* ---------- Fonts (v0.28): self-hosted variable fonts, OFL (assets/fonts). Sora = display/headings (--serif keeps its
   historical name), Manrope = body/UI (--sans). Latin subset covers Portuguese. ---------- */
@font-face{font-family:'Sora';font-style:normal;font-display:swap;font-weight:100 800;src:url(../fonts/sora-latin-wght-normal.woff2) format('woff2-variations'),url(../fonts/sora-latin-wght-normal.woff2) format('woff2')}
@font-face{font-family:'Manrope';font-style:normal;font-display:swap;font-weight:200 800;src:url(../fonts/manrope-latin-wght-normal.woff2) format('woff2-variations'),url(../fonts/manrope-latin-wght-normal.woff2) format('woff2')}

/* ---------- Colour (dark default) ---------- */
:root{color-scheme:dark;
--paper:#151311;--soft:#1e1b18;--hover:#25221e;--footer-bg:#100e0c;--input-bg:#1e1b18;          /* page, surface, hover, footer, inputs */
--ink:#ede7dc;--text:#d6cfc4;--muted:#a9a196;--faint:#8f877c;                                    /* primary, body, secondary, faint text */
--line:#34302a;--line-strong:#4d463e;                                                          /* borders and rules */
--accent:#6bb3ea;--accent-fill:#1f5f9e;--on-accent:#fff;--focus:#6bb3ea;                       /* FATOFORMA blue accent */
--button-bg:#ede7dc;--button-text:#151311;
--inverse-bg:#231f1b;--inverse-text:#ede7dc;--inverse-muted:#b8afa3;--inverse-line:#3b3630;--inverse-accent:#9ccbef;--inverse-num:#d4b196;--inverse-focus:#9ccbef;--inverse-border:#3b3630;
--gauge-track:#3d3731;--gauge-fill:#6bb3ea;--gauge-tick:#625a50;--bar-track:#3d3731;
--shadow:0 12px 30px #0006;--shadow-toast:0 5px 25px #0003;
--saude:#5cc8c2;--saude-fill:#157a76;--exercicio:#c39bff;--exercicio-fill:#6b3fc4;                     /* FATOFORMA domains: Health teal · Exercise violet */
--ev-1:#f0625a;--ev-2:#f08c45;--ev-3:#e6c34a;--ev-4:#9bd46a;--ev-5:#46c585;
--marker:rgba(206,170,52,.42);--marker-edge:rgba(206,170,52,.16);--marker-duration:1s}                /* editorial highlighter (dark: muted, never neon) */                      /* Índice de Evidência bands: none → strong */
:root[data-theme="light"]{color-scheme:light;
--paper:#F6F8F7;--soft:#EDF3F0;--hover:#E7EFEB;--footer-bg:#EDF3F0;--input-bg:#fff;
--ink:#173247;--text:#33434C;--muted:#66737A;--faint:#6B777D;
--line:#DFE6E3;--line-strong:#C9D4D0;
--accent:#1f5f9e;--accent-fill:#1f5f9e;--on-accent:#fff;--focus:#1f5f9e;
--button-bg:#173247;--button-text:#fff;
--inverse-bg:#173247;--inverse-text:#F6F8F7;--inverse-muted:#bfc6bd;--inverse-line:#4a524c;--inverse-accent:#a9d0f0;--inverse-num:#caa992;--inverse-focus:#a9d0f0;--inverse-border:#1e2422;
--gauge-track:#d3d6ca;--gauge-fill:#1f5f9e;--gauge-tick:#aab1a4;--bar-track:#d8ddd2;
--shadow:0 12px 30px #17324714;
--saude:#0e6c68;--saude-fill:#0e6c68;--exercicio:#6232b8;--exercicio-fill:#6232b8;
--ev-1:#bf3128;--ev-2:#a9510f;--ev-3:#876a00;--ev-4:#3f7a17;--ev-5:#16804a;
--marker:rgba(255,210,50,.55);--marker-edge:rgba(255,210,50,.2)}

/* ---------- FATOFORMA product palette (v0.1). ONE light theme: the head script always applies data-theme="light";
   the dark block above is dormant legacy. Saúde = green/teal · Exercício = red. Neutral ink is the brand accent;
   the page's domain (app.js :root[data-domain]) takes over the accent: *-dark for text, *-primary for fills. ---------- */
:root,:root[data-theme="light"]{
--health-primary:#1D8F8B;--health-secondary:#5FB8AE;--health-soft:#E7F3F0;--health-light:#BFE3DB;--health-dark:#146A67;
--health-block:#17706C;                                    /* solid Health blocks with white text (AA with white) */
--exercise-primary:#DC6A56;--exercise-secondary:#EE9585;--exercise-soft:#FCEEEA;--exercise-dark:#A8402F;
--exercise-block:#BF4F3C;                                  /* solid red blocks/CTAs with white text */
--exercise-blue:#173247;--exercise-blue-soft:#EAF0F4;       /* Exercise support: structure, data, secondary actions */
--saude:var(--health-primary);--saude-fill:var(--health-primary);--exercicio:var(--exercise-primary);--exercicio-fill:var(--exercise-primary);
--accent:#173247;--accent-fill:#173247;--focus:#1D8F8B;
--evidence-low:#D84A4A;--evidence-limited:#E77C3C;--evidence-mixed:#E5B93F;--evidence-moderate:#78A85A;--evidence-strong:#2E9B68;   /* Índice de Evidência (semantic, independent of section colours) */
--ev-1:var(--evidence-low);--ev-2:var(--evidence-limited);--ev-3:var(--evidence-mixed);--ev-4:var(--evidence-moderate);--ev-5:var(--evidence-strong);--bar-gap:var(--paper);
--card-bg:#fff;--card-radius:20px;--card-shadow:0 1px 2px #1732470a,0 8px 24px #17324712;
/* v0.28 reference visual system (brand + surfaces). Components read these; nothing else hardcodes them. */
--brand-navy:#173247;--brand-teal:#1D8F8B;--brand-mint:#9DBCA8;--brand-sage:#DCEFE9;
--grad-health:linear-gradient(155deg,#1F837E 0%,#0F5856 100%);--grad-food:linear-gradient(155deg,#6A8A4B 0%,#46612F 100%);--food-block:#557339;--food-dark:#3F5A28;--food-soft:#EEF3E6;--grad-exercise:linear-gradient(155deg,#E0735F 0%,#BF4F3C 100%);
--grad-soft:linear-gradient(135deg,#EEF6F3 0%,#F6F8F7 100%);
--radius-lg:24px;--radius-md:18px;--radius-sm:12px;--radius-pill:999px;
--shadow-soft:0 1px 2px #1732470a,0 10px 30px #17324712;--shadow-lift:0 16px 36px #1732471f;
--art-hero:url(../art/hero-art.svg);--art-health:url(../art/card-leaves.svg);--art-exercise:url(../art/card-motion.svg)}
:root[data-domain="saude"]{--accent:var(--health-dark);--accent-fill:var(--health-block);--focus:var(--health-primary);--inverse-bg:var(--health-dark);--inverse-border:var(--health-dark);--inverse-accent:var(--health-light);--inverse-num:#fff}
:root[data-domain="exercicio"]{--accent:var(--exercise-dark);--accent-fill:var(--exercise-block);--focus:var(--exercise-primary);--inverse-bg:var(--exercise-blue);--inverse-border:var(--exercise-blue)}
:root[data-domain="alimentacao"]{--accent:var(--food-dark);--accent-fill:var(--food-block);--focus:var(--food-block);--inverse-bg:var(--food-dark);--inverse-border:var(--food-dark)}   /* Alimentação (v0.56): sage/olive pillar */

/* ---------- Evidence-status colour families (v0.1.14). Three strong families for the most visible statuses
   (established = muted green-teal, probable = amber, contested/disputed = rust) plus a neutral one. Each family has text,
   border and background, tuned per theme for AA contrast. Statuses are mapped to tones in data/taxonomy.js
   (evidenceStatusTone); the .status-badge component reads only these tokens. ---------- */
:root{
--status-established-text:#9ccdb2;--status-established-border:#4f8f71;--status-established-bg:#1c2a23;
--status-probable-text:#e3bf72;--status-probable-border:#a9853f;--status-probable-bg:#2c2416;
--status-contested-text:#f09a82;--status-contested-border:#b9573f;--status-contested-bg:#2f1d18;
--status-neutral-text:var(--ink);--status-neutral-border:var(--line-strong);--status-neutral-bg:transparent}
:root[data-theme="light"]{
--status-established-text:#245c43;--status-established-border:#5e9a7d;--status-established-bg:#e4efe8;
--status-probable-text:#6f4f0c;--status-probable-border:#b38c3a;--status-probable-bg:#f5ead0;
--status-contested-text:#9b2f1c;--status-contested-border:#c0654f;--status-contested-bg:#f6e0d9}

/* ---------- Spacing, layout, type, component metrics ---------- */
:root{
--s1:4px;--s2:8px;--s3:12px;--s4:16px;--s5:24px;--s6:32px;--s7:48px;                             /* spacing scale */
--gutter:32px;--shell-max:1440px;--header-h:60px;--control-h:34px;--control-radius:10px;--utility-h:36px;
--measure:680px;                                  /* reading column (articles, methodology, about) */
--toc-w:248px;--rail-w:250px;                     /* investigation navigation panel and "At a glance" rail */
--article-gap:40px;--article-header-gap:var(--s7);/* space between article columns / header columns */
--method-gap:56px;                                /* methodology/about/information columns */
--card-min:250px;--card-pad:var(--s3) var(--s4);  /* card grids (home, archive, related) */
--panel-pad:var(--s5);                            /* filled panels: argument box, verdict, discussion, callout */
--block-rule:1px solid var(--line-strong);        /* rule that separates long-form blocks instead of a box */
--read-section:64px;--read-block:32px;            /* long-form rhythm: between sections / between blocks */
--fs-h1:clamp(2.1rem,3.4vw,3.1rem);--fs-h2:clamp(1.45rem,2vw,1.85rem);--fs-card:1.3rem;--fs-meta:.75rem;
--fs-prose:1.0625rem;--lh-prose:1.75;
--serif:'Sora','Manrope',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;--sans:'Manrope',system-ui,-apple-system,'Segoe UI',Arial,sans-serif}

@media(max-width:1100px){:root{--gutter:20px}}
@media(max-width:1079px){:root{--header-h:54px;--read-section:48px;--read-block:28px;--article-gap:var(--s6);--article-header-gap:var(--s5)}}
@media(max-width:760px){:root{--control-h:32px}}
@media(max-width:650px){:root{--gutter:16px;--header-h:52px;--fs-card:1.2rem;--read-section:40px;--read-block:24px;--article-gap:var(--s5);--article-header-gap:var(--s4);--panel-pad:var(--s4);--lh-prose:1.7}}
