/* =====================================================================
   The design tokens of the four applications (PBI #511): the one place where colours, radii, shadows and type faces
   are written as values (stylelint: color-no-hex everywhere else). Linked first by every application: the panel, Unit
   Control and the chat's dossier window bundle it (FccCssBundle), the Marketplace and the chat link it before
   css/site.css, and the public site writes it inline before site.css (PageStyles). The file lives in
   FCC.OperatorsControl.UI.Shared/assets/css and is served as css/tokens.css.

   Sections: the console (--ag-*), the dossier paper, the type faces, the control borders (--line-control, >= 3:1),
   the aliases of the geometry editor (--ops-*), Unit Control's system (--uc-*), the language of the family (--bg,
   --text, --card-*…: under html.fcc-site, the public site, the Marketplace and the chat, and html.fcc-uc, Unit Control;
   PBI #635), and the chat's own colours (--chat-*).

   Layers, weakest first for normal declarations:
     forced  only !important declarations: the few that must beat the framework's !important utilities
             (.muted, .border, .mb-3...) or another stylesheet's !important. For important declarations
             the FIRST layer wins, so they compare among themselves by specificity and order, as before.
     vendor  Bootstrap (imported by vendor.css, linked before this file) and the Blazor template defaults (app.css).
     base    the design tokens (this file).
     shared  the shared look: agency.css, geometry-editor.css, unit-map.css, relations.css, components.css.
     app     what one application adds on top: command.css (Unit Control). It wins over shared and vendor
             whatever their specificity, so it needs no !important for that.
   Unlayered rules beat every layer. Leaflet's own stylesheets are injected unlayered by the map scripts, so the
   few rules that restyle Leaflet's elements (selectors with .leaflet-*) stay unlayered at the end of their file.
   Inline style attributes still beat every normal declaration.
   Our own stylesheets are never @imported from each other: their URLs carry a content fingerprint.
   ===================================================================== */
@layer forced, vendor, base, shared, app;

