/* __ the theme ____________________________________________________________________________________________
   The one palette every rendering of the desk wears: the app's tabs, every artifact page the engine serves,
   every mock-up, and the terminal through the escapes CliSetting reads off this very file. A rendering
   names a token from here; no rendering names a colour.

   Colour on the desk is a status. Green, amber and red mean it holds, it waits on somebody, and it is over
   or has failed, and each is worn by a glyph, a pill or a bar and never by a word. The accent says what is
   being read or run right now and what the pointer is over. A tier's hue is worn by a tier mark and by
   nothing else, and no tier wears a status colour. A progress hue says which source writes a record or that
   a job is a draft, and is worn by that mark alone. Everything else is ink.

   The two faces every rendering is set in, IBM Plex Sans and IBM Plex Mono (OFL, vendor/plex/LICENSE.txt),
   served off this app's own vendor folder so no page reaches an outside host for them; the stacks under
   --sans and --mono fall back to the system's faces where a file is not yet loaded. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
             src: url("vendor/plex/IBMPlexSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap;
             src: url("vendor/plex/IBMPlexSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
             src: url("vendor/plex/IBMPlexSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap;
             src: url("vendor/plex/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap;
             src: url("vendor/plex/IBMPlexMono-Medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap;
             src: url("vendor/plex/IBMPlexMono-SemiBold.woff2") format("woff2"); }
:root {
  color-scheme: dark;
  /* surfaces */
  --eln-ground: #0f141b;         /* the page */
  --eln-panel: #161c25;          /* a card, a table, a band */
  --eln-raised: #1c2430;         /* a thing lifted off a panel: a head row, a chip, a hover */
  --eln-line: #26303d;           /* every rule and border */
  --eln-line-strong: #34404e;    /* the heavy rule: a band edge, a section end */
  --eln-hairline: rgba(255,255,255,0.12);
  --eln-shadow: rgba(0,0,0,0.3);        /* the shade under a pop-over or a tip; the same in both schemes */
  --eln-veil: rgba(0,0,0,0.45);         /* the dim over the page under a sheet popped on it; the same in both schemes */
  /* ink */
  --eln-ink: #e6eaf0;            /* what is said */
  --eln-ink-2: #a9b3c1;          /* what is said under it */
  --eln-ink-3: #838d9a;          /* what is said aside: a label, a clock, a file name */
  --eln-on-status: #10161d;      /* ink drawn on a filled status shape */
  /* the link and the accent */
  --eln-link: #82aaff;
  --eln-link-hover: #a8c4ff;
  --eln-link-soft: #16233d;
  --eln-accent: #6cc1dc;         /* what the desk is reading or running right now; the pointer's colour */
  --eln-accent-soft: #183643;
  /* status: the only three colours that mean anything, worn only by a glyph, a pill or a bar */
  --eln-ok: #8fd3a3;   --eln-ok-soft: #17301f;
  --eln-warn: #f0b56b; --eln-warn-soft: #33260f;
  --eln-bad: #f0917f;  --eln-bad-soft: #37201c;
  /* tier: one hue per tier of the graph, T1 at the root down to T5 and TE for embed, worn only by a tier
     mark. None of them is green, amber or red, which are statuses, and none is the accent, which is what
     is running: a tier is a rank and not a state, so its hue sits off the status wheel. No model is named
     or coloured anywhere: which model serves a tier is a setting, and the mark says the tier. */
  --eln-tier-1: #8e6ffa;         /* T1, the root */
  --eln-tier-2: #d977b8;
  --eln-tier-3: #5b8bd6;
  --eln-tier-4: #b39ddb;
  --eln-tier-5: #9aa6b2;
  --eln-tier-e: #7a6f9b;         /* TE, embed */
  /* progress: the marks the job progress board and the levels page draw that are not a status, each worn only
     by its own mark: the source that writes a record, whichever model serves a turn, and a draft read and not
     yet confirmed */
  --eln-progress-human: #b592e0;      /* the mark of a record a person writes */
  --eln-progress-model: #5fb6d3;      /* the mark of a record a model's turn writes */
  --eln-progress-tool: #5cc48a;       /* the mark of a record a tool door writes */
  --eln-progress-engine: #74838f;     /* the mark of a record the engine writes */
  --eln-progress-draft: #a49bff;      /* a draft: read, not confirmed, no node yet; its ring and its chip's ink */
  --eln-progress-draft-soft: #30334c; /* behind a draft's ink: its chip's fill */
  /* type */
  --eln-font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --eln-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --eln-size-page-title: 24px;
  --eln-size-desk-title: 20px;
  --eln-size-stat: 22px;
  --eln-size-body: 14px;
  --eln-size-cell: 13px;
  --eln-size-label: 12px;
  --eln-size-micro: 11px;
  --eln-weight-title: 600;
  --eln-weight-medium: 500;
  --eln-weight-regular: 400;
  --eln-leading: 1.5;
  --eln-leading-tight: 1.35;
  --eln-track-label: 0.06em;
  --eln-measure: 65ch;           /* the longest line of running text */
  /* shape and space */
  --eln-radius: 8px;
  --eln-radius-sm: 6px;
  --eln-radius-xs: 4px;          /* a mark inside a control: a key cap, a count, a tag */
  --eln-radius-pill: 999px;
  --eln-gap: 12px;
  --eln-gutter: 16px;
  --eln-section: 24px;
  --eln-pad-card: 16px;
  --eln-cell-x: 12px;
  --eln-cell-y: 8px;
  /* The steps every margin, padding and gap stands on; gap, gutter and section above are named steps of it. */
  --eln-space-3xs: 2px;
  --eln-space-2xs: 4px;
  --eln-space-xs: 6px;
  --eln-space-sm: 8px;
  --eln-space-md: 12px;
  --eln-space-lg: 16px;
  --eln-space-xl: 24px;
  --eln-space-2xl: 32px;
  --eln-space-3xl: 48px;
  /* controls: one height for a button, an input, a select and a tab, so a row of them lines up */
  --eln-control: 28px;
  --eln-control-sm: 24px;        /* a small action: in a table row, a card's head, beside a chip */
  --eln-tab: 28px;               /* a tab of a strip */
  --eln-bar: 40px;               /* a window's top bar */
  --eln-foot: 26px;              /* a window's status bar */
  --eln-icon: 16px;
  --eln-icon-stroke: 1.6;
  /* elevation: what lifts off the page, and how far */
  --eln-elevation-card: 0 0 0 1px var(--eln-line);
  --eln-elevation-pop: 0 8px 24px var(--eln-shadow);                              /* a pop-over, a menu, a tip */
  --eln-elevation-sheet: 0 0 0 1px var(--eln-line), 0 12px 32px -8px var(--eln-shadow); /* a sheet, a drawer */
  /* stacking: one order for everything laid over the page, lowest first */
  --eln-z-sticky: 10;            /* a head row or a bar that stays as the page scrolls */
  --eln-z-drawer: 20;
  --eln-z-pop: 30;               /* a pop-over or a menu */
  --eln-z-sheet: 40;             /* a sheet and the veil under it */
  --eln-z-tip: 50;
  /* motion: two speeds and two curves; under reduced motion both speeds are zero */
  --eln-duration-fast: 150ms;    /* hover, colour and press; anything leaving */
  --eln-duration: 180ms;         /* a pop-over, a menu or a drawer arriving */
  --eln-ease-out: cubic-bezier(0.23, 1, 0.32, 1);    /* what arrives, and every hover */
  --eln-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* a drawer or a sheet sliding in from an edge */
}
@media (prefers-reduced-motion: reduce) {
  :root { --eln-duration-fast: 0ms; --eln-duration: 0ms; }
}
/* The same names in daylight. A page read in the light redefines the values and the scheme a browser draws its
   own controls in, a list or a scroll bar, and nothing else: a token's meaning is the theme's, its value is the
   scheme's. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --eln-ground: #f5f7fa; --eln-panel: #ffffff; --eln-raised: #eaeef3;
    --eln-line: #d7dde5; --eln-line-strong: #bfc8d3; --eln-hairline: rgba(0,0,0,0.10);
    --eln-ink: #171c23; --eln-ink-2: #48525f; --eln-ink-3: #626b78; --eln-on-status: #ffffff;
    --eln-link: #2457c5; --eln-link-hover: #163f9e; --eln-link-soft: #e4ecfb;
    --eln-accent: #1e7f98; --eln-accent-soft: #dcf0f5;
    --eln-ok: #1f7a3e; --eln-ok-soft: #dff3e5;
    --eln-warn: #955f00; --eln-warn-soft: #fbefd6;
    --eln-bad: #b6382a; --eln-bad-soft: #fbe3df;
    --eln-tier-1: #6b46e5; --eln-tier-2: #b4408f; --eln-tier-3: #2f65b8;
    --eln-tier-4: #7e57c2; --eln-tier-5: #6b7887; --eln-tier-e: #5c527a;
    --eln-progress-human: #7a4eab; --eln-progress-model: #0e6f8e; --eln-progress-tool: #2b8a5a;
    --eln-progress-engine: #8593a0; --eln-progress-draft: #7a6fd8; --eln-progress-draft-soft: #e7e5f8;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --eln-ground: #f5f7fa; --eln-panel: #ffffff; --eln-raised: #eaeef3;
  --eln-line: #d7dde5; --eln-line-strong: #bfc8d3; --eln-hairline: rgba(0,0,0,0.10);
  --eln-ink: #171c23; --eln-ink-2: #48525f; --eln-ink-3: #626b78; --eln-on-status: #ffffff;
  --eln-link: #2457c5; --eln-link-hover: #163f9e; --eln-link-soft: #e4ecfb;
  --eln-accent: #1e7f98; --eln-accent-soft: #dcf0f5;
  --eln-ok: #1f7a3e; --eln-ok-soft: #dff3e5;
  --eln-warn: #955f00; --eln-warn-soft: #fbefd6;
  --eln-bad: #b6382a; --eln-bad-soft: #fbe3df;
  --eln-tier-1: #6b46e5; --eln-tier-2: #b4408f; --eln-tier-3: #2f65b8;
  --eln-tier-4: #7e57c2; --eln-tier-5: #6b7887; --eln-tier-e: #5c527a;
  --eln-progress-human: #7a4eab; --eln-progress-model: #0e6f8e; --eln-progress-tool: #2b8a5a;
  --eln-progress-engine: #8593a0; --eln-progress-draft: #7a6fd8; --eln-progress-draft-soft: #e7e5f8;
}
/* __ the head of a page ___________________________________________________________________________________
   Every page of the shelf opens with its h1, the title and its state after a middot, and the .byline under it:
   when it was kept, in London, in b, then what the page is. A desk's own head sets its byline in its own sheet. */
