/*
 * The console's own styles. Every rule is scoped to .console-page (the class the
 * console layout puts on <body>) or to a .console-* class, because
 * application.html.erb links stylesheets with `stylesheet_link_tag :app`, which
 * Propshaft expands to EVERY css file under app/assets — so a bare `body` or
 * `table` rule here would also restyle the sign-in and password pages.
 *
 * ---------------------------------------------------------------------------
 * The look, and why it is this one.
 *
 * This is read on a shop floor and at 2am, by somebody who is not an engineer
 * and who opened it because something is wrong. So it is built like service-bay
 * signage rather than like a dashboard: four colours that mean the same thing on
 * every page, numerals big enough to read across a desk, and nothing decorative
 * competing with them.
 *
 *   go       fine, nothing to do
 *   caution  a human has to decide something
 *   stop     it did not work, or doing this costs something you cannot undo
 *   rest     inert — retired, waiting, not applicable
 *
 * Colour is never the only carrier. Every badge says its meaning in words, so
 * the page survives greyscale printing and colour-blind readers.
 *
 * One typeface, IBM Plex, served from this application rather than a font
 * service: a font request to a third party that hangs during an incident is a
 * fleet an operator cannot see, and font-display: swap means the page paints in
 * the system face first regardless. Plex Mono carries the rule the console has
 * always had — anything you must copy or repeat exactly (a store number, a
 * command id, an agent version, a command type) is monospaced; anything you
 * must understand is not.
 */

@font-face { font-family: "IBM Plex Sans"; src: url("/assets/IBMPlexSans-Regular-Latin1-6115bad7.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/IBMPlexSans-Medium-Latin1-1f4326e4.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/IBMPlexSans-SemiBold-Latin1-bec83101.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/IBMPlexSans-Bold-Latin1-5af41c85.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/IBMPlexMono-Regular-Latin1-33d0b38f.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/IBMPlexMono-Medium-Latin1-3dc6f3b2.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

.console-page {
  --floor: #f6f7f9;
  --panel: #ffffff;
  --ink: #1a1f2b;
  --ink-2: #5b6475;
  --rule: #e3e6eb;
  --rule-soft: #eef0f3;

  --go: #0f6b47;
  --go-wash: #e5f4ec;
  --caution: #8a4b00;
  --caution-wash: #fdf0dc;
  --stop: #b42318;
  --stop-wash: #fdecea;
  --rest: #545b66;
  --rest-wash: #eef0f3;
  --tape: #e8b63a;

  /* The one colour that means "you can do something here": links, the
     primary button, the current page in the nav. Indigo rather than the Cherry
     red, because red already means stop on every badge in the console. */
  --accent: #3451d1;
  --accent-ink: #2238a8;
  --accent-wash: #e8ecfb;

  --radius: 8px;

  /* The one width for anything read or filled in: forms, their help, the
     notes and disclosures above tables. Tables and cards take the page. */
  --measure: 44rem;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);

  /* Kept as aliases: earlier rules and any future ones can keep using the
     original two names without inventing a second red. */
  --muted: var(--ink-2);
  --line: var(--rule);
  --warn: var(--stop);
  --wash: var(--stop-wash);

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/*
 * The same tokens, inverted. This console is opened in the middle of the night
 * more often than it is opened in daylight, and every colour above is a token,
 * so honouring the operator's own setting costs one block rather than a second
 * stylesheet.
 */
@media (prefers-color-scheme: dark) {
  .console-page {
    --floor: #0e1117;
    --panel: #151a22;
    --ink: #e6e9ef;
    --ink-2: #9ba4b4;
    --rule: #262c36;
    --rule-soft: #1f242d;

    --go: #74d3a0;
    --go-wash: #12271d;
    --caution: #f0b357;
    --caution-wash: #2a2113;
    --stop: #ff8d7e;
    --stop-wash: #2c1815;
    --rest: #a9b1bd;
    --rest-wash: #22262d;

    --accent: #9dabff;
    --accent-ink: #c3ccff;
    --accent-wash: #1c2140;

    --shadow: none;
  }
}

.console-page {
  font: 14px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--floor);
  margin: 0;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

.console-page main {
  max-width: 76rem;
  padding: 1.75rem 2rem 4rem;
  box-sizing: border-box;
}

.console-page a { color: var(--accent); text-decoration: none; }
.console-page a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.console-page :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ------------------------------------------------------------------ heading */

.console-page h1 {
  font-size: 1.6rem;
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

/* A machine code beside a heading's words is a footnote to them, not more
   heading: the code's own size, not the title's. */
.console-page :is(h1, h2, h3) .machine { font-size: 0.6em; font-weight: 400; color: var(--ink-2); vertical-align: 0.15em; }

.console-page h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 2.25rem 0 0.6rem;
}

/* What a panel is, in the panel's own corner: sentence case and quiet, so it
   names the thing without competing with the heading under it. */
.console-page .eyebrow {
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--ink-2);
  margin: 0 0 0.2rem;
}

/*
 * The top of every page (page_header): crumbs, the title, what the page is for,
 * and the buttons that leave it, always top right. Every page starting the same
 * way is most of what makes forty pages read as one application.
 */
.console-page .page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin: 0 0 1.75rem;
}
.console-page .page-head__main { flex: 1 1 30rem; min-width: 0; }
.console-page .page-head__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.2rem; }
.console-page .page-head .record-summary { margin: 0.55rem 0 0; }
.console-page .page-head .purpose { margin: 0.4rem 0 0; }
.console-page .page-head .lede { margin: 0.45rem 0 0; }

/* A page's opening paragraphs, when they sit under the header rather than in
   it, belong to the header: closer to it than to what follows. */
.console-page .page-head:has(+ .lede) { margin-bottom: 0.75rem; }

.console-page .crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.45rem;
  font-size: 0.85rem;
  margin: 0 0 0.35rem;
}
.console-page .crumbs a { color: var(--ink-2); }
.console-page .crumbs a:hover { color: var(--accent); }
.console-page .crumbs__sep { color: var(--rule); }

/* The one sentence that says what the page is for. Measured, not full width:
   a line an operator has to track back across 72rem is a line they skip. */
.console-page .lede {
  font-size: 1.02rem;
  color: var(--ink-2);
  max-width: 68ch;
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}

/* The page's purpose, folded to its question. The toggle is the only thing in
   it that looks clickable, so the question reads as a subtitle, not a link. */
.console-page .purpose { max-width: 72ch; margin: 0 0 1.5rem; }

.console-page .purpose__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.75rem;
  list-style: none;
  cursor: pointer;
}
.console-page .purpose__summary::-webkit-details-marker { display: none; }

.console-page .purpose__question { font-size: 1.02rem; color: var(--ink-2); }

/* A small pill rather than an underlined phrase: it is a control, and it
   should not read as the end of the question's sentence. */
.console-page .purpose__toggle {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
}
.console-page .purpose__toggle::after { content: "\25BE"; display: inline-block; margin-left: 0.3rem; font-size: 0.85em; }
.console-page .purpose[open] .purpose__toggle::after { content: "\25B4"; }
.console-page .purpose__summary:hover .purpose__toggle { color: var(--ink); border-color: var(--ink-2); }

.console-page .purpose .lede {
  margin: 0.7rem 0 0;
  padding: 0.7rem 0.9rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.94rem;
  color: var(--ink);
  max-width: none;
}

.console-page .note { color: var(--ink-2); font-size: 0.92em; max-width: 72ch; margin: 0 0 1.25rem; text-wrap: pretty; }
.console-page .muted { color: var(--ink-2); }

/* ------------------------------------------------------------- head and nav */

/*
 * The shell: a sidebar down the left holding the name of the application, the
 * nav and the operator's own controls, and the page beside it. The sidebar is
 * the one dark surface in the console, in both schemes — everything beside it
 * is the work; this is the frame around it, and making it a different material
 * lets the eye skip past it to the page. The only bright things in it are the
 * counts, so the bright things in the nav are exactly the jobs waiting.
 */
.console-page {
  --head: #151922;
  --head-raised: #232936;
  --head-ink: #ffffff;
  --head-ink-2: #b4bccb;
  --head-ink-3: #8a93a3;
  --head-rule: #2a303c;
}

@media (prefers-color-scheme: dark) {
  .console-page {
    --head: #0b0e13;
    --head-raised: #1a1f29;
    --head-rule: #222832;
  }
}

.console-shell {
  display: flex;
  min-height: 100vh;
}

.console-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.console-body > main { flex: 1 0 auto; width: 100%; }

.console-page .console-head {
  flex: 0 0 15.5rem;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.1rem 0.75rem 1rem;
  background: var(--head);
  color: var(--head-ink);
  border-right: 1px solid var(--head-rule);
}

.console-page .console-head :focus-visible { outline-color: var(--tape); }

.console-page .console-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.6rem;
  color: inherit;
  text-decoration: none;
}
.console-page .console-brand:hover { color: inherit; text-decoration: none; }

/* The mark is decorative (alt="") because the name beside it already says what
   it is. It is white, which only works because the sidebar is dark in both
   schemes. */
.console-page .console-brand__logo {
  display: block;
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
}

.console-page .console-brand__name {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.25;
}

.console-page .console-brand__strap {
  display: block;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--head-ink-3);
  margin-top: 0.1rem;
}

.console-nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.console-nav__group { display: flex; flex-direction: column; gap: 1px; }

.console-nav__heading {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--head-ink-3);
  padding: 0 0.6rem 0.35rem;
}

.console-page .console-nav a { color: var(--head-ink-2); text-decoration: none; }

.console-nav__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.console-nav__link .console-icon { flex: none; opacity: 0.7; }