@layer base {
    :root {
        /* Height of the top bar of the narrow layout (.entity-topbar, below 1100 px): what sticks under it uses it too. */
        --ag-topbar-h:57px;
        /* Layers (z-index) of what floats over the page in the four applications, lowest first (PBI #684). The maps'
           own pieces (Leaflet, MapLibre, "Create here", the floating search) use 1000–1002, and an application's top
           bar 1100 at most. The windows of FccDialog are native <dialog> elements in the top layer, over all of these.
           Unit Control's tab bar (1200), drawer (1290–1300) and toasts (1400) keep this scale. */
        --layer-chat:1100;        /* the floating chat (ChatDock), closed or as a panel: over the maps */
        --layer-bar:1200;         /* a bottom bar of the phone (Unit Control's tabs) */
        --layer-chat-open:1250;   /* the chat open as a sheet on the phone: over the bottom bar (#629) */
        --layer-drawer:1300;      /* menus and drawers, over the chat; their backdrop just under them */
        --layer-window:1350;      /* a window that is not a <dialog>: the zoomed photos, the geometry editor */
        --layer-toast:1400;       /* notices and «Undo», over everything else */
        /* Console (dark) */
        --ag-bg:#04070a;
        --ag-panel:#0a0f15;
        --ag-panel-2:#0e151d;
        --ag-panel-3:#121b25;
        --ag-line:#1b2632;
        --ag-line-2:#2a3a4a;
        --ag-text:#d3dae1;
        --ag-text-2:#a9b5c0;
        --ag-muted:#9aa8b5;       /* secondary text on the dark panels: >= 7:1 (was #6e7e8d, ~4.2:1 on the cards) */
        --ag-gold:#c9a24a;
        --ag-gold-2:#e3c06b;
        --ag-gold-dim:rgba(201,162,74,.14);
        --ag-gold-ink-warm:#1a1405; /* text on the filled gold button of the chat proposal card, PBI #1104 */
        --ag-gold-ink:#0b0f14;    /* text on the gold: 8:1 on --ag-gold, 11:1 on --ag-gold-2 */
        --ag-red:#c8323a;
        --ag-red-2:#e5484f;
        --ag-green:#3fbf7f;
        --ag-green-2:#5fd08a;      /* green text on the dark panels (accepted proposal), PBI #1104 */
        --ag-cyan:#67c7d9;
        --ag-banner:#7d1a1f;

        /* Dossier (manila paper) */
        --paper:#e9e0c8;
        --paper-2:#dccfae;
        --paper-edge:#b9a77b;
        --paper-shadow:#5d4f31;
        --paper-head:#d8c79c;     /* the head band of a paper window (FccDialog, PBI #601) */
        --paper-head-2:#cfbc8c;
        --ink:#1f1b14;
        --ink-2:#463f30;
        --ink-muted:#5a503f;      /* secondary text on the manila paper: >= 5:1 (was #7a6e55, ~3.6:1) */
        --stamp:#a8261f;

        /* Control borders (PBI #511, WCAG 1.4.11): the border that identifies a field, a select, a chip, a ghost button
           or the language selector, >= 3:1 on what is behind it. Cards and dividers keep --ag-line / --ag-line-2.
           --line-control (--line-control-dark): 3.5:1 on --ag-bg, 3.2:1 on --ag-panel-2, 3.0:1 on --ag-panel-3.
           --line-control-paper: 3.8:1 on --paper, 4.4:1 on --paper-field. */
        --line-control-dark:#56687a;
        --line-control:var(--line-control-dark);
        --line-control-paper:#7d6e4b;

        /* Surface tokens (PBI #593): what a component writes for its text and its control borders, whichever surface it
           sits on. Here, their value on the console; the paper surfaces below reassign them, so the same component reads
           on both. Components never use the single-surface tokens (--ag-text*, --ag-muted, --ink*, --line-control*) for
           color or border-color. Ratios on --ag-panel (#0a0f15) and on --paper (#e9e0c8). */
        --on-surface:var(--ag-text);           /* 13.6:1 */
        --on-surface-title:var(--ag-title);    /* titles and names, a step brighter: 17:1 (PBI #620) */
        --on-surface-2:var(--ag-text-2);       /* 9.5:1 */
        --on-surface-muted:var(--ag-muted);    /* 7.9:1 */
        --accent-text:var(--ag-gold-2);        /* 11:1 */
        --link:var(--ag-gold-2);
        --danger-text:var(--uc-red-2);         /* 6:1 */
        --ok-text:var(--uc-green);
        --control-border:var(--line-control-dark); /* 3.5:1 */
        --surface:var(--ag-panel);
        --surface-raised:var(--ag-panel-2);
        /* Buttons (fcc-ui.css, PBI #596): the filled variants, by surface. */
        --btn-primary-bg:var(--ag-gold);
        --btn-primary-hover:var(--ag-gold-2);
        --btn-primary-text:var(--ag-gold-ink);
        --btn-danger-bg:var(--uc-red);
        --btn-danger-hover:var(--uc-red-2);
        --btn-danger-text:var(--uc-red-text);
        --btn-disabled-bg:var(--ag-panel-3);
        /* Fields (fcc-ui.css, PBI #599): the fill of an input, a select, a textarea or a check, the ring of the focus
           (PBI #518: amber on the console, the red stamp on paper) and the marks drawn as images, whose colour a
           data URI cannot take from a token (arrow ~9:1 on the field, the check on its filled box, the knob of a switch). */
        --surface-field:var(--ag-panel-2);
        --focus-ring:var(--uc-amber);
        --field-arrow:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23b3c1ce' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
        --field-check:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230b0f14' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
        --field-radio:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%230b0f14'/%3e%3c/svg%3e");

        /* Type */
        --ag-display:"Barlow Condensed","Oswald","Arial Narrow",sans-serif;
        --ag-mono:"IBM Plex Mono",Consolas,"Cascadia Mono","Courier New",monospace;
        --ag-type:"Special Elite","Courier Prime","Courier New",monospace;
        /* The title of a record (the dossier cover, .dossier-title h2): the typewriter in every application. */
        --ag-type-record:"Special Elite","Courier Prime","Courier New",monospace;
        /* Long texts (letters, notes, descriptions): Special Elite only in the titles of a record (PBI #512). */
        --ag-sans:"IBM Plex Sans",system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;

        /* Aliases consumed by the geometry editor (geometry-editor.css). */
        --ops-bg:var(--ag-bg);
        --ops-panel:var(--ag-panel);
        --ops-panel-2:var(--ag-panel-2);
        --ops-line:var(--ag-line);
        --ops-line-bright:var(--ag-line-2);
        --ops-text:var(--ag-text);
        --ops-muted:var(--ag-muted);
        --ops-cyan:var(--ag-gold-2);
        --ops-cyan-dim:var(--ag-gold);
        --ops-green:var(--ag-green);
        --ops-amber:var(--ag-gold-2);
        --ops-red:var(--ag-red-2);

        /* Unit Control design system (command.css). */
        /* Containers: one radius, one border width, one shadow per surface, one glow for what is selected. Unit Control
           takes the card radius of the public family (6 px, :root.fcc-uc below, PBI #639); the other radii are 0 (strips),
           --radius-pill (chips, badges, bars, switches) and --radius-round (avatars, dots). */
        --uc-radius:3px;
        --radius-pill:999px;
        --radius-round:50%;
        --ec-radius-sm:8px;
        --ec-radius-md:12px;
        --ec-radius-lg:16px;
        --uc-border:1px;
        --uc-shadow-dark:0 1px 2px rgba(0,0,0,.35), 0 8px 22px rgba(0,0,0,.22);
        --uc-shadow-paper:0 1px 1px rgba(93,79,49,.22), 0 6px 16px rgba(93,79,49,.14);

        /* Labels: never thinner than medium, never below 11 px, with real contrast on both surfaces. */
        --uc-label-size:var(--fs-stamp);
        --uc-label-weight:600;
        --uc-label-tracking:.1em;
        --uc-label-dark:#b3c1ce;   /* ~9:1 on the dark panels */
        --uc-label-paper:#463d2c;  /* ~9:1 on the manila paper */

        /* States: amber = active selection, green = nominal, grey = vacant or inactive, red = alert. The bright inks are
           for the dark panels, the *-paper ones for paper; the administration panel uses them too (status tags, links). */
        --uc-amber:#e8b040;
        --uc-amber-2:#f4c862;
        --uc-amber-bg:rgba(232,176,64,.16);
        --uc-amber-paper:#6e4a00;  /* «provisional», «about to expire» on paper: 6:1 */
        --uc-glow:0 0 0 2px var(--uc-amber), 0 0 24px rgba(232,176,64,.45);
        --uc-green:#3fbf7f;
        --uc-green-paper:#23683f;
        --uc-green-bg:rgba(63,191,127,.14);
        --uc-grey:#97a3ae;
        --uc-grey-paper:#5f5747;
        --uc-grey-bg:rgba(151,163,174,.14);
        --uc-red:#ef5a60;
        --uc-red-paper:#9c231d;
        --uc-red-badge:#b3262d;    /* background of the counters with white text (bell, chat): 6.5:1 */
        --uc-red-bg:rgba(200,50,58,.12);
        --uc-red-text:#140405;     /* text on the filled red button */
        /* Fields: the dark field once focused, the light field of the sign-in cards. */
        --ag-field-focus:#070b10;
        --paper-field:#f6f0de;

        /* Main call to action: filled with the system accent. */
        --uc-cta:#c9a24a;
        --uc-cta-hover:#e3c06b;
        --uc-cta-border:#7c5d17;
        --uc-cta-text:#171004;

        /* The rest of Unit Control's tones (PBI #532): its pages wrote some 470 colours as hex (a palette of the recruitment
           pages, --rx-*, the Chakra and Tailwind tones of the events, near copies of the console). Each one went to the
           nearest token above, or to one of these. */
        --ag-title:#eef2f5;        /* titles and names on the dark panels, a step brighter than --ag-text */
        --ag-violet-chat:#7c5cd6;  /* the package square of the listing strip of the chat, PBI #1104 */
        --ag-white:#fff;           /* the QR codes and the text on the filled state badges */
        --ag-black:#000;           /* the shadows and the dark veils (with alpha, PBI #620) */
        --paper-light:#fffdf5;     /* the light veils over the manila paper (with alpha, PBI #620) */
        --uc-red-2:#f0767b;        /* red text on the dark panels (refused, cancelled, critical): 6:1; hover of the red button */
        --uc-violet:#b79cff;       /* shortlisted candidates, private events */
        --uc-cyan-paper:#235a65;   /* information on paper (chips, the intelligence post) */
        --uc-friendly:#80e0ff;     /* the frame of the echelon symbol: the «friendly» blue of APP-6 */
        --uc-live:#2f8cff;         /* the dot of a live position on the map (chat, PBI #253) */
        --ag-rank:#cfd6dd;         /* the rank insignia (RankInsignia): troops; NCOs, officers and generals use --ag-gold-2 */
        --ag-rank-aspirant:#9aa7b4; /* the rank insignia of an aspirant */
        --uc-amber-line:#b07d1f;   /* amber borders and bars on paper (pending, weak password, unsaved changes; PBI #620) */
        --uc-olive:#5f8a3a;        /* the third step of the password meter, between amber and green (PBI #620) */
        /* The tones of the dossier's timeline and of its strip of periods (one per unit served in). */
        --uc-copper:#e08a52;
        --uc-steel:#5fa8d3;
        --uc-teal:#4fb3a9;
        --dos-period-0:#6b5a2e;
        --dos-period-1:#2d6f7c;
        --dos-period-2:#7a3b2e;
        --dos-period-3:#4b6b3a;
        --dos-period-4:#5a4a78;

        /* Type scale (PBI #512): nothing below the stamp; what is pressed (links, text buttons) at least the action size.
           Stamps: seals and section labels, the only uppercase text. In rem so that the browser zoom still scales them. */
        --fs-stamp:.6875rem;   /* 11 px */
        --fs-label:.75rem;     /* 12 px */
        --fs-meta:.8125rem;    /* 13 px: the second line of a row in Unit Control (echelon, place, rank; PBI #594) */
        --fs-action:.875rem;   /* 14 px */
        --fs-body:.9375rem;    /* 15 px */
    }

    /* Paper surfaces (PBI #593): a new surface takes the class .paper or data-surface="paper"; the classes after them
       are the existing paper surfaces (cards, dossier, record, licence, the unit and profile modals). What is drawn
       inside them inherits the paper values of the surface tokens. Only in the administration panel and in the
       dossier window of the chat: Unit Control has no paper (PBI #642) and its surfaces keep the console values of
       :root. The guard is in :where(), so each selector keeps its specificity against the console islands below. */
    :where(:root:not(.fcc-uc)) .paper, :where(:root:not(.fcc-uc)) [data-surface="paper"],
    :where(:root:not(.fcc-uc)) .ux-paper, :where(:root:not(.fcc-uc)) .entity-details-panel:not(.cmd-graph-side),
    :where(:root:not(.fcc-uc)) .umap-modal, :where(:root:not(.fcc-uc)) .rec-detail, :where(:root:not(.fcc-uc)) .dos-sheet,
    :where(:root:not(.fcc-uc)) .dos-panel, :where(:root:not(.fcc-uc)) .profile-card,
    :where(:root:not(.fcc-uc)) .paper-modal, :where(:root:not(.fcc-uc)) .profile-page,
    :where(:root:not(.fcc-uc)) .access-form, html:where(:not(.fcc-uc)):not(.fcc-site) .auth-card,
    :where(:root:not(.fcc-uc)) .registrations, :where(:root:not(.fcc-uc)) .confirm-dialog,
    :where(:root:not(.fcc-uc)) .terrev-letter, :where(:root:not(.fcc-uc)) .op360-head, :where(:root:not(.fcc-uc)) .ev-form,
    :where(:root:not(.fcc-uc)) .ev-danger, :where(:root:not(.fcc-uc)) .asp-tray, :where(:root:not(.fcc-uc)) .asp-notice,
    :where(:root:not(.fcc-uc)) .asp-views button.is-active b, :where(:root:not(.fcc-uc)) .rel-results,
    :where(:root:not(.fcc-uc)) .addr-results, :where(:root:not(.fcc-uc)) .locp-results,
    :where(:root:not(.fcc-uc)) .ut-panel:fullscreen, :where(:root:not(.fcc-uc)) .ut-panel.is-fullscreen,
    :where(:root:not(.fcc-uc)) .dos-rank, :where(:root:not(.fcc-uc)) .dos-dot, :where(:root:not(.fcc-uc)) .tag-chip,
    :where(:root:not(.fcc-uc)) .tag-suggest button:hover, :where(:root:not(.fcc-uc)) .ux-split-back:not(.rx-back),
    :where(:root:not(.fcc-uc)) .cmd-ter-doc, :where(:root:not(.fcc-uc)) .fcc-dialog.is-paper,
    :where(:root:not(.fcc-uc)) .dos-event {
        --on-surface:var(--ink);               /* >= 13:1 */
        --on-surface-title:var(--ink);
        --on-surface-2:var(--ink-2);           /* 8.6:1 */
        --on-surface-muted:var(--ink-muted);   /* 6:1 (7.3:1 on --paper-field) */
        --accent-text:var(--uc-amber-paper);   /* 6:1 */
        --link:var(--uc-amber-paper);
        --danger-text:var(--uc-red-paper);     /* 5.9:1 */
        --ok-text:var(--uc-green-paper);
        --control-border:var(--line-control-paper); /* 3.8:1 */
        --surface:var(--paper);
        --surface-raised:var(--paper-field);
        --btn-primary-bg:var(--ink);           /* paper on ink: 13:1, on --ink-2 7.9:1 */
        --btn-primary-hover:var(--ink-2);
        --btn-primary-text:var(--paper);
        --btn-danger-bg:var(--uc-red-paper);   /* paper on it: 6:1, on --stamp 5.4:1 */
        --btn-danger-hover:var(--stamp);
        --btn-danger-text:var(--paper);
        --btn-disabled-bg:var(--paper-2);
        --surface-field:var(--paper-field);
        --focus-ring:var(--stamp);
        --field-arrow:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23463f30' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
        --field-check:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23e9e0c8' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
        --field-radio:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23e9e0c8'/%3e%3c/svg%3e");
    }
    /* Console islands inside a paper surface (a dark chip, a dark side panel, the dark side cards of the dossier window,
       the dark head of the profile card): back to the console values. */
    .console, [data-surface="console"], .cmd-graph-side, .dos-modal .dos-side-card, .profile-card-head, .locp-toolbar,
    .fcc-dialog.is-console, .dos-panel.is-timeline, .ux-map-note, .ux-map-sheet-tabs button, .ux-map-layers-toggle, .cmd-map-world-note {
        --on-surface:var(--ag-text);
        --on-surface-title:var(--ag-title);
        --on-surface-2:var(--ag-text-2);
        --on-surface-muted:var(--ag-muted);
        --accent-text:var(--ag-gold-2);
        --link:var(--ag-gold-2);
        --danger-text:var(--uc-red-2);
        --ok-text:var(--uc-green);
        --control-border:var(--line-control-dark);
        --surface:var(--ag-panel);
        --surface-raised:var(--ag-panel-2);
        --btn-primary-bg:var(--ag-gold);
        --btn-primary-hover:var(--ag-gold-2);
        --btn-primary-text:var(--ag-gold-ink);
        --btn-danger-bg:var(--uc-red);
        --btn-danger-hover:var(--uc-red-2);
        --btn-danger-text:var(--uc-red-text);
        --btn-disabled-bg:var(--ag-panel-3);
        /* The fields and the focus ring too (a search box in a dark toolbar over paper, e.g. LocationPicker). */
        --surface-field:var(--ag-panel-2);
        --focus-ring:var(--uc-amber);
        --field-arrow:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23b3c1ce' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
        --field-check:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230b0f14' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
        --field-radio:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%230b0f14'/%3e%3c/svg%3e");
    }

    /* The language of the family (PBI #635, epic #630): the console's colours under shorter names and one semantic
       layer, the same for the public family (<html class="fcc-site">: the public site, the Marketplace and the chat)
       and for Unit Control (<html class="fcc-uc">). Not in the panel: it reads some of these names with its own
       fallback (var(--muted, …)). What only the public sites need (their lighter secondary texts, type face, header)
       is in the next rule; Unit Control's own values of those, in the one after it. */
    :root.fcc-site, :root.fcc-uc {
        --bg:var(--ag-bg);
        --panel:var(--ag-panel);
        --panel-2:var(--ag-panel-2);
        --panel-3:var(--ag-panel-3);
        --line:var(--ag-line);
        --line-2:var(--ag-line-2);
        --text:var(--ag-text);
        --gold:var(--ag-gold);
        --gold-2:var(--ag-gold-2);
        --gold-dim:var(--ag-gold-dim);
        --red:var(--ag-red);
        --green:var(--ag-green);
        --display:var(--ag-display);
        --mono:var(--ag-mono);
        --radius:var(--uc-radius);
        --gutter:20px;
        /* The semantic layer (study of the graphic language of UC, area A): a card, its line, radius and padding (12 px
           on the dense screens). --card-radius is UC's --uc-radius (PBI #639). The type sizes are
           the --fs-* of :root, and the scale of buttons and fields is in fcc-ui.css (:root.fcc-site / :root.fcc-uc). */
        --card-bg:var(--panel);
        --card-line:var(--line);
        --card-radius:6px;
        --card-pad:16px;
        --card-pad-dense:12px;
        /* Motion (PBI #636): one fast and one normal duration, and the longer one of the attention animations (the
           bell, the pulse of a new badge, the highlight of a target). prefers-reduced-motion: below. */
        --dur-fast:.15s;
        --dur:.2s;
        --dur-attn:2.4s;
    }
    /* Reduced motion: no animations and transitions as short as possible, the final state stays. */
    @media (prefers-reduced-motion: reduce) {
        :root.fcc-site, :root.fcc-uc { --dur-fast:.01ms; --dur:.01ms; --dur-attn:.01ms; }
        :root.fcc-uc :is(*, ::before, ::after) { animation-iteration-count:1 !important; scroll-behavior:auto !important; }
    }
    /* Only the public sites: lighter secondary texts for reading on the web, their type face and header. */
    :root.fcc-site {
        --text-2:var(--site-text-2);
        --muted:var(--site-muted);
        /* .muted and the secondary texts of the common components (fcc-ui.css) keep the site's tone (PBI #620). */
        --on-surface-muted:var(--site-muted);
        --sans:"IBM Plex Sans",system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
        --header:68px;
        color-scheme:dark;
    }
    /* Unit Control: the secondary texts of the console, and the type at the size of the web (PBI #640, study of the
       graphic language of UC, area C): reading text at 15 px (--fs-body), labels and second lines at 14 px, stamps and
       kickers at 12 px, the only uppercase spaced text. Every screen, the staffing, the chain of command and the map
       included: no compact variant. The panel keeps the scale of :root. */
    :root.fcc-uc {
        --text-2:var(--ag-text-2);
        --muted:var(--ag-muted);
        /* One card (PBI #639): every container, field and button of UC with the radius of the public family. */
        --uc-radius:var(--card-radius);
        --fs-stamp:.75rem;     /* 12 px */
        --fs-label:.875rem;    /* 14 px */
        --fs-meta:.875rem;     /* 14 px */
        --fs-action:.875rem;   /* 14 px */
        --fs-body:.9375rem;    /* 15 px */
        --uc-label-size:var(--fs-label);
        --uc-label-tracking:normal;
        /* Special Elite only in the titles of the record (decision 3 of the user): the rest of --ag-type is Sans. */
        --ag-type:var(--ag-sans);
        /* The fixed sizes of the stylesheets shared with the panel (agency.css, components.css, relations.css…) read
           these with their old value as the fallback: var(--uc-fs-label, .78rem). Only Unit Control defines them. */
        --uc-fs-label:var(--fs-label);
        --uc-fs-meta:var(--fs-meta);
        --uc-fs-body:var(--fs-body);
        /* No paper (PBI #642): the paper surfaces above do not apply in UC, and what its stylesheets and the ones it
           shares with the panel still paint with the paper tones takes the console tone in its place. The inverted
           pairs (ink background, paper text: the active step, the selected view) stay inverted, light on dark. */
        --paper:var(--ag-panel);
        --paper-2:var(--ag-panel-2);
        --paper-field:var(--ag-panel-2);
        --paper-head:var(--ag-panel-2);
        --paper-head-2:var(--ag-panel-2);
        --paper-edge:var(--ag-line);
        --paper-shadow:var(--ag-black);
        --paper-light:var(--ag-panel-3);
        --ink:var(--ag-text);              /* 12:1 on --ag-panel */
        --ink-2:var(--ag-text-2);
        --ink-muted:var(--ag-muted);
        --stamp:var(--uc-red-2);           /* the seals and the red marks: 6:1 on --ag-panel (#a8261f was 2.9:1) */
        --line-control-paper:var(--line-control-dark);
        --uc-shadow-paper:none;
        --uc-label-paper:var(--uc-label-dark);
        --uc-amber-paper:var(--uc-amber);
        --uc-green-paper:var(--uc-green);
        --uc-red-paper:var(--uc-red-2);
        --uc-grey-paper:var(--uc-grey);
        --uc-cyan-paper:var(--ag-cyan);
        color-scheme:dark;
    }
    :root.fcc-uc body { font-size:var(--fs-body); }
    :root {
        /* The secondary texts of the public family. */
        --site-text-2:#c2ccd5;
        --site-muted:#a9b6c2;
    }

    /* Event Control's skin (PBI #1146, epic #1144, docs/arquitectura/event-control-estilo.md): <html class="fcc-site
       fcc-events">. Written after the public family's rules (same specificity, later wins). It reassigns the console's
       colours (--ag-*) as well as the semantic names, so every component that reads either follows; Unit Control, the
       Marketplace, the chat and the public site do not carry the class and keep theirs. Contrast on --surface (#14171C):
       --text 16:1, --muted 6.9:1, --text-dim 5.8:1 (D6: the #6B7280 of the proposal gives 3.7:1 and is only for borders
       and decorative icons, --faint), --gold 10.7:1; black on --gold 13:1. */
    :root.fcc-events {
        --ag-bg:#0d0f12;
        --ag-panel:#14171c;
        --ag-panel-2:#181c23;
        --ag-panel-3:#1a1e25;
        --ag-line:#232730;
        --ag-line-2:#323844;
        --ag-text:#f3f4f6;
        --ag-text-2:#c9ced6;
        --ag-title:#f3f4f6;
        --ag-muted:#9ca3af;
        --ag-gold:#f3c64f;
        --ag-gold-2:#d9a726;
        --ag-gold-dim:rgba(243,198,79,.14);
        --ag-gold-ink:#0d0f12;
        --ag-sans:"Inter",system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
        --ag-mono:"JetBrains Mono",Consolas,"Cascadia Mono","Courier New",monospace;
        --site-text-2:var(--ag-text-2);
        --site-muted:var(--ag-muted);

        --bg:var(--ag-bg);
        --panel:var(--ag-panel);
        --surface:var(--ag-panel);
        --panel-2:var(--ag-panel-2);
        --surface-raised:var(--ag-panel-2);
        --surface-field:var(--ag-panel-2);
        --panel-3:var(--ag-panel-3);
        --hover:var(--ag-panel-3);
        --line:var(--ag-line);
        --line-2:var(--ag-line-2);
        --text:var(--ag-text);
        --text-2:var(--ag-text-2);
        --muted:var(--ag-muted);
        --text-dim:#8b93a1;
        --faint:#6b7280;
        --gold:var(--ag-gold);
        --gold-2:var(--ag-gold-2);
        --accent-text:var(--ag-gold);
        --link:var(--ag-gold);
        --focus-ring:var(--ag-gold);
        --sans:var(--ag-sans);
        --mono:var(--ag-mono);
        --card-bg:var(--panel);
        --card-line:var(--line);
        --card-radius:16px;
        --uc-radius:8px;
        --radius:8px;
        --radius-md:12px;
        --radius-lg:16px;
        --tactical-grid:rgba(255,255,255,.02);
    }

    /* The chat's own colours (FCC.OperatorsControl.Chat.Client/wwwroot/chat.css), on its elements, which may be drawn
       outside .chat-root (the sheet). A host may change them on its own elements. */
    .chat-root, .chat-conversations, .chat-tabs, .chat-messages, .chat-composer, .chat-bubble, .chat-avatar, .chat-text, .chat-sheet-backdrop, .chat-connection, .chat-group-new {
        /* The console's colours (PBI #542, maqueta M5): no blues; the own bubble olive, links and read marks gold. */
        --chat-bg:var(--ag-bg);
        --chat-surface:var(--ag-panel);
        --chat-surface-2:var(--ag-panel-2);
        --chat-text:var(--ag-text);
        --chat-muted:var(--ag-muted);
        --chat-line:var(--ag-line-2);
        --chat-mine:#2b3d2c;
        --chat-mine-text:#eaf3e6;
        --chat-group:#3a4a2a;       /* the avatar of a group without a photo */
        --chat-theirs:var(--chat-surface-2);
        --chat-accent:var(--uc-amber);
        --chat-read:var(--ag-gold-2);
        --chat-link:var(--ag-gold-2);
        /* The names of the authors in a group (PBI #619), on --chat-theirs: 10.5, 7.8, 6.9, 8.1, 7.3 and 9.4:1. */
        --chat-author-0:var(--ag-gold-2);
        --chat-author-1:var(--uc-green);
        --chat-author-2:var(--uc-copper);
        --chat-author-3:var(--uc-violet);
        --chat-author-4:var(--uc-teal);
        --chat-author-5:var(--ag-cyan);
    }
}