.byline { color: var(--eln-ink-3); font-size: var(--eln-size-label); margin: 0 0 var(--eln-section); }
.byline b { color: var(--eln-ink-2); font-weight: var(--eln-weight-medium); }
/* __ the code view ________________________________________________________________________________________
   How every page shows code to a person: the shape of the Redvers portal api design page,
   laid in the job's own design. Code is never shown as source; it is drawn as a graph in an svg inside .cv:
   each file or class is a .node in the .lane of the plan step (or the folder) that works it, its path or name in
   .path and the symbols or what it owns in .sym under it, its action on the node's edge and on the .tag in its
   corner; what is read and never written stands in the dashed .outside box; an .edge says what one reads,
   imports, renders, inherits, holds or uses; a .pin on a node or an edge is a risk, numbered R1, R2 in its
   severity. Under the graph: the .cv-thesis that leads, the objectives as .cv-obj chips, the risks as .cv-risk
   cards worst first, the acceptance as .cv-check chips, each with its whole wording on hover, and .cv-foot
   saying what the page hands on as data. A page draws these classes and writes no colour into the svg.
   A change wears the status hues and the view names no token of its own, so a kept page can carry this very block
   in its own sheet and draw the same on an engine whose theme predates it: created holds (ok), modified waits
   (warn), removed is over (bad), read and never written is an aside (ink-3).
   A drawing stands at the size its own width and height say, a node's name at the body's size: no sheet stretches it
   to the column or shrinks it, and one wider than the page scrolls sideways inside its own .cv, the page never. */