.console-page .console-nav a.console-nav__link:hover { color: var(--head-ink); background: var(--head-raised); }
.console-nav__link:hover .console-icon,
.console-nav__link--on .console-icon { opacity: 1; }

/* The current section is a raised row with a bar at its edge rather than a
   colour swap of the count, so "where am I" and "what needs doing" stay
   separate signals. */
.console-page .console-nav a.console-nav__link--on {
  color: var(--head-ink);
  background: var(--head-raised);
  box-shadow: inset 3px 0 0 var(--tape);
}

.console-nav__count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  color: #1a1d21;
  background: var(--tape);
}

/* At the foot of the sidebar: about the operator, not the fleet. Plain words,
   so they never compete with the nav. The rules out-specify the generic button
   rule further down, which would otherwise make signing out the loudest
   control in the console. */
/* Which fleet this is. Red for production in both schemes — the sidebar is
   dark in both — because it is the one fact on the page that should stop a
   hand before it clicks. */
.console-page .console-env {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0 0.25rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid;
}
.console-page .console-env--live { background: #2a1215; border-color: #5c1f22; }
.console-page .console-env--test { background: #1b2433; border-color: #2f3d55; }
.console-page .console-env__name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.console-page .console-env--live .console-env__name { color: #ff9b8f; }
.console-page .console-env--test .console-env__name { color: #9fc1ff; }
.console-page .console-env__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.console-page .console-env__note { font-size: 0.78rem; color: var(--head-ink-3); }
.console-page .console-env--live .console-env__note { color: #c9a9a6; }

.console-page .console-user { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.45rem; min-width: 0; }
.console-page .console-user__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--head-raised);
  color: var(--head-ink);
  font-size: 0.72rem;
  font-weight: 600;
}
.console-page .console-user__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.console-page .console-user__email { font-size: 0.82rem; color: var(--head-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12rem; }
.console-page .console-user__role { font-size: 0.76rem; color: var(--head-ink-3); }

.console-page .console-build { margin: 0.45rem 0 0; font-family: var(--mono); font-size: 0.7rem; color: var(--head-ink-3); }
.console-page .console-build a { color: inherit; }
.console-page .console-build a:hover { color: var(--head-ink); }

.console-page .console-head__tools {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.85rem 0.6rem 0;
  border-top: 1px solid var(--head-rule);
}

/* button_to puts `class:` on the BUTTON and wraps it in a form of its own; the
   form steps out of the layout so the buttons sit in the column like links. */
.console-page .console-head__tools form { display: contents; }

.console-page .console-head__help,
.console-page .console-head__signout {
  font: inherit;
  font-size: 0.84rem;
  font-weight: 450;
  color: var(--head-ink-2);
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.console-page .console-head__help:hover,
.console-page .console-head__signout:hover {
  color: var(--head-ink);
  background: none;
  text-decoration: underline;
  opacity: 1;
}

/* Too narrow for a sidebar beside the page: it becomes a band across the top
   again, with the nav one row that scrolls sideways rather than eight rows the
   operator has to scroll past to reach the page. */
@media (max-width: 60rem) {
  .console-shell { flex-direction: column; }
  .console-page .console-head {
    position: static;
    height: auto;
    flex: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--head-rule);
  }
  /* In the band the badge shrinks to its name, and who you are and which
     build are left to the wide layout. */
  .console-page .console-env { order: 1; flex-direction: row; margin: 0; padding: 0.2rem 0.55rem; }
  .console-page .console-env__note,
  .console-page .console-user,
  .console-page .console-build { display: none; }
  .console-page .console-head__tools {
    order: 2;
    margin: 0 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0;
    border-top: 0;
  }
  .console-nav {
    order: 3;
    flex: 1 0 100%;
    flex-direction: row;
    gap: 1.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
  }
  .console-nav__group { flex-direction: row; gap: 0.25rem; }
  .console-nav__heading { display: none; }
  .console-nav__count { margin-left: 0.15rem; }
}

@media (max-width: 46rem) {
  .console-page .console-brand__strap { display: none; }
}


/* ------------------------------------------------------------------- flashes */

.console-flash { max-width: 76rem; margin: 1.25rem 0 0; padding: 0 2rem; box-sizing: border-box; }

.console-flash p {
  margin: 0 0 0.5rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.console-flash__tag {
  display: inline-block;
  margin-right: 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  vertical-align: 0.06em;
}

.console-flash__notice { border-color: var(--go); background: var(--go-wash); }
.console-flash__notice .console-flash__tag { color: var(--go); }
.console-flash__alert { border-color: var(--stop); background: var(--stop-wash); }
.console-flash__alert .console-flash__tag { color: var(--stop); }

/* --------------------------------------------------------------- the board */

/*
 * The one number an operator needs before any other: how many stores are not
 * talking to us. Finding that by counting rows in a 65-row table is how a page
 * gets read wrong at 2am, so it is counted for them. One card, a cell per
 * count, the label over the number with a swatch of the colour the rows below
 * use for the same thing — the strip and the table are one language.
 *
 * Dividers drawn as inset hairlines on the cells rather than as a 1px grid gap
 * over a coloured container: when cells wrap onto two rows the container
 * colour shows through the empty tracks, which reads as more panels with
 * nothing in them.
 *
 * Wrapping cells that grow rather than a fixed grid, so however many counts
 * there are and however wide the window, every row is full: one row of seven
 * on a desktop, and on anything narrower the last row's cells stretch rather
 * than leave an empty slot.
 */
.console-page .board {
  display: flex;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0 0 1.5rem;
}

.console-page .board__cell {
  display: flex;
  flex-direction: column-reverse;
  /* column-reverse: flex-start is the bottom, so the numbers line up across
     the row when one label wraps onto two lines. */
  justify-content: flex-start;
  gap: 0.2rem;
  padding: 0.85rem 1rem 0.9rem;
  box-shadow: inset -1px 0 0 var(--rule-soft), inset 0 -1px 0 var(--rule-soft);
  color: var(--ink);
  text-decoration: none;
  --swatch: var(--rest);
  flex: 1 1 9.5rem;
  box-sizing: border-box;
  min-width: 0;
}

.console-page .board__num {
  display: block;
  font-size: 1.65rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.console-page .board__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-2);
}

.console-page .board__label::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--swatch);
}

.console-page .board__cell--go { --swatch: var(--go); }
.console-page .board__cell--stop { --swatch: var(--stop); }
.console-page .board__cell--stop .board__num { color: var(--stop); }
.console-page .board__cell--caution { --swatch: var(--caution); }
.console-page .board__cell--caution .board__num { color: var(--caution); }
.console-page .board__cell--rest .board__num { color: var(--rest); }
.console-page a.board__cell:hover { background: var(--floor); color: var(--ink); text-decoration: none; }

/* ------------------------------------------------------------------ badges */

/* A pill with a dot of its own colour. The word is still the meaning; the dot
   is what lets a column of them be scanned before it is read. */
.console-page .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 550;
  line-height: 1.35;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--rest);
  background: var(--rest-wash);
}

.console-page .badge::before {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}

.console-page .badge--go { color: var(--go); background: var(--go-wash); }
.console-page .badge--caution { color: var(--caution); background: var(--caution-wash); }
.console-page .badge--stop { color: var(--stop); background: var(--stop-wash); }
.console-page .badge--rest { color: var(--rest); background: var(--rest-wash); }

/* ------------------------------------------------------------------ tables */

.console-page .table-scroll {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 0 1.25rem;
}

.console-page table { width: 100%; border-collapse: collapse; }

.console-page th, .console-page td {
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: baseline;
}

.console-page tbody tr:last-child td { border-bottom: 0; }
.console-page .table-scroll tbody tr:hover td { background: color-mix(in srgb, var(--floor) 60%, var(--panel)); }

.console-page th {
  font-weight: 600;
  color: var(--ink-2);
  font-size: 0.76rem;
  white-space: nowrap;
  background: var(--floor);
  border-bottom-color: var(--rule);
}

.console-page td.num, .console-page th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* "about 2 months ago" is one value; broken over two lines it doubles the row
   and reads as two. The same for an exact time. */
.console-page td > time, .console-page td > .stamp { white-space: nowrap; }

/* Links inside a table read as the row's text, and only take the link colour
   when pointed at. A table of indigo phrases is a page of noise; the row is
   already the thing you click. */
.console-page .table-scroll td a { color: var(--ink); }
.console-page .table-scroll td a:hover { color: var(--accent); }

/* Machine identifiers: a thing to copy exactly rather than a thing to read. */
.console-page .machine, .console-page .machine-cell, .console-page .machine-link {
  font-family: var(--mono);
  font-size: 0.82em;
}

.console-page .machine { color: var(--ink-2); word-break: break-all; }
.console-page .record-id .machine { font-size: 0.9rem; color: var(--ink); user-select: all; }

