/* Scope: this case only (the Fennia B2B portal prototype). Nothing outside design repo/cases/fennia-b2b-portal/ uses this
   system unless Janne asks.

   The system's tokens, written as we go: each block is a decision, dated, with what it's for. The prototype loads this file
   after its own stylesheets (version 6's styles.css, version 7's soft.css), so a token here wins. The older tokens move in
   here when the work reaches them; until then they live where they are. */

:root {
  /* 14 October 2026, later: the cover cards (a wealth app's asset cards): the ring on the left, the illustration's square on the right */
  --cc-ring: 64px;
  --cc-art: 72px;
}

:root {
  /* 14 October 2026, the app shell (a clinic's secretary app: "copy the style exactly"). A slim white app bar, a narrow rail of
     icons under it, and the full menu as a drawer over the page */
  --appbar-h: 64px;
  --mini-w: 72px;
  --mini-btn: 48px;                      /* a rail item: a 48 square, the icon 24 in it */
  --r-mini: 12px;
  --mini-cur: var(--card);               /* the current page's square: light gray */
  --drawer-w: 288px;
  --nav-w: 248px;
  --field-bg: #F3F2EE;   /* form fields, after fin.ai's demo form (16 October 2026) */
  --field-line: #8C8A84;
  --dash: #ADADAD;   /* the dashed edge of a policy she doesn't have */
  --rule: #D3CEC6;   /* list rules, after Fin's open roles (16 October 2026): a visible warm gray, black on hover */   /* the side menu, always open (15 October 2026) */
  --shell-line: var(--line);             /* the hairlines under the app bar and beside the rail */
}
@media (min-width: 1024px) { :root { --page-top: 72px; } }   /* the reference's air between the bar and the page's title */

:root {
  /* 14 October 2026, the documents panel (a wealth app's vault): document cards at least 152 high, 3 across */
  --doc-card-h: 152px;
  --doc-min: 200px;
}

:root {
  /* 14 October 2026, the overview's top (a wealth app's home: "teal and the green, like them doing"). Teal joins Fennia's greens
     for the highlighted cards and the claims card's bar. Contrast: white on --teal-900 8.6:1; --ink on --teal-300 7.9:1; --ink on
     --hl-lime 10.9:1 */
  --teal-900: #004C07;   /* 16 October 2026, Janne: "dont use teal, not fennia color": the teal tokens now hold Fennia greens (DS primary/90, the light green, primary/10) */
  --teal-300: #8ADC94;
  --teal-50: #E6FAE7;   /* the page band on Your insurance and Claims (15 October 2026), after Collective Health */
  --hl-lime: #E7F3A4;
  --hl-h: 216px;                         /* a highlighted card's height */
  --panel-w: 340px;                      /* the side panel beside them */
  --band: var(--card);                   /* the light band behind the greeting */
}

:root {
  /* 14 October 2026, the risk assessment (Janne: "make the light gray bar darker"): the empty part of a progress bar, 1.4:1 on white
     and 1.3:1 on the gray card, so the bar reads as a bar before it fills */
  --track: #D9D9D9;
}

:root {
  /* 14 October 2026: the page takes the room the slim rail gave back (Janne: "so you have full space on the right") */
  --content-max: 1240px;
}

