/* Resilience Insights -- the live view.
 *
 * NOT A COPY OF src/render.py's CSS CONSTANT. Two copies of a 700-line
 * stylesheet drift, and only one of them is covered by tier 1's byte-identity
 * check. This is written for a thing that is scanned and operated rather than
 * read top to bottom: summary before detail, state encoded in form as well as
 * number, and figures in a tabular face so digits line up down a column.
 *
 * ONE CONSEQUENCE, NAMED RATHER THAN PAPERED OVER. The grade and severity
 * colours now exist in two places -- GRADE_COLORS / SEV_COLORS at the top of
 * src/render.py for the export, and the block directly below for the app -- so
 * a B could render differently in each. They are kept adjacent and commented
 * instead of generated: persisting a palette or emitting this file from
 * render.py costs more than the mismatch it prevents.
 */

/* ------------------------------------------------------------------ tokens */
:root {
  /* Semantic, and identical to src/render.py GRADE_COLORS / SEV_COLORS.
     The dark theme lifts them further down -- #9b1c1c on a #0f1215 ground is
     a smear, not a signal -- but the light values are the same bytes. */
  --g-a: #1a7f4b;  --g-b: #4a8c2a;  --g-c: #b8860b;
  --g-d: #c05621;  --g-f: #9b1c1c;  --g-na: #64748b;
  --sev-critical: #9b1c1c; --sev-high: #c05621;
  --sev-medium:   #b8860b; --sev-low:  #64748b;

  /* Remediation waves, and identical to src/render_backup.py WAVE_COLOR.
     The THIRD copy of a palette in this repo, named here for the same reason
     the two above are: waves 1 and 2 reuse the critical and high hues on
     purpose -- urgency is urgency -- and wave 3 is the one colour in the app
     that is neither a grade nor a severity. */
  --w-1: #9b1c1c;  --w-2: #c05621;  --w-3: #2c5282;

  /* Neutrals carry a slight cool bias rather than sitting on pure grey, and
     the accent is brass: this is an actuarial document about an insurance
     estate, not a product launch. */
  --bg:      #f4f5f7;
  --surface: #ffffff;
  --sunk:    #eceef1;
  --ink:     #14181c;
  --ink-2:   #4a545e;
  --ink-3:   #79848f;
  --line:    #dce0e5;
  --line-2:  #c3cad1;
  --accent:  #7d5f18;
  --accent-bg: #f3ecd9;
  --focus:   #1c6fb0;
  --shadow:  0 1px 2px rgb(20 24 28 / .06), 0 4px 14px rgb(20 24 28 / .05);

  --r: 5px;
  --pad: 18px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

/* System-default viewers get nothing stamped on <html>, so this media query is
   the only thing separating them -- guarded so an explicit light choice still
   beats a dark OS. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --g-a: #3fae74;  --g-b: #79bf4e;  --g-c: #d9a520;
    --g-d: #e0813f;  --g-f: #e05c56;  --g-na: #8b96a3;
    --sev-critical: #e05c56; --sev-high: #e0813f;
    --sev-medium:   #d9a520; --sev-low:  #8b96a3;
    --w-1: #e05c56;  --w-2: #e0813f;  --w-3: #6b9fd4;
    --bg:      #0f1215;
    --surface: #171b20;
    --sunk:    #1e232a;
    --ink:     #e4e8ec;
    --ink-2:   #a6b0bb;
    --ink-3:   #7b8794;
    --line:    #2a313a;
    --line-2:  #3b4552;
    --accent:  #d2ad5c;
    --accent-bg: #2a2418;
    --focus:   #66b2f0;
    --shadow:  0 1px 2px rgb(0 0 0 / .4), 0 4px 14px rgb(0 0 0 / .3);
  }
}
/* And again for the explicit toggle, so it wins in the other direction too. */
:root[data-theme="dark"] {
  --g-a: #3fae74;  --g-b: #79bf4e;  --g-c: #d9a520;
  --g-d: #e0813f;  --g-f: #e05c56;  --g-na: #8b96a3;
  --sev-critical: #e05c56; --sev-high: #e0813f;
  --sev-medium:   #d9a520; --sev-low:  #8b96a3;
  --w-1: #e05c56;  --w-2: #e0813f;  --w-3: #6b9fd4;
  --bg: #0f1215; --surface: #171b20; --sunk: #1e232a;
  --ink: #e4e8ec; --ink-2: #a6b0bb; --ink-3: #7b8794;
  --line: #2a313a; --line-2: #3b4552;
  --accent: #d2ad5c; --accent-bg: #2a2418; --focus: #66b2f0;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 4px 14px rgb(0 0 0 / .3);
}

/* ------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* Explicit, from a token: the page composites over a ground the host paints
     in its own theme, and a transparent body borrows it. */
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  display: flex; flex-direction: column; min-height: 100vh;
}
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -.012em; }
h1 { font-size: 1.5rem; font-weight: 640; }
h2 { font-size: 1.05rem; font-weight: 620; }
h3 { font-size: .9rem;  font-weight: 620; }
p  { margin: 0 0 .7em; }
a  { color: var(--focus); text-decoration-thickness: 1px;
     text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px;
                 border-radius: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 20; background: var(--surface);
              padding: 8px 12px; border: 1px solid var(--line-2);
              border-radius: var(--r); }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ chrome */