.console-page .record-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0 0 1.75rem; }
.console-page .record-summary__store { color: var(--ink-2); margin-left: 0.2rem; }
.console-page .stamp { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- fleet table */

.console-page .fleet__store a { text-decoration: none; }
.console-page .fleet__store a:hover .fleet__label { text-decoration: underline; }
.console-page .fleet__number { font-family: var(--mono); font-weight: 600; }
.console-page .fleet__store { white-space: nowrap; }
.console-page .fleet__label { color: var(--ink-2); margin-left: 0.35rem; }

/* The detail under a cell's headline: the age under a status, the policy and
   abilities under a version. Stacked rather than given columns of their own. */
.console-page .fleet__sub { display: block; margin-top: 0.2rem; font-size: 0.8rem; color: var(--ink-2); }
.console-page .fleet__counts { white-space: nowrap; font-variant-numeric: tabular-nums; }
.console-page .fleet__commands .badge { margin-top: 0.25rem; }

/*
 * The stripe: only on a row that needs somebody, in its bucket's colour, down
 * the left edge — so the few rows that matter stand out of a column of quiet
 * ones without washing the row. A wash on every silent row was legible at one
 * store and an alarm wall at ten. inset box-shadow rather than a border, so
 * turning it on never shifts the column.
 */
.console-page .fleet tr[data-bucket="silent"] td:first-child,
.console-page .fleet tr[data-bucket="not_reading"] td:first-child { box-shadow: inset 3px 0 0 var(--stop); }
.console-page .fleet tr[data-bucket="loaded"] td:first-child { box-shadow: inset 3px 0 0 var(--caution); }

/* A row's status as a dot and words, in the stripe's colour. */
.console-page .status { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 550; white-space: nowrap; }
.console-page .status::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; flex: none; }
.console-page .status--go { color: var(--ink); }
.console-page .status--go::before { background: var(--go); }
.console-page .status--stop { color: var(--stop); }
.console-page .status--rest { color: var(--ink-2); }

/* A count on one line; the list itself only when asked for, and wrapped to a
   width that keeps the row from turning into a column of names. */
.console-page .abilities summary { cursor: pointer; white-space: nowrap; }
.console-page .abilities__list { display: block; max-width: 22rem; margin-top: 0.3rem; white-space: normal; }

/* Each figure keeps its label and number together; the line may break only
   between the two figures. */
.console-page [data-machine-load] [data-cpu-pct], .console-page [data-machine-load] [data-mem-pct] { white-space: nowrap; }

/* A quiet store's machine figures, with how old they are under them. */
.console-page .machine-age { display: block; font-size: 0.75rem; white-space: nowrap; }

.flag { font-size: 0.85em; }

/* --------------------------------------------------------- alerts, in place */

/* The open alerts, one line each, as a banner above the fleet. */
.console-page .alerts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.7rem 1rem;
  margin: 0 0 1.25rem;
  background: var(--caution-wash);
  border: 1px solid color-mix(in srgb, var(--caution) 35%, transparent);
  border-radius: var(--radius);
}

.console-page .alerts ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.console-page .alerts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
.console-page .alerts__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--caution); align-self: center; }
.console-page .alerts__since, .console-page .alerts time { color: var(--ink-2); }
.console-page .alerts__more { font-size: 0.9em; white-space: nowrap; }
.console-page .alerts__what { font-weight: 600; }
.console-page .alerts-table { margin: 0; }

/* ------------------------------------------------------------- disclosures */

/*
 * The reasoning this console cannot delete and must not lead with. Each of these
 * answers a question an operator asks once and then knows; left open, it is a
 * paragraph that gets skipped along with the first rows of the table under it.
 */
.console-page .explain {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0 1rem;
  margin: 0 0 1.5rem;
  max-width: var(--measure);
  box-sizing: border-box;
}

.console-page .explain > summary {
  cursor: pointer;
  padding: 0.65rem 0;
  font-size: 0.92rem;
  font-weight: 550;
  color: var(--ink);
}
.console-page .explain > summary::marker { color: var(--ink-2); }

.console-page .explain[open] > summary { border-bottom: 1px solid var(--rule); margin-bottom: 0.7rem; }
.console-page .explain p { color: var(--ink-2); font-size: 0.92rem; margin: 0 0 0.9rem; }

/* ---------------------------------------------------- definition list pages */

.console-page .command-detail, .console-page .store-detail {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 0 1.25rem;
  margin: 0 0 1.75rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.35rem 1rem 0.5rem;
}

.console-page .command-detail dt, .console-page .store-detail dt {
  color: var(--ink-2);
  font-size: 0.88rem;
  padding-top: 0.6rem;
}

.console-page .command-detail dd, .console-page .store-detail dd {
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-soft);
  min-width: 0;
}

.console-page .command-detail > dd:last-of-type, .console-page .store-detail > dd:last-of-type { border-bottom: 0; }
.console-page .command-detail pre { margin: 0; font-family: var(--mono); font-size: 0.82em; overflow-x: auto; }

.console-page .chain { padding-left: 1.1rem; margin: 0 0 1.25rem; }
.console-page .chain li { margin-bottom: 0.3rem; }

/* -------------------------------------------------------- boxed decisions */

/*
 * The indeterminate section is the one place on this page where an operator is
 * about to write the only record of what happened at a POS, so it is boxed and
 * washed rather than laid out like the read-only audit above it. The prose is
 * part of the affordance: it says why there is no retry button, and a page that
 * merely omitted one would leave an operator looking for it.
 */
.console-page .operator-decision {
  border: 1px solid var(--caution);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem 1.1rem;
  background: var(--caution-wash);
  margin: 0 0 1.5rem;
}

.console-page .operator-decision h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.console-page .operator-decision .note { color: var(--ink); max-width: 74ch; }
.console-page .operator-decision__form { margin: 1rem 0 0; }
.console-page .operator-decision__form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.2rem; }
.console-page .operator-decision__form textarea { width: 100%; max-width: var(--measure); font: inherit; padding: 0.5rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.console-page .operator-decision blockquote { margin: 0.6rem 0 0; padding: 0.2rem 0 0.2rem 0.85rem; border-left: 3px solid var(--rule); }
.console-page .resolution { margin: 0.4rem 0 0; color: var(--ink-2); font-size: 0.92rem; }

/*
 * The raw token exists in plaintext exactly once, and this box is that once. It
 * is the loudest thing on the page for the same reason the operator-decision box
 * is on the command page: leaving it costs something no later page can give back.
 */
.console-page .issued-token {
  border: 2px solid var(--stop);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem 1.1rem;
  margin: 0 0 1.75rem;
  background: var(--stop-wash);
}

.console-page .issued-token h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.console-page .issued-token p { max-width: 72ch; }
.console-page .issued-token code { font-family: var(--mono); font-size: 1.05em; word-break: break-all; user-select: all; }

/*
 * Two boxes, and the visual weight is the product requirement: the safe switch
 * looks ordinary, the irreversible one looks like what it is. An operator who
 * wants a store to stop working must reach the first and hesitate at the second.
 *
 * The hazard tape is the one loud thing in this console, and it is spent here
 * rather than anywhere else — it is the edge of the only controls on any page
 * that cost something no later page can give back.
 */
.console-page .stop-work {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem 1.1rem;
  margin: 0 0 1rem;
  background: var(--panel);
}

.console-page .danger {
  border: 1px solid var(--stop);
  border-radius: var(--radius);
  padding: 0 1.1rem 1.1rem;
  margin: 0 0 1.75rem;
  background: var(--stop-wash);
  overflow: hidden;
}

.console-page .danger::before {
  content: "";
  display: block;
  height: 7px;
  margin: 0 -1.1rem 0.9rem;
  background: repeating-linear-gradient(135deg, var(--stop) 0 10px, var(--tape) 10px 20px);
}

.console-page .stop-work :is(h2, h3), .console-page .danger :is(h2, h3) { font-size: 1rem; margin: 0 0 0.5rem; }
.console-page .danger :is(h2, h3) { color: var(--stop); }
.console-page .danger p, .console-page .stop-work p { max-width: 72ch; }
.console-page .danger form { display: inline-block; margin: 0.6rem 0.5rem 0 0; }

/* ------------------------------------------------------------------- forms */

.console-page .store-form label, .console-page .enqueue-form label,
.console-page .producer-form label {
  display: block;
  margin: 0 0 1.1rem;
  font-weight: 600;
  font-size: 0.94rem;
}

.console-page .field-hint {
  display: block;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--ink-2);
  max-width: 68ch;
  margin: 0.15rem 0 0.35rem;
}

/* Every field the console has, whether or not its form styles it: the native
   control otherwise sits small and grey beside a filled button. Inside :where()
   so it weighs nothing and any form's own rule below wins. */
:where(.console-page) :where(select, textarea, input:is([type="text"], [type="number"], [type="email"], [type="url"], [type="password"], [type="search"], :not([type]))) {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  max-width: 100%;
  box-sizing: border-box;
}

.console-page .store-form input[type="text"],
.console-page .store-form input[type="number"],
.console-page .producer-form input[type="text"],
.console-page .enqueue-form select,
.console-page .enqueue-form input[type="text"],
.console-page .enqueue-form textarea {
  font: inherit;
  display: block;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  max-width: var(--measure);
  width: 100%;
}

.console-page .enqueue-form textarea { font-family: var(--mono); font-size: 0.88em; }
.console-page .enqueue-form label { margin-bottom: 0.3rem; }
.console-page .enqueue-form select, .console-page .enqueue-form input[type="text"] { margin-bottom: 1.1rem; }
.console-page .store-form label.check, .console-page .producer-form label.check { font-weight: 600; }
.console-page .store-form label.check input, .console-page .producer-form label.check input { margin-right: 0.35rem; }

.console-page .form-errors {
  border: 1px solid var(--stop);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin: 0 0 1.25rem;
  color: var(--stop);
  background: var(--stop-wash);
}

.console-page .form-errors p { margin: 0 0 0.3rem; }
.console-page .form-errors ul { margin: 0; padding-left: 1.1rem; }

.console-page .scope-list, .console-page .store-location {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.3rem 1rem 1rem;
  margin: 0 0 1.25rem;
  background: var(--panel);
}

.console-page .scope-list legend, .console-page .store-location legend {
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 0.35rem;
}

/* The box beside its words, not over them: one item, one line to scan. */
.console-page .scope-list__item { display: flex; align-items: baseline; gap: 0.55rem; margin: 0.35rem 0; }
.console-page .scope-list__item input { flex: none; margin: 0; transform: translateY(0.1em); }
.console-page .scope-list__item label { display: inline; margin: 0; font-weight: 500; }

