/*
 * Neotelix design system.
 *
 * One stylesheet, served same-origin, no build step. That is not laziness:
 * the session cookie uses the `__Host-` prefix with SameSite=Lax and no CORS
 * (see app/services/sessions.py), which only holds because the API serves the
 * interface itself. A separate front-end origin would cost all of that and
 * buy a bundler.
 *
 * DENSITY FIRST. This is read during an incident, by someone who already has
 * six windows open. Every rule here favours information per screen over
 * whitespace: 13px base, tight line-height in tables, no decorative padding.
 *
 * SEVERITY IS NEVER COLOUR ALONE. Around 1 in 12 men has a colour vision
 * deficiency, and this is safety-critical text. Every severity carries a
 * label and a border weight as well as a hue.
 */

/*
 * TWO THEMES, AND THREE STATES TO COVER
 * A viewer can choose light, choose dark, or choose neither. The last is the
 * common case and stamps nothing on the document, so `:root` alone must be a
 * complete, working palette — light here — and the dark values are redefined
 * twice: once behind `prefers-color-scheme` for the un-stamped state, and
 * once behind `[data-theme="dark"]` so the toggle beats the operating system
 * in both directions.
 *
 * Every component below reads tokens only. A colour defined inside a media
 * query would simply not exist in the un-stamped state, which is how a page
 * ends up rendering one theme's text on the other theme's ground.
 */

:root {
  --donut: conic-gradient(var(--text-faint) 0 100%);
  /* LIGHT — light grey ground, navy writing. */
  --bg: #eef1f5;
  --bg-raised: #ffffff;
  --panel: #ffffff;
  --panel-hover: #e4e9f1;
  --line: #d3dae6;
  --line-strong: #b3bfd1;

  --text: #10203a;
  --text-dim: #46587a;
  --text-faint: #6b7c9c;

  /* The wordmark. #1098ff is the brand blue the marketing site uses, but on a
     white header bar it is 3.0:1 against the ground — fine for a 42px header,
     not for 13px. The light theme therefore uses the darker brand blue and
     the dark theme uses the site's exact value. */
  --wordmark-neo: #0b5fae;
  --wordmark-telix: #10203a;

  --accent: #0b5fae;
  --accent-dim: #d7e5f6;
  --ok: #1a7f4b;
  --warn: #8a5a12;
  --bad: #a3123f;
  --info: #5b46b8;

  --shadow: 0 4px 14px rgba(16, 32, 58, 0.14);
  --on-accent: #ffffff;

  /* The relationship graph's node colours. Eight distinct hues, saturated
     but dark enough to hold contrast on a light ground; the dark themes
     redefine them brighter rather than reusing these, which disappear into
     navy. */
  --net-1: #d6336c; --net-2: #7048e8; --net-3: #1971c2; --net-4: #0c8a6a;
  --net-5: #d9480f; --net-6: #ae3ec9; --net-7: #b08900; --net-8: #0b7285;

  /* Chart series, validated as a categorical set against THIS ground:
     lightness band, chroma floor, colour-vision separation (deutan ΔE 18.6),
     normal-vision separation and contrast. The dark theme needs its own
     steps — the same hues fail the band on a navy ground, which is why
     these are redefined rather than reused. */
  --c-critical: #a3123f;
  --c-warning: #b87d10;
  --c-neutral: #0b5fae;
  --c-grid: #d3dae6;

  /* THE RISK BANDS, one definition for the whole product. Severity means the
     same colour on a finding badge, a bar, a donut segment and a gauge, and
     the alternative -- each chart choosing -- is how "critical" ends up amber
     on one panel and red on the next.

     Critical red, high orange, medium yellow, low green, informational grey,
     as the specification asks. High and medium are separate hues rather than
     two weights of amber: on a stacked bar they sit against each other, and
     an orange next to a yellow-brown is the pair people with deuteranopia
     lose first. Each is checked for contrast against this ground at the 12px
     label size a legend actually uses. */
  --c-high: #c1560c;
  --c-medium: #8a6d00;
  --c-low: #1a7f4b;
  --c-info: #5a6b8c;

  --radius: 8px;
  --radius-sm: 5px;
  --topbar: 52px;

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: Calibri, Carlito, "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* DARK — navy ground, white writing, blue accents. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --bg-raised: #111a2e;
    --panel: #131d33;
    --panel-hover: #182444;
    --line: #26334d;
    --line-strong: #33436a;

    --text: #f2f6fb;
    --text-dim: #a9bcd8;
    --text-faint: #7e91b2;

    --wordmark-neo: #1098ff;
    --wordmark-telix: #ffffff;

    --accent: #5cc8f5;
    --accent-dim: #123246;
    --ok: #4ade80;
    --warn: #fbbf24;
    --bad: #ff8095;
    --info: #a78bfa;

    --shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    --on-accent: #04121c;

    --net-1: #ff6b9d; --net-2: #a78bfa; --net-3: #4dabf7; --net-4: #38d9a9;
    --net-5: #ff922b; --net-6: #e599f7; --net-7: #ffd43b; --net-8: #66d9e8;

    --c-critical: #e05a76;
    --c-warning: #c08a1c;
    --c-neutral: #3f9fd6;
    --c-grid: #1f2b45;

    /* Redefined rather than reused: the light theme's steps fail the
       lightness band on a navy ground, which is the same reason the three
       series colours above are already declared twice. */
    --c-high: #ef8a4a;
    --c-medium: #d8c04a;
    --c-low: #4ade80;
    --c-info: #93a5c4;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --bg-raised: #111a2e;
  --panel: #131d33;
  --panel-hover: #182444;
  --line: #26334d;
  --line-strong: #33436a;

  --text: #f2f6fb;
  --text-dim: #a9bcd8;
  --text-faint: #7e91b2;

  --wordmark-neo: #1098ff;
  --wordmark-telix: #ffffff;

  --accent: #5cc8f5;
  --accent-dim: #123246;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #ff8095;
  --info: #a78bfa;

  --shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  --on-accent: #04121c;

  --net-1: #ff6b9d; --net-2: #a78bfa; --net-3: #4dabf7; --net-4: #38d9a9;
  --net-5: #ff922b; --net-6: #e599f7; --net-7: #ffd43b; --net-8: #66d9e8;

  --c-critical: #e05a76;
  --c-warning: #c08a1c;
  --c-neutral: #3f9fd6;
  --c-grid: #1f2b45;

  /* The explicit dark choice, matching the media-query block above. A token
     declared in two of the three blocks does not error -- it inherits, and
     the omission only shows on the theme nobody checked. */
  --c-high: #ef8a4a;
  --c-medium: #d8c04a;
  --c-low: #4ade80;
  --c-info: #93a5c4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- shell -- */

/* THREE STACKED ROWS. The menu used to be a column down the left; it is now a
   bar under the header, so the content gets the full width of the window --
   which matters most on the dashboard, where a twelve-column grid was losing
   232px to navigation on every screen. */
/* FOUR ROWS, and the fourth is named rather than left to auto-placement.
   The credit alarm and the client hint used to be bare elements emitted
   between the nav and the pane, with no grid area, so where they landed was
   whatever auto-placement decided against three named areas -- and how many
   of them render at all depends on the reader's permissions. They share one
   slot with a row of its own now, which collapses to nothing when both are
   empty. */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--topbar) auto auto 1fr;
  grid-template-areas: "topbar" "nav" "notices" "main";
  height: 100vh;
}

#notice-slot { grid-area: notices; }

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  padding-right: 16px;
  margin-right: 4px;
  border-right: 1px solid var(--line);
  font-weight: 700;
  letter-spacing: 0.06em;
}
/* The mark is the real logo asset now, which carries its own dark ground. The
   radius is what makes that read as an app tile rather than as a stray dark
   square sitting on the light theme's header bar. `flex: none` because the brand
   row is a flex container and would otherwise squeeze it. */
.brand .mark { flex: none; display: block; border-radius: 5px; }
/* Sits under a field, before the next label. The invitation box is
   `type=text` because a code is meant to be pasted and read back, which makes
   it look like the password box the rest of the page does not have — someone
   typed a password into it and got a full round trip to their provider before
   being refused. */
/* Not scoped to .login any more. Four places in the console now say a
   sentence under a field about what it will and will not do, and each was
   borrowing this rule from the sign-in page — which works right up until
   somebody changes the sign-in page. The login margin is the tighter one
   there and stays as an override. */
.field-note {
  margin: 4px 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-faint);
}

.brand .name { font-size: 14.5px; }

/* "Neo" in blue, the rest in the theme's ink — white on the dark navy
   header bar, navy on the light one. Both halves inherit the weight and
   letter-spacing of whatever they sit in, so the wordmark works at 13px in
   the header bar and at heading size on the sign-in card without a second rule. */
.wordmark .neo { color: var(--wordmark-neo); }
.wordmark { color: var(--wordmark-telix); }

/* The same mark on the sign-in card, where it sits inside an <h1> and has to
   be pulled onto the text baseline rather than the line box. */
.mark-inline { display: inline-flex; vertical-align: -6px; }
.mark-inline .mark { border-radius: 6px; }

.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
/* The crumbs take the slack so the account controls stay hard right and the
   wordmark stays hard left, whatever the page is called. */
.topbar .crumbs { color: var(--text-dim); font-size: 13px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .crumbs b { color: var(--text); font-weight: 500; }

.whoami {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}
.whoami .who { color: var(--text); }

nav.topnav {
  grid-area: nav;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  /* WRAPS RATHER THAN SCROLLS, and the first attempt got this wrong in a way
     worth recording. `overflow-x: auto` with `overflow-y: visible` does not
     mean "scroll sideways, overflow downwards": CSS computes `visible` to
     `auto` the moment the other axis is not visible, so the bar became a
     53px scroll container and every dropdown was clipped inside it. Measured
     at 314px of menu hidden behind 53px of bar.

     So there is no overflow here at all. A bar too wide for the window takes
     a second row, which moves the content down once on a narrow screen --
     and that is plainly better than a menu that opens into nothing. */
  flex-wrap: wrap;
}
.nav-group { position: relative; flex: none; }

/* A real button, so keyboard and screen-reader behaviour come from the
   element rather than being re-implemented. */
nav.topnav button.group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-dim);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
nav.topnav button.group:hover { color: var(--text); background: var(--panel-hover); }
/* A one-page group links straight to it, styled like the dropdown buttons. */
.nav-direct { display: flex; }
nav.topnav a.group {
  display: flex; align-items: center; padding: 10px 12px; font-size: 12.5px;
  color: var(--text-dim); border-bottom: 2px solid transparent; font-weight: 600;
  white-space: nowrap; text-decoration: none;
}
nav.topnav a.group:hover { color: var(--text); background: var(--panel-hover); text-decoration: none; }
nav.topnav a.group:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
nav.topnav .nav-group.here a.group { color: var(--text); border-bottom-color: var(--accent); }
nav.topnav button.group:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
/* WHERE YOU ARE, without opening anything. The group holding the current page
   is underlined; the dropdown stays shut so it does not cover the page you
   just asked for. */
nav.topnav .nav-group.here button.group {
  color: var(--text);
  border-bottom-color: var(--accent);
}
nav.topnav button.group[aria-expanded="true"] {
  color: var(--text);
  background: var(--panel-hover);
}
nav.topnav .chev { font-size: 9px; line-height: 1; }

/* The pages a group opens.
 *
 * The `[hidden]` rule is EXPLICIT, matching `.tab-panel`, `.qbox` and
 * `pre.out`. There is no global reset in this stylesheet, so a later
 * `display:` on this class would silently beat the attribute and every menu
 * would hang open while the tests still passed. */