.cv { background: var(--eln-panel); border: 1px solid var(--eln-line); border-radius: var(--eln-radius);
      padding: var(--eln-gap) var(--eln-pad-card); margin: 0 0 var(--eln-gap); overflow-x: auto; }
.cv svg { display: block; max-width: none; margin: 0 auto; color: var(--eln-ink-2);
          font-family: var(--eln-font-sans); }
.cv figcaption { font-size: var(--eln-size-label); color: var(--eln-ink-3); margin-top: 6px; max-width: 78ch; }
.cv .lane { fill: var(--eln-raised); opacity: 0.55; }
.cv .lane-name { fill: var(--eln-accent); font-size: var(--eln-size-micro); font-weight: var(--eln-weight-title);
                 letter-spacing: var(--eln-track-label); text-transform: uppercase; }
.cv .outside { fill: none; stroke: var(--eln-line-strong); stroke-dasharray: 5 4; }
.cv .outside-name { fill: var(--eln-ink-3); font-size: var(--eln-size-micro); font-weight: var(--eln-weight-title);
                    letter-spacing: var(--eln-track-label); text-transform: uppercase; }
.cv .node { fill: var(--eln-panel); stroke: var(--eln-line-strong); stroke-width: 1.2; }
.cv .node.create { stroke: var(--eln-ok); }
.cv .node.modify { stroke: var(--eln-warn); }
.cv .node.delete { stroke: var(--eln-bad); }
.cv .node.read { stroke: var(--eln-ink-3); stroke-width: 1; stroke-dasharray: 4 3; }
.cv .node:hover { stroke: var(--eln-accent); }
.cv .path { fill: var(--eln-ink); font-family: var(--eln-font-mono); font-size: 10.5px;
            font-weight: var(--eln-weight-medium); }