/* The wildcard box sits above the list it overrides, and is ruled off from it:
   ticking it makes every box below irrelevant, and a reader has to be able to
   see that before they start ticking. */
.console-page .scope-list__item--all {
  padding: 0 0 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

/* The values themselves, under the summary badge on a producer's page. Dense on
   purpose — a fleet-wide list is 65 store numbers and it still has to be
   readable as one block rather than a scroll. */
.console-page .scope-values {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
}

/* ----------------------------------------------------------------- buttons */

/* Primary: the buttons that write something are the only filled ones. */
.console-page button,
.console-page input[type="submit"],
.console-page .button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  .console-page button,
  .console-page input[type="submit"] { background: #5b6cf0; border-color: #5b6cf0; }
}

.console-page button:hover,
.console-page input[type="submit"]:hover,
.console-page .button:hover { opacity: 0.9; text-decoration: none; }

/* Secondary: the ordinary navigation actions — enrol, edit, queue — are outline
   rather than solid, so the only filled buttons on a page are the ones that
   write something. */
.console-page .button {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--rule);
}
.console-page .button:hover { color: var(--ink); background: var(--floor); opacity: 1; }

/* A link that starts the page's main action, filled like the buttons that
   write — "Enroll a store" beside "Export CSV". */
.console-page .button--primary,
.console-page .button--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.console-page .button--primary:hover { opacity: 0.9; }

/* The two irreversible controls wear the colour they cost. */
.console-page .danger button {
  background: var(--panel);
  color: var(--stop);
  border-color: var(--stop);
}

.console-page .alerts-table button {
  font-size: 0.82rem;
  padding: 0.35rem 0.6rem;
  white-space: nowrap;
  background: var(--panel);
  color: var(--ink);
  border-color: var(--rule);
}

/* ------------------------------------------------------------- enrolments */

/* Shared by every page that opens with the rule it enforces: a panel, so the
   sentence reads as the rule of the page rather than as more of the lede. */
/* Everything held to the measure is measured outside its border, so a padded
   box and a bare field stop at the same line. */
.console-page :is(.operator-decision__form textarea, .enqueue-form textarea, .arg-help, .field-warning, .arg-builder, .json-escape, .json-state) {
  box-sizing: border-box;
}

.console-page .lede-note {
  max-width: var(--measure);
  box-sizing: border-box;
  margin: 0 0 1.75rem;
  padding: 0.8rem 1rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-wrap: pretty;
}
.console-page .lede-note p { margin: 0; }

.console-page .dim { color: var(--ink-2); }

.console-page .empty {
  padding: 1.5rem 1.25rem;
  color: var(--ink-2);
  text-align: center;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
}

.console-page .enrolments { display: grid; gap: 1rem; margin: 0 0 2rem; }

/* One machine. The left edge says what the claim is worth before anything is
   read: green when its installer code matched a store, grey when it did not. */
.console-page .enrolment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rest);
  border-radius: var(--radius);
}
.console-page .enrolment--verified { border-left-color: var(--go); }

.console-page .enrolment__who { padding: 1rem 1.25rem 1.1rem; }

/* A box that has stopped asking is still listed, but it is not where the next
   decision is — so it steps back rather than competing with the live ones. */
.console-page .enrolment--stale .enrolment__who { opacity: 0.72; }

.console-page .enrolment__claim {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.7rem;
  margin: 0 0 0.9rem;
}

.console-page .enrolment__store {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.console-page .enrolment__unclaimed { font-size: 1.35rem; line-height: 1.2; color: var(--ink-2); }

.console-page .enrolment__facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.3rem 1rem;
  margin: 0;
  font-size: 0.92rem;
}
.console-page .enrolment__facts dt { color: var(--ink-2); }
.console-page .enrolment__facts dd { margin: 0; overflow-wrap: anywhere; }
.console-page .enrolment__facts .badge { margin-left: 0.35rem; }

.console-page .enrolment__decide {
  padding: 1rem 1.25rem 1.1rem;
  background: var(--floor);
  border-left: 1px solid var(--rule);
}

.console-page .approve label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 0.85rem;
}
.console-page .approve .field-hint { grid-column: 1 / -1; font-size: 0.82rem; margin: -0.5rem 0 0.9rem; }

.console-page .approve select,
.console-page .approve input[type="text"],
.console-page .approve input[type="number"] {
  font: inherit;
  font-weight: 400;
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  box-sizing: border-box;
}
.console-page .approve input[type="text"] { font-family: var(--mono); font-size: 0.88em; }

/* The emailed code is six digits, so its box is sized to them rather than
   stretched across the section the way the wider approval forms want. Shared by
   the work-order and allow-change confirm forms, whose code box is the same. */
.console-page .approve input[name="code"] { max-width: 8rem; }

.console-page .approve__pair {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0 0.85rem;
}

.console-page .approve input[type="submit"] { min-width: 8rem; }

/* Work orders. Create and delete each take an emailed code, the same as an
   enrolment or an allow-change, so they wear the approval-card form styling
   above rather than raw browser inputs. What differs: three actions stack in one
   section, so they are ruled apart and spaced; their paired fields — two names,
   a number and a mode — are evenly weighted, not the long-field/short-field
   split the enrolment card wants; and a customer's name is read, not copied
   exactly, so it keeps the proportional font the base .approve rule sets to
   mono. The code box in the pending state is a code, so it stays mono. */