nav.topnav .group-items {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  min-width: 220px;
  padding: 5px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
nav.topnav .group-items[hidden] { display: none; }

nav.topnav .group-items a {
  display: block;
  padding: 8px 14px;
  color: var(--text-dim);
  border-left: 2px solid transparent;
  white-space: nowrap;
}
nav.topnav .group-items a:hover {
  background: var(--panel-hover);
  color: var(--text);
  text-decoration: none;
}
nav.topnav .group-items a.active {
  color: var(--text);
  background: var(--panel-hover);
  border-left-color: var(--accent);
}

main.content {
  grid-area: main;
  overflow-y: auto;
  padding: 20px 24px 48px;
}

/* ---------------------------------------------------- the analysis layout -- */

/* THE QUEUE BESIDE THE ALERT, not instead of it. Working the queue used to
   mean list, full page, decision, find your place again -- thirty times a
   shift. The rail scrolls on its own and sticks, so the pane beside it can be
   several screens long without taking the queue with it. */
.analysis-layout {
  display: grid;
  grid-template-columns: var(--rail-width, 300px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* RETRACTED, NOT REMOVED. The track narrows to just the toggle, so the
   button that brings the queue back is still exactly where the button that
   sent it away was. Hiding the rail outright would leave nothing to click
   and nothing to say the queue exists -- the mistake the old sidebar made. */
.analysis-layout.rail-collapsed { grid-template-columns: 24px minmax(0, 1fr); }
.rail-collapsed .queue-rail {
  border-right: 0;
  padding-right: 0;
  overflow: visible;
}
.rail-collapsed .queue-rail > *:not(.rail-toggle) { display: none; }

/* `min-width: 0` IS THE WHOLE RULE AND IT IS NOT DECORATION. A grid child
   defaults to `min-width: auto`, so one wide table or a long unbroken hash in
   `pre.out` would push this column past its track and take the rail off
   screen with it. The column's own `minmax(0, 1fr)` covers the same ground;
   both are declared because either one alone is a single edit away from the
   overflow coming back. */
.analysis-main { min-width: 0; }

.queue-rail {
  position: sticky;
  top: 0;
  /* `main.content` is the scroll container and carries 20px of top padding
     and 48px at the bottom; this keeps the rail inside the viewport rather
     than letting a long queue push the page. */
  max-height: calc(100vh - var(--topbar) - 68px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding-right: 12px;
}

/* THE RETRACT BUTTON sits in the rail's own top-left, above the count, so
   it travels with the rail instead of needing a home in the page header. */
.rail-toggle {
  display: block;
  margin: 0 0 6px;
  padding: 1px 5px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}
.rail-toggle:hover { color: var(--text); border-color: var(--text-dim); }

/* THE DRAG HANDLE. Nine pixels of reach centred on the gap between the two
   columns, so it can be grabbed without pixel-hunting. Positioned against
   the LAYOUT, not the rail: the rail scrolls, and a handle on its edge would
   be clipped by that overflow. */
.analysis-layout { position: relative; }
.rail-grip {
  position: absolute;
  top: 0;
  left: calc(var(--rail-width, 300px) + 6px);
  width: 9px;
  height: 100%;
  cursor: col-resize;
  background: none;
  border: 0;
  border-radius: 3px;
}
.rail-collapsed .rail-grip { display: none; }
.rail-grip:hover, .rail-grip:focus-visible {
  background: var(--accent);
  opacity: 0.35;
  outline: none;
}

.queue-count {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.queue-empty { margin: 0; font-size: 12.5px; color: var(--text-dim); }

.queue-list { margin: 0; padding: 0; list-style: none; }

.queue-row {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}
.queue-row:hover { background: var(--panel-hover); text-decoration: none; }

/* THE ONE BEING READ, and the one the keyboard is on, are different things
   and look different. A cursor that looked identical to the current page
   would make `j` appear to do nothing. */
.queue-row.current { background: var(--panel-hover); border-color: var(--accent); }
.queue-row.cursor { border-color: var(--text-dim); }

.queue-row-top { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.queue-age { font-size: 11px; color: var(--text-faint); white-space: nowrap; }

/* AN ALERT THAT HAS BEEN SITTING. Age is the strongest triage signal on the
   page, and the only one the queue could show before PR 6 sends the host. */
.queue-age.stale { color: var(--warn); font-weight: 600; }

.queue-id { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* THE AFFECTED MACHINE. Dimmer than the incident id, which is what the row is
   identified by, and brighter than the state -- in a queue being scanned for
   "which of these is on a server I care about", this is the line the eye
   wants second. */
.queue-host {
  font-size: 11px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-state { font-size: 11px; color: var(--text-dim); }

/* THE DECISION IS A BUTTON AT THE END OF THE PAGE, and that is the whole
   rule now.

   It used to be a bordered panel pinned to the bottom of the scrollport, on
   the argument that the thing the page most wants somebody to do should
   always be reachable. In practice it was a box floating over whatever was
   being read, and it had to explain itself to justify the space it took. One
   action at the end of the work is one button at the end of the page. */

/* BELOW THIS THE RAIL IS A LIST ABOVE THE ALERT, not a column beside it.
   Hiding it would leave a narrow screen with no queue at all, which is the
   mistake the sidebar made before it became the top bar. */
@media (max-width: 1100px) {
  /* The rail is a list ABOVE the alert here, so neither the stored width nor
     the collapse applies -- a 560px track and a 24px one are both wrong for
     a single-column page. */
  .analysis-layout,
  .analysis-layout.rail-collapsed { grid-template-columns: minmax(0, 1fr); }
  .rail-collapsed .queue-rail > *:not(.rail-toggle) { display: revert; }
  .rail-grip { display: none; }
  .queue-rail {
    position: static;
    max-height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 10px;
    margin-bottom: 4px;
  }
  .queue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px; }
}

/* THE FACTS, AS A STRIP RATHER THAN A TAB. Six values laid out across the
   width instead of stacked in a tabbed panel: the tab row cost more height
   than the content it hid, and it was one of five strips on this page. */
.facts-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2px 16px;
  margin: 0;
}

/* WHY THAT CONFIDENCE. The sentence was in the payload and rendered only
   inside a collapsed fold. It sits under the badges now, because a bare
   "high" is the thing an analyst would otherwise act on. */
.confidence-basis {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-dim);
  max-width: 76ch;
}

/* SUBMITTED AGAINST MATCHED, in two columns. The two lists were in different
   sections, so working out which of nine indicators actually matched meant
   reading one against the other. */
/* IT MUST NOT SCROLL SIDEWAYS INSIDE ITS PANEL. The whole point of the strip
   is that an analyst reads it at a glance; a table with its own horizontal
   scrollbar is the bulky look this replaced. The submitted value is a hash or
   a domain and must stay intact, so the width goes to that column and the
   second one takes what it needs. */
.ioc-table { width: 100%; table-layout: auto; }
.ioc-table td { vertical-align: top; }
.ioc-table td:first-child { word-break: break-all; }
.ioc-table td:last-child { white-space: nowrap; }

/* THE TICK, in orange. Not green: a match is not good news. It is the one
   mark on this page an analyst scans the column for, so it carries weight
   the row's text does not. */
.ioc-hit {
  color: var(--warn);
  font-weight: 700;
  margin-right: 6px;
}

/* THE GIST. One or two derived sentences where the tab used to hold every
   intelligence sentence the feeds carry for every matched indicator. */
/* WHAT THIS ALERT SHOWS, first and in full strength. It is the only line in
   this tab that is about THIS incident rather than about the threat, so it
   leads and it is not dimmed. */
.intel-lead {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 76ch;
  color: var(--text);
}

.intel-gist { margin: 0; font-size: 13px; line-height: 1.6; max-width: 76ch; }

/* THE FEED'S OWN ACCOUNT, under the derived summary. Set at reading width
   and a touch dimmer than the gist above it: the gist is what we worked out
   and this is what the intelligence says, which is the more useful of the
   two and the longer. */
.intel-story {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.65;
  max-width: 76ch;
  color: var(--text-dim);
}
.intel-story + .intel-story { margin-top: 8px; }

/* THE SWEEP LIST, bounded. It was a full-width section where fifty values
   simply ran down the page; inside a tab it scrolls within the panel so the
   strip keeps its height whatever the alert carried. */
.sweep-list {
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
}

/* A technique and the one sentence saying what it is. The sentence is dimmer
   than the name because the name is what the reader is scanning for. */
.technique-list .dim { display: block; margin-top: 2px; }

/* THE TACTIC, against the technique rather than under it. "Execution" is half
   of what T1204.001 means, and it is one word -- a chip beside the name reads
   faster than another line. */
.technique-tactic {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* "AND 15 MORE", WHICH NOW OPENS. It was a dim line of text that looked
   clickable and was not. Native disclosure rather than a bound handler: the
   pane is swapped wholesale on navigation, so anything bound after render has
   to be re-bound, and find-in-page opens a `details` on its own. */
.more-fold { margin-top: 2px; }
.more-fold > summary {
  cursor: pointer;
  display: inline-block;
  padding: 3px 0;
  font-size: 12px;
  color: var(--accent);
  list-style: none;
}
.more-fold > summary::-webkit-details-marker { display: none; }
.more-fold > summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.12s ease;
}
.more-fold[open] > summary::before { transform: rotate(90deg); }
.more-fold > summary:hover { text-decoration: underline; }
.more-fold > ul { margin-top: 4px; }

/* WHAT THE ADVERSARY DID, as one numbered account. Numbered because the order
   is the point -- it is a sequence of events, not a set of options -- and
   deliberately without the checkbox every other attributed list on this page
   carries: ticking these would be recording having done what the attacker
   did. */
.adversary-account { margin: 0; padding-left: 22px; }
.adversary-account li { font-size: 13px; line-height: 1.65; padding: 3px 0; }

/* HAVE WE SEEN THIS BEFORE? The first thing on the analysis page, and marked
   so it reads as a finding rather than as more metadata -- it is the one
   panel that can end the analyst's work before they read anything else. The
   accent edge, not a colour: whether a repeat is good or bad news depends
   entirely on how the earlier ones turned out. */
/* THE TITLE AND THE REPEAT ON ONE LINE. The repeat used to be a panel below
   the title; as a line beside it, it costs the alert no vertical space when
   there is no repeat to report, and the sentence that can end the work sits
   where the eye already is. Wraps under the title on a narrow pane rather
   than squeezing either. */
.title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.title-row h1 { margin-bottom: 0; }

/* A DISCLOSURE, NOT A PANEL. The summary is the whole point and the rest is
   behind it, so the accent lives on the line rather than on a block. */
.repeat-history { margin-bottom: 0; }
.repeat-headline {
  margin: 0;
  cursor: pointer;
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
}
.repeat-headline::-webkit-details-marker { display: none; }
.repeat-headline::after {
  content: "\25BE";
  margin-left: 6px;
  font-size: 10px;
  transition: transform 0.12s ease;
  display: inline-block;
}
.repeat-history[open] > .repeat-headline::after { transform: rotate(180deg); }
.repeat-headline:hover { text-decoration: underline; }

/* The detail, once opened: indented under the line it belongs to and bounded
   so a long history does not push the summary off the top of the page. */
.repeat-detail {
  margin: 8px 0 4px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  max-width: 70ch;
}
.repeat-detail > :first-child { margin-top: 0; }

/* "Every one of them was a false positive" is a conclusion, not a count, so
   it carries weight the breakdown above it does not. */
.repeat-pattern { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--warn); }

.repeat-list { margin: 10px 0 0; padding: 0; list-style: none; }
.repeat-list li { font-size: 12.5px; padding: 3px 0; }
.repeat-list .dim { margin-left: 8px; }

/* The four outcomes, as one row of buttons. The recorded one is marked rather
   than disabled: an analyst correcting a hasty triage call needs to see which
   one they are changing, and a disabled button is the one thing you cannot
   click to find out. */
.disposition-row { gap: 7px; flex-wrap: wrap; }
button.disposition.active {
  background: var(--panel-hover);
  border-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}

/* HOW FAR THROUGH THE CHECKLIST THIS ALERT IS. Quiet by default -- it is a
   fact about progress, not an instruction -- and loud only when a tick could
   not be saved, because an analyst who believes the record holds what they
   did will build a report from that belief. Never hidden by the Details
   toggle: it carries a value, and hiding it leaves a blank where a reader
   expects a figure. */
.step-progress {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.step-progress-failed { color: var(--bad); font-weight: 600; }

/* THE PANE WHILE THE NEXT PAGE IS LOADING. Dimmed and inert, not emptied:
   the reader keeps what they were looking at, and a slow page reads as slow
   rather than as a page that lost their work. `pointer-events` is the half
   that matters -- a visibly stale pane whose buttons still fire is worse than
   a wipe, because the click lands on the page that is leaving. */
main.content.loading {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 120ms ease-in;
}

/* ---------------------------------------------------------------- type --- */

/* EVERY HEADING IS BOLD, and h3/h4 are declared here rather than left to the
   browser: without a rule they inherit the user agent's own weight, which is
   bold in most browsers and is not something to rely on. Setting all four in
   one place is what makes the answer to "how heavy is a heading" one line
   rather than four defaults. */
h1 { font-size: 18.5px; font-weight: 700; margin: 0 0 4px; }

/* Background prose, off until the Details button beside the page title asks
   for it. Instructions, warnings and empty states never carry this class --
   a form that hides "Required." is not a tidier form. */
.page-detail { display: none; }
body.show-details .page-detail { display: block; }

/* The wrapper takes the bottom margin the h1 gives up, so a subtitle under
   it sits where it always did. */
.page-head { display: flex; align-items: baseline; gap: 10px;
  flex-wrap: wrap; margin: 0 0 4px; }
.page-head h1 { margin: 0; }
.details-toggle {
  padding: 2px 9px;
  font-size: 11.5px;
  color: var(--text-dim);
  border-radius: 999px;
}
.details-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
h2 { font-size: 15.5px; font-weight: 700; margin: 24px 0 10px; }
h3 { font-size: 13.5px; font-weight: 700; margin: 18px 0 8px; }
h4 { font-size: 12.5px; font-weight: 700; margin: 14px 0 6px; }
.subtitle { color: var(--text-dim); margin: 0 0 18px; font-size: 13px; }
code, .mono, .id { font-family: var(--mono); font-size: 13px; }
.id { color: var(--text-dim); }

/* --------------------------------------------------------------- panels -- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel > header {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel > .body { padding: 14px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.tile {
  /* A grid item's minimum width defaults to its content's, which is what let
     a long value push past the tile's edge instead of wrapping. */
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
}
.tile .label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.tile .value { font-size: 26.5px; font-weight: 600; margin-top: 5px; font-family: var(--mono);
  overflow-wrap: anywhere; line-height: 1.2; }
/* A verdict, a name or a date: smaller and in the text face, so it fits the
   tile rather than running out of it. */
.tile .value.wordy { font-size: 19px; font-family: var(--sans); }
.tile .value.dim { color: var(--text-dim); }
.tile-note { font-size: 12px; color: var(--text-faint); margin-top: 3px; }

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

table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-faint);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.grid td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
/* A table somebody has resized keeps its widths, so a long value must wrap or
   be cut inside its own cell rather than push the next column along. */
table.grid[style*="fixed"] td { overflow-wrap: anywhere; }

/* -- column resizing. The grip sits over the heading's right edge, wide
   enough to catch with a mouse and invisible until it is wanted. */
table.grid th { position: relative; }
.col-resizer {
  position: absolute; top: 0; right: -4px; bottom: 0; width: 9px;
  cursor: col-resize; z-index: 1; touch-action: none;
}
.col-resizer::after {
  content: ""; position: absolute; top: 25%; bottom: 25%; left: 4px; width: 1px;
  background: var(--line-strong); opacity: 0; transition: opacity .15s;
}
table.grid th:hover .col-resizer::after,
.col-resizer:focus-visible::after,
body.col-resizing .col-resizer::after { opacity: 1; }
.col-resizer:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
/* While dragging, nothing else reacts to the pointer and no text is selected. */
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none; }
table.grid tbody tr:hover { background: var(--panel-hover); }
table.grid tbody tr.clickable { cursor: pointer; }
.analysis-description { min-width: 240px; max-width: 420px; color: var(--text-dim); }
.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.sort-control span { color: var(--text-faint); font-size: 10px; }
.sort-control.active { color: var(--accent); }
.sort-control:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.report-select-all {
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
}

.payment-topup .body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.payment-topup h2 { margin: 0 0 5px; }
.payment-topup .field-note { margin: 0; }
.payment-purchase-button { flex: none; min-width: 160px; text-align: center; }

.checkout-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 18px;
  border-bottom: 1px solid var(--line-strong);
}
.checkout-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-faint);
  font-weight: 600;
}
.checkout-step.active { color: var(--text); border-color: var(--accent); }
.checkout-step:disabled { opacity: .7; cursor: default; }
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
  gap: 18px;
  align-items: start;
}
.checkout-section, .checkout-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.checkout-section { padding: 18px; }
.checkout-section > header { display: block; margin: -18px -18px 18px; padding: 14px 18px;
                              border-bottom: 1px solid var(--line); }