.cv .sym { fill: var(--eln-ink-2); font-size: 9.5px; }
.cv .tag { fill: var(--eln-line-strong); }
.cv .tag.create { fill: var(--eln-ok); }
.cv .tag.modify { fill: var(--eln-warn); }
.cv .tag.delete { fill: var(--eln-bad); }
.cv .tag.read { fill: var(--eln-ink-3); }
.cv .tag-word, .cv .pin-word { fill: var(--eln-on-status); font-size: 8.5px;
                               font-weight: 700; text-anchor: middle; }
.cv .edge { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0.55; }
.cv .edge.reads, .cv .edge.holds { stroke-dasharray: 5 3; }
.cv .edge.renders, .cv .edge.uses { stroke-dasharray: 1 3; }
.cv .edge.imports, .cv .edge.inherits { stroke-width: 1.4; }
.cv .edge.bad { stroke: var(--eln-bad); stroke-width: 1.6; opacity: 0.95; }
.cv .edge.warn { stroke: var(--eln-warn); stroke-width: 1.6; opacity: 0.95; }
.cv .arrow { fill: currentColor; }
.cv .arrow.bad { fill: var(--eln-bad); }
.cv .arrow.warn { fill: var(--eln-warn); }
.cv .pin { fill: var(--eln-ink-3); }
.cv .pin.bad { fill: var(--eln-bad); }
.cv .pin.warn { fill: var(--eln-warn); }
.cv .pin.ok { fill: var(--eln-ok); }
.cv-thesis { font-size: var(--eln-size-desk-title); line-height: var(--eln-leading-tight); max-width: 64ch;
             color: var(--eln-ink); margin: 0 0 var(--eln-gap); }