.top { background: var(--surface); border-bottom: 1px solid var(--line);
       position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1280px; margin: 0 auto; padding: 12px var(--pad) 10px;
          display: flex; flex-wrap: wrap; gap: 14px;
          align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px;
         color: inherit; text-decoration: none; }
.brand-mark { width: 9px; height: 26px; border-radius: 2px; flex: none;
              background: linear-gradient(var(--g-b) 0 25%, var(--g-c) 25% 50%,
                          var(--g-d) 50% 75%, var(--g-f) 75% 100%); }
.brand-txt { font-weight: 640; font-size: 1rem; letter-spacing: -.015em;
             line-height: 1.15; }
.brand-txt em { display: block; font: 400 .72rem/1.3 var(--sans);
                font-style: normal; color: var(--ink-3);
                letter-spacing: .04em; text-transform: uppercase; }

.runbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
          font-size: .74rem; color: var(--ink-2); }
.runbar b { font-weight: 600; color: var(--ink); }
.runbar code { font-family: var(--mono); font-size: .72rem;
               background: var(--sunk); border: 1px solid var(--line);
               border-radius: 3px; padding: 1px 5px; }
.runbar .scope { background: var(--accent-bg); color: var(--accent);
                 border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
                 border-radius: 3px; padding: 1px 7px; font-weight: 600; }

.tabs { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad);
        display: flex; gap: 2px; overflow-x: auto; }
.tabs a { padding: 8px 13px 9px; font-size: .84rem; font-weight: 550;
          color: var(--ink-2); text-decoration: none; white-space: nowrap;
          border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); background: var(--sunk); }
.tabs a[aria-current="page"] { color: var(--ink);
                               border-bottom-color: var(--accent); }

main { flex: 1; max-width: 1280px; width: 100%; margin: 0 auto;
       padding: 22px var(--pad) 48px; }
.pad { padding: 22px 0; }

.foot { border-top: 1px solid var(--line); background: var(--surface);
        font-size: .74rem; color: var(--ink-3); }
.foot > * { max-width: 1280px; }
.foot { display: flex; flex-wrap: wrap; gap: 8px 20px;
        justify-content: space-between; padding: 14px var(--pad); }

/* ------------------------------------------------------------------ blocks */
.head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline;
        justify-content: space-between; margin-bottom: 16px; }
.head .sub { color: var(--ink-2); font-size: .85rem; }
.card { background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r); box-shadow: var(--shadow); }
.card > h2, .card > h3 { padding: 12px 14px; border-bottom: 1px solid var(--line);
                         margin: 0; }
.card .body { padding: 14px; }
section + section { margin-top: 22px; }

.grid { display: grid; gap: 12px;
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
/* 2026-10-20: a grid item's min-width defaults to its content, so a wide
   table pushed its card past the column and painted over the next one
   (the executive summary's readiness and cost cards). Shrinkable cards, and
   a wide table scrolls inside its own card instead. */
.grid > * { min-width: 0; }
.grid > .card .body { overflow-x: auto; }
/* Card tables are short: their headers wrap and do not stick. Sticky headers
   are for long lists, where they earn their keep; in a card they floated over
   the neighbouring card while the page scrolled. */
.grid > .card thead th { position: static; white-space: normal; }
/* The remediation cost table has five columns; on a wide screen its card takes
   two grid columns. Below that the cards stack, so a span would overflow. */
@media (min-width: 1180px) { .grid.wide > .card.span-2 { grid-column: span 2; } }

.tile { background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r); padding: 13px 14px; box-shadow: var(--shadow);
        display: flex; flex-direction: column; gap: 3px;
        color: inherit; text-decoration: none; }
a.tile:hover { border-color: var(--line-2); }
a.tile:hover .tile-n { color: var(--accent); }
.tile-n { font: 620 1.75rem/1.1 var(--sans); font-variant-numeric: tabular-nums;
          letter-spacing: -.02em; }
.tile-l { font-size: .82rem; font-weight: 550; }
.tile-s { font-size: .74rem; color: var(--ink-3); }

/* ------------------------------------------------------------------- chips */
.chip { display: inline-block; font: 600 .72rem/1.5 var(--sans);
        padding: 0 7px; border-radius: 3px; white-space: nowrap;
        border: 1px solid transparent; }