.checkout-section > header h2 { margin: 0; font-size: 16px; }
.checkout-section > header p { margin: 3px 0 0; color: var(--text-faint); font-size: 12px; }
.checkout-section > .checkout-subsection { margin-top: 20px; }
.credit-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
                  margin-bottom: 18px; }
.credit-presets button { min-height: 48px; color: var(--text-dim); }
.credit-presets button.selected { border-color: var(--accent); color: var(--text);
                                  background: var(--panel-hover); box-shadow: inset 0 -2px 0 var(--accent); }
.checkout-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.checkout-span { grid-column: 1 / -1; }
.checkout-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px;
                    margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.checkout-methods { display: grid; gap: 8px; }
.checkout-method {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
}
.checkout-method:has(input:checked) { border-color: var(--accent); background: var(--panel-hover); }
.checkout-method input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.checkout-method span { display: grid; gap: 2px; }
.checkout-method small { color: var(--text-faint); font-size: 11px; }
.checkout-method em { color: var(--text-faint); font-size: 11px; font-style: normal; text-align: right; }
.checkout-method.unavailable { opacity: .58; cursor: not-allowed; }
.checkout-summary { padding: 18px; background: var(--bg-raised); }
.checkout-eyebrow { margin: 0 0 14px; color: var(--text-faint); font-size: 12px;
                    font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.checkout-summary-line, .checkout-total { display: flex; align-items: baseline;
                                         justify-content: space-between; gap: 14px; }
.checkout-summary > p:not(.checkout-eyebrow) { color: var(--text-faint); font-size: 12px; }
.checkout-total { margin: 18px 0; padding: 15px 0; border-top: 1px solid var(--line-strong);
                  border-bottom: 1px solid var(--line-strong); font-size: 18px; }
.checkout-assurance { display: grid; gap: 2px; margin-top: 12px; padding: 11px;
                      border: 1px solid var(--line); border-radius: var(--radius-sm); }
.checkout-assurance span { color: var(--text-faint); font-size: 11px; }
@media (max-width: 820px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { grid-row: 1; }
}
@media (max-width: 560px) {
  .checkout-step { padding-inline: 4px; font-size: 11px; gap: 5px; }
  .credit-presets, .checkout-form-grid { grid-template-columns: 1fr 1fr; }
  .checkout-span { grid-column: 1 / -1; }
  .checkout-method { grid-template-columns: 20px minmax(0, 1fr); }
  .checkout-method em { grid-column: 2; text-align: left; }
}
/* A row, not a panel: no border, no background, no heading. The space above
   it is what separates it from the page, and 48px of scroll padding on
   `main.content` keeps it off the bottom edge. */
.workflow-decision {
  margin: 22px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* New incident alerts. Fixed above the working surface so a notification is
   visible on every route, but narrow enough not to cover a report editor. */
.alert-toasts {
  position: fixed;
  right: 18px;
  top: calc(var(--topbar) + 14px);
  width: min(390px, calc(100vw - 36px));
  display: grid;
  gap: 9px;
  z-index: 80;
  pointer-events: none;
}
.alert-toast {
  position: relative;
  pointer-events: auto;
  background: var(--bg-raised);
  border: 1px solid var(--accent);
  border-left-width: 4px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.alert-toast a { display: grid; gap: 3px; padding: 11px 38px 11px 12px; color: var(--text); }
.alert-toast a:hover { text-decoration: none; background: var(--panel-hover); }
.alert-toast b { color: var(--accent); }
.alert-toast small { color: var(--text-dim); line-height: 1.35; }
.alert-dismiss {
  position: absolute;
  right: 7px;
  top: 6px;
  z-index: 1;
  padding: 1px 7px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 18px;
}

/* Small tabs with names and counts in a responsive grid, one panel below.
 *
 * Replaces a stack of full-width accordion bars. Four bars the width of the
 * page, three of them collapsed, is a lot of furniture to say "there are ten
 * detection rules"; and with several stacks on one page the reader loses
 * which heading owns which body.
 *
 * auto-fit rather than a fixed count, so seven response phases and four
 * evidence groups both lay out sensibly without either being told how many
 * there are.
 */
/* The wrapper. Two tab groups on one page — response and evidence — need
   air between them, and the JS finds its group with closest(".tabs"). */
.tabs { margin-bottom: 14px; }
/* ALL THE TABS ON ONE LINE. `minmax(140px, 1fr)` wrapped the seventh tab
   onto a second row in the analysis pane, which puts "Sweep for" under
   "Summary" and makes a strip read as two. 104px is the width the longest
   label here -- "Attack Techniques" -- needs before it starts eliding, and
   `auto-fit` still gives every tab the same share of whatever is left.

   STILL A MINIMUM, not a fixed width: on the narrow pane the rail leaves at
   1100px there is genuinely not room for seven, and wrapping is the right
   answer there rather than seven unreadable slivers. */
.tab-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
             gap: 6px; margin-bottom: 9px; }
button.tab { display: grid; grid-template-columns: 1fr;
             grid-template-areas: "name" "count";
             align-items: center; text-align: left; background: var(--bg);
             color: var(--text-dim); border: 1px solid var(--line);
             border-radius: 8px; padding: 6px 8px; min-height: 44px;
             cursor: pointer; font: inherit; }
button.tab:hover { background: var(--panel-hover); border-color: var(--line-strong); }
button.tab.active { background: var(--panel-hover); border-color: var(--accent);
                    color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
/* Containment and eradication change the estate and are not trivially
   reversible. Carried by the border as well as the colour, so the
   distinction survives for a reader who cannot separate the two. */
button.tab.danger { border-color: var(--bad); }
button.tab.danger.active { border-color: var(--bad); box-shadow: inset 0 -2px 0 var(--bad); }
.tab-name { grid-area: name; font-size: 12px; font-weight: 600; line-height: 1.15;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-count { grid-area: count; font: 10px var(--mono); color: var(--text-faint);
             margin-top: 2px; white-space: nowrap; overflow: hidden;
             text-overflow: ellipsis; }

/* THE FIGURE, NOT THE WORD. Scanning a row of seven tabs for "how many
   matched", the number is what the eye is looking for and the unit is what
   tells it which number. Orange is the same mark the matched-indicator tick
   carries, and it means the same thing in both places: this is the count
   that matters. */
.tab-n { color: var(--warn); font-weight: 700; }
.tab-panel { background: var(--panel); border: 1px solid var(--line);
             border-radius: 10px; padding: 12px 14px; }
.tab-panel[hidden] { display: none; }
.tab-panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tab-panel-head b { font-size: 13px; font-weight: 600; flex: 1; }
.tab-panel ul { margin: 0; padding: 0; }
.tab-panel li { list-style: none; display: flex; gap: 8px; align-items: flex-start;
                margin: 7px 0; color: var(--text-dim); line-height: 1.55; font-size: 13px; }
.tab-panel li input[type=checkbox] { margin: 3px 0 0; accent-color: var(--accent);
                                     width: 14px; height: 14px; flex: none; }
.tab-panel .n { font-size: 11px; color: var(--accent); font-family: var(--mono); }

/* Two columns on a narrow screen, and the name allowed to wrap — seven
   phases at 140px each would otherwise overflow a phone. */
@media (max-width: 620px) {
  .tab-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab-name { white-space: normal; }
}

.pills { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 11px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

/* Shift handover: editable context stays beside its alert, while the real
   colleague directory and send action remain visible in the adjacent column. */
.handover-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 20px; align-items: start; }
.handover-shift { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.handover-shift .field { flex: 1 1 190px; min-width: 0; margin: 0; }
.handover-shift .btn { margin-bottom: 1px; }
.handover-alerts, .handover-details { min-width: 0; }
.handover-alerts h2, .handover-details h2 { font-size: 16px; margin: 0 0 12px; }
.handover-section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.handover-section-heading > span { color: var(--text-dim); font-size: 12px; }
.handover-list { display: grid; gap: 14px; }
.handover-alert { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--panel); min-width: 0; }
.handover-alert.is-selected { border-color: var(--accent); }
.handover-alert-pick { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.handover-alert-pick input { margin: 4px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.handover-alert-pick > span { min-width: 0; overflow-wrap: anywhere; }
.handover-alert-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--text-dim); font-size: 12px; margin: 4px 0 8px; }
.handover-alert-summary { margin: 5px 0 0 27px; color: var(--text-dim); overflow-wrap: anywhere; }
.handover-alert-edit { display: grid; gap: 12px; margin: 14px 0 0 27px; }
.handover-alert-edit[hidden] { display: none; }
.handover-alert-edit .field, .handover-details .field { margin: 0; }
.handover-alert-edit textarea { min-height: 76px; }
.handover-details { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: var(--panel); display: grid; gap: 13px; }
.handover-details select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.handover-details .field-note, .handover-details .lbl { margin: 0; }
.handover-item-notes { margin: 12px 0; }
.handover-item-notes dt { font-size: 12px; color: var(--text-dim); margin-top: 12px; }
.handover-item-notes dd { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.handover-recipients { display: grid; gap: 10px; overflow-wrap: anywhere; }
.handover-recipients .field-note { display: block; }
.handover-prose { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 22px; }
@media (max-width: 1100px) { .handover-layout { grid-template-columns: minmax(0, 1fr) 250px; } }
@media (max-width: 760px) {
  .handover-layout { display: flex; flex-direction: column; }
  .handover-alerts, .handover-details { width: 100%; }
  .handover-layout > .handover-details { order: -1; }
  .handover-received .handover-details { order: initial; }
  .handover-alert-edit { margin-left: 0; }
}
@media (max-width: 620px) {
  .shell { grid-template-rows: auto auto auto minmax(0, 1fr); }
  .topbar { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .topbar .whoami { min-width: 0; flex: 1 1 100%; flex-wrap: wrap; }
}
.row input[type=text] { flex: 1; min-width: 220px; background: var(--bg); color: var(--text);
                        border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px;
                        font: inherit; }
/* A select in a row grows like the text input beside it. The report page's
   recipient picker holds "Name — long.address@customer.example", and at the
   browser default width every entry was truncated to the name — which is
   the half you already knew. */
.row select { flex: 1; min-width: 220px; max-width: 100%; }
button.go { background: var(--accent); color: var(--bg); border: 1px solid var(--accent);
            border-radius: 7px; padding: 7px 13px; font: inherit; font-weight: 600;
            cursor: pointer; }
button.go:disabled { opacity: 0.6; cursor: default; }

/* Badge variants the analysis page needs and the sheet did not have. */
.badge.known { background: rgba(255, 128, 149, 0.14); color: var(--bad); }
.badge.none { background: var(--panel-hover); color: var(--text-faint); }
.badge.ok { background: rgba(74, 222, 128, 0.14); color: var(--ok, #4ade80); }

ul.steps { margin: 0; padding: 0; list-style: none; }
ul.steps li { margin: 6px 0; line-height: 1.55; color: var(--text-dim); }
ul.steps.mono li { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.lead { font-size: 14px; line-height: 1.6; margin: 0 0 8px; }

/* The report builder. */
.report-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px;
               margin: -4px 0 14px; color: var(--text-faint); font-size: 12px; }
.report-builder-panel { margin-bottom: 10px; }
.report-template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
                        gap: 8px; }
.report-template { min-height: 42px; color: var(--text-dim); background: var(--bg);
                   border-color: var(--line); font-weight: 600; }
.report-template:hover { color: var(--text); border-color: var(--line-strong); }
.report-template.active { color: var(--text); background: var(--panel-hover);
                          border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.report-select-all { display: grid; grid-template-columns: 18px minmax(0, 1fr);
                     align-items: start; gap: 8px; margin-bottom: 12px;
                     color: var(--text); font-weight: 600; }
.includes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 9px 18px; margin-bottom: 12px; align-items: start; }
.includes label { font-size: 13px; display: grid;
                  grid-template-columns: 18px minmax(0, 1fr); gap: 7px;
                  align-items: start; cursor: pointer; color: var(--text-dim);
                  line-height: 1.35; }
.includes input[type=checkbox], .report-select-all input[type=checkbox] {
  width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--accent);
}
.report-details { display: grid; grid-template-columns: minmax(0, 2fr) minmax(190px, 1fr);
                  gap: 8px; }
.report-details input, .report-details select { width: 100%; min-width: 0; }
.report-actions { display: grid; grid-template-columns: repeat(4, minmax(120px, max-content)) 1fr;
                  gap: 8px; align-items: center; }
.report-actions .n { justify-self: end; }
.report-send { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
               gap: 8px; align-items: center; }
.report-send select, .report-send input { width: 100%; min-width: 0; }
@media (max-width: 900px) {
  .includes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-actions .n { grid-column: 1 / -1; justify-self: start; }
  .report-send { grid-template-columns: minmax(0, 1fr) auto; }
  .report-send input { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 560px) {
  .includes, .report-template-grid, .report-details, .report-actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .report-actions .n { grid-column: auto; }
  .report-send { grid-template-columns: minmax(0, 1fr); }
  .report-send input { grid-column: auto; grid-row: auto; }
}
#neotelix-report textarea, .panel textarea { width: 100%; min-height: 72px; resize: vertical;
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 10px; font: inherit; font-size: 13px; margin-top: 10px; }
.panel select { background: var(--bg); color: var(--text); border: 1px solid var(--line);
                border-radius: 7px; padding: 7px 10px; font: inherit; }
/* The query behind a step.
 *
 * The BUTTON is deliberately small and quiet. It sits at the end of a
 * sentence somebody is reading, and a full-weight button there would compete
 * with the step for attention — the step is the instruction, the query is a
 * convenience for the moment they go to run it. */
.qtoggle {
  margin-left: 8px;
  padding: 1px 7px;
  font-size: 11px;
  font-family: var(--mono);
  line-height: 1.6;
  color: var(--text-faint);
  background: var(--panel-hover);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  vertical-align: baseline;
}
.qtoggle:hover { color: var(--text); border-color: var(--accent); }
.qtoggle.open { color: var(--accent); border-color: var(--accent); }

.qbox { margin: 8px 0 12px; }
.qbox[hidden] { display: none; }
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 8px;
         margin-top: 8px; }
.qcopy { padding: 2px 9px; font-size: 12px; background: var(--panel-hover);
         color: var(--text-dim); border: 1px solid var(--line); border-radius: 5px;
         cursor: pointer; }
.qcopy:hover { color: var(--text); border-color: var(--accent); }

/* Monospace and horizontally scrollable rather than wrapped. A wrapped query
   is one somebody copies with a line break in the middle of a field name;
   this scrolls inside its own box so the page never does. */
pre.query {
  margin: 5px 0 0;
  padding: 9px 11px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow-x: auto;
  white-space: pre;
}

/* The generated document. Monospace and pre-wrap because it IS markdown —
   rendering it would hide exactly the formatting the analyst is about to
   paste somewhere else. */
pre.out { white-space: pre-wrap; font-family: var(--mono); font-size: 12px;
          color: var(--text-dim); background: var(--bg); border: 1px solid var(--line);
          border-radius: 8px; padding: 12px; max-height: 360px; overflow: auto;
          margin-top: 12px; }
pre.out[hidden] { display: none; }
.lbl { font-size: 12px; color: var(--text-faint); text-transform: uppercase;
       letter-spacing: 0.08em; margin: 14px 0 7px; }

/* A tile that opens something.
 *
 * `.clickable` existed only for table rows, so the "What's new" tiles were
 * clickable with no cursor and no hover — an affordance the page relied on
 * and never showed. The lift is the same one the rows get, so a reader who
 * has clicked a row once knows a tile does the same thing.
 */
.tile.clickable { cursor: pointer; transition: background 120ms ease, border-color 120ms ease; }
.tile.clickable:hover { background: var(--panel-hover); border-color: var(--line-strong); }
/* A table wider than the page scrolls sideways within its own frame -- the
   bar at its foot -- and a long one scrolls within a frame the height of the
   window, so that bar is always on screen rather than at the end of a
   thousand rows. The headings stay put while the rows move. */
.table-scroll { overflow: auto; max-height: 75vh; }
.table-scroll > table.grid thead th {
  position: sticky; top: 0; z-index: 2; background: var(--panel);
}

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

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  white-space: nowrap;
}
/* Border weight and label, never hue alone — this is read by people who
   cannot rely on colour, under time pressure. */
.badge.known_threat { color: var(--bad); border-color: var(--bad); border-width: 2px; }
.badge.technique_only { color: var(--warn); border-color: var(--warn); }
/* Deliberately the accent and not the neutral: an infrastructure match IS a
   match, and it used to arrive here dressed as `no_match`. */
.badge.infrastructure_match { color: var(--accent); border-color: var(--accent); }
.badge.no_match { color: var(--text-dim); }
.badge.approved { color: var(--ok); border-color: var(--ok); }
.badge.unreviewed { color: var(--warn); border-color: var(--warn); border-width: 2px; }
.badge.tlp-red { color: var(--bad); border-color: var(--bad); border-width: 2px; }
.badge.tlp-amber { color: var(--warn); border-color: var(--warn); }
.badge.tlp-green, .badge.tlp-clear { color: var(--ok); border-color: var(--ok); }
.badge.tech { font-family: var(--mono); color: var(--accent); border-color: var(--accent-dim); }

/* -------------------------------------------------------------- controls - */

button, .btn {
  font: inherit;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--panel-hover); text-decoration: none; }
/* `.btn.primary` as well as `button.primary`: a download is an anchor, not a
   button, and the emphasised variant was scoped so that an <a class="btn
   primary"> silently got the plain style. Additive -- the selector matched
   nothing before this. */
button.primary, .btn.primary {
  /* The accent itself, not a tint: on light grey a pale fill reads as
     disabled. --on-accent flips with the theme so the label stays legible
     on whichever ground the accent has become. */
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
/* A compact button for inside a table row, where a full-size one would make
   every row twice as tall as its text. */
button.small, .btn.small { padding: 3px 9px; font-size: 12.5px; }
/* A button that is only an icon: square, quiet, and the icon takes the text
   colour so it reads in both themes. */
.icon-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  padding: 0; line-height: 1; font-size: 17px; color: var(--text-dim);
}
.icon-btn:hover { color: var(--text); }

/* -- the Processes list: selection, actions, and the bulk bar ------------- */
table.ptable th.pselect, table.ptable td.pselect { width: 34px; padding-right: 0; }
table.ptable td.pactions { white-space: nowrap; }
table.ptable td.pactions > * { vertical-align: middle; }
table.ptable td.pactions > * + * { margin-left: 4px; }
/* Numbers and times do not wrap: a count broken over two lines reads as two. */
table.ptable td:nth-last-child(-n+4) { white-space: nowrap; }
.pbulk {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}
.pbulk[hidden] { display: none; }
#pbulk-count { font-weight: 600; margin-right: 4px; }

/* -- dialogs. Native <dialog>, so Escape, focus and the backdrop behave as a
   person expects without a library. */
.nx-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow);
}
.nx-dialog-wide { width: min(820px, calc(100vw - 32px)); }
.nx-dialog::backdrop { background: rgba(4, 8, 20, 0.55); }
.nx-dialog-body { padding: 20px 22px; }
.nx-dialog-body h2 { margin-top: 0; }
.nx-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nx-dialog-head h2 { margin: 0; }

/* -- the process tree: a top-down hierarchy drawn in SVG. It scrolls both
   ways inside the dialog rather than shrinking, because a box too small to
   read is not a tree anybody can use. */
.ptree-canvas { overflow: auto; max-height: 64vh; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg); }
.ptree-svg { display: block; margin: 0 auto; }
.ptree-links path { fill: none; stroke: var(--line-strong); stroke-width: 1.6; }
.ptree-box rect { fill: var(--panel); stroke: var(--line-strong); stroke-width: 1.4; }
.ptree-box text { text-anchor: middle; fill: var(--text); }
.ptree-name { font-size: 12px; font-weight: 600; }
.ptree-runs { font-size: 10px; fill: var(--text-dim) !important; }
/* The border carries the risk, the same three groups as the Processes list. */
.ptree-risky rect { stroke: var(--bad); stroke-width: 2; }
.ptree-low_risk rect { stroke: var(--ok); }
.ptree-root rect { stroke: var(--accent); stroke-width: 2.6;
  fill: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.ptree-repeat rect { stroke-dasharray: 5 4; }
.ptree-more rect { fill: none; stroke-dasharray: 3 3; }
.ptree-more text { font-size: 12px; fill: var(--text-dim); }
a[data-tree-link] .ptree-box:hover rect { fill: var(--panel-hover); }
a[data-tree-link] { cursor: pointer; }

input, select, textarea {
  font: inherit;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); border-color: var(--accent); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 150px; }