.console-page [data-work-orders] .approve {
  margin: 0 0 1.5rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.console-page [data-work-orders] .approve:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.console-page [data-work-orders] .approve__pair {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.console-page [data-work-order-form="workorder.create.customer"] input[type="text"] {
  font-family: inherit;
  font-size: inherit;
}

@media (max-width: 46rem) {
  .console-page [data-work-orders] .approve__pair { grid-template-columns: 1fr; }
}

.console-page .enrolment__refuse {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
}

/* Blocking is reversible, but it is a refusal: outlined in the colour of one,
   and never the filled button on the card. */
.console-page .button--danger {
  background: var(--panel);
  color: var(--stop);
  border-color: var(--stop);
  font-size: 0.88rem;
  padding: 0.35rem 0.75rem;
}

/* ------------------------------------------------------- confirmations */

/* One dialog for every "are you sure", in place of the browser's. */
.console-page .confirm-dialog {
  width: min(30rem, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(13, 17, 26, 0.35);
}
.console-page .confirm-dialog::backdrop { background: rgba(13, 17, 26, 0.48); }
.console-page .confirm-dialog__form { margin: 0; }
.console-page .confirm-dialog__body { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.4rem 1.5rem 1.2rem; }
.console-page .confirm-dialog__title { margin: 0; font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.console-page .confirm-dialog__message { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.console-page .confirm-dialog__type { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; font-weight: 500; }
.console-page .confirm-dialog__type code { font-family: var(--mono); font-weight: 600; }
.console-page .confirm-dialog__type input { width: 100%; font-family: var(--mono); }
.console-page .confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  background: var(--floor);
  border-top: 1px solid var(--rule);
}
.console-page .confirm-dialog__go--danger { background: var(--stop); border-color: var(--stop); }
.console-page .confirm-dialog__go:disabled { opacity: 0.45; cursor: not-allowed; }

.console-page .turned-away {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.console-page .turned-away li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
}
.console-page .turned-away li:last-child { border-bottom: 0; }
.console-page .turned-away button { font-size: 0.85rem; padding: 0.3rem 0.7rem; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 46rem) {
  .console-page main { padding: 1.25rem 1rem 3rem; }
  .console-page .board__cell { flex-basis: 40%; }
  /* A table squeezed to a phone's width wraps every cell to a word a line and
     reads as a column of fragments. At a readable width it scrolls inside its
     own box instead, and the page around it stays put. */
  .console-page .table-scroll table { min-width: 40rem; }
  .console-page .table-scroll--bare table { min-width: 0; }
  .console-flash { padding-left: 1rem; padding-right: 1rem; }
  .console-page .explains__row { grid-template-columns: 1fr; gap: 0.15rem; }
  .console-page .enrolment { grid-template-columns: 1fr; }
  .console-page .enrolment__decide { border-left: 0; border-top: 1px solid var(--rule); }
  .console-page .approve__pair { grid-template-columns: 1fr; }
  .console-page .turned-away li { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .console-page .command-detail, .console-page .store-detail { grid-template-columns: 1fr; }
  .console-page .command-detail dt, .console-page .store-detail dt { padding-top: 0.7rem; }
  .console-page .command-detail dd, .console-page .store-detail dd { padding-top: 0.15rem; }

  /* Dropped rather than squeezed: at this width the store, its status and when
     it last checked in are the whole question, and a version string pushed off
     the right edge takes them with it. Still in the markup, so the columns come
     back the moment there is room. */
  .console-page .col-optional { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .console-page * { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------ "How this works" */

/*
 * The loop diagram. Decorative — the numbered list beside it is the accessible
 * copy — so it is drawn in the page's own tokens and inherits the theme rather
 * than carrying colours of its own.
 */
.console-page .flow {
  display: block;
  width: 100%;
  max-width: 41rem;
  height: auto;
  margin: 0 0 1.25rem;
}

.console-page .flow rect { fill: var(--panel); stroke: var(--rule); stroke-width: 1; }
.console-page .flow line, .console-page .flow path { stroke: var(--ink-2); stroke-width: 1.25; fill: none; }
.console-page .flow .flow__head { fill: var(--ink-2); stroke: none; }
.console-page .flow text { font-family: system-ui, sans-serif; }
.console-page .flow .flow__name { fill: var(--ink); font-size: 14px; font-weight: 600; }
.console-page .flow .flow__sub { fill: var(--ink-2); font-size: 12px; }
.console-page .flow .flow__step { fill: var(--ink-2); font-size: 12px; }

.console-page .loop { max-width: 70ch; margin: 0 0 1.25rem; padding-left: 1.3rem; }
.console-page .loop li { margin-bottom: 0.6rem; }

/*
 * Section name against what that section is for. A definition list rather than
 * prose because the question a reader arrives with is "what is THAT one", and a
 * list they can scan answers it without making them read the other four.
 */
.console-page .explains {
  margin: 0 0 1.75rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.25rem 1rem;
}

.console-page .explains__row {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.console-page .explains__row:last-child { border-bottom: 0; }
.console-page .explains dt { font-weight: 650; }
.console-page .explains dd { margin: 0; }
.console-page .explains p { margin: 0 0 0.4rem; max-width: 62ch; }
.console-page .explains p:last-child { margin-bottom: 0; }
.console-page .explains__question { color: var(--ink-2); }
.console-page .explains--glossary .explains__row { padding: 0.6rem 0; }

/* ------------------------------------------------- the enqueue form's help */

/*
 * [hidden] is honoured by browsers by default, but several rules in this file
 * set display on classes the enqueue controller hides, and a class selector
 * beats the UA sheet. Stated once, here, so hiding something actually hides it.
 */
.console-page [hidden] { display: none !important; }

/*
 * What to put in Details, per action. Stimulus narrows this to the one that was
 * picked; with JavaScript off the whole list stays on screen, which is worse to
 * read and still correct. What it must never do is show one action's fields
 * under another action's name — which is exactly what the single hard-coded
 * oil-change example used to do for five of the six.
 */
.console-page .arg-help {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.85rem 1rem;
  margin: 0 0 1.25rem;
  max-width: var(--measure);
}

.console-page .arg-help__lead {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
}

.console-page .arg-help__type + .arg-help__type { border-top: 1px solid var(--rule); padding-top: 0.85rem; margin-top: 0.85rem; }
.console-page .arg-help__type h3 { font-size: 0.95rem; font-weight: 650; margin: 0 0 0.5rem; }
.console-page .arg-help__type .note { margin: 0 0 0.6rem; }

.console-page .arg-help__fields { display: grid; grid-template-columns: 11rem 1fr; gap: 0.3rem 1rem; margin: 0 0 0.7rem; }
.console-page .arg-help__fields dt { font-size: 0.85em; }
.console-page .arg-help__fields dd { margin: 0; color: var(--ink-2); font-size: 0.92em; }

.console-page .arg-help pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--floor);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  overflow-x: auto;
}

/*
 * Said before the submit, not after it. Amber rather than red: none of these
 * refuse the command — a store's real allow list is in its own config.json and a
 * stale belief here must not block real work — they only say what is likely to
 * happen to it.
 */
.console-page .field-warning {
  border: 1px solid var(--caution);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--caution-wash);
  color: var(--ink);
  padding: 0.55rem 0.75rem;
  margin: 0 0 1.1rem;
  max-width: var(--measure);
  font-size: 0.92rem;
}

@media (max-width: 46rem) {
  .console-page .arg-help__fields { grid-template-columns: 1fr; gap: 0.1rem; }
}

/* ------------------------------------------- the enqueue form's own boxes */

/*
 * The boxes that write the JSON, for the actions whose shape this console knows.
 * Boxed and set against the panel colour so it reads as one instrument with the
 * textarea below it rather than as a rival form: they are a way to WRITE that
 * box, never a second place the command could come from.
 */
.console-page .arg-builder {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.85rem 1rem 0.95rem;
  margin: 0 0 1.1rem;
  max-width: var(--measure);
}

.console-page .arg-builder__lead {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
}

.console-page .arg-builder .field-hint { margin-bottom: 0.9rem; }
.console-page .arg-builder__fields { display: grid; gap: 0.9rem; }
.console-page .enqueue-form .arg-builder__field { display: block; margin: 0; font-weight: 400; }
.console-page .arg-builder__label { display: block; font-weight: 600; font-size: 0.94rem; margin-bottom: 0.2rem; }
.console-page .arg-builder__field .field-hint { margin: 0.2rem 0 0; }

/* Scoped through .enqueue-form so this beats the form's own
   `input[type="text"]` rule, whose attribute selector would otherwise leave the
   text boxes at 40rem and the number box at 22rem in the same little stack. */
.console-page .enqueue-form .arg-builder input {
  font: inherit;
  display: block;
  width: 100%;
  max-width: 22rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
}

/* Paused, not broken. The JSON below does not parse, so writing to it from here
   would delete whatever the operator is halfway through typing. */
.console-page .enqueue-form .arg-builder input:disabled { background: var(--rest-wash); color: var(--ink-2); cursor: not-allowed; }

/* The keys inside an object argument: indented under the argument they belong
   to, so a patch reads as one thing with parts rather than as four more
   top-level boxes. */
.console-page .arg-builder__nested {
  display: grid;
  gap: 0.8rem;
  margin: 0.35rem 0 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--rule);
}

.console-page .arg-builder__checks {
  display: grid;
  gap: 0.15rem;
  margin: 0.2rem 0 0;
  max-height: 16rem;
  overflow-y: auto;
}

.console-page .enqueue-form .arg-builder__checks .check {
  display: block;
  margin: 0;
  font-weight: 400;
  font-size: 0.92rem;
}

.console-page .enqueue-form .arg-builder__checks .check input { display: inline; width: auto; margin-right: 0.35rem; }
.console-page .enqueue-form .arg-builder__null { display: block; margin: 0.3rem 0 0; font-weight: 400; font-size: 0.88rem; color: var(--ink-2); }
.console-page .enqueue-form .arg-builder__null input { display: inline; width: auto; margin-right: 0.3rem; }
.console-page .enqueue-form .arg-builder select { max-width: 22rem; margin-bottom: 0; }

/* An argument name is one short word and belongs on one line. The machine face
   breaks anywhere by default, which is right for a command id in a table cell and
   wrong for `serviceReviewBaseUrl` at the end of a sentence, where it splits
   mid-word and reads as two identifiers. */
.console-page .arg-builder .field-hint .machine { word-break: normal; white-space: nowrap; }

/*
 * The JSON, folded away.
 *
 * It was the first thing on this form and it is now a door: the boxes above do
 * the job, and this is here for the command nobody has written boxes for, the
 * argument somebody wants to set by hand, and the operator who simply prefers it.
 * Set flush and quiet so it reads as a way out rather than as a step to complete.
 */
.console-page .json-escape {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0 1rem;
  margin: 0 0 1.25rem;
  max-width: var(--measure);
}

.console-page .json-escape summary {
  cursor: pointer;
  padding: 0.65rem 0;
  font-size: 0.92rem;
  font-weight: 550;
  color: var(--ink);
}
.console-page .json-escape summary::marker { color: var(--ink-2); }

.console-page .json-escape[open] summary { border-bottom: 1px solid var(--rule); margin-bottom: 0.8rem; }
/* The reference, inside the box it is the reference for: a section of it, not
   a box of its own. */
.console-page .json-escape .arg-help { border: 0; border-top: 1px solid var(--rule-soft); border-radius: 0; background: none; box-shadow: none; padding: 0.9rem 0 0; margin: 0.9rem 0 0; max-width: none; }
.console-page .json-escape > *:last-child { margin-bottom: 0.9rem; }

/* Whether the box parses, said while it is being typed rather than on submit. */
.console-page .json-state {
  border: 1px solid var(--caution);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--caution-wash);
  color: var(--ink);
  padding: 0.5rem 0.7rem;
  margin: 0.5rem 0 1.1rem;
  max-width: var(--measure);
  font-size: 0.9rem;
}

/* Work that is queued and can never be handed over. */
.console-page .held-flag {
  display: block;
  font-size: 0.72rem;
  font-weight: 640;
  color: var(--caution);
  white-space: nowrap;
}

.console-page .held-work {
  border: 1px solid var(--caution);
  border-radius: var(--radius);
  background: var(--caution-wash);
  padding: 0.9rem 1.1rem 1rem;
  margin: 0 0 1.5rem;
}

.console-page .held-work h3 { font-size: 1rem; margin: 0 0 0.5rem; }
.console-page .held-work p { max-width: 72ch; }
.console-page .held-work .chain { margin-bottom: 0; }

/* ------------------------------------------- queueing work from a store page */

/*
 * One card per thing this store has told us it can do, in the enqueue form's
 * piles. Outlined, like every other navigation action in this console: a card
 * opens a form, it does not queue anything, and the only filled buttons on a
 * page are the ones that write. Each card says up front what the form will ask
 * for, so nobody opens one to find they needed a work order number.
 */
.console-page .quick-queue { margin: 0 0 1.75rem; }
.console-page .quick-queue h3 { font-size: 1rem; margin: 0 0 0.5rem; }
.console-page .quick-queue p { max-width: 72ch; }

.console-page .quick-queue__group { margin: 0 0 1.1rem; padding-left: 0.85rem; border-left: 3px solid var(--rule); }
.console-page .quick-queue__group--writes { border-left-color: var(--caution); }
.console-page .quick-queue__group--writes .eyebrow { color: var(--caution); }
.console-page .quick-queue__group .eyebrow { margin-bottom: 0.45rem; }

.console-page .quick-queue__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.6rem;
}
.console-page .quick-queue__list li { display: flex; }

.console-page .quick-queue__card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.9rem 0.75rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
}
.console-page .quick-queue__card:hover { border-color: var(--ink-2); }
.console-page .quick-queue__label { font-weight: 600; }
.console-page .quick-queue__label::after { content: " \2192"; color: var(--ink-2); }
.console-page .quick-queue__needs { font-size: 0.86rem; color: var(--ink-2); }
.console-page .quick-queue__card .machine { font-size: 0.78rem; margin-top: auto; padding-top: 0.25rem; }

/*
 * The dashboard lock on the store page.
 *
 * Two pictures side by side when a rotation is pending — current on the left,
 * because that is the one to read out — and the pending one set back, so it
 * never reads as the answer. The words under each picture are what an operator
 * actually says down the phone; the monospace string is what they copy.
 */
.console-page .dashboard-lock {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem 1.1rem;
  margin: 0 0 1.75rem;
  background: var(--panel);
}

.console-page .dashboard-lock h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.console-page .dashboard-lock p { max-width: 72ch; }
.console-page .dashboard-lock__patterns { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0 0 0.75rem; }
.console-page .dashboard-lock__pattern { flex: 0 1 18rem; min-width: 0; }
.console-page .dashboard-lock__pattern p { margin: 0.3rem 0; }
.console-page .dashboard-lock__pattern--pending { padding-left: 1.5rem; border-left: 2px dashed var(--caution); }
.console-page .dashboard-lock__pattern--pending .lock-pattern { opacity: 0.8; }
.console-page .dashboard-lock__words { font-weight: 600; }
.console-page .dashboard-lock form { display: inline-block; margin: 0.4rem 0 0; }

.console-page .lock-pattern { display: block; color: var(--ink); }
.console-page .lock-pattern__grid-dot { fill: var(--rest); }
.console-page .lock-pattern__path { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.console-page .lock-pattern__start { fill: none; stroke: var(--go); stroke-width: 3; }
.console-page .lock-pattern__dot { fill: var(--ink); }
.console-page .lock-pattern__order { fill: var(--panel); font: 700 11px var(--mono); }

/* Destinations: a store's list, edited in place like the agent's Settings tab,
   and the fleet view grouped by destination. Each one is a card; the add form
   is one more card that opens. */
.console-page .destinations { margin: 0 0 1.75rem; }
.console-page .destination {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem 1.1rem;
  margin: 0 0 1rem;
  background: var(--panel);
}
.console-page .destination__head { margin: 0 0 0.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.console-page .destination__kind { margin: 0 0 0.75rem; font-size: 0.9rem; }
.console-page .destination form { margin: 0.4rem 0 0; }
.console-page .destination--new summary { cursor: pointer; font-weight: 600; }
.console-page .destination--new[open] summary { margin-bottom: 0.75rem; }
.console-page .destination-form select {
  font: inherit;
  display: block;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  max-width: 40rem;
  width: 100%;
  margin-bottom: 1.1rem;
}
.console-page .destination-form input[type="text"] { margin-bottom: 1.1rem; }
.console-page .destination-form__secret { display: flex; gap: 0.5rem; align-items: flex-start; max-width: 40rem; }
.console-page .destination-form__secret input[type="text"] { font-family: var(--mono); font-size: 0.88em; }
.console-page .destination-form label.check { display: block; margin-bottom: 0.9rem; }
.console-page [data-destination-for][hidden] { display: none; }
.console-page .button--quiet {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--rule);
  font-weight: 400;
}
.console-page .destination-stores { border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0 0 1.1rem; }
.console-page .destination-stores legend { font-weight: 600; padding: 0 0.35rem; }
.console-page .destination-stores__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.25rem 1rem; }
.console-page .destination-stores__list label.check { font-weight: 400; margin: 0; }
.console-page .destination-stores__list .dim { display: block; font-size: 0.82rem; margin-left: 1.4rem; }
.console-page .destination__edit summary { cursor: pointer; font-size: 0.92rem; }
.console-page .destination__edit[open] summary { margin-bottom: 0.6rem; }

/* ------------------------------------------------------------ the store page */

/*
 * One store, in sections. The title and the one button that leaves the page
 * share a row; under them, four answers; under those, a bar that stays put and
 * jumps to each section, because the section somebody came for is usually a
 * long way below the one they did not.
 */

/* The same cell as the fleet board, with words where the board has numbers. */
.console-page .glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 1rem;
}
.console-page .glance__cell {
  display: block;
  padding: 0.8rem 1rem 0.85rem;
  box-shadow: inset -1px 0 0 var(--rule-soft);
  color: var(--ink);
  text-decoration: none;
  --swatch: var(--rest);
}
.console-page a.glance__cell:hover { background: var(--floor); color: var(--ink); text-decoration: none; }
.console-page .glance__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-2);
}
.console-page .glance__label::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--swatch);
}
.console-page .glance__value { display: block; font-size: 1.05rem; font-weight: 600; margin-top: 0.2rem; }
.console-page .glance__cell--go { --swatch: var(--go); }
.console-page .glance__cell--caution { --swatch: var(--caution); }
.console-page .glance__cell--stop { --swatch: var(--stop); }

