/* ============================================================================
   THE COMPOSER'S "+" AND ITS MODEL LIST (chat-first UI step 5, 2026-10-12) —
   composer-plus.js, model-picker.js, motion.js
   ----------------------------------------------------------------------------
   The owner's Plus and Runtime canvases in this app's palette and type. The
   "+" is a menu of two groups whose "›" rows open a list beside it (over it,
   with a Back, on a phone). The model list is Auto on a row of its own, then
   a block per way of running with its models as chips.

   The base rules for both — where they open, the phone sheet, the dock they
   open above — stay in style.css (sections 9 and 12), which the DOM tests
   read; this file restyles what is inside them. Loaded after hire.css.

   Motion is the motion pack's (Motion.dc.html, tokens in style.css):
   - the "+" blooms on the spring, its rows staggering 18ms for the first six —
     the one place besides the avatar pop and the check mark that rule 4 lets
     anything spring — and the "+" turns to "×" in 140ms;
   - a side list slides 4px in on the snap curve in 140ms;
   - the model list arrives with 4px of travel and .96 of scale in 140ms on
     the snap curve, and never springs: it is a choice about money;
   - everything leaves at 0.7 of its entrance on the exit curve, played on an
     inert copy so input never waits (motion.js);
   - under reduced motion each is an 80ms fade, and no copy is made.
   ============================================================================ */

.mp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- the "+" ---------- */
.cm-plus .ic { transition: transform var(--dur-quick) var(--ease-snap); }

/* The panel is the frame; the menu and its side list are the cards. The
   panel keeps the height popover-place.js gives it, and the menu scrolls in
   it, so a side list can sit OUTSIDE it without being clipped. */
.cm-menu {
  width: auto; padding: 0; gap: 0; overflow: visible;
  background: none; border: 0; box-shadow: none;
}
.pm-main, .pm-sub {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--elev-2);
}
.pm-main {
  width: min(316px, calc(100vw - 48px)); min-height: 0; padding: 6px;
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
}
.pm-group { display: flex; flex-direction: column; gap: 1px; }
.pm-group:empty { display: none; }
.pm-group + .pm-group:not(:empty) { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; }
.pm-main .cm-item { min-height: 42px; padding: 6px 8px; }
.pm-main .cm-item .sq { width: 28px; height: 28px; border-radius: 50%; }
.pm-main .cm-item-title { font-weight: 500; font-size: 14px; }
.pm-main .cm-item-sub { font-size: 11.5px; }
.cm-item.is-open { background: var(--stone-tint); }
.pm-meta { margin-left: auto; flex: none; font: 500 12px/1.2 var(--f-body); letter-spacing: normal; color: var(--dim); font-variant-numeric: tabular-nums; }
.pm-chev { width: 14px; height: 14px; color: var(--dim); margin-left: auto; }
.pm-meta + .pm-chev { margin-left: 4px; }