/* ---------------------------------------------------------------- states - */

.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--text-dim);
}
.empty .headline { color: var(--text); margin-bottom: 6px; }
.notice {
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  margin-bottom: 14px;
}
.notice.bad { border-color: var(--bad); color: var(--bad); }
.notice.warn { border-color: var(--warn); color: var(--warn); }

/* The analyst's refusal, and the box it is written in.
 *
 * The reason reads as prose, not as a status: it is a person explaining what
 * the product got wrong, and it is the most useful sentence on the page.
 * `pre-wrap` keeps the line breaks they typed -- a rejection is often a short
 * list, and reflowing it into one paragraph loses the shape of the argument. */
.reject-box { margin-top: 10px; }

/* A certificate fingerprint, meant to be compared character by character
 * against `openssl x509 -fingerprint -sha256` on the customer's own server.
 * Monospace and breakable: 32 colon-separated bytes do not fit a narrow
 * column, and wrapping mid-byte would make the comparison error-prone. */
.ca-fp {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  word-break: break-all;
}
.reject-reason {
  white-space: pre-wrap;
  border-left: 3px solid var(--warn);
  padding-left: 10px;
  margin: 4px 0 0;
}
.notice.good { border-color: var(--ok); color: var(--ok); }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------- login - */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login {
  width: 100%;
  max-width: 372px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.login { position: relative; }
.login h1 { font-size: 17.5px; margin-bottom: 3px; padding-right: 92px; }
.login .subtitle { margin-bottom: 20px; }
.login label { display: block; font-size: 12px; color: var(--text-faint); margin: 12px 0 5px;
               text-transform: uppercase; letter-spacing: 0.08em; }
/* Scoped to the submit button. Unscoped, this also caught the theme switch
   sitting in the card's corner and stretched it across the full width —
   `float:right` on the switch could not win against `width:100%`. */
.login button[type="submit"] { width: 100%; margin-top: 18px; }

/* ------------------------------------------------------------- key/value - */

dl.kv { display: grid; grid-template-columns: 168px 1fr; gap: 7px 16px; margin: 0; }
dl.kv dt { color: var(--text-faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; padding-top: 2px; }
dl.kv dd { margin: 0; }

pre.raw {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  max-height: 420px;
}

@media (max-width: 860px) {
  /* The bar stays: it is the only navigation there is now, so hiding it the
     way the sidebar used to be hidden would leave a phone with no menu at
     all. It scrolls sideways instead, and the crumbs give up their space
     first. */
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar .crumbs { display: none; }
  nav.topnav { padding: 0 6px; }
  main.content { padding: 16px 14px 40px; }
}


/* ---------------------------------------------------------------- charts - */

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.dashboard-heading > div:first-child { min-width: 0; }
.dashboard-page-menu, .dashboard-widget-menu { position: relative; flex: none; }
.dashboard-page-menu > summary, .dashboard-widget-menu > summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.dashboard-page-menu > summary::-webkit-details-marker,
.dashboard-widget-menu > summary::-webkit-details-marker { display: none; }
.dashboard-page-menu[open] > summary,
.dashboard-widget-menu[open] > summary { border-color: var(--accent); color: var(--accent); }
.dashboard-menu-popover {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  right: 0;
  width: min(310px, calc(100vw - 36px));
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
}
.dashboard-menu-popover b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.dashboard-menu-popover label { display: grid; gap: 4px; color: var(--text-faint); }
.dashboard-menu-popover select, .dashboard-menu-popover input { font-size: 12px; padding: 6px 8px; }
.dashboard-menu-popover button { width: 100%; text-align: left; font-size: 12px; padding: 6px 8px; }
.dashboard-menu-popover hr { width: 100%; margin: 3px 0; border: 0; border-top: 1px solid var(--line); }
.dashboard-add-form { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.dashboard-add-form button { width: auto; white-space: nowrap; }
.dashboard-add-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; max-height: 230px; overflow-y: auto; }
.dashboard-add-widgets button { min-width: 0; }
.danger-action { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.dashboard-switcher {
  display: flex;
  gap: 7px;
  margin: 0 0 16px;
  padding-bottom: 2px;
  overflow-x: auto;
}
.dashboard-switcher button { white-space: nowrap; padding: 5px 10px; color: var(--text-dim); }
.dashboard-switcher button.on { color: var(--accent); border-color: var(--accent); background: var(--panel-hover); }
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.dashboard-card { min-width: 0; overflow: visible; transition: opacity 120ms ease, border-color 120ms ease; }
.dashboard-card > .body { overflow: hidden; }
.dashboard-card > header { justify-content: flex-start; gap: 8px; }
.dashboard-card > header .dashboard-widget-menu { margin-left: auto; }
.dashboard-widget-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dashboard-widget-period {
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--panel-hover);
  color: var(--text-faint);
  font: 10px var(--mono);
}
.dashboard-drag-handle {
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
  cursor: grab;
  user-select: none;
}
.dashboard-drag-handle:active { cursor: grabbing; }
.dashboard-dragging { opacity: .42; }
.dashboard-drop-target { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dashboard-metrics { margin-bottom: 0; }

@media (max-width: 1100px) {
  /* Anything narrower than half the grid becomes half, and anything wider
     becomes the full width. A three-twelfths panel at 900px is a column of
     clipped labels. */
  .dashboard-card { grid-column: span max(6, var(--panel-w, 6)); }
}
@media (max-width: 700px) {
  .dashboard-grid > .dashboard-card { grid-column: 1 / -1; }
}

.chart-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .axis-label { fill: var(--text-faint); font-size: 10.5px; font-family: var(--sans); }
.chart .value-label { fill: var(--text-dim); font-size: 11.5px; font-family: var(--mono); }
.chart .series-label { fill: var(--text); font-size: 12px; font-family: var(--sans); }
.chart .gridline { stroke: var(--c-grid); stroke-width: 1; }

/* The hover layer on the trend area. One invisible column per day, the full
   height of the plot, so a day with two analyses is as easy to hit as a day
   with two hundred. It becomes faintly visible on hover so the reader can see
   WHICH day the tooltip is describing — a tooltip with no anchor is a
   guess. */
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: var(--c-grid); fill-opacity: 0.45; }

/* Dots carry a ring in the panel colour. Analyses cluster — a burst of the
   same correlation search lands within seconds — and without the ring a
   cluster fuses into one blob and reads as a single large mark. */
.chart .dot { stroke: var(--panel); stroke-width: 2; }
.chart .dot:hover { stroke: var(--text); }

.chart header .hint { color: var(--text-faint); font-size: 11.5px; }

/* Legend: identity is never colour alone, so every swatch carries its name. */
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 0 14px 12px; font-size: 12px; color: var(--text-dim); }
.legend .item { display: flex; align-items: center; gap: 6px; }
.legend .swatch { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.donut-layout {
  display: grid;
  grid-template-columns: minmax(130px, 190px) 1fr;
  align-items: center;
  gap: 24px;
  min-height: 190px;
}
.donut {
  width: min(100%, 180px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--donut);
  display: grid;
  place-items: center;
  margin: auto;
}
.donut::before {
  content: "";
  grid-area: 1 / 1;
  width: 59%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
}
.donut > div { grid-area: 1 / 1; z-index: 1; display: grid; text-align: center; }
.donut b { font: 700 26px var(--mono); color: var(--text); }
.donut span { font-size: 11px; color: var(--text-faint); text-transform: uppercase; }
.donut-key { display: grid; gap: 10px; }
.donut-key > div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; }
.donut-key .swatch { width: 10px; height: 10px; border-radius: 3px; }
.donut-key b { font-family: var(--mono); color: var(--text); }
.posture-alert-list { display: grid; gap: 1px; }
.posture-alert-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.posture-alert-list a:last-child { border-bottom: 0; }
.posture-alert-list a:hover b { color: var(--accent); }
.posture-alert-list a > span:first-child { display: grid; gap: 3px; min-width: 0; }
.posture-alert-list small {
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.active-alerts { min-width: 860px; }

@media (max-width: 560px) {
  .donut-layout { grid-template-columns: 1fr; }
}

.chart-tip {
  position: fixed;
  pointer-events: none;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  font-size: 12.5px;
  z-index: 40;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.chart-tip .tip-title { color: var(--text); margin-bottom: 3px; }
.chart-tip .tip-row { color: var(--text-dim); display: flex; gap: 8px; justify-content: space-between; }
.chart-tip .tip-row b { color: var(--text); font-family: var(--mono); font-weight: 500; }

.range { display: flex; gap: 6px; }
.range button.on { border-color: var(--accent); color: var(--accent); }


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

.field { display: block; margin-bottom: 12px; font-size: 12px; color: var(--text-faint);
         text-transform: uppercase; letter-spacing: 0.08em; }
.field input, .field textarea, .field select {
  margin-top: 5px; text-transform: none; letter-spacing: normal;
  font-size: 14.5px; color: var(--text); font-family: var(--mono);
}
.field textarea { font-family: var(--mono); resize: vertical; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hunt-input-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.hunt-input-tabs button {
  border: 0;
  padding: 7px 13px;
  background: transparent;
  color: var(--text-dim);
}
.hunt-input-tabs button.active {
  background: var(--panel-hover);
  color: var(--accent);
}
.hunt-input-panel[hidden] { display: none; }
.hunt-file-drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 190px;
  margin-bottom: 16px;
  padding: 34px 20px;
  place-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  text-align: center;
}
.hunt-file-drop:hover, .hunt-file-drop:focus-within {
  border-color: var(--accent);
  background: var(--panel-hover);
}
.hunt-file-title { color: var(--text); font-size: 15px; font-weight: 600; }
.hunt-file-help { color: var(--text-faint); font-size: 12px; }
.hunt-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.hunt-file-name {
  max-width: 100%;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.hunt-run { margin-top: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.check input { width: auto; }
.foot { margin-top: 14px; font-size: 12px; color: var(--text-faint); line-height: 1.6; }
td.actions { white-space: nowrap; text-align: right; }
td.actions button { padding: 3px 9px; font-size: 12.5px; }
td select { width: auto; padding: 3px 8px; font-size: 13px; }
.notice code { display: block; margin-top: 7px; word-break: break-all; color: var(--text); }
.filters button.on { border-color: var(--accent); color: var(--accent); }
/* One sentence of triage reasoning per process row; the rest is on the
   program's own page. Capped so it never pushes the counts off screen. */
/* Same shape as the Processes page's Why column: a sentence in a table of
   numbers, kept narrow so it wraps rather than pushing the columns apart. */
.baseline-normal { max-width: 42ch; font-size: 0.85em; line-height: 1.35; }
.process-why { max-width: 40ch; font-size: 0.85em; line-height: 1.35;
  /* A path has no spaces to break at; without this it runs straight across
     the next columns. */
  overflow-wrap: anywhere; }

@media (max-width: 620px) { .two-up { grid-template-columns: 1fr; } }


/* --------------------------------------------------------------- theme --- */

/* The theme control: three segments, the active one filled.
   Replaces a single button that showed the CURRENT mode and cycled on click —
   a control labelled with its own state reads as an instruction, and cycling
   hid the third option behind two presses. */
.theme-switch {
  display: inline-flex;
  gap: 1px;
  padding: 1px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  flex: none;
}
.theme-switch button {
  padding: 2px 8px;
  font-size: 11.5px;
  line-height: 1.5;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  /* Each segment is a different width, so the control would resize as the
     selection moved. Fixed so it does not twitch under the pointer. */
  min-width: 38px;
  text-align: center;
}
.theme-switch button:hover { color: var(--text); }
.theme-switch button.on {
  background: var(--panel-hover);
  color: var(--text);
  font-weight: 600;
}
.theme-switch button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* On the sign-in card it sits in the corner, out of the heading's way. */
.login .theme-switch {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* -------------------------------------------------------------------------
 * Behavioural Intelligence.
 *
 * Its own prefix (`bx-`) rather than reusing a class from another page. The
 * console has been bitten twice by a rule borrowed across surfaces —
 * `.field-note` was scoped to `.login`, `nx-mt` came from the Splunk
 * stylesheet — and both worked right up until somebody changed the page that
 * owned them.
 * ---------------------------------------------------------------------- */

.bx-score { margin: 0 0 1rem; }
.bx-score-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.25rem;
}
.bx-score-label { font-weight: 600; }
.bx-score-value { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.bx-score-track {
  height: 6px; border-radius: 3px; background: var(--panel-hover); overflow: hidden;
}
.bx-score-fill { height: 100%; background: var(--accent); }
.bx-score-note { margin: 0.35rem 0 0; color: var(--text-dim); font-size: 0.9em; }

/* A dimension that could not be assessed is visibly different from one that
   scored zero. Same weight in the layout, no bar — because there is no
   number, and drawing an empty bar would read as "nothing found". */
.bx-score-absent .bx-score-value { font-style: italic; }
.bx-score-absent { opacity: 0.85; }

.bx-reasons { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.bx-reasons li { margin-bottom: 0.35rem; }
.bx-reasons-lead li { margin-bottom: 0.5rem; }

.bx-sev {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 10px;
  font-size: 0.85em; font-weight: 600; white-space: nowrap;
}
.bx-sev-normal { background: var(--panel-hover); color: var(--text-dim); }
.bx-sev-unusual { background: var(--panel-hover); color: var(--text); }
/* The palette's own semantic colours, so the chips follow the theme like
   everything else rather than needing their own dark-mode block. */
.bx-sev-suspicious { background: var(--panel-hover); color: var(--warn); }
.bx-sev-high_risk { background: var(--panel-hover); color: var(--warn); }
.bx-sev-critical { background: var(--panel-hover); color: var(--bad); }

/* A rate input on the pricing screen. Narrow and right-aligned with tabular
   figures, because these are money and a column of prices that does not line
   up is one somebody misreads. */
.ax-rate,
.bx-rate,
.bx-discount {
  width: 9em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Process assessment, as a word rather than a colour alone.
 *
 * The tone carries the same meaning as elsewhere in the console (bad, warn,
 * good), but the LABEL is what the page relies on: a reader who cannot
 * distinguish the colours must still be able to tell "Known malicious" from
 * "Verified legitimate", and about one man in twelve cannot. */
.pclass {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pclass-bad { color: var(--bad); border-color: var(--bad); }
.pclass-warn { color: var(--warn); border-color: var(--warn); }
.pclass-good { color: var(--ok); border-color: var(--ok); }
.pclass-dim { color: var(--text-faint); }

/* "by name only" — a verdict resting on a weak identity. Quiet, because it
 * qualifies the answer rather than being the answer. */
.pident {
  margin-left: 6px;
  font-size: 11px;
  color: var(--text-faint);
  border-bottom: 1px dotted var(--line-strong);
  cursor: help;
}

/* A command line is long, and wrapping it into six lines pushes the rest of
 * the table off the screen. One line, scrollable in its own cell. */
.pcmd {
  max-width: 380px;
  overflow-x: auto;
  white-space: nowrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
}
.prow td { vertical-align: top; }

/* The behavioural score, next to the band it falls in.
 *
 * THE NUMBER AND THE BAND ARE BOTH SHOWN. The band is what a reader acts on;
 * the number is what lets them tell 62 from 79 when both say "high risk", and
 * comparing two rows is the whole reason the list is sorted. */
.pscore {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-right: 4px;
}

.pfind {
  font-size: 11px;
  color: var(--bad);
  white-space: nowrap;
}

/* One recorded assessment on the process page. */
.assessment {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.6rem;
}
.assessment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
/* FOLDED AWAY, NOT OMITTED. What could not be checked belongs on the page --
 * it is how a reader knows the score rests on partial evidence -- but opening
 * with a list of absences buries the reasons the assessment actually found. */
.assessment-gaps summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-faint);
}

/* -- dashboards ---------------------------------------------------------
 *
 * SIZE IS A NUMBER OF TWELFTHS AND A NUMBER OF ROWS, carried on the element
 * as custom properties rather than as one of four size classes. A panel is
 * dragged to a width, so the width has to be a number; and because it stays a
 * fraction of the grid rather than a pixel count, a dashboard built on a wide
 * monitor still lays out sensibly on a laptop.
 */
.dashboard-card { grid-column: span var(--panel-w, 6); }
.dashboard-card > .body { min-height: calc(var(--panel-h, 2) * 78px); }
.dashboard-card.dragging { opacity: .42; }
.dashboard-card.drop-target { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dash-head-actions { display: flex; align-items: flex-start; gap: 8px; flex: none; }
.dash-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-note { margin: 0 14px 6px; color: var(--text-dim); font-size: 12px; }
.dash-save { margin-left: 8px; color: var(--text-faint); font-size: 12px; }
.dash-save.bad { color: var(--bad); }
.dash-shared {
  padding: 0 5px;
  border-radius: 999px;
  background: var(--panel-hover);
  color: var(--text-faint);
  font: 10px var(--mono);
}
.dash-readonly { margin: -4px 0 10px; }
.dash-secondary { font-size: 12px; }
.dash-link { border: 0; background: transparent; color: var(--bad); cursor: pointer;
  font: inherit; padding: 0; }
.dash-preset-row, .dash-export-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dash-custom-range { display: grid; gap: 4px; }

/* The corner grip. Its own hit area rather than the card's edge: a resize
   that starts wherever the pointer happens to be near a border fights every
   attempt to select text inside the panel. */
.dash-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  border-right: 2px solid var(--line-strong);
  border-bottom: 2px solid var(--line-strong);
  border-bottom-right-radius: 4px;
  opacity: .6;
  touch-action: none;
}
.dash-resize:hover { opacity: 1; border-color: var(--accent); }
.dashboard-card { position: relative; }

.dash-svg { width: 100%; height: auto; display: block; }
.dash-axis { fill: var(--text-faint); font-size: 10px; font-family: var(--sans); }

/* The relationship graph. Labels one size up from the other charts' axes,
   because here the label IS the data. Hovering or clicking a node lights up
   its connections and fades everything else; a click keeps it lit. */
.dash-net-label { fill: var(--text-dim); font-size: 11px; font-family: var(--sans);
  pointer-events: none; }
.dash-net-node { cursor: pointer; stroke: var(--panel); stroke-width: 2;
  transition: r 0.12s ease, opacity 0.12s ease; }
.dash-net-edge { transition: opacity 0.12s ease, stroke-width 0.12s ease; }
.dash-net.focused .dash-net-edge,
.dash-net.focused .dash-net-node,
.dash-net.focused .dash-net-label { opacity: 0.15; }
.dash-net.focused .dash-net-edge.lit { opacity: 1; stroke-width: 3; }
.dash-net.focused .dash-net-node.lit { opacity: 1; }
.dash-net.focused .dash-net-node.lit-self { opacity: 1; r: 8; }
.dash-net.focused .dash-net-label.lit { opacity: 1; fill: var(--text);
  font-weight: 600; }
.dash-clickable { cursor: pointer; }
.dash-clickable:hover { opacity: .8; }
.dash-centre { fill: var(--text); font-size: 22px; font-weight: 600; font-family: var(--mono); }
.dash-centre-label { fill: var(--text-faint); font-size: 11px; font-family: var(--sans); }

.dash-donut-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dash-donut { width: 180px; height: 180px; flex: none; }
.legend.dash-column { display: grid; gap: 4px; align-content: start; }

.dash-hbars { display: grid; gap: 6px; }
.dash-hbar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 8px;
  align-items: center; font-size: 12px; }
.dash-hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-dim); }
.dash-hbar-track { background: var(--panel-hover); border-radius: 999px; height: 12px; }
.dash-hbar-fill { display: block; height: 12px; border-radius: 999px; }
.dash-hbar-value { font-family: var(--mono); color: var(--text-dim); }

.dash-gauge-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.dash-gauge { width: 220px; flex: none; }
.dash-gauge-value { fill: var(--text); font-size: 30px; font-weight: 600; font-family: var(--mono); }
.dash-gauge-parts { display: grid; gap: 4px; min-width: 220px; flex: 1; }
.dash-part { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center;
  font-size: 12px; color: var(--text-dim); text-decoration: none; }
.dash-part:hover { color: var(--text); }
.dash-part b { font-family: var(--mono); color: var(--bad); }

.dash-kpi { border-left: 3px solid var(--kpi, var(--accent)); }
.dash-kpi-note { color: var(--text-faint); font-size: 11px; margin-top: 3px; }
.dash-kpi-link { text-decoration: none; }

/* Intensity carries the value and the hue stays put, so the map is still
   readable without colour vision. */
.dash-heatmap {
  display: grid;
  /* `--cols` is set on the element by the renderer, because the number of
     columns is a property of the data. The fallback is what a heatmap of
     hours needs, so a missing value degrades to a readable grid rather
     than to one invalid declaration and no layout at all. */
  grid-template-columns: minmax(64px, auto) repeat(var(--cols, 24), minmax(8px, 1fr));
  gap: 2px;
  font-size: 10px;
}
.dash-heat-corner { }
.dash-heat-col, .dash-heat-row { color: var(--text-faint); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.dash-heat-cell { height: 16px; border-radius: 2px; }

.dash-funnel { display: grid; gap: 6px; }
.dash-funnel-step { display: grid; grid-template-columns: 1fr auto; gap: 6px;
  align-items: center; font-size: 12px; position: relative; padding-bottom: 12px; }
.dash-funnel-bar { display: block; height: 22px; border-radius: 4px; grid-column: 1 / -1; }
.dash-funnel-label { position: absolute; left: 8px; top: 3px; color: var(--on-accent);
  font-size: 11px; }
.dash-funnel-step b { position: absolute; right: 0; top: 3px; font-family: var(--mono); }

.dash-table th { white-space: nowrap; }
.dash-num { text-align: right; font-family: var(--mono); }

.dash-gaps { margin-top: 8px; font-size: 12px; color: var(--text-dim); }
.dash-gaps summary { cursor: pointer; color: var(--text-faint); }
.dash-gaps ul { margin: 6px 0 0; padding-left: 18px; }
.dash-panel-error, .dash-layer-error { display: grid; gap: 6px; margin-top: 8px; }

/* The editor and the gallery share one backdrop: both are a decision taken
   away from the dashboard and handed back when it closes. */
.dash-editor-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 24, .55);
  display: flex;
  justify-content: flex-end;
  z-index: 40;
}
.dash-editor {
  background: var(--panel);
  border-left: 1px solid var(--line);
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.dash-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.dash-editor > header h2 { margin: 0; font-size: 16px; }
.dash-editor-body { padding: 16px; overflow-y: auto; display: grid; gap: 12px; }
.dash-editor-body label { display: grid; gap: 4px; font-size: 12px; color: var(--text-faint); }
.dash-layer { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px;
  display: grid; gap: 8px; }
.dash-layer legend { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); }
.dash-layer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px; }
.dash-toggles { display: flex; flex-wrap: wrap; gap: 12px; }
.dash-toggle { display: flex !important; flex-direction: row; align-items: center; gap: 6px;
  color: var(--text-dim) !important; }
.dash-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px; margin-bottom: 8px; }
.dash-gallery-card {
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  cursor: pointer;
}
.dash-gallery-card:hover:not(:disabled) { border-color: var(--accent); background: var(--panel-hover); }
.dash-gallery-card:disabled { opacity: .5; cursor: not-allowed; }
.dash-gallery-card b { font-size: 13px; }
.dash-gallery-card span { font-size: 11px; color: var(--text-dim); }
.dash-gallery-card small { font-size: 10px; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: .06em; }

@media (max-width: 900px) {
  .dashboard-card { grid-column: 1 / -1; }
  .dash-editor { width: 100%; }
}

/* A tile that is a way in, not a number to look at. The queue page's tiles
   are the primary navigation for triage: somebody reads "43 risky" and the
   next thing they want is those 43. */
.tile-link { text-decoration: none; display: block; transition: border-color 120ms ease; }
.tile-link:hover { border-color: var(--accent); background: var(--panel-hover); }
.tile-link.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* The knowledge freshness stamp, in the corner of every page. Quiet by
   default -- it is a reassurance, not a control -- and it turns red when a
   source could not be reached, which is the one state worth interrupting
   somebody for. */
.freshness {
  font-size: 11.5px;
  color: var(--text-faint);
  white-space: nowrap;
  text-decoration: none;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.freshness.bad { color: var(--bad); border-color: var(--bad); }

/* "What's new", moved out of the Detection & response menu to sit beside the
   stamp. A CONTROL rather than a reassurance, so it is not as quiet as the
   stamp it follows -- a button nobody can see is worse than a menu item four
   places down, which is what this replaced. */
.whatsnew {
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  text-decoration: none;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.whatsnew:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }

@media (max-width: 1100px) {
  /* The account controls and the wordmark matter more on a narrow window;
     the stamp has its own page. */
  .freshness { display: none; }
  /* THE BUTTON STAYS. Hiding it here would have made the page unreachable on
     a narrow window the moment its menu entry was removed -- the stamp can
     go, because it only reports a time, but this is now the only way in. */
}

/* The four quadrants on the AI activity page. Four blocks rather than a
   scatter plot, because the two scores are deliberately never merged and a
   plot invites the eye to read a single position as a single verdict. Tone
   follows meaning: the corner that matters is the only one coloured as a
   warning, and "automated, nothing suspicious" is deliberately calm because
   it is where most of a healthy estate lives. */
.ai-quadrants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.ai-quadrant {
  /* A BUTTON NOW, because it filters the table below. Reset the browser's
     own button styling rather than fighting it later. */
  display: block; width: 100%; text-align: left;
  font: inherit; cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--panel);
}
.ai-quadrant-head { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.ai-quadrant:hover { border-color: var(--line-strong); }
.ai-quadrant.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* The tile whose list is on screen. Same marking as the quadrant filter,
   so one visual idea covers both selectors on this page. */
.tile-link.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ai-quadrant-count {
  display: block;
  font-size: 30px; font-weight: 600; font-family: var(--mono);
  margin-top: 4px; color: var(--text);
}
.ai-quadrant-note { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.ai-quadrant.ai-bad { border-color: var(--bad); }
.ai-quadrant.ai-bad .ai-quadrant-count { color: var(--bad); }
.ai-quadrant.ai-warn .ai-quadrant-count { color: var(--warn, var(--text-dim)); }
.ai-quadrant.ai-dim .ai-quadrant-count { color: var(--text-faint); }

tr.ai-row { cursor: pointer; }
tr.ai-row:hover > td { background: var(--tint, rgba(11, 95, 174, 0.05)); }
tr.ai-detail > td { background: var(--tint, rgba(11, 95, 174, 0.04)); }
.ai-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 20px; padding: 6px 2px;
}
.ai-detail-grid .label {
  display: block; font-size: 11px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 2px;
}
.ai-detail-wide { grid-column: 1 / -1; }

/* The approve/forbid pair on a provider row. Side by side and quiet: this
   is a decision somebody makes once per discovery, not a primary action, and
   the row it sits in is itself clickable. */
/* The techniques a merged step covers, at the end of the line. Quiet on
   purpose: it is provenance, not instruction, and the step is what gets
   read. Monospace so a run of IDs lines up rather than wandering. */
.step-covers {
  color: var(--text-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  white-space: nowrap;
}

.ai-decide { white-space: nowrap; }
.ai-decide .btn { margin-right: 6px; }
.ai-decide .notice { margin-top: 6px; white-space: normal; }

/* One intelligence source on an analysis, with what it publishes and what a
   match against it means. NOT `.source-row`, which belongs to the knowledge
   page's clickable table rows: borrowing it would give this block a pointer
   cursor and a hover highlight, so it would look clickable and do nothing.
   That mistake has been made twice before in this stylesheet. */
.intel-source { padding: 10px 0; border-bottom: 1px solid var(--line); }
.intel-source:last-child { border-bottom: none; }
.intel-source p { margin: 0 0 4px; }
.intel-source .steps { margin-top: 6px; }
.intel-source-name { font-weight: 600; }
.intel-source-name .dim { font-weight: 400; margin-left: 8px; }

/* What one source check changed, opened under its row. */
.source-row { cursor: pointer; }
.source-row:hover { background: var(--panel-hover); }
.source-records[hidden] { display: none; }
.source-records td { background: var(--bg-raised); }
.changed-records {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}
.changed-record {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 12px;
}
.changed-record small { color: var(--text-faint); font-size: 10.5px; }

/* The itemised bill: a summary by tenant, then every charge with the tenant
   on the row so an MSSP can sort by client. */
.billing-page { max-width: 1180px; }
.billing-heading { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.billing-heading .subtitle { margin-bottom: 0; }
.billing-period, .billing-section-period { color: var(--text-faint); font-size: 12px;
  font-family: var(--mono); }
.chart-period { color: var(--text-faint); font-size: 11px; font-family: var(--mono); }
.billing-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.billing-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.billing-actions > div { flex: 1 1 240px; min-width: 0; }
.billing-actions h2 { margin: 0 0 4px; }
.billing-actions .field-note { margin: 0; }
.billing-provider-note { flex: 1 1 260px; }
.billing-section-head { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.billing-section-head h2 { margin: 0 0 4px; }
.billing-section-head .field-note { margin: 0; }
/* COMPACT ON THIS PAGE ONLY. The billing page stacks four KPI tiles, four
   wallet tiles, a chart and three more tiles before the first table, and at
   the shared tile size that ran to two screens -- so the number a finance
   owner opens the page for sat below the fold. Scoped to .billing-page
   because the dashboard tiles are the page's subject there and should stay
   large; here they are a summary above the detail. */
.billing-page .tile { padding: 9px 11px; }
.billing-page .tile .label { font-size: 11px; letter-spacing: 0.07em; }
.billing-page .tile .value { font-size: 19.5px; margin-top: 3px; }
.billing-page .tile .value.wordy { font-size: 15.5px; }
.billing-page .tile-note { font-size: 11px; margin-top: 2px; }
.billing-page .tiles { gap: 9px; margin-bottom: 12px; }
.billing-page .panel > .body { padding: 12px; }
.billing-page h1 { margin-bottom: 2px; }
.billing-page h2 { font-size: 15px; }
.billing-kpis { gap: 9px; margin-bottom: 10px; }
.billing-kpis .tile, .invoice-summary-tiles .tile { min-height: 58px; }
.billing-actions-panel { margin-bottom: 10px; }
.billing-section { margin-top: 10px; }
.billing-usage-tiles { margin-bottom: 10px; }
/* preserveAspectRatio defaults to meet, so the drawing scales down inside
   the box rather than being squashed by the cap. */
.billing-page .chart svg { max-height: 184px; }

.invoice-panel { margin-top: 14px; }
.invoice-head { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; }
.invoice-head h2 { margin: 0 0 4px; }
.invoice-head .field-note { margin: 0; }
.invoice-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.invoice-summary-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin: 14px 0; }
.invoice-itemized-shell { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.invoice-itemized-toggle { width: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; text-align: left; }
.invoice-itemized-toggle.open { border-color: var(--accent); color: var(--text); }
.invoice-toggle-label { font-weight: 600; }
.invoice-toggle-chevron { color: var(--accent); font-size: 16px; line-height: 1; }
.invoice-itemized-shell > .page-detail { display: block; }
.invoice-detail { margin-top: 12px; }
.invoice-detail[hidden] { display: none !important; }
.invoice-lines-title { margin: 18px 0 6px; font-size: 13px; }
/* The total is in a tfoot, which the sorter leaves alone; it needs the rule
   above it that a tbody row would have got from .grid. */
.grid tfoot td {
  border-top: 2px solid var(--line-strong);
  padding: 8px 10px;
}

@media (max-width: 820px) {
  .billing-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .billing-kpis, .invoice-summary-tiles { grid-template-columns: minmax(0, 1fr); }
  .billing-actions .btn { flex: 1 1 180px; text-align: center; }
}

/* -- searching a list ---------------------------------------------------
 *
 * Sits above any table with more than a handful of rows, added by
 * `bindTableFilter` rather than by each page. Deliberately quiet: it is a
 * tool the reader reaches for, not a thing competing with the data under it.
 */
.list-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}
.list-filter-input {
  flex: 0 1 320px;
  min-width: 0;
  padding: 7px 10px;
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.list-filter-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.list-filter-input::placeholder { color: var(--text-faint); }
/* Tabular, so the number does not jitter under the reader's eye as they type. */
.list-filter-count {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.list-filter-empty {
  margin-bottom: 10px;
}
/* A CLASS RATHER THAN `hidden`, because other features in this console toggle
 * `hidden` on rows and two owners of one attribute is how a row vanishes for
 * a reason nobody can trace. The table itself takes the class when nothing
 * matches, so the reader sees one message instead of empty headings. */
tr.filtered-out, table.grid.filtered-out { display: none; }

/* Visible to a screen reader, not on screen. Used for the search box's label:
 * the placeholder is a hint and disappears on typing, so it cannot be the
 * only thing naming the control. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .list-filter-input { flex: 1 1 auto; }
}

/* The tree button rides on the program's subtitle line, beside what the file
   is -- the page title already carries the Details toggle. */
.pd-tree { margin-left: 8px; display: inline-flex; align-items: center; gap: 6px;
  vertical-align: middle; }

/* The wallet's allocate and release controls: one row per product, the amount
   beside the two things that can be done with it. */
.wallet-moves { display: grid; gap: 10px; margin-top: 12px; }
.wallet-move { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.wallet-move .field { flex: 1 1 180px; margin: 0; }

/* The credit alarm sits between the menu and the page, the width of the
   content, so it reads as being about the whole account, not one screen. */
.credit-alarm { margin: 10px 24px 0; }

/* THE BALANCE FLAG IN THE TOP BAR. Small, in the corner, and permanently
   visible -- it replaced a full-width banner that pushed every page down a
   row and was scrolled past, for a state that can last weeks. Coloured
   rather than shouted: `warn` means credit is running out, `bad` means
   something has already stopped. */
.balance-flag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid currentColor;
}
.balance-flag:hover { text-decoration: none; filter: brightness(1.15); }
.balance-flag.warn { color: var(--warn); }
.balance-flag.bad { color: var(--bad); }

/* The client selector in the top bar. Sized to the names it holds, and
   marked when a client is chosen so nobody forgets they are looking at one
   customer's data rather than all of them. */
.client-picker select {
  width: auto; max-width: 220px; padding: 4px 8px; font-size: 12.5px;
  background: var(--bg-raised); border-color: var(--line-strong);
}
.client-picker select:not([value=""]) { border-color: var(--accent); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* The system log. One line per entry, never reflowed: a syslog line's fields
   are positional, and somebody reading this page is checking their ORDER.
   `overflow-x` on the block rather than wrapping, so a long path pushes the
   scrollbar instead of folding the rest of the line onto a new row. */
.syslog-lines { overflow-x: auto; }
.syslog-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre;
  padding: 1px 0;
  border-bottom: 1px solid var(--line);
}
.syslog-line:last-child { border-bottom: 0; }

/* The delete control on an analysed alert. An icon rather than a worded
   button because the column has no heading and a row of "Delete" would pull
   the eye away from the verdict, which is what the table is for. It carries
   an aria-label naming the alert, so it is not a bare glyph to a screen
   reader. Dim until the row is hovered or it is focused: a destructive
   control should not be the brightest thing in a list somebody is reading. */
.row-delete { width: 1%; text-align: right; white-space: nowrap; }
.icon-delete {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 4px 6px;
  opacity: 0.55;
  transition: opacity 120ms ease, color 120ms ease, border-color 120ms ease;
}
tr:hover > .row-delete > .icon-delete, .icon-delete:focus-visible {
  opacity: 1;
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 55%, var(--line));
}

/* A footnote that has to be read rather than skimmed: who pays for an
   organisation created underneath another one. */
.foot.warn-foot { color: var(--warn); border-left: 2px solid var(--warn); padding-left: 8px; }

/* An unpriced rate. A zero in a price column reads as a legitimate total --
   "this costs nothing" -- when what it actually means is that the work is
   being served free while still costing Neotelix a model call. The row is
   marked so that reading is impossible. */
tr.rate-unpriced { background: color-mix(in srgb, var(--warn) 9%, transparent); }
tr.rate-unpriced td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.id.unpriced { color: var(--warn); font-weight: 560; }

/* Folded sections: the per-technique write-ups and the findings corpus.
 *
 * `<details>` rather than a button and a class toggle, because the browser
 * already does this correctly — keyboard, screen reader, and find-in-page
 * all work, and find-in-page opening a closed section is behaviour we would
 * not have thought to build. The marker is removed and drawn on the left so
 * the row reads as a heading rather than a widget. */
details.fold > summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 12px 16px; list-style: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-right: 2px;
  border-right: 1.5px solid var(--text-faint); border-bottom: 1.5px solid var(--text-faint);
  transform: rotate(-45deg); transition: transform 120ms ease;
}
details.fold[open] > summary::before { transform: rotate(45deg); }
details.fold > summary:hover { background: var(--panel-hover); }
details.fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
details.fold .fold-title { flex-grow: 1; font-weight: 500; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); }

/* The first three steps, above everything that explains them. Bordered in
 * the danger colour because it is the one block on the page that is asking
 * the reader to do something before they finish reading. */
.panel.urgent { border-color: var(--bad); }
.urgent-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.urgent-steps li { font-size: 15px; line-height: 1.5; }

/* The plain sentence under a NIST phase name. */
.tab-note {
  display: block; font-size: 11px; color: var(--text-faint);
  margin-top: 2px; font-weight: 400;
}

/* A tile that opens the thing it counts. An anchor, so middle-click, copy
   link and keyboard focus all work without being reimplemented; `display:
   block` because an inline anchor would not take the grid item's height. */
.tile-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.tile-link:hover { border-color: var(--accent); }
.tile-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile-link .value { color: var(--accent); }

/* -------------------------------------------------------------------------
 * "What to do next" on a behavioural finding, and how it unfolded.
 *
 * The level is carried by its WORD and a border weight as well as a hue:
 * check (accent, 3px), contain (warn, 4px), escalate (bad, 5px).
 * ------------------------------------------------------------------------- */
.nx-next { margin-bottom: 18px; border-left-width: 3px; border-left-color: var(--accent); }
.nx-next.nx-level-contain { border-left-width: 4px; border-left-color: var(--warn); }
.nx-next.nx-level-escalate { border-left-width: 5px; border-left-color: var(--bad); }
.nx-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nx-head h2 { margin: 0; }
.nx-level {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  border: 2px solid var(--accent); color: var(--accent);
}
.nx-level-contain .nx-level { border-color: var(--warn); color: var(--warn); }
.nx-level-escalate .nx-level { border-color: var(--bad); color: var(--bad); }
.nx-next h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); margin: 14px 0 6px; }
.nx-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nx-step { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.nx-num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--accent-dim); color: var(--accent);
}
.nx-step-text { font-weight: 600; }
.nx-fold { margin-top: 12px; }
.nx-fold > summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.nx-fold .nx-steps { margin-top: 8px; }
.nx-fine { margin: 14px 0 0; }
.nx-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.nx-basis > summary { color: var(--text-dim); font-weight: 500; }