.console-page .page-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  padding: 0;
  margin: 0 0 0.5rem;
  background: var(--floor);
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
  font-weight: 500;
}
/* Tabs in look, jump links in fact: the sections are all on the one page. */
.console-page .page-nav a {
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.65rem 0 0.55rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.console-page .page-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); text-decoration: none; }
/* Once section_tabs_controller.js has connected, the bar is real tabs: the
   section on show is marked, and hovering only hints. */
.console-page .page-nav--tabs a:hover { border-bottom-color: var(--rule); }
.console-page .page-nav a.page-nav__tab--on { color: var(--ink); border-bottom-color: var(--accent); }
.console-page .page-nav--tabs + .page-section > h2:first-child,
.console-page .page-nav--tabs ~ .page-section > h2:first-child { margin-top: 1.25rem; }
.console-page .page-nav__count {
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  margin-left: 0.2rem;
}
.console-page .page-nav__count--caution { color: var(--caution); background: var(--caution-wash); }

/* Room above each anchor for the sticky bar, so a jump does not land a
   section's heading underneath it. */
.console-page .page-section { scroll-margin-top: 3.25rem; margin: 0 0 2rem; }
.console-page .status-panel { scroll-margin-top: 3.25rem; }

/* Once the bar is tabs, the tab names the section on show, and the section's
   own heading repeating it a line lower is the same word twice. Kept for
   screen readers, which navigate by headings. */
.console-page .page-nav--tabs ~ .page-section > h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.console-page .page-section > h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.9rem;
}
.console-page .page-section h3 { font-size: 1rem; font-weight: 650; margin: 1.5rem 0 0.5rem; }
.console-page .page-section .held-work h3,
.console-page .page-section .quick-queue h3,
.console-page .page-section .stop-work h3,
.console-page .page-section .danger h3 { margin-top: 0; }

/* The boxed sections carry their heading inside the box. */
.console-page .page-section.dashboard-lock { margin-top: 2rem; }
.console-page .page-section.dashboard-lock > h2 { font-size: 1.2rem; margin: 0 0 0.6rem; }

.console-page .status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1rem;
  align-items: start;
}
.console-page .status-panel h3 { margin: 0 0 0.4rem; }
/* A third of the page is too narrow for a label column beside a value column —
   both wrap to five lines. Label over value instead. */
.console-page .status-panel .store-detail { display: block; margin: 0; padding: 0.25rem 1rem 0.4rem; }
.console-page .status-panel .store-detail dt { padding-top: 0.6rem; font-size: 0.82rem; }
.console-page .status-panel .store-detail dd { padding: 0.05rem 0 0.6rem; }

.console-page .allow-change__form { max-width: none; margin-top: 1rem; }
.console-page .allow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 0.2rem 1.25rem;
  margin: 0 0 0.75rem;
}
.console-page .allow-grid label.check { display: block; font-weight: 400; }
.console-page .allow-grid label.check .dim { display: block; margin-left: 1.4rem; font-size: 0.82rem; }

@media (max-width: 46rem) {
  .console-page .status-grid { grid-template-columns: 1fr; }
  .console-page .status-panel .store-detail { grid-template-columns: 1fr; }
  .console-page .page-nav { gap: 0.2rem 0.9rem; font-size: 0.88rem; }
}
.console-page .quick-queue__other { font-size: 0.92rem; margin: 0.25rem 0 0; }

/* ------------------------------------------------------------------- maps */

/* Where a store is, placed by hand on its edit page. The map is as wide as the
   form's own fields so it reads as one of them, and tall enough to find a
   building on. */
.console-page .store-location__map {
  height: 22rem;
  max-width: 40rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin: 0.5rem 0 0.75rem;
}

.console-page .store-location__coords {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.console-page .store-location__coords label { margin: 0; }
.console-page .store-location__coords input[type="number"] { width: 11rem; font-family: var(--mono); font-size: 0.9em; }

/* The pin being placed. A plain dot rather than Leaflet's marker image, so the
   page ships no images and the pin is the console's own red. */
.map-pin {
  background: var(--stop);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.45);
  cursor: grab;
}

.console-page .fleet-map-section { margin: 0 0 1.5rem; }

/* Tall enough to tell Ogden from Roy, short enough that the table under it is
   still in reach on a laptop. */