.grade { min-width: 1.6em; text-align: center; color: #fff; }
.grade-A { background: var(--g-a); } .grade-B { background: var(--g-b); }
.grade-C { background: var(--g-c); } .grade-D { background: var(--g-d); }
.grade-F { background: var(--g-f); } .grade-NA { background: var(--g-na); }
:root[data-theme="dark"] .grade,
:root:not([data-theme="light"]) .grade { color: #0f1215; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .grade { color: #fff; }
}
/* Severity reads as a rule down the left edge as well as a colour, so it
   survives both a greyscale print and a reader who cannot separate the hues. */
.sev { padding-left: 6px; border-left: 3px solid var(--g-na); color: var(--ink-2); }
.sev-Critical { border-left-color: var(--sev-critical); color: var(--sev-critical); }
.sev-High     { border-left-color: var(--sev-high);     color: var(--sev-high); }
.sev-Medium   { border-left-color: var(--sev-medium);   color: var(--sev-medium); }
.sev-Low      { border-left-color: var(--sev-low);      color: var(--sev-low); }

/* Waves read as a sequence, so they are filled chips rather than the ruled
   left border severity uses -- two encodings on one row must not look like
   the same encoding twice. */
.wave { color: #fff; min-width: 1.6em; text-align: center; }
.wave-1 { background: var(--w-1); } .wave-2 { background: var(--w-2); }
.wave-3 { background: var(--w-3); }

/* "Assessed and clean" and "not assessed" must not look alike, here as in the
   export. This is the second, and it is deliberately not a zero. */
.na-panel { border: 1px dashed var(--line-2); border-radius: var(--r);
  padding: 14px; color: var(--ink-2); font-size: .88rem;
  background: var(--sunk); }
.na-panel b { color: var(--ink); }

.tag { display: inline-block; font-size: .72rem; padding: 1px 6px;
       border: 1px solid var(--line-2); border-radius: 3px;
       color: var(--ink-2); background: var(--sunk); }

/* -------------------------------------------------------------------- bars */
.stack { display: flex; height: 22px; border-radius: 3px; overflow: hidden;
         border: 1px solid var(--line); }
.stack span { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px;
          font-size: .76rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px;
            margin-right: 5px; vertical-align: baseline; }
.bar { background: var(--sunk); border-radius: 2px; height: 8px;
       min-width: 60px; overflow: hidden; }
.bar span { display: block; height: 100%; }

/* ------------------------------------------------------------------ tables */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .84rem; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line);
         vertical-align: top; }
thead th { position: sticky; top: 0; background: var(--surface); z-index: 1;
           font-size: .72rem; font-weight: 620; text-transform: uppercase;
           letter-spacing: .05em; color: var(--ink-3); white-space: nowrap;
           border-bottom: 1px solid var(--line-2); }
tbody tr:hover { background: var(--sunk); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.key { font-family: var(--mono); font-size: .78rem; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th[aria-sort] { color: var(--accent); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px;
      font-size: .84rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

/* -------------------------------------------------------------- form + nav */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end;
           margin-bottom: 14px; }
.f { display: flex; flex-direction: column; gap: 3px; }
.f label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
           color: var(--ink-3); font-weight: 600; }
select, input, button {
  font: inherit; font-size: .84rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 5px 8px; min-height: 31px;
}
button { cursor: pointer; font-weight: 550; }
button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px;
         font-size: .8rem; color: var(--ink-2); }

/* ----------------------------------------------------------------- notices */
.note { border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
        background: var(--surface); border-radius: var(--r);
        padding: 14px 16px; box-shadow: var(--shadow); }
.note.bad { border-left-color: var(--sev-critical); }
.note h2 { margin-bottom: 6px; }
.note code { font-family: var(--mono); font-size: .8rem; background: var(--sunk);
             border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: .78rem; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------- the diagram plate
   THE PLATE IS LIGHT IN BOTH THEMES, ON PURPOSE. The drawing is #000000 text
   on a #ffffff ground rect, produced by src/diagrams/svg_render.py -- a light
   document, not a themable one. The alternative was a theme-aware renderer,
   which would move out/diagrams/ and retire the 1,045-file recursive hash
   that is phase 13's guard against the hoist having been an edit. So instead
   of recolouring the drawing, the page gives it a paper surface: a white
   plate with a border and a shadow, which in dark mode reads as a document on
   a desk rather than as a blown-out slab. The literal #fff here is therefore
   a property of the artifact, not an untokenised colour -- it must not follow
   --surface, or dark mode paints black-on-black.
   The border and shadow DO come from tokens, so the plate's frame still sits
   in whichever theme the page is wearing. */
.plate {
  background: #ffffff;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 10px;
  overflow: hidden;         /* a panned viewBox must not spill onto the page */
}
.plate-img { display: block; width: 100%; height: auto; }

/* The full-page plate is a fixed viewport the drawing is panned inside, not a
   box that grows with its contents: the whole point of the route is that the
   drawing is bigger than the screen. dvh, so a mobile URL bar collapsing does
   not leave the bottom of the plate under it. */
.plate-full { height: min(74dvh, 900px); padding: 0; touch-action: none; }
.plate-full .plate-svg { display: block; width: 100%; height: 100%;
                         cursor: grab; }
.plate-full.dragging .plate-svg { cursor: grabbing; }

.zoom { display: flex; align-items: center; gap: 6px; }
.zoom button { min-width: 30px; }
.zoom #zoom-level { min-width: 4.2em; text-align: center; color: var(--ink-2);
                    font-variant-numeric: tabular-nums; }
/* A link that acts as a control, so it is built from the same parts as the
   buttons beside it rather than reading as body-copy underline in a toolbar. */
.zoom .btn { display: inline-flex; align-items: center; min-height: 31px;
             font-size: .84rem; font-weight: 550; color: var(--ink);
             background: var(--surface); border: 1px solid var(--line-2);
             border-radius: var(--r); padding: 5px 10px; text-decoration: none; }
.zoom .btn:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------- who is here
   The identity strip, third item in .top-in beside the brand and the runbar.
   It is painted only when /v1/auth/me answered, so the empty case needs no
   rule: main.js writes "" and a flex container with no children occupies
   nothing. */
.who { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center;
       font-size: .78rem; }
.who-id { display: flex; align-items: center; gap: 7px;
          color: var(--ink); text-decoration: none; }