.badge.nx-link-strong { color: var(--bad); border-color: var(--bad); border-width: 2px; }
.badge.nx-link-likely { color: var(--warn); border-color: var(--warn); }

.nx-story-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nx-story-head h2 { margin: 0; }
.nx-story-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-runs-sum { margin: 4px 0 12px; color: var(--text-dim); }
#nx-runs-dialog td:first-child, #nx-runs-dialog td:nth-child(2) { white-space: nowrap; }
/* The whole command, wrapped: in this dialog it is the thing being read. */
#nx-runs-dialog .pcmd { max-width: 460px; white-space: normal; overflow: visible;
  text-overflow: clip; overflow-wrap: anywhere; }
.nx-key { display: inline-block; width: 26px; vertical-align: middle;
  border-top: 2px solid var(--text-dim); }
.nx-key-proven { border-top-style: solid; }
.nx-key-inferred { border-top-style: dashed; }
.nx-story { list-style: none; margin: 10px 0 0; padding: 0; }
.nx-story-step { position: relative; padding-left: 22px; }
.nx-story-step::before {
  /* The node. */
  content: ""; position: absolute; left: 4px; top: 14px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--panel); border: 2px solid var(--text-dim);
}
.nx-story-step.nx-in-proven,
.nx-story-step.nx-in-inferred { padding-top: 22px; }
.nx-story-step.nx-in-proven::after,
.nx-story-step.nx-in-inferred::after {
  /* The link INTO this step, from the one above: solid when the telemetry
     recorded it, dashed when Neotelix connected it. */
  content: ""; position: absolute; left: 9px; top: -2px; height: 32px;
  border-left: 2px solid var(--text-dim);
}
.nx-story-step.nx-in-inferred::after { border-left-style: dashed; }
.nx-story-step.nx-in-proven::before,
.nx-story-step.nx-in-inferred::before { top: 36px; }
.nx-link-why { position: absolute; left: 22px; top: 3px; font-size: 11.5px; color: var(--text-faint); }
.nx-story-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 10px;
  background: var(--bg-raised);
}
.nx-story-meta { font-size: 11.5px; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: 0.05em; }
.nx-story-title { font-weight: 600; margin-top: 2px; }
.nx-focus .nx-story-card { border-color: var(--accent); border-width: 2px; }
.nx-focus::before { background: var(--accent); border-color: var(--accent); }
.nx-kind-alert .nx-story-card { border-left: 3px solid var(--warn); }
.nx-kind-alert::before { border-color: var(--warn); }
.nx-hint .nx-story-card { border-style: dashed; background: transparent; color: var(--text-dim); }
.nx-hint::before { border-style: dashed; }
.nx-taken { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px;
  margin: 0 0 12px; }