:root {
  /* 14 October 2026, the type scale (Janne: "You really don't need many sizes of font"). Six sizes, one job each, the same on every
     screen:
       page title (H1)                   32 / 40   Bold
       section title (H2)                24 / 32   Bold
       card title (H3)                   20 / 28   Bold
       base                              16 / 24
       explanations and prices           14 / 20
       pills (chips, tags, counts)       12 / 16
     The older names map onto them, so every component follows without being rewritten: display and title are the page title,
     hero and group the section title, section the card title, lead the base. 12 is new and only for pills; until now 14 was the
     floor */
  /* 16 October 2026: the scale follows Intercom's job pages (Greenhouse, Janne: "size of titles, font, etc. ... create the size
     of font tokens based on this"): page title 32/40 Regular, section title 24 Bold, body 16/24, paragraphs 16 apart */
  --fs-display: 32px;  --lh-display: 40px;
  --fs-title: 32px;    --lh-title: 40px;
  --fs-hero: 24px;     --lh-hero: 32px;
  --fs-group: 24px;    --lh-group: 32px;
  --fs-section: 20px;  --lh-section: 28px;
  --fs-lead: 16px;     --lh-lead: 24px;
  --fs-body: 16px;     --lh-body: 24px;   --lh-ui: 24px;
  --para-gap: 16px;    /* between paragraphs in running text */
  --fs-small: 14px;    --lh-small: 20px;
  --fs-xs: 14px;       --lh-xs: 20px;
}
html[data-base="15"] { --fs-body: 15px; --fs-lead: 15px; --lh-ui: 22px; }
/* Badge dots, from Fennia's Components library, "New badge" (Figma uMhPcB6a9u59KFEJGJrXCw, 19763:97659; 16 October 2026) */
:root { --dot-positive: #008A28; --dot-attention: #FF991F; --dot-info: #0052CC; --dot-error: #D93D27; --dot-promo: #FFC31F; --badge-line: #DDDDDD; }

/* Corners, the two the whole system uses (16 October 2026, Janne: buttons fully round; filters, tags, chips, counts, badges and
   segments 4px). Every component reads these; change them here and both prototypes follow */
:root { --r-button: 999px; --r-control: 4px; --r-card: 24px; --r-card-sm: 12px; }
:root { --hero-sub: #B8EABB; }   /* the hero's line under the title: Fennia light green on --green, 4.6:1 */

/* NUMBERS AND MONEY (16 October 2026, Janne). Euros are written the European way everywhere in this case:
   the sign after the number with a non-breaking space; a dot between thousands (piste); a comma before cents (pilkku).
   1.000.000 €   58,50 €   702 €   +3,00 € a month. The prototype's eur() in app/core.js does it; never write "€58.50". */
/* CLAIMS (16 October 2026, Janne): a claim is filed under a policy, never under one of its covers. No "File a claim" on a cover. */
:root { --hover-line: #6CC77A; }   /* the edge a hovered card or chip takes with the green wash (16 October 2026) */

/* ART TO TEXT (17 October 2026, Janne: "the text is a bit too close to the illustration ... create a proper style").
   An illustration always keeps this much room from its text, beside it or above it: 32 for 64 to 96 px art, 24 for
   smaller icons and art under 64. Use the tokens, never a one-off gap. */
:root { --gap-art: 32px; --gap-art-sm: 24px; }

/* THE TYPE SCALE, FIVE SIZES (17 October 2026, Janne: "You have too many fonts"; "your options for fonts were 12, 16, and then
   the header sizes"). 40 page title, 28 section title, 20 card title, 16 everything you read (body, explanations, prices, rows,
   buttons, hints), 12 tags, counts and badges. 14 is retired: what was 14 is now 16. No other size may render; system/type-scale.js
   holds every page to it while the older hard-coded sizes in components.css are rewritten onto these tokens. */
:root {
  --fs-display: 40px;  --lh-display: 44px;
  --fs-title: 40px;    --lh-title: 44px;
  --fs-hero: 28px;     --lh-hero: 32px;
  --fs-group: 28px;    --lh-group: 32px;
  --fs-section: 20px;  --lh-section: 24px;
  --fs-lead: 16px;     --lh-lead: 24px;
  --fs-body: 16px;     --lh-body: 24px;   --lh-ui: 24px;
  --fs-small: 16px;    --lh-small: 24px;
  --fs-xs: 14px;       --lh-xs: 20px;
}

/* SECTION GAP (17 October 2026, Janne: "at least 80 ... we want a lot of negative space ... it also groups things better").
   The space between one section and the next on every page. Inside a section, things stay closer (24 to 32), so the gap
   between sections is what groups them. */
:root { --gap-section: 80px; }

/* LINE LENGTH (17 October 2026, Janne: "the width of the text should never be more than 700 pixels. It should always go to the
   second row. That is an accessibility issue"). Running text (paragraphs, hints, notes, list items of prose) never runs wider
   than --measure; it wraps instead. 700 px at 16 px is about 80 characters, the WCAG 1.4.8 ceiling. Cards and rows can be wider;
   the text inside them still stops at 700. */
:root { --measure: 700px; }

/* BUTTON HEIGHT (system fixer, 17 October 2026): every button is a 44 px pill, the large ones too (soft.css had 52, styles.css 48) */
:root { --btn-h: 44px; --btn-h-lg: 44px; }