.who-id:hover b { color: var(--accent); }
.who-id b { font-weight: 600; }
.who > a:not(.who-id) { color: var(--focus); font-weight: 550; }
.who button { padding: 3px 9px; min-height: 26px; font-size: .78rem; }

/* Role is a standing fact about a person rather than a measured value, so it
   is a tinted outline rather than the filled chip a grade or a wave gets --
   two encodings on one line must not look like the same encoding twice. */
.chip.role { text-transform: lowercase; letter-spacing: .02em;
             background: var(--sunk); color: var(--ink-2);
             border-color: var(--line-2); }
.role-superadmin { background: var(--accent-bg); color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.role-administrator { color: var(--w-3);
  background: color-mix(in srgb, var(--w-3) 12%, transparent);
  border-color: color-mix(in srgb, var(--w-3) 35%, transparent); }

/* ----------------------------------------------------------- the login card
   NO CHROME WHILE SIGNED OUT, and it is done by hiding rather than by not
   rendering: the tabs link into data this session may not be allowed to read,
   and a nav bar above a login form invites clicking it. The footer goes too
   -- its one link is /export/, which nginx now puts behind the same session
   this form is trying to open. */
body[data-auth="out"] .top,
body[data-auth="out"] .foot { display: none; }
body[data-auth="out"] main { display: flex; align-items: center;
                             padding-top: min(9vh, 90px); }

.auth-wrap { width: 100%; max-width: 430px; margin: 0 auto; }
.auth-card { background: var(--surface); border: 1px solid var(--line);
             border-radius: var(--r); box-shadow: var(--shadow);
             padding: 22px 24px 24px; }
.auth-head { display: flex; align-items: center; gap: 11px;
             margin-bottom: 20px; }
.auth-head h1 { font-size: 1.05rem; }
.auth-head p { margin: 0; font-size: .72rem; letter-spacing: .04em;
               text-transform: uppercase; }
.auth-card h2 { margin-bottom: 6px; }
.lede { color: var(--ink-2); font-size: .86rem; margin-bottom: 14px; }
.policy { font-size: .76rem; margin: -2px 0 12px; }

/* The steps are numbered because they ARE a sequence -- password, then the
   forced rotation, then a passkey -- and the order is enforced by the server,
   not offered as a menu. A numbered marker on a set of unordered choices
   would be decoration; here it is the fact. */
.steps { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 18px;
         padding: 0; list-style: none; counter-reset: step;
         font-size: .73rem; color: var(--ink-3); }
.steps li { display: flex; align-items: center; gap: 6px;
            counter-increment: step; }
.steps li::before { content: counter(step); flex: none;
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .64rem; font-weight: 700; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line-2); background: var(--sunk); color: var(--ink-3); }
.steps li.done { color: var(--ink-2); }
.steps li.done::before { content: "\2713"; background: var(--g-b);
                         border-color: var(--g-b); color: var(--surface); }
.steps li.now { color: var(--ink); font-weight: 620; }
.steps li.now::before { background: var(--accent); border-color: var(--accent);
                        color: var(--surface); }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 13px; }
.field label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
               color: var(--ink-3); font-weight: 600; }
.field label .muted { text-transform: none; letter-spacing: 0;
                      font-weight: 400; }
.field input { width: 100%; min-height: 36px; }

/* An error here is the whole answer the server gave, so it is a block with a
   severity rule down its edge rather than red text under a box -- the same
   encoding .sev uses, for the same reason. */
.auth-err { border-left: 3px solid var(--sev-critical);
            background: color-mix(in srgb, var(--sev-critical) 8%, transparent);
            border-radius: 3px; padding: 9px 11px; margin-bottom: 13px;
            font-size: .84rem; color: var(--ink); }
.auth-err[hidden] { display: none; }

button.primary { width: 100%; min-height: 38px; font-weight: 600;
                 color: var(--surface); background: var(--accent);
                 border-color: var(--accent); }