.console-page .fleet-map {
  height: 24rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

/* The same three colours as the fleet table's status badges. CSS rather than
   Leaflet's colour options, so they follow the console into dark mode. */
.fleet-map__pin { stroke-width: 2; fill-opacity: 0.85; }
.fleet-map__pin--ok { stroke: #fff; fill: var(--go); }
.fleet-map__pin--silent { stroke: #fff; fill: var(--stop); }
.fleet-map__pin--retired { stroke: #fff; fill: var(--rest); }

/* The ping: a ring that swells out of the dot and fades, in the dot's own
   colour, once per check-in. Invisible at rest. */
.fleet-map__ring { fill: none; stroke-width: 0; stroke-opacity: 0; }
.fleet-map__ring.fleet-map__pin--ok { stroke: var(--go); }
.fleet-map__ring.fleet-map__pin--silent { stroke: var(--stop); }
.fleet-map__ring.fleet-map__pin--retired { stroke: var(--rest); }
.fleet-map__ring.is-pinging { animation: fleet-map-ping 1.2s ease-out; }

@keyframes fleet-map-ping {
  from { stroke-width: 2; stroke-opacity: 0.9; }
  to   { stroke-width: 28; stroke-opacity: 0; }
}

/* Without motion, a single soft halo that fades — still one mark per check-in. */
@media (prefers-reduced-motion: reduce) {
  .fleet-map__ring.is-pinging { animation: fleet-map-ping-still 1.2s linear; }

  @keyframes fleet-map-ping-still {
    from { stroke-width: 10; stroke-opacity: 0.5; }
    to   { stroke-width: 10; stroke-opacity: 0; }
  }
}

.console-page .fleet-map-frame { position: relative; }

/* Over the map, not beside it, because the map is what it is about. */
.console-page .fleet-map__stale {
  position: absolute;
  inset: 0.75rem 0.75rem auto 3.5rem;
  z-index: 1000; /* above Leaflet's panes, which run to 700 */
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--caution);
  border-radius: var(--radius);
  background: var(--caution-wash);
  color: var(--caution);
  font-weight: 600;
}

.console-page .fleet-map__stale[hidden] { display: none; }

.console-page .fleet-map__key {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.console-page .fleet-map__swatch {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  vertical-align: -0.05rem;
  margin-right: 0.3rem;
}

.console-page .fleet-map__swatch--ok { background: var(--go); }
.console-page .fleet-map__swatch--silent { background: var(--stop); }
.console-page .fleet-map__swatch--retired { background: var(--rest); }
.console-page .fleet-map__key-note { margin-left: auto; }

.console-page .fleet-map__unplaced { margin: 0.5rem 0 0; }
.console-page .fleet-map__unplaced summary { cursor: pointer; color: var(--ink-2); }

.console-page .fleet-map__unplaced ul {
  columns: 14rem;
  padding: 0;
  list-style: none;
}

/* ------------------------------------------------------------------ toasts */

/*
 * The operator's own commands as the store takes them (command_toasts_controller.js).
 * Bottom right and out of the way of the page, because the page is still the
 * thing being read; a toast only says that something moved and links to it.
 * The edge stripe carries the same tone as the command's badge, and the tag
 * says it in words, so colour is never the only carrier here either.
 * Above Leaflet's controls, which the fleet map stacks at 1000.
 */
.console-toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.console-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rest);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.14);
  pointer-events: auto;
  animation: console-toast-in 160ms ease-out;
}

.console-toast--go      { border-left-color: var(--go); }
.console-toast--caution { border-left-color: var(--caution); background: var(--caution-wash); }
.console-toast--stop    { border-left-color: var(--stop); background: var(--stop-wash); }

.console-page .console-toast__body {
  flex: 1;
  margin: 0;
  padding: 0.6rem 0 0.6rem 0.75rem;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.console-page a.console-toast__body:hover { text-decoration: underline; }

.console-toast__tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--rest);
}

.console-toast--go .console-toast__tag      { color: var(--go); }
.console-toast--caution .console-toast__tag { color: var(--caution); }
.console-toast--stop .console-toast__tag    { color: var(--stop); }

.console-toast__note { display: block; color: var(--ink-2); font-size: 0.82rem; }

/* Prefixed to outrank the console's own filled button. */
.console-page .console-toast__close {
  flex: none;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 400;
  padding: 0.5rem 0.6rem;
  border-radius: 0;
  cursor: pointer;
}

.console-page .console-toast__close:hover { color: var(--ink); opacity: 1; }

@keyframes console-toast-in {
  from { opacity: 0; transform: translateY(0.4rem); }
}

@media (prefers-reduced-motion: reduce) {
  .console-toast { animation: none; }
}

/* ------------------------------------------------------------------ inbox */

/*
 * Every worklist in one list, with the selected item beside it — the shape of
 * a mail client, because that is the job: work down a list, settle each item,
 * move on. The list scrolls on its own so the detail stays where the eye is.
 */
.console-page .inbox-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
  font-weight: 500;
}

.console-page .inbox-tabs__tab {
  color: var(--ink-2);
  padding: 0.6rem 0 0.55rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.console-page .inbox-tabs__tab:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--rule); }
.console-page .inbox-tabs__tab--on { color: var(--ink); border-bottom-color: var(--accent); }
.console-page .inbox-tabs__tab--on:hover { border-bottom-color: var(--accent); }
.console-page .inbox-tabs__count { color: var(--ink-2); font-variant-numeric: tabular-nums; margin-left: 0.15rem; }

.console-page .inbox {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.console-page .inbox__list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden auto;
  max-height: calc(100vh - 14rem);
  position: sticky;
  top: 1rem;
}

.console-page .inbox__list li + li { border-top: 1px solid var(--rule-soft); }

.console-page .inbox__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.8rem 1rem;
  color: var(--ink);
  box-shadow: inset 3px 0 0 transparent;
}
.console-page .inbox__item:hover { background: var(--floor); color: var(--ink); text-decoration: none; }
.console-page .inbox__item--on,
.console-page .inbox__item--on:hover { background: var(--accent-wash); box-shadow: inset 3px 0 0 var(--accent); }

.console-page .inbox__item-top { display: flex; align-items: center; gap: 0.5rem; }
.console-page .inbox__age { margin-left: auto; font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; }
.console-page .inbox__title { font-weight: 600; font-size: 0.92rem; }
.console-page .inbox__where { font-size: 0.82rem; color: var(--ink-2); }

.console-page .inbox__detail {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem 1.5rem;
  min-width: 0;
}

.console-page .inbox__heading { margin: 0 0 0.6rem; font-size: 1.3rem; font-weight: 650; }
.console-page .inbox__detail .record-summary { margin: 0 0 1.25rem; }
.console-page .inbox__detail .command-detail { margin: 0 0 1rem; box-shadow: none; }
.console-page .inbox__detail pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.console-page .inbox__more { font-size: 0.88rem; color: var(--ink-2); margin: 0 0 1.25rem; }
.console-page .inbox__detail .operator-decision { margin: 0; }

.console-page .inbox__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.console-page .inbox__actions form { display: contents; }
.console-page .inbox__actions .button-secondary { background: var(--panel); color: var(--ink); border-color: var(--rule); }

@media (max-width: 60rem) {
  .console-page .inbox { grid-template-columns: minmax(0, 1fr); }
  .console-page .inbox__list { position: static; max-height: 22rem; }
}

/* --------------------------------------------------------------- overview */

/*
 * The whole system on one screen. Cards in two columns: the fleet and the
 * recent work on the left, where the eye starts; the short lists and single
 * numbers on the right. Every card's heading row carries the link to the page
 * that has the rest.
 */
.console-page .board--four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.console-page .overview {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.25rem;
  align-items: start;
}

.console-page .overview__main,
.console-page .overview__side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }

.console-page .card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem 1.15rem;
}
.console-page .card--flush { padding: 0; overflow: hidden; }
.console-page .card__pad { padding: 0 1.25rem; margin: 0.75rem 0 1rem; }

.console-page .card__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 0.85rem;
}
.console-page .card--flush .card__head { padding: 1rem 1.25rem 0; margin-bottom: 0.6rem; }
.console-page .card__head h2 { margin: 0; font-size: 1rem; }
.console-page .card__head a { margin-left: auto; font-size: 0.85rem; white-space: nowrap; }
.console-page .card .note:last-child { margin-bottom: 0; }

/* A table that is the card's body rather than a box of its own. */
.console-page .table-scroll--bare { border: 0; border-radius: 0; box-shadow: none; margin: 0; border-top: 1px solid var(--rule-soft); }
.console-page .table-scroll--bare td { vertical-align: top; }
.console-page .table-scroll--bare .recent__outcome { width: 1%; white-space: nowrap; padding-right: 0; }

.console-page .fleet-bar {
  display: flex;
  gap: 2px;
  height: 0.85rem;
  border-radius: 4px;
  overflow: hidden;
  background: var(--rest-wash);
}
.console-page .fleet-bar__part { flex: 0 1 0; min-width: 4px; }
.console-page .fleet-bar__part--healthy { background: var(--go); }
.console-page .fleet-bar__part--loaded { background: var(--caution); }
.console-page .fleet-bar__part--not_reading { background: color-mix(in srgb, var(--stop) 65%, var(--ink)); }
.console-page .fleet-bar__part--silent { background: var(--stop); }
.console-page .fleet-bar__part--retired { background: var(--rest); }

.console-page .fleet-legend {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: 0.86rem;
  color: var(--ink-2);
}
.console-page .fleet-legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.console-page .fleet-legend strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.console-page .fleet-legend__swatch { width: 0.65rem; height: 0.65rem; border-radius: 2px; flex: none; }

.console-page .attention { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-soft); }
.console-page .attention li + li { border-top: 1px solid var(--rule-soft); }
.console-page .attention__item { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.7rem 1.25rem; color: var(--ink); }
.console-page .attention__item:hover { background: var(--floor); color: var(--ink); text-decoration: none; }
.console-page .attention__title { font-weight: 600; font-size: 0.92rem; }
.console-page .attention__meta { font-size: 0.82rem; color: var(--ink-2); }

.console-page .overview__big { margin: 0 0 0.75rem; color: var(--ink-2); }
.console-page .overview__big strong { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); margin-right: 0.3rem; font-variant-numeric: tabular-nums; }