/* Sentences, not labels: the form's field styling must not uppercase them. */
.nx-taken, .nx-taken * { text-transform: none; letter-spacing: normal; }
.nx-taken legend { font-weight: 600; padding: 0 4px; }
.nx-taken label.check { display: block; margin: 4px 0; }

/* The attack flow diagram. Wider than the standard wide dialog: four boxes a
   row is the point of it, and squeezing them would cut the titles short. */
#nx-flow-dialog { width: min(1040px, calc(100vw - 32px)); }
.nx-flow-canvas { overflow: auto; max-height: 70vh; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg); margin-top: 10px; }
.nx-flow-svg { display: block; margin: 0 auto; }
.nx-flow-box rect { fill: var(--panel); stroke: var(--line-strong); stroke-width: 1.4; }
.nx-flow-focus rect { stroke: var(--accent); stroke-width: 2.6; }
.nx-flow-alert rect { stroke: var(--warn); stroke-width: 2; }
.nx-flow-hint rect { fill: none; stroke-dasharray: 5 4; }
.nx-flow-hint text { fill: var(--text-dim) !important; }
.nx-flow-meta { font-size: 9.5px; letter-spacing: 0.06em; fill: var(--text-faint); }
.nx-flow-title { font-size: 12.5px; font-weight: 600; fill: var(--text); }
.nx-flow-foot { font-size: 10.5px; fill: var(--text-dim); font-family: var(--mono); }
.nx-flow-arrow { fill: none; stroke: var(--text-dim); stroke-width: 1.8; }
.nx-flow-inferred { stroke-dasharray: 6 5; }
.nx-flow-head { fill: var(--text-dim); }
a[data-flow-link] .nx-flow-title { fill: var(--accent); }