.pm-sub {
  position: absolute; left: calc(min(316px, calc(100vw - 48px)) + 8px); bottom: 0;
  width: min(300px, calc(100vw - 48px)); max-height: min(60vh, 460px);
  overflow-y: auto; overscroll-behavior: contain; padding: 10px 6px 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.pm-sub[hidden] { display: none; }
.cm-menu.opens-down .pm-sub { bottom: auto; top: 0; }
.pm-sub-head { display: flex; align-items: center; gap: 4px; padding: 0 4px 4px; }
.pm-sub-head .cm-sec-head { padding: 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0; }
/* Back is for the phone, where the side list covers the menu. */
.pm-back {
  display: none; place-items: center; width: 36px; height: 36px; padding: 0; flex: none;
  border: 0; border-radius: var(--ctl-r); background: none; color: var(--text); cursor: pointer;
}
.pm-back:hover, .pm-back:focus-visible { background: var(--stone-tint); }
.pm-back .ic { width: 16px; height: 16px; }

.pm-sub .cm-conns { padding: 0 4px; gap: 0; }
.pm-sub .cm-conn { min-height: 46px; padding: 4px 4px; gap: 10px; justify-content: flex-start; }
.pm-sub .cm-conn .conn-ic { border-radius: 50%; }
.cm-conn-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cm-conn-name { font-size: 14px; color: var(--text); }
.cm-conn-access { font-size: 12px; line-height: 1.35; color: var(--dim); }
.pm-sub .cm-conn-state { flex: none; margin-left: auto; font-weight: 500; font-size: 11.5px; }
.pm-sub .cm-conn-none { padding: 6px 4px; color: var(--dim); font-size: 13px; }
.pm-sub .cm-sec-note { margin: 6px 8px 2px; font-size: 11.5px; }
.pm-sub .cm-link { min-height: 38px; }
.pm-sub .cm-link .cm-item-title { color: var(--sage); font-weight: 600; font-size: 13.5px; }

.pm-skills, .pm-files { list-style: none; margin: 0; padding: 0 4px; display: flex; flex-direction: column; }
.pm-skill { display: flex; flex-direction: column; gap: 1px; padding: 7px 4px; border-top: 1px solid var(--line); }
.pm-skill:first-child { border-top: 0; }
.pm-skill-name { font-size: 13.5px; color: var(--text); font-weight: 500; }
.pm-skill-desc { font-size: 12px; line-height: 1.4; color: var(--dim); }
.pm-file { min-height: 40px; }
.pm-file .cm-item-title { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-file .cm-item-sub { font-family: var(--f-mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 720px) {
  .pm-main { width: min(340px, calc(100vw - 32px)); }
  .cm-menu.sub-open .pm-main { display: none; }
  .pm-sub { position: static; width: min(340px, calc(100vw - 32px)); max-height: none; min-height: 0; }
  .pm-back { display: inline-grid; }
  .pm-main .cm-item, .pm-sub .cm-item { min-height: 48px; }
}

/* ---------- the model list ---------- */
/* Never wider than the composer it opens from (`100%`: the form is its
   containing block). Capped only at the window, it was 440px inside a 419px
   chat panel: its right 29px were cut off with the tick under them, and the
   panel scrolled 9px sideways under the keyboard, taking the composer with it
   (desktop QA, 2026-10-14). */
.model-pop { width: min(440px, calc(100vw - 48px), 100%); max-height: min(70vh, 560px); padding: 12px 8px 6px; }
.mp-head { padding: 0 10px 8px; font-size: 12.5px; font-weight: 500; color: var(--dim); }
.mp-sec { border-radius: 12px; padding: 4px; }
.mp-sec + .mp-sec { margin-top: 2px; }
.mp-sec.mp-sec-chips { padding: 10px; }
.mp-sec.has-chosen.mp-sec-chips { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.mp-sec-top { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.mp-tile { width: 20px; height: 20px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 1; }
.mp-glabel { padding: 0; font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--text); }
.mp-sec-meta { margin-left: auto; font: 500 12px/1.2 var(--f-body); letter-spacing: normal; color: var(--dim); font-variant-numeric: tabular-nums; }
.mp-sec-tick { flex: none; width: 16px; text-align: center; color: var(--sage); font-weight: 700; font-size: 13px; }
.mp-sec-meta + .mp-sec-tick { margin-left: 2px; }
.mp-sec-top > .mp-glabel + .mp-sec-tick { margin-left: auto; }
.mp-sec-tick::before { content: "✓"; }
.mp-sec-note { margin: 4px 0 0 28px; font-size: 12.5px; line-height: 1.45; color: var(--dim); }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 28px; }
.mp-opt.mp-chip {
  display: inline-flex; align-items: center; gap: 0; min-height: 30px; padding: 4px 10px;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); cursor: pointer;
  transition: background-color var(--dur-instant) linear, border-color var(--dur-instant) linear;
}
.mp-chip .mp-text { flex-wrap: nowrap; column-gap: 6px; align-items: center; }
.mp-chip .mp-name { font-size: 13px; font-weight: 500; white-space: nowrap; }
.mp-chip .mp-meta { font-family: var(--f-body); font-size: 12px; font-weight: 500; letter-spacing: normal; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mp-opt.mp-chip.is-active { background: var(--stone-tint); }
.mp-opt.mp-chip[aria-selected="true"] { border-color: var(--text); box-shadow: inset 0 0 0 .5px var(--text); }
.mp-say { margin: 7px 0 0 28px; font-size: 12.5px; line-height: 1.4; color: var(--dim); }
.mp-say[hidden] { display: none; }
.mp-rows { display: flex; flex-direction: column; }
.mp-opt.mp-row { align-items: flex-start; gap: 8px; padding: 8px 10px; min-height: 0; }
.mp-row .mp-tile { margin-top: 1px; }
.mp-row .mp-text { flex-direction: column; align-items: flex-start; flex: 1; }
.mp-row .mp-name { font-size: 14px; font-weight: 600; }
.mp-row .mp-blurb { font-size: 12.5px; }
.mp-row .mp-check { margin-left: auto; color: var(--sage); }
/* The Harness group (2026-10-15): rows with a head, as a chips section has,
   under a rule — it is the setting below the models, not one more of them. */
.mp-sec.mp-sec-headed { padding: 10px 4px 4px; }
.mp-sec-headed > .mp-sec-top { padding: 0 6px; }
.mp-sec-headed > .mp-sec-note { margin: 4px 0 2px; padding: 0 6px; }
.mp-sec + .mp-sec-headed { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0; }
.mp-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 2px; }
.mp-row .mp-line .mp-meta { font-family: var(--f-body); font-size: 12px; font-weight: 500; letter-spacing: normal; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Greyed, not gone: still reached by the keyboard and read out, with its
   reason as the line under it (model-picker.js). */
.mp-opt[aria-disabled="true"] { cursor: default; }
.mp-opt[aria-disabled="true"] .mp-name { color: var(--dim); }
.mp-opt[aria-disabled="true"] .mp-tile { opacity: .45; filter: grayscale(1); }
.mp-opt.mp-chip[aria-disabled="true"] { background: transparent; border-style: dashed; }
.mp-sec.is-off .mp-glabel { color: var(--dim); }
.mp-sec.is-off .mp-sec-top .mp-tile { opacity: .45; filter: grayscale(1); }
/* The pill's harness tag: the chat's harness, when it is not the default. */
.harness-tag { flex: none; padding: 1px 6px; border-radius: var(--r-pill); background: var(--stone-tint); color: var(--dim); font-family: var(--f-body); font-size: 12px; font-weight: 500; letter-spacing: normal; white-space: nowrap; }
.harness-tag[hidden] { display: none; }
.mp-foot { margin-top: 6px; padding: 9px 10px 4px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.4; color: var(--dim); }

@media (max-width: 720px) {
  /* The model sheet's dim (model-picker.js): the Ask sheet's colour, one
     layer under the list (z 90) in the composer's stacking context, and the
     phone's scrim fades in and out (phone.css .scrim-layer). */
  .scrim-layer.mp-scrim { display: block; position: fixed; inset: 0; z-index: 89; background: rgb(28 22 16 / .28); }
  /* A page's composer slot is sticky, so it is the stacking context the dim
     and the list are drawn in — and at its own level Today's cards painted
     over both (a dim that took no touch). Lifted over the page while the
     sheet is up. */
  [id$="-composer-slot"]:has(.mp-scrim:not([hidden])) { z-index: 89; }
  .model-pop { width: 100%; }
  /* popover-place.js sets --sheet-foot to what the bottom bar covers. */
  .model-pop:not(.over-dock) { padding-bottom: calc(12px + max(env(safe-area-inset-bottom), var(--sheet-foot, 0px))); }
  /* With the dim up the sheet is drawn over the tab bar, so the room it kept
     for the bar would be an empty band at its foot; only the safe area stays. */
  .mp-scrim:not([hidden]) + .model-pop:not(.over-dock) { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .model-pop.over-dock { width: min(440px, calc(100vw - 32px)); }
  .mp-opt.mp-chip { min-height: 40px; }
  .mp-chips, .mp-sec-note, .mp-say { margin-left: 0; }
}

/* ---------- motion ---------- */
@keyframes pm-bloom { from { opacity: 0; transform: translateY(6px) scale(.96); } }
@keyframes pm-row { from { opacity: 0; transform: translateY(4px) scale(.96); } }
@keyframes pm-slide { from { opacity: 0; transform: translateX(-4px); } }
@keyframes pm-leave { to { opacity: 0; transform: translateY(4px) scale(.97); } }
@keyframes mp-in { from { opacity: 0; transform: translateY(4px) scale(.96); } }
@keyframes mp-sheet { from { opacity: 0; transform: translateY(16px); } }
@keyframes mp-out { to { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes cm-fade { from { opacity: 0; } }
@keyframes cm-fade-out { to { opacity: 0; } }

/* The bloom grows out of the "+": up and to the right of it, or down where
   the list opened downwards (popover-place.js). */
.cm-menu .pm-main { transform-origin: 14px calc(100% + 18px); }
.cm-menu.opens-down .pm-main { transform-origin: 14px -18px; }
.cm-menu.is-entering .pm-main { animation: pm-bloom var(--dur-base) var(--ease-spring) both; }
.cm-menu.is-entering .pm-main .cm-item { animation: pm-row var(--dur-base) var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 18ms); }
.pm-sub.is-entering { animation: pm-slide var(--dur-quick) var(--ease-snap) both; }
.cm-menu.is-leaving { z-index: 45; }
.cm-menu.is-leaving > * { animation: pm-leave calc(var(--dur-base) * var(--dur-exit-scale)) var(--ease-exit) both; }

.model-pop { transform-origin: 24px 100%; }
.model-pop.opens-down { transform-origin: 24px 0; }
.model-pop.is-entering { animation: mp-in var(--dur-quick) var(--ease-snap) both; }
.model-pop.is-entering .mp-sec { animation: cm-fade var(--dur-quick) var(--ease-snap) both; animation-delay: calc(var(--i, 0) * 18ms); }
/* A section a harness pick greyed or freed, while the list stays open. */
.model-pop .mp-sec.mp-shift { animation: cm-fade var(--dur-quick) var(--ease-snap) both; }
.model-pop.is-leaving { z-index: 45; animation: mp-out calc(var(--dur-quick) * var(--dur-exit-scale)) var(--ease-exit) both; }
@media (max-width: 720px) {
  .model-pop:not(.over-dock).is-entering { animation: mp-sheet var(--dur-panel) var(--ease-snap) both; }
}

@media (prefers-reduced-motion: reduce) {
  .cm-plus .ic, .mp-opt.mp-chip { transition: none; }
  .cm-menu.is-entering .pm-main, .cm-menu.is-entering .pm-main .cm-item, .pm-sub.is-entering,
  .model-pop.is-entering, .model-pop.is-entering .mp-sec, .model-pop:not(.over-dock).is-entering, .model-pop .mp-sec.mp-shift {
    animation: cm-fade 80ms linear both; animation-delay: 0s;
  }
  .cm-menu.is-leaving > *, .model-pop.is-leaving { animation: cm-fade-out 80ms linear both; }
}

/* The owner's "Run certification…" under the model list, and its panel
   (app.js `openCertPanel`, 2026-10-20). Warm cream, one motion: the panel's
   fade in, and none under reduced motion. */
.mp-extra.cert-open { display: block; width: calc(100% - 16px); margin: 6px 8px 2px; padding: 8px 10px; border: 1px solid var(--edge); border-radius: 10px; background: var(--card-2); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.mp-extra.cert-open:hover, .mp-extra.cert-open:focus-visible { border-color: var(--edge-2); }
/* The frame (2026-10-27, jo: "I can't scroll on the setup page models list
   to see continue or the rest of the models"). It was one scroller holding
   the head, a 40-row list and the button in a row, so "Review cost" sat
   ~600–700px below the fold with no scrollbar drawn at rest on a Mac or a
   phone. Now a column: the head and the foot keep their place, the body
   between them is the one scroller, and the model list inside it is a
   bounded box of its own. `dvh` where it is known, so a phone's toolbar does
   not push the top under the status bar; `vh` before it for older engines.
   Over the toasts (z 90), which sat on the panel's corner. */
.cert-panel {
  position: fixed; inset: auto 16px 16px auto; z-index: 91;
  display: flex; flex-direction: column;
  width: min(560px, calc(100vw - 32px));
  max-height: min(80vh, 720px); max-height: min(80dvh, 720px);
  overflow: hidden; padding: 0;
  border: 1px solid var(--edge); border-radius: 16px; background: var(--paper); color: var(--ink);
  box-shadow: 0 12px 40px rgb(30 27 24 / 0.14);
  animation: cm-fade var(--dur-quick) var(--ease-snap) both;
}
.cert-panel[hidden] { display: none; }
.cert-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.cert-title { margin: 0; font-size: 15px; font-weight: 600; }
.cert-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 12px; }
.cert-body:focus { outline: none; }
.cert-body:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
/* The step's buttons and its message, always on screen. */
.cert-foot { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 10px 16px 12px; border-top: 1px solid var(--line); background: var(--paper); }
.cert-foot:empty { display: none; }
.cert-foot .cert-msg { margin: 0; }
.cert-close, .cert-back { margin-left: auto; padding: 4px 10px; border: 1px solid var(--edge); border-radius: 8px; background: var(--card); color: var(--ink-dim); font: inherit; font-size: 12.5px; cursor: pointer; }
.cert-row .cert-back:first-child, .cert-inline, .cert-row-btn { margin-left: 0; }
.cert-row-btn { display: block; width: 100%; text-align: left; white-space: normal; }
.cert-inline { padding: 2px 8px; }
.cert-field { display: block; margin: 8px 0; font-size: 13px; color: var(--ink-dim); }
.cert-models { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--edge); border-radius: 10px; background: var(--card); }
.cert-models legend { font-size: 12.5px; color: var(--ink-dim); }
.cert-models .mc-pick { margin: 6px 0 0 22px; }
/* The model list's own box: about nine rows, then it scrolls inside its
   edge, so the cap under it and the foot stay in reach. */
.cert-list {
  max-height: min(40vh, 300px); max-height: min(40dvh, 300px); overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px;
  /* A shade at an edge with more behind it, and none at an end: the covers
     scroll with the rows (local), the shades stay with the box (scroll), so
     a list that has more says so without a scrollbar drawn at rest. */
  background:
    linear-gradient(var(--card) 30%, transparent) top / 100% 24px no-repeat local,
    linear-gradient(transparent, var(--card) 70%) bottom / 100% 24px no-repeat local,
    radial-gradient(farthest-side at 50% 0, color-mix(in srgb, var(--ink) 18%, transparent), transparent) top / 100% 10px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, color-mix(in srgb, var(--ink) 18%, transparent), transparent) bottom / 100% 10px no-repeat scroll;
  background-color: var(--card);
}
.cert-model { display: block; padding: 3px 0; font-size: 13px; }
.cert-mark { margin-left: 6px; font-family: var(--f-body); font-size: 12px; font-weight: 500; letter-spacing: normal; color: var(--ink-faint); }
.cert-go { padding: 7px 14px; border: 0; border-radius: 10px; background: var(--ink); color: var(--paper); font: inherit; font-size: 13px; cursor: pointer; }
.cert-go:disabled { opacity: 0.5; cursor: default; }
.cert-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cert-plan, .cert-lines { max-height: 260px; overflow: auto; padding: 8px 10px; border-radius: 10px; background: var(--card-2); font-family: var(--f-mono); font-size: 11.5px; white-space: pre-wrap; }
.cert-lines { margin: 8px 0; padding-left: 28px; }
.cert-lines:empty { display: none; }
.cert-msg, .cert-status, .cert-spend, .cert-lede, .cert-live { font-size: 13px; color: var(--ink-dim); }
/* The model scout's "New models" panel (2026-11-17): the cert panel's frame, its own lists. */
.nm-list ul, .nm-runs { list-style: none; margin: 4px 0 10px; padding: 0; }
.nm-h { margin: 12px 0 4px; font-size: 13px; font-weight: 600; }
.nm-cand, .nm-run-row { padding: 8px 10px; margin: 6px 0; border: 1px solid var(--edge); border-radius: 10px; background: var(--card-2); font-size: 13px; }
.nm-name { font-weight: 600; overflow-wrap: anywhere; }
.nm-ranks, .nm-facts, .nm-why, .nm-cert, .nm-run-result { font-size: 12px; color: var(--ink-dim); overflow-wrap: anywhere; }
.nm-acts { display: flex; gap: 6px; margin-top: 6px; }
.nm-month, .nm-next, .nm-last, .nm-caveat, .nm-attribution { font-size: 13px; color: var(--ink-dim); }
.cert-status { margin: 4px 0 6px; color: var(--ink); font-weight: 500; }
/* The quiet lines under the bar: one fact each (rule 152). */
.cert-count, .cert-now, .cert-last, .cert-resumed { margin: 2px 0; font-size: 12.5px; color: var(--ink-dim); }
.cert-last { color: var(--ink-faint); }
.cert-count:empty, .cert-now:empty, .cert-last:empty, .cert-resumed:empty { display: none; }
.cert-spend { margin: 2px 0; font-size: 12.5px; }
/* Why it ended short: its own line in the error colour, never folded into the status. */
.cert-error { margin: 4px 0 8px; padding: 6px 10px; border-left: 3px solid var(--err); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--err) 8%, transparent); color: var(--ink); font-size: 13px; }
.cert-live { margin: 6px 0 4px; }
.cert-busy { color: var(--ink); }
/* The bar: determinate once the record says how far, a slow stripe until it does. */
.cert-progress { position: relative; height: 6px; margin: 4px 0 6px; overflow: hidden; border-radius: 999px; background: var(--card-2); }
.cert-progress-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--sage); transition: width var(--dur-quick) var(--ease-snap); }
.cert-progress.is-indeterminate .cert-progress-fill {
  width: 100%;
  background: repeating-linear-gradient(-45deg, var(--edge-2) 0 8px, transparent 8px 16px);
  background-size: 200% 100%;
  animation: cert-stripe 1.6s linear infinite;
}
@keyframes cert-stripe { to { background-position: -45px 0; } }
.cert-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.cert-table th, .cert-table td { padding: 3px 4px; border-bottom: 1px solid var(--edge); text-align: left; }
.cert-table .v-pass { color: var(--sage); }
.cert-table .v-fail, .cert-table .v-error { color: var(--primary-ink); }
.cert-export { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--denim); }
/* On a phone, a bottom sheet like the app's others: full width from the
   foot, rounded top, its own dim behind (index.html #cert-scrim), and never
   taller than the screen. */