.cv-objs { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--eln-gap) 0 0; }
.cv-obj { font-size: var(--eln-size-label); color: var(--eln-ink-2); border: 1px solid var(--eln-line);
          border-radius: var(--eln-radius-sm); padding: 2px 8px; cursor: help; }
.cv-obj b { color: var(--eln-accent); font-family: var(--eln-font-mono); margin-right: 4px; }
.cv-risks { display: grid; gap: 8px; margin: 0 0 var(--eln-gap); }
.cv-risk { background: var(--eln-panel); border-left: 4px solid var(--eln-ink-3);
           border-radius: 0 var(--eln-radius-sm) var(--eln-radius-sm) 0; padding: 8px var(--eln-cell-x);
           font-size: var(--eln-size-cell); }
.cv-risk.bad { border-left-color: var(--eln-bad); }
.cv-risk.warn { border-left-color: var(--eln-warn); }
.cv-risk.ok { border-left-color: var(--eln-ok); }
.cv-risk b { display: block; color: var(--eln-ink); font-weight: var(--eln-weight-title); margin-bottom: 2px; }
.cv-risk .rid { color: var(--eln-ink-3); font-family: var(--eln-font-mono); font-size: var(--eln-size-micro); margin-right: 6px; }
.cv-risk .as { color: var(--eln-ink-2); }
.cv-checks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--eln-gap); }
.cv-check { display: inline-block; padding: 1px 8px; border-radius: var(--eln-radius-pill); font-family: var(--eln-font-mono);
            font-size: var(--eln-size-micro); font-weight: var(--eln-weight-medium); cursor: help;
            background: var(--eln-raised); color: var(--eln-ink-2); border: 1px solid var(--eln-line); }
.cv-check.ok { background: var(--eln-ok-soft); color: var(--eln-ok); border-color: transparent; }
.cv-check.warn { background: var(--eln-warn-soft); color: var(--eln-warn); border-color: transparent; }
.cv-check.bad { background: var(--eln-bad-soft); color: var(--eln-bad); border-color: transparent; }
.cv-tag { display: inline-block; font-family: var(--eln-font-mono); font-size: var(--eln-size-micro);
          letter-spacing: var(--eln-track-label); text-transform: uppercase; padding: 0 6px; border-radius: 3px;
          font-weight: var(--eln-weight-medium); }
.cv-tag.create { background: var(--eln-ok-soft); color: var(--eln-ok); }
.cv-tag.modify { background: var(--eln-warn-soft); color: var(--eln-warn); }
.cv-tag.delete { background: var(--eln-bad-soft); color: var(--eln-bad); }
.cv-tag.read { border: 1px dashed var(--eln-ink-3); color: var(--eln-ink-3); }
.cv-foot { margin-top: var(--eln-section); border-top: 1px dashed var(--eln-line); padding-top: var(--eln-gap);
           font-size: var(--eln-size-label); color: var(--eln-ink-3); }
.cv-foot summary { cursor: pointer; color: var(--eln-accent); font-weight: var(--eln-weight-medium); }
.cv-foot pre { font-size: var(--eln-size-micro); }
/* The tabs a job's page is read in, one per part of the job: its design (how the job was
   made: the stages, the layers, what was asked and distilled, the questions, the brief and the plan), its code
   (the code view above), and what it hands on. A tab is a radio .tab-key and its .tab-name, no script; the .tab
   pane after them shows while its key is checked, each pane naming its key by data-tab. Headings inside a pane
   are set compact, so a pane reads as one card of the job. */
.tabs { margin: var(--eln-gap) 0 0; }
.tabs > .tab-key { position: absolute; opacity: 0; pointer-events: none; }
.tabs > .tab-name { display: inline-block; padding: 6px 14px; margin: 0 2px -1px 0; cursor: pointer;
                    font-size: var(--eln-size-label); font-weight: var(--eln-weight-medium); color: var(--eln-ink-3);
                    border: 1px solid var(--eln-line); border-bottom: 0; background: var(--eln-panel);
                    border-radius: var(--eln-radius-sm) var(--eln-radius-sm) 0 0; }