/* Root cause: the sentence, then the launch chain, then the reasons. */
.nx-root { margin-bottom: 18px; }
.nx-root-summary { font-size: 14px; font-weight: 600; margin: 6px 0 10px; }
.nx-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.nx-chain-node { font-family: var(--mono); font-size: 12.5px; padding: 3px 9px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-raised); }
.nx-chain-focus { border-color: var(--accent); border-width: 2px; color: var(--accent); font-weight: 600; }
.nx-chain-arrow { color: var(--text-dim); }
.nx-root-why { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); margin: 12px 0 4px; }

/* The seven dimensions as tiles. The band is carried by its WORD and the
   bar's length as well as the hue. */
.nx-dim-big { font-size: 22px; font-weight: 700; margin: 8px 0; }
.nx-dim-big span { font-size: 14px; font-weight: 600; margin-left: 8px; color: var(--text-dim); }
.nx-dim-big.nx-dim-high span { color: var(--bad); }
.nx-dim-big.nx-dim-mid span { color: var(--warn); }
#nx-dim-dialog { width: min(560px, calc(100vw - 32px)); }
.nx-raw > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--text-dim); }
.nx-raw > .body > .panel { box-shadow: none; }

/* What the program is (left) and how far this run strayed (right). */
.nx-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px;
  align-items: stretch; margin-bottom: 18px; }