@media (max-width: 720px) {
  .scrim-layer.cert-scrim { display: block; position: fixed; inset: 0; z-index: 90; background: rgb(28 22 16 / .28); }
  .scrim-layer.cert-scrim[hidden] { display: none; }
  .cert-panel {
    inset: auto 0 0 0; width: 100%; box-sizing: border-box;
    max-height: 86vh; max-height: 86dvh;
    border-radius: 18px 18px 0 0; border-bottom: 0;
    animation: ph-sheet-up var(--dur-sheet) var(--ease-sheet);
  }
  .cert-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .cert-go, .cert-back, .cert-close { min-height: 44px; }
  .cert-model { padding: 8px 0; }
  .cert-list { max-height: 38vh; max-height: 38dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .cert-panel { animation: none; }
  .cert-progress.is-indeterminate .cert-progress-fill { animation: none; }
  .cert-progress-fill { transition: none; }
}

/* The composer's mode (composer-mode.js, Polar slice 3): three small segments
   beside the +, the chosen one filled. Wraps rather than pushing Send off the
   bar at 360px. */
.cm-mode { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--surface-2, rgba(127, 127, 127, 0.12)); }
.cm-mode[hidden] { display: none; }
.cm-mode-opt { border: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.cm-mode-opt[aria-checked="true"] { background: var(--surface, #fff); box-shadow: 0 0 0 1px var(--line, rgba(127, 127, 127, 0.3)); font-weight: 600; }