.console-page .tally { margin: 0; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.console-page .tally div { display: flex; justify-content: space-between; gap: 1rem; }
.console-page .tally dt { color: var(--ink-2); }
.console-page .tally dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.console-page .meter { display: block; height: 0.5rem; border-radius: 999px; background: var(--rest-wash); overflow: hidden; margin: 0 0 0.75rem; }
.console-page .meter__fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.console-page .meter--thin { height: 0.35rem; margin: 0; flex: 1; }

.console-page .builds { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.88rem; }
.console-page .builds li { display: flex; align-items: center; gap: 0.75rem; }
.console-page .builds .machine { width: 6.5rem; flex: none; color: var(--ink); }
.console-page .builds__count { width: 2rem; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }

@media (max-width: 60rem) {
  .console-page .overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 46rem) {
  .console-page .board--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ----------------------------------------------------------------- search */

.console-page .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* In the sidebar, above the nav: a box that looks like a search field and is a
   button, because typing happens in the dialog it opens. */
.console-page .console-head a.console-search-button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--head-rule);
  background: var(--head-raised);
  color: var(--head-ink-3);
  font-size: 0.88rem;
  text-decoration: none;
}
.console-page .console-head a.console-search-button:hover { color: var(--head-ink); border-color: var(--head-ink-3); }
.console-page .console-search-button__key,
.console-page .search-dialog__esc {
  margin-left: auto;
  font: 600 0.7rem var(--mono);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid currentColor;
  opacity: 0.8;
}

.console-page .search-dialog {
  width: min(40rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100vh - 6rem));
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 48px -12px rgba(16, 24, 40, 0.35);
  overflow: hidden;
}
.console-page .search-dialog[open] { display: flex; flex-direction: column; }
.console-page .search-dialog::backdrop { background: rgba(15, 18, 25, 0.45); }

.console-page .search-dialog__form {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}
.console-page .search-dialog__form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}
.console-page .search-dialog__esc { color: var(--ink-2); }
.console-page .search-dialog__results { display: block; overflow-y: auto; padding: 0.35rem 0 0.6rem; }

.console-page .search-page__form { display: flex; gap: 0.5rem; max-width: 36rem; margin: 0 0 1.5rem; }
.console-page .search-page__form input[type="search"] {
  flex: 1;
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.console-page .search-results__hint { margin: 0; padding: 1rem; color: var(--ink-2); font-size: 0.9rem; }
.console-page .search-results__group h2 {
  margin: 0.6rem 0 0.2rem;
  padding: 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
}
.console-page .search-results__group ul { list-style: none; margin: 0; padding: 0 0.4rem; }
.console-page .search-results__item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  color: var(--ink);
}
.console-page .search-results__item:hover,
.console-page .search-results__item:focus { background: var(--accent-wash); color: var(--ink); text-decoration: none; outline: none; }
.console-page .search-results__title { font-weight: 550; font-size: 0.92rem; }
.console-page .search-results__detail { font-size: 0.8rem; color: var(--ink-2); }

@media (max-width: 60rem) {
  .console-page .console-head a.console-search-button { order: 3; flex: 1 0 100%; }
  .console-page .console-search-button__key { display: none; }
}

/* ------------------------------------------------------------ fleet table */

.console-page .fleet-attention { color: var(--stop); font-weight: 600; }
.console-page .loaded-age--stale { color: var(--caution); font-weight: 550; }
.console-page .loaded-age__refresh { margin-left: 0.15rem; }

/* Filters, one per bucket: the overview's five, plus held work. */
.console-page .fleet-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.console-page .fleet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: none;
}
.console-page .fleet-chip:hover { border-color: var(--ink-2); opacity: 1; }
.console-page .fleet-chip--on { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.console-page .fleet-chip__count { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.console-page .fleet-chip--on .fleet-chip__count { color: inherit; opacity: 0.75; }

.console-page .fleet-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex: none; }
.console-page .fleet-dot--silent, .console-page .fleet-dot--not_reading { background: var(--stop); }
.console-page .fleet-dot--loaded { background: var(--caution); }
.console-page .fleet-dot--healthy { background: var(--go); }
.console-page .fleet-dot--retired { background: var(--rest); }

/* The table, its toolbar and its count, as one panel. */
.console-page .fleet-panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0 0 1.5rem;
}
.console-page .fleet-panel .table-scroll--bare { border-top: 0; }
.console-page .fleet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.console-page .fleet-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 15rem;
  max-width: 22rem;
  padding: 0 0.6rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink-2);
}
.console-page .fleet-search:focus-within { border-color: var(--accent); }
.console-page .fleet-search input { border: 0; outline: 0; padding: 0.45rem 0; flex: 1; min-width: 0; background: none; }
.console-page .fleet-switch { margin-left: auto; display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.console-page .fleet-switch button {
  height: 2rem;
  padding: 0 0.8rem;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 0.86rem;
  box-shadow: none;
}
.console-page .fleet-switch button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }
.console-page .fleet-map-pane { padding: 1rem; }
.console-page .fleet-map-pane .fleet-map-section { margin: 0; }

/* Sortable headings: the heading is the button. */
.console-page .fleet-sort {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.console-page .fleet-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.console-page th[aria-sort] .fleet-sort::after { content: "\2195"; opacity: 0.35; font-size: 0.85em; }
.console-page th[aria-sort="ascending"] .fleet-sort::after { content: "\2191"; opacity: 1; }
.console-page th[aria-sort="descending"] .fleet-sort::after { content: "\2193"; opacity: 1; }
.console-page th[aria-sort="ascending"], .console-page th[aria-sort="descending"] { color: var(--ink); }

.console-page .fleet-empty { margin: 0; padding: 2rem 1rem; text-align: center; color: var(--ink-2); }
.console-page .fleet-empty__reset { all: unset; color: var(--accent); cursor: pointer; }
.console-page .fleet-foot { margin: 0; padding: 0.6rem 1rem; border-top: 1px solid var(--rule); font-size: 0.84rem; color: var(--ink-2); }

/* ------------------------------------------------------------- audit log */

.console-page .audit__filters select { height: 2.1rem; }
.console-page .audit__filters input[type="submit"] { height: 2.1rem; padding: 0 0.9rem; }
.console-page .audit__clear { font-size: 0.88rem; }
.console-page .audit__table td { vertical-align: top; }
.console-page .audit__who { white-space: nowrap; }
.console-page .audit__who > span { vertical-align: middle; }
.console-page .audit__avatar {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  font-size: 0.66rem;
  font-weight: 600;
  background: var(--accent-wash);
  color: var(--accent-ink);
}
.console-page .audit__avatar--producer,
.console-page .audit__avatar--system,
.console-page .audit__avatar--anonymous { background: var(--rest-wash); color: var(--ink-2); }
.console-page .audit__kind { margin-left: 0.35rem; font-size: 0.75rem; color: var(--ink-2); }
.console-page .audit__action { white-space: nowrap; }
.console-page .audit__action .badge { margin-left: 0.4rem; }
.console-page .audit__tone--danger { color: var(--stop); }
.console-page .audit__tone--change { color: var(--ink); }
.console-page .audit__tone--change::before { background: var(--accent); }
.console-page .audit__tone--decide { color: var(--caution); }
.console-page .audit__tone--read { color: var(--ink); }
.console-page .audit__tone--read::before { background: var(--rest); }
.console-page .audit__target { min-width: 10rem; max-width: 16rem; overflow-wrap: anywhere; }
.console-page .audit__detail { min-width: 14rem; max-width: 30rem; color: var(--ink-2); }
.console-page .audit__reconstructed { display: inline-block; margin-left: 0.3rem; padding: 0 0.4rem; border: 1px solid var(--rule); border-radius: 999px; font-size: 0.72rem; color: var(--ink-2); white-space: nowrap; }
.console-page .audit__filters select { max-width: 14rem; }
.console-page .audit__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.console-page .audit__pages { display: flex; gap: 0.4rem; }
.console-page .audit__pages .button { padding: 0.3rem 0.75rem; }

/* ---------------------------------------------------------------- trends */

/* Under a board number: its last seven days and how far it moved since
   yesterday. column-reverse on the cell puts this, first in the markup, last
   on screen. */
.console-page .board__trend { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; font-size: 0.76rem; color: var(--ink-2); }
.console-page .board__trend svg { flex: none; overflow: visible; }
.console-page .board__trend--go svg { color: var(--go); }
.console-page .board__trend--stop svg { color: var(--stop); }
.console-page .board__trend--caution svg { color: var(--caution); }
.console-page .board__trend--empty { font-style: italic; }
.console-page .board__delta { white-space: nowrap; font-variant-numeric: tabular-nums; }

.console-page .card__note { font-size: 0.84rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Commands per day: one stacked bar a day, done at the bottom. */
.console-page .week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.9rem;
  height: 10rem;
  margin: 0.9rem 0 0;
}
.console-page .week__day { display: flex; flex-direction: column; gap: 0.35rem; min-height: 0; }
.console-page .week__bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; }
.console-page .week__part { display: block; min-height: 0; }
.console-page .week__part:first-child { border-radius: 3px 3px 0 0; }
.console-page .week__part--done { background: var(--accent); }
.console-page .week__part--problem { background: var(--stop); }
.console-page .week__part--going { background: var(--rest); opacity: 0.5; }
.console-page .week__label { text-align: center; font-size: 0.76rem; color: var(--ink-2); }
.console-page .week__key { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; list-style: none; padding: 0; margin: 0.8rem 0 0; font-size: 0.8rem; color: var(--ink-2); }
.console-page .week__key li { display: flex; align-items: center; gap: 0.4rem; }
.console-page .week__swatch { width: 0.65rem; height: 0.65rem; border-radius: 2px; display: inline-block; }