.nx-top > .panel { margin: 0; }
.nx-def, .nx-chart { min-width: 0; }
.nx-anatomy { margin-bottom: 18px; }
.nx-chart-sum { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 980px) { .nx-top { grid-template-columns: minmax(0, 1fr); } }
.nx-def-verdict { margin: 4px 0 12px; }
.nx-def-list { margin: 0; display: grid; gap: 8px; }
.nx-def-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.nx-def-row dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint); padding-top: 2px; }
.nx-def-row dd { margin: 0; overflow-wrap: anywhere; }
.nx-def-warn { color: var(--warn); font-size: 12.5px; margin-top: 2px; }

.nx-bars { display: grid; gap: 6px; }
.nx-bar { display: grid; grid-template-columns: 160px minmax(0, 1fr) 40px; align-items: center;
  gap: 12px; padding: 7px 8px; border: 1px solid transparent; border-radius: 6px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.nx-bar:hover, .nx-bar:focus-visible { border-color: var(--accent); background: var(--panel-hover); }
.nx-bar-label { font-size: 13px; }
.nx-bar-track { position: relative; height: 12px; border-radius: 6px; background: var(--line);
  overflow: hidden; }
/* Band boundaries at 30 and 60, the same bands the dialog names. */
.nx-bar-track::before, .nx-bar-track::after { content: ""; position: absolute; top: 0; bottom: 0;
  width: 1px; background: var(--panel); z-index: 1; }
.nx-bar-track::before { left: 30%; }
.nx-bar-track::after { left: 60%; }
.nx-bar-fill { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--text-dim);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 70ms); }
.nx-bar-high .nx-bar-fill { background: var(--bad); }
.nx-bar-mid .nx-bar-fill { background: var(--warn); }
.nx-bar-low .nx-bar-fill { background: var(--ok); }
.nx-bar-value { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.nx-bar-high .nx-bar-value { color: var(--bad); }
.nx-bar-absent .nx-bar-value, .nx-bar-absent .nx-bar-label { color: var(--text-faint); }
.nx-scale { display: grid; grid-template-columns: 30fr 30fr 40fr; margin: 6px 0 0 180px;
  padding-right: 60px; font-size: 11.5px; color: var(--text-faint); }
.nx-scale span:nth-child(2) { text-align: center; }
.nx-scale span:nth-child(3) { text-align: right; }
@media (prefers-reduced-motion: reduce) { .nx-bar-fill { transition: none; } }
