/* tokens.css -- the design system, as the only place it is written down.

   Chris, 26 Aug: "today is the day where we standardize the design." The rule
   that came out of that day is one component per idea, joined rather than
   restated: a new picker joins a selector list, it does not get a copy of the
   declarations. This file is the other half of it. A colour, a radius or a
   measurement that appears in frame.css as a literal is a second copy of a
   decision, and two copies that agree today are two copies that drift.

   WHAT IS A TOKEN AND WHAT IS NOT. A token is a decision that more than one
   component asks about. A number that exactly one rule uses belongs in that
   rule -- promoting it here would suggest a shared meaning it does not have,
   and the next reader would go looking for the other caller.
*/

:root {
    /* ---- ink -------------------------------------------------------
       Five values, and there is deliberately no sixth. The accent is one
       colour: the active pill, a hover border, the Add button and any primary
       action are all the same blue, because a second blue reads as a mistake
       rather than as emphasis. */
    --cs-ink:        #0f172a;   /* headings, layer names, card titles */
    --cs-muted:      #64748b;   /* captions, section labels, secondary text */
    --cs-accent:     #2563eb;   /* the ONLY accent */
    --cs-line:       #e2e8f0;   /* card borders */
    --cs-hairline:   #eef1f5;   /* panel edges, dividers */
    --cs-track:      #f1f5f9;   /* segmented control track */
    --cs-blueprint:  #e9eef5;   /* the one ground every Add-panel drawing sits on */
    --cs-white:      #ffffff;

    /* THE ONE DESTRUCTIVE COLOUR, and it is not a second accent -- it says
       "this removes something" and appears nowhere else. Added when Remove
       arrived in the inspector: a delete that looks identical to every other
       button is the control a customer presses by accident. */
    --cs-danger:     #b91c1c;

    /* ---- edges ----------------------------------------------------- */
    --cs-r-card:     14px;
    --cs-r-well:     10px;
    --cs-r-menu:     16px;
    --cs-border:     1.5px;     /* CARDS ARE 1.5px. Chromium floors a fractional
                                   border-width to a whole pixel in the used
                                   value and WebKit does not -- and WebKit is
                                   what the customers are on. So a computed-value
                                   test cannot tell 1.5 from 1 here, and the
                                   claim about this number has to be asked of the
                                   declaration rather than of a render. */

    /* ---- type ------------------------------------------------------
       The stack after Manrope is not decoration: font-display is swap, so these
       are the metrics the first paint actually uses. Anything measured before
       document.fonts.ready is measured in one of these. */
    --cs-face: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* ---- the studio surround ---------------------------------------
       Shipped 28 Aug, and it knowingly reverses the 16 Aug decision that the
       surround must be uniform and neutral. Both arguments were true and are
       overruled rather than answered: a value that changes across the screen
       makes the same case look different depending where it sits, and chroma in
       a viewing surround biases the colour a customer thinks they are choosing.
       Chris had the arithmetic in front of him and chose it. If a printed colour
       is ever judged wrong against this surround, this paragraph is the note
       that says why. No dots. */
    --cs-surround: radial-gradient(circle at 62% 45%,
                                   #ffffff 0%,
                                   #f1f5f9 52%,
                                   #e2e8f0 100%);
}

/* box-sizing IS THE PAGE'S, NOT A FIXTURE'S.

   The old stylesheet had no global box-sizing, and a fixture that helpfully
   added one turned a granted 429 into 427 of content -- a two-pixel error that
   came from the test rather than the page. The fix is not "fixtures must not
   have a reset". It is that the page states its own box model, here, and every
   fixture loads this file rather than approximating it. */
*, *::before, *::after { box-sizing: border-box; }

/* hidden MUST WIN, AND THIS IS WHY IT CARRIES !important.
 *
 * Found by the picker suite on 29 Aug, live in this tree and never deployed:
 * mountAddMenu closes the menu by setting menu.hidden = true, and the menu
 * stayed on screen. #cs-addmenu { display: flex } is an ID selector at (1,0,0);
 * the browser's own [hidden] { display: none } is (0,1,0). So the attribute was
 * set, correct, and INERT -- out-specified, which is on this project's own list
 * of the ways that happens, and invisible to t-addmenu.js because that suite is
 * node-only and loads no stylesheet at all.
 *
 * The narrow fix is #cs-addmenu[hidden]. It is the wrong one: every component
 * that gets an id and a display rule inherits the same trap, silently, and the
 * symptom is a panel that will not close while every test goes on passing.
 *
 * !important is normally a smell because it is a fight with an opponent. There
 * is no opponent here: this engine renders its own document and every
 * stylesheet that applies is in this directory. So this is not out-shouting
 * anybody -- it is the page stating a rule about itself, the same reasoning as
 * the box-sizing line above. */
[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--cs-white);
    color: var(--cs-ink);
    font-family: var(--cs-face);
    -webkit-text-size-adjust: 100%;
}