button.primary:hover:not(:disabled) { color: var(--surface);
  background: color-mix(in srgb, var(--accent) 86%, var(--ink));
  border-color: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
button.primary:disabled { opacity: .6; }

.auth-foot { margin: 14px 2px 0; font-size: .74rem; text-align: center; }

/* ---------------------------------------------------- accounts and passkeys
   Shown once, stored never: create_account() returns the generated password
   in the response it is about to write and keeps only the argon2 hash. So the
   one place it appears has to look like something to copy rather than
   something to read past. */
code.once { display: block; font-family: var(--mono); font-size: 1rem;
  letter-spacing: .06em; user-select: all; word-break: break-all;
  background: var(--sunk); border: 1px dashed var(--accent);
  border-radius: var(--r); padding: 10px 12px; color: var(--ink); }

/* Row actions. A cell of buttons, not a cell of links: each one is a POST.
   Spaced with a margin on the adjacent sibling rather than by making the cell
   a flex container: `display: flex` on a <td> takes it out of the table
   layout algorithm -- the table then wraps it in an anonymous cell -- and the
   column widths stop agreeing with the header above them. */
td.controls { white-space: nowrap; }
td.controls > * + * { margin-left: 6px; }
td.controls button, td.controls select { padding: 2px 8px; min-height: 26px;
                                         font-size: .78rem; }
td.controls .muted { font-size: .78rem; }

/* Phase 18, the tenants screen. A destructive control should not look like
   an ordinary one -- the colour is a warning, the typed-slug prompt behind
   it is the actual brake. */
button.danger { color: var(--g-f); border-color: var(--g-f); }
button.danger:hover:not(:disabled) { color: #0f1215; background: var(--g-f);
  border-color: var(--g-f); }

/* The pre-parsed outline of a refused upload. Inside the error box, so it
   reads as part of the refusal rather than as a result. */
.outline { margin-top: 10px; }
.outline details { margin: 4px 0; }
.outline summary { cursor: pointer; }
.outline .small { font-size: 12px; color: var(--ink-2);
  overflow-wrap: anywhere; margin: 4px 0 8px 14px; }
/* Present and focusable, just not where anyone can see it. See the comment
   in views/tenants.js: `hidden` would stop the file picker opening. */
.offscreen { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; }
/* A statement of fact inside a panel -- used where a screen would otherwise
   imply something it cannot do. Quieter than .note, louder than .muted. */
.note-inline { border-left: 3px solid var(--line-2); padding: 2px 0 2px 10px;
  margin: 10px 0; color: var(--ink-2); font-size: .86rem; }
.note-inline + p.muted + pre.mono, pre.mono.small {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 8px 10px; font-size: 12px;
  overflow-x: auto; white-space: pre; }
/* The estate picker in the run bar. Sized to its content so the bar does
   not jump when a longer slug is chosen. */
.runbar select { font: inherit; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1px 4px; max-width: 220px; }
.runbar select:hover { border-color: var(--accent); }

/* --- intake readiness -----------------------------------------------------
   SCOPED UNDER .readiness, ALL OF IT. `.small` already exists in this file
   but only under `.outline` and `pre.mono`, and `.chip` is a shared shape
   with grade colours attached. Phase 18 shipped a screen that worked and
   looked broken because `.grid` was reused for a table when it meant a card
   layout; borrowing a global class here would be the same move. Nothing
   below changes what any existing class means anywhere else.

   Tokens only -- no literal colours -- so dark mode follows without a
   second declaration, which is the rule the rest of this file keeps. */
.readiness { border: 1px solid var(--line-2); border-radius: 4px;
             padding: 10px 12px; margin: 10px 0; }
.readiness p { margin: 4px 0; }
.readiness .small { font-size: 12px; color: var(--ink-2); }
/* Green for a source we have, amber for one still needed. Reusing the grade
   palette deliberately: those two colours already mean good and caution
   everywhere else in the app, and inventing a third pair would make the
   screen say "this is a different kind of good". */
.readiness .chip.ok   { background: var(--g-a); color: #fff; }
.readiness .chip.warn { background: var(--g-c); color: #fff; }
.readiness .warn-list { margin: 6px 0 6px 18px; color: var(--ink-2); }
.readiness .warn-list li { margin: 2px 0; }

/* The build controls. Scoped, like .readiness, and for the same reason. */
.buildbar { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.buildbar .small { font-size: 12px; color: var(--ink-2); }
/* DISABLED, NOT HIDDEN, when the estate is not ready -- so `absent` keeps
   exactly one meaning: this account may never build. The phase-18 lesson
   from the delete control, applied before it could be learned twice. */
.buildbar .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* --- the intake modal (phase 35) ---------------------------------------- */
dialog.intake {
  width: min(960px, 94vw); max-height: 88vh; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  padding: 0 var(--pad) var(--pad);
}
dialog.intake::backdrop { background: rgb(0 0 0 / .45); }
dialog.intake .intake-head {
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: var(--surface); padding-top: var(--pad);
}
dialog.intake .intake-head button { font-size: 1.4rem; line-height: 1; }
dialog.intake .dropzone {
  border: 2px dashed var(--line); border-radius: var(--r);
  padding: 22px; text-align: center; margin: 10px 0 16px; background: var(--sunk);
}
dialog.intake .dropzone.over { border-color: var(--focus); background: var(--accent-bg); }
dialog.intake .intake-list { width: 100%; margin-bottom: 14px; }
dialog.intake .intake-list td { vertical-align: top; }
dialog.intake .small { font-size: .78rem; }
.tag.good { border-color: var(--g-a); color: var(--g-a); }
.tag.bad  { border-color: var(--g-f); color: var(--g-f); }
.good { color: var(--g-a); }
.fail { color: var(--g-f); }

/* Phase 37: the weights sliders live inside the Scoring weights tile. */
.slider-cell { display: flex; align-items: center; gap: 10px; min-width: 16em; }
.slider-cell input[type=range] { flex: 1; accent-color: var(--accent); }
.slider-cell output { width: 3.2em; text-align: right; }
.weights-actions { padding: 12px 14px; border-top: 1px solid var(--line); }
.weights-actions input[data-weights-reason] { width: min(28em, 100%); margin-right: 6px; }
.weights-actions button { margin: 6px 6px 0 0; }

/* Phase 38: the rate card. A changed value is visible before it is saved. */
tr.changed td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rate-version { border-bottom: 1px solid var(--line); padding: 6px 0; }
.rate-version:last-child { border-bottom: 0; }
.warn { color: var(--g-d); }
.small { font-size: .82rem; }

/* Phase 41: the Views menu sits at the end of the run bar. */
.views-menu { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.views-menu select, .views-menu button { font-size: .8rem; }

/* A small inline action beside a value (the tenant's export date). */
button.linkish { background: none; border: 0; padding: 0 2px; color: var(--accent);
                 cursor: pointer; font-size: .8rem; text-decoration: underline; }

/* 2026-10-16: the build an accepted diagram edit queues, in progress. */
.progress { height: 6px; border-radius: 3px; background: var(--line);
  overflow: hidden; margin: 8px 0; max-width: 28em; }
.progress-bar { height: 100%; width: 35%; border-radius: 3px;
  background: var(--accent); animation: ri-progress 1.4s ease-in-out infinite; }
@keyframes ri-progress { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .progress-bar { animation: none; width: 100%; opacity: .5; } }

/* The self-hosted diagram editor, embedded on the scorecard. */
dialog.editor { width: min(1400px, 96vw); height: 92vh; padding: 0; border: 0;
  border-radius: 8px; overflow: hidden; }
dialog.editor { display: flex; flex-direction: column; }
dialog.editor:not([open]) { display: none; }
dialog.editor .editor-bar { display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; }
dialog.editor iframe { width: 100%; flex: 1; border: 0; display: block; }

/* Discovery and Confirm: the owner's form (confirm.html). */
main.confirm { max-width: 760px; margin: 24px auto; padding: 0 16px; }
main.confirm .q { padding: 10px 0; border-bottom: 1px solid var(--line); }
main.confirm .q.gap { border-left: 3px solid var(--accent); padding-left: 10px; }
main.confirm .q input[type=text], main.confirm .q input[type=number],
main.confirm .q input[type=date], main.confirm .q select, main.confirm .q textarea {
  display: block; width: 100%; max-width: 32em; margin-top: 6px; }
main.confirm label.inline { display: inline-block; margin: 6px 12px 0 0; }

/* Patch posture (2026-10-20): a server with overdue critical patches or an
   open known-exploited CVE, highlighted in the scorecard's server table. */
tr.warn-row td { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* 2026-10-20: builds in progress and their outcome, app-wide (build_watch.js).
   The banner sits under the sticky top bar; notifications drop in from the
   top and fade. */
#build-banner { position: sticky; top: 0; z-index: 9; display: flex; align-items: center;
  gap: 12px; padding: 6px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
  font-size: .85rem; }
#build-banner .progress { flex: 0 0 120px; margin: 0; }
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; flex-direction: column; gap: 8px; width: min(560px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: var(--r); box-shadow: var(--shadow);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  cursor: pointer; opacity: 0; transform: translateY(-16px);
  transition: opacity .3s ease, transform .3s ease; }
.toast.in { opacity: 1; transform: none; }
.toast.good { border-left-color: var(--g-b, #3a8a4a); }
.toast.bad { border-left-color: var(--g-f, #c0392b); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Surveys dashboard (2026-10-22). */
.survey-dash .grid { margin-bottom: 14px; }
.survey-charts { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, 2fr);
                 gap: 14px; }
@media (max-width: 760px) { .survey-charts { grid-template-columns: 1fr; } }
.donut { width: 132px; height: 132px; border-radius: 50%; flex: none; position: relative;
         display: grid; place-items: center; }
.donut span { width: 86px; height: 86px; border-radius: 50%; background: var(--surface);
              display: grid; place-content: center; text-align: center; line-height: 1.1; }
.donut b { font-size: 1.4rem; }
.donut small { color: var(--ink-3, var(--muted)); font-size: .72rem; }
.stack { display: flex; height: 14px; border-radius: 3px; overflow: hidden;
         background: var(--sunk); min-width: 60px; }
.stack span { display: block; height: 100%; }
.stack-rows { margin-top: 12px; width: 100%; }
.stack-rows th { width: 70px; font-weight: 550; text-align: left; white-space: nowrap; }
.stack-rows td.num { width: 40px; }
.legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap;
          gap: 4px 14px; font-size: .8rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px;
            margin-right: 5px; vertical-align: -1px; }
main.confirm .bu-pick td { padding: 4px 8px 4px 0; }
main.confirm .bu-pick select { max-width: 100%; }

/* BIA impact grid and questionnaire (2026-10-22). */
.impact-grid th { text-align: left; font-weight: 550; white-space: nowrap; padding-right: 8px; }
.impact-grid td { padding: 2px 4px; }
.impact-grid select { min-width: 7.5em; }
.impact-result { margin: 6px 0 0; }
.bia-rows td { padding: 2px 4px; vertical-align: top; }
.bia-rows input, .bia-rows select, .bia-rows textarea { width: 100%; min-width: 7em; }
.bia-section { margin-top: 18px; }
.bia-section h3 { margin: 0 0 8px; }
.bia-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; }
.bia-fields label { display: block; font-size: .82rem; font-weight: 550; margin-bottom: 3px; }
.bia-fields input, .bia-fields select, .bia-fields textarea { width: 100%; }
.disagree { color: var(--sev-high); font-weight: 600; }

/* A link that looks like a button (the RTO / RPO workbook export). */
a.button { display: inline-block; padding: 6px 12px; border: 1px solid var(--line);
           border-radius: var(--r); background: var(--surface); color: var(--ink);
           text-decoration: none; font-size: .85rem; margin-left: auto; }
a.button:hover { border-color: var(--accent); }

/* The single-pane RTO / RPO catalogue (2026-10-28): colour-banded outcomes,
   the application pinned while the role groups scroll past. color-mix keeps
   the bands legible in both themes off the grade palette. */
.band-bad  { background: color-mix(in srgb, var(--g-f) 16%, transparent); }
.band-warn { background: color-mix(in srgb, var(--g-c) 18%, transparent); }
.band-good { background: color-mix(in srgb, var(--g-a) 14%, transparent); }
.band-none { color: var(--ink-3, var(--ink-2)); }
#rto-table th.group { text-align: center; border-bottom: 1px solid var(--line-2); }
#rto-table th.group.sep, #rto-table td.sep { border-left: 2px solid var(--line-2); }
#rto-table .pin { position: sticky; left: 0; background: var(--surface); z-index: 2; }
#rto-table thead .pin { z-index: 3; }
#rto-table td { white-space: nowrap; }
#rto-table thead tr:nth-child(2) th { top: 2em; }
.weights-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.weights-row label { font-size: .85rem; }
.weights-row input[type=number] { width: 4.5em; }
.decide-grid td { padding: 3px 6px; vertical-align: top; }
.decide-grid input[type=number] { width: 5em; }
#rto-cols { padding: 8px 14px; border-bottom: 1px solid var(--line); }
#rto-cols summary { cursor: pointer; font-size: .85rem; }
#rto-col-picks { margin-top: 6px; }

/* On/off switch (fmt.js toggle()). The checkbox is visually hidden but still
   focusable; the track and knob are drawn from its state. */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
          font-size: .85rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 38px; height: 22px; border-radius: 11px;
                background: var(--line-2); transition: background .15s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
                       border-radius: 50%; background: #fff; transition: transform .15s;
                       box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: .5; cursor: not-allowed; }
.switch-off, .switch-on { color: var(--ink-3, var(--ink-2)); }
.switch:has(input:not(:checked)) .switch-off,
.switch:has(input:checked) .switch-on { color: var(--ink); font-weight: 550; }

/* ------------------------------------------- UI review fixes (2026-10-30)
   From tools/shoot_ui.py's photographs; shared rules rather than per-screen
   patches, so screens stop drifting apart. */

/* A primary action sits at its natural size beside the others. Only the
   login card's single action spans its form. */
button.primary { width: auto; min-height: 34px; padding: 6px 18px; }
.auth-card button.primary { width: 100%; min-height: 38px; }

/* Checkboxes and radios: the shared input rule gave them a 31px minimum
   height and padding, which floated them above their labels. */
input[type=checkbox], input[type=radio] {
  min-height: 0; padding: 0; width: auto; height: auto; margin: 0 6px 0 0;
  vertical-align: -2px; accent-color: var(--accent); }
label > input[type=checkbox], label > input[type=radio] { flex: none; }

/* Two cards one after the other get the gap two sections do; inside a grid
   the grid's own gap applies. */
:not(.grid, .survey-charts, .report-grid) > .card + .card,
:not(.grid, .survey-charts, .report-grid) > .card + section,
:not(.grid, .survey-charts, .report-grid) > section + .card { margin-top: 22px; }

/* Short labels never break: a state tag, a tier, a key. */
.tag, td.nowrap, th.nowrap { white-space: nowrap; }

/* Six tiles fit one row at desktop width, instead of five and an orphan. */
.grid { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }

/* Filter bars as one even grid: every select the same width. */
form.filters#dimensions { display: grid; gap: 8px 12px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
form.filters#dimensions select { width: 100%; }

/* Tabs and filter chips drawn as chips, not as small underlined links. */
.filters a.chip { text-decoration: none; color: var(--ink-2); background: var(--surface);
  border-color: var(--line-2); padding: 3px 10px; border-radius: 999px; font-weight: 550; }
.filters a.chip:hover { border-color: var(--accent); color: var(--accent); }
.filters a.chip.on { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.filters a.chip.on .muted { color: inherit; opacity: .8; }


/* Long machine text in a narrow cell wraps inside it rather than over the
   next column (the audit's detail). */
td.mono { overflow-wrap: anywhere; }

/* Phone width: a wide table scrolls inside its card; nothing scrolls the page
   sideways. */
@media (max-width: 760px) {
  .card .body, .card > .scroll { overflow-x: auto; }
  .card { max-width: 100%; }
  td.controls, td:last-child { white-space: normal; }
}

/* 2026-11-09: the Reporting tab. Cards on a grid that collapses to one column
   at phone width; the panels inside scroll rather than widening the page.
   Every closed tile is given the same height, the tallest closed tile's, by
   views/reports.js (--rp-tile-h); each card is a column whose buttons sit at
   the bottom, so the tiles line up. Every row is at least that height too, so
   the first column's tiles are evenly spaced however tall a neighbour grows,
   and align-items: start keeps every tile at the top of its row -- an open
   Upload or History panel grows its own tile and row and nothing else. */
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
               grid-auto-rows: minmax(var(--rp-tile-h, auto), auto);
               align-items: start; gap: 14px; margin-bottom: 14px; }
.report-card { margin: 0; min-width: 0; display: flex; flex-direction: column;
               min-height: var(--rp-tile-h, auto); }
.report-card > .body { flex: 1; display: flex; flex-direction: column; }
.report-card > .body > .rp-buttons { margin-top: auto; }
.report-card h2 .tag { margin-left: 6px; vertical-align: middle; }
.rp-buttons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rp-panel { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; overflow-x: auto; }
.rp-panel h3 { margin: 10px 0 6px; font-size: .9rem; }
.grid-table { border-collapse: collapse; width: 100%; font-size: .8rem; }
.grid-table th, .grid-table td { border-bottom: 1px solid var(--line); padding: 4px 6px;
                                 text-align: left; vertical-align: top; }
.rp-help code, .rp-panel code { font-family: var(--mono); font-size: .78rem; overflow-wrap: anywhere; }
.rp-status .err, .rp-result .err { color: var(--sev-critical); }

/* 2026-11-11: optional AI inference. The Settings form, and the assistant's
   drawer -- non-modal and pinned right, so a link in an answer can be
   followed with the conversation still open. Built only from the tokens above,
   so both themes follow. */
.inf-form { display: grid; gap: 10px; max-width: 46rem; }
.inf-form label { display: grid; gap: 4px; font-size: .9rem; color: var(--ink-2); }
.inf-form label.inline { display: flex; gap: 8px; align-items: center; }
/* display: grid above outranks the hidden attribute (the reasoning-effort row). */
.inf-form label[hidden] { display: none; }
.inf-form input:not([type=checkbox]) { width: 100%; }
.ask-btn { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
dialog.assistant {
  position: fixed; inset: auto 16px 16px auto; margin: 0;
  width: min(440px, calc(100vw - 32px)); height: min(640px, calc(100vh - 96px));
  display: flex; flex-direction: column; gap: 8px; z-index: 20;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  padding: 12px 14px;
}
dialog.assistant:not([open]) { display: none; }
dialog.assistant .asst-head { display: flex; justify-content: space-between; align-items: center; }
dialog.assistant .asst-note { color: var(--ink-3); margin: 0; }
dialog.assistant .asst-log {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--line); padding-top: 8px;
}
dialog.assistant .asst-msg { padding: 8px 10px; border-radius: var(--r); overflow-wrap: anywhere; }
dialog.assistant .asst-user { align-self: flex-end; background: var(--accent-bg); max-width: 85%; }
dialog.assistant .asst-assistant { align-self: flex-start; background: var(--sunk); max-width: 95%; }
dialog.assistant form { display: flex; gap: 8px; align-items: flex-end; }
dialog.assistant textarea { flex: 1; resize: vertical; font: inherit; }
dialog.assistant[data-state="asking"] .asst-log::after { content: "Thinking…"; color: var(--ink-3); }

/* 2026-11-17: the portable AI prompt menu (web/js/ai_prompt.js). */
details.ai-menu { margin: 8px 0 0; font-size: .85rem; }
details.ai-menu > summary { cursor: pointer; color: var(--accent); width: max-content; }
details.ai-menu ul { list-style: none; margin: 6px 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px; }
details.ai-menu button.linkish { font-size: .85rem; text-align: left; }
.card details.ai-menu { border-top: 1px solid var(--line); padding-top: 6px; }

/* 2026-11-17: AI drafts and their review (web/js/ai_drafts.js). */
.ai-draft-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 0 0 8px; }
.ai-draft-form label { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }
.ai-draft-form input { min-width: 16em; }
.ai-draft-form p { flex-basis: 100%; margin: 0; }
.ai-draft-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ai-draft { border-top: 1px solid var(--line); padding-top: 8px; min-width: 0; }
.ai-draft-text, .ai-draft-edit { white-space: pre-wrap; font: inherit; font-size: .85rem;
  max-height: 22em; overflow: auto; margin: 6px 0; }
.ai-draft-edit { width: 100%; box-sizing: border-box; }
.tag.ai-approved { border-color: var(--accent); color: var(--accent); }
.tag.ai-rejected { opacity: .65; text-decoration: line-through; }
.ai-draft-problems { margin: 6px 0 0; padding-left: 1.2em; }
.ai-dropped { margin: 4px 0; }

/* 2026-11-19: drafts drawn as documents, and the drafting chat (web/js/ai_chat.js). */
.draft-view h4 { margin: 10px 0 4px; font-size: .9rem; }
.draft-items { margin: 0 0 6px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.draft-items li { line-height: 1.4; }
.draft-gates { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--ink-2); margin-top: 2px; }
.draft-ask { font-size: .8rem; color: var(--ink-2); margin-top: 2px; }
.draft-cite { font-size: .72rem; color: var(--ink-2); margin-top: 2px; }
.draft-cite code { font-size: .72rem; }
.step-no { color: var(--accent); }
.pill { display: inline-block; font-size: .7rem; padding: 0 6px; border-radius: 9px;
  border: 1px solid var(--line-2); color: var(--ink-2); vertical-align: 1px; }
.pill-critical { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.pill-high, .pill-proposed { border-color: var(--accent); color: var(--accent); }
.pill-missing, .pill-requires { border-style: dashed; }
.ai-chat .asst-log { min-height: 14rem; }
.ai-chat .asst-msg.draft-view { max-width: 100%; }
.chat-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.chat-attach { cursor: pointer; font-size: .85rem; }
.chat-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chat-thumbs img { max-height: 64px; max-width: 120px; border: 1px solid var(--line); border-radius: 4px; }
.chat-thumb { position: relative; }
.chat-use { margin: 8px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