.tabs > .tab-name .d { font-weight: 400; margin-left: 4px; }
.tabs > .tab-name:hover { color: var(--eln-ink); }
.tabs > .tab-key:checked + .tab-name { color: var(--eln-ink); background: var(--eln-raised);
                                       border-color: var(--eln-line-strong); box-shadow: inset 0 2px 0 var(--eln-accent); }
.tabs > .tab-key:focus-visible + .tab-name { outline: 2px solid var(--eln-accent); }
.tabs > .tab { display: none; border-top: 1px solid var(--eln-line-strong); padding-top: var(--eln-gap); }
.tabs > .tab-key:nth-of-type(1):checked ~ .tab[data-tab="1"], .tabs > .tab-key:nth-of-type(2):checked ~ .tab[data-tab="2"],
.tabs > .tab-key:nth-of-type(3):checked ~ .tab[data-tab="3"], .tabs > .tab-key:nth-of-type(4):checked ~ .tab[data-tab="4"],
.tabs > .tab-key:nth-of-type(5):checked ~ .tab[data-tab="5"] { display: block; }
.tab h2 { font-size: var(--eln-size-body); margin: var(--eln-gap) 0 6px; padding-top: 6px; border-top: 1px solid var(--eln-line); }
.tab h2:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.tab h2 .d { font-weight: 400; font-size: var(--eln-size-label); margin-left: 6px; }
.tab table { margin-bottom: var(--eln-gap); }
.tab th, .tab td { padding: 5px var(--eln-cell-x); }
.tab .grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.tab .grid .card { padding: 8px var(--eln-cell-x); margin: 0; }
.tab .grid .stat { font-size: var(--eln-size-desk-title); }
.cv-kv { display: flex; flex-wrap: wrap; gap: 4px var(--eln-section); margin: 0 0 var(--eln-gap);
         font-size: var(--eln-size-label); color: var(--eln-ink-3); }
.cv-kv b { color: var(--eln-ink); font-size: var(--eln-size-body); font-weight: var(--eln-weight-title); margin-right: 4px; }
/* An excerpt: a long text a desk carries (a job's brief, its oracle's reply, a line of the conversation, a record
   whole, a question waiting on the person) drawn as its first lines cut at a word, the .cut, with the whole of it
   in the .whole beside it, hidden, and a .fold control under them that shows the one and hides the other in
   place. Plain text keeps its own line breaks in either part. */
.excerpt { min-width: 0; }
.excerpt > .cut, .excerpt > .whole { white-space: pre-wrap; overflow-wrap: anywhere; }
.excerpt > [hidden] { display: none; }
.excerpt > .fold { all: unset; display: inline-block; margin-top: 2px; cursor: pointer; color: var(--eln-link);
                   font-family: var(--eln-font-mono); font-size: var(--eln-size-micro); }
.excerpt > .fold:hover { color: var(--eln-link-hover); }
.excerpt > .fold:focus-visible { outline: 2px solid var(--eln-accent); }
/* The copy of a page as a picture, the one control the engine sets at the foot of every page it hands out off the
   shelf, which puts the picture of the whole page on the clipboard and is hidden from the picture itself: a label
   drawn as the desks' copy is. The engine's frame places it in the window's lower right corner, out of the page's
   flow, on every kept page, this sheet linked or not; this sheet dresses it. */
button.picture {
  padding: 3px 10px; font-family: var(--eln-font-mono); font-size: var(--eln-size-micro); letter-spacing: var(--eln-track-label);
  text-transform: uppercase; color: var(--eln-ink-2); background: var(--eln-panel);
  border: 1px solid var(--eln-line-strong); border-radius: var(--eln-radius-sm); cursor: pointer;
}
button.picture:hover { color: var(--eln-ink); background: var(--eln-raised); }
button.picture:focus-visible { outline: 2px solid var(--eln-accent); }
