/*
 * The parts the redesigned pages are built from: one look for a page head,
 * a card, a number tile, a button, a status pill, a table, a row in a list,
 * tabs, a form field and a dialog. Colours and sizes come from shell.css.
 * A page keeps only what is its own in its <style>.
 *
 * Sizes: body 15px; nothing a person must read is under 12.5px; ids are
 * the only monospace.
 */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--primary-strong); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.35; }

.page { max-width: 1280px; margin: 0 auto; display: grid; gap: 1.1rem; }
.page.wide { max-width: 1680px; }
.page.narrow { max-width: 860px; }

/* ---------- page head ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 1.5rem; }
.page-head { align-items: center; }
.page-head h1 { font-size: 1.25rem; font-weight: 700; }
.page-sub { color: var(--muted); font-size: .9rem; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }

/* ---------- text helpers ---------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .87rem; }
.tiny { font-size: .82rem; }
.mono { font-family: var(--mono); font-size: .84em; letter-spacing: -.01em; }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.tone-good { color: var(--good); }
.tone-bad { color: var(--bad); }
.tone-warn { color: var(--warn); }
.tone-quiet { color: var(--muted); }

/* ---------- card ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin-bottom: .85rem; }
.card.flush > .card-head { margin: 0; padding: .9rem 1.25rem; border-bottom: 1px solid var(--grid); }
.card-head h2 { font-size: 1.02rem; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.card-head h2 .note { font-size: .85rem; font-weight: 400; color: var(--muted); }
.card-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.section-title { font-size: 1.02rem; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.section-title .note { font-size: .85rem; font-weight: 400; color: var(--muted); }

/* ---------- number tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); gap: .85rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .95rem 1.15rem; display: grid; gap: .1rem; align-content: start; min-width: 0; }
.stat-label { font-size: .87rem; color: var(--muted); }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.stat-sub { font-size: .85rem; color: var(--muted); }
.stat.alert { border-color: var(--bad); background: var(--bad-wash); }
.stat.alert .stat-value { color: var(--bad); }
.stat.calm .stat-value { color: var(--good); }
a.stat { color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--primary); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.5rem; padding: 0 .95rem;
  border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--raised); color: var(--ink);
  font: inherit; font-size: .93rem; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.sm { min-height: 2.1rem; padding: 0 .7rem; font-size: .87rem; }
.btn.plain { border-color: transparent; background: none; color: var(--primary-strong); padding: 0 .35rem; }
.btn.plain:hover { text-decoration: underline; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 1.05rem; height: 1.05rem; flex: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* ---------- status pill: a dot and a word, never colour alone ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .12rem .65rem; border-radius: 999px;
  font-size: .85rem; font-weight: 600; white-space: nowrap; background: var(--quiet-wash); color: var(--muted);
}
.pill::before { content: ''; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-wash); color: var(--good); }
.pill.bad { background: var(--bad-wash); color: var(--bad); }
.pill.warn { background: var(--warn-wash); color: var(--warn); }
.pill.idle { background: var(--primary-wash); color: var(--primary-strong); }
.pill.off::before { background: none; border: 2px solid currentColor; width: .45rem; height: .45rem; }
.pill.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; padding: .05rem .5rem; border-radius: 6px; font-size: .8rem; font-weight: 600; background: var(--quiet-wash); color: var(--muted); white-space: nowrap; }
.tag.qr { background: var(--primary-wash); color: var(--primary-strong); }
.tag.coin { background: var(--warn-wash); color: var(--warn); }
.tag.remote { background: var(--quiet-wash); color: var(--idle); }
.count { display: inline-grid; place-items: center; min-width: 1.5rem; padding: 0 .4rem; border-radius: 999px; font-size: .8rem; font-weight: 700; line-height: 1.5; background: var(--quiet-wash); color: var(--muted); }
.count.bad { background: var(--bad); color: var(--on-bad); }

/* ---------- banners ---------- */
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; padding: .7rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); font-size: .93rem; }
.banner.good { background: var(--good-wash); border-color: var(--good); }
.banner.bad { background: var(--bad-wash); border-color: var(--bad); }
.banner.warn { background: var(--warn-wash); border-color: var(--warn); }
.banner.quiet { background: var(--quiet-wash); }
.banner .grow { flex: 1; min-width: 12rem; }
/* The shared order forms speak in .message and .hint. */
.message { font-size: .93rem; padding: .7rem 1rem; border-radius: var(--radius-s); border: 1px solid var(--border); background: var(--surface); }
.message.good { background: var(--good-wash); border-color: var(--good); }
.message.bad { background: var(--bad-wash); border-color: var(--bad); }
.hint { color: var(--muted); font-size: .87rem; }

/* ---------- segmented control and tabs ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: .2rem; padding: .2rem; border-radius: 10px; background: var(--quiet-wash); }
.seg button {
  min-height: 2.1rem; padding: 0 .8rem; border: 0; border-radius: 8px; background: none; color: var(--muted);
  font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--seg-on); color: var(--ink); font-weight: 600; }
.seg button .n { margin-left: .3rem; font-weight: 600; color: var(--faint); }
.seg button .n.bad { color: var(--bad); }

.tabs { display: flex; gap: 1.5rem; padding: 0 1.25rem; border-bottom: 1px solid var(--grid); overflow-x: auto; overflow-y: hidden; }
.tabs button {
  position: relative; min-height: 3rem; padding: 0; border: 0; background: none; color: var(--muted);
  font: inherit; font-size: .95rem; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px; border-radius: 2px 2px 0 0; background: var(--primary); }
.tabs button .n { margin-left: .35rem; }
.tabpanel { padding: 1.1rem 1.25rem; }
.tabpanel.flush { padding: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: left; font-size: .82rem; font-weight: 500; color: var(--muted); padding: .6rem .75rem; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--sunken); }
.tbl td { padding: .65rem .75rem; border-bottom: 1px solid var(--grid); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 1.25rem; }
.tbl th:last-child, .tbl td:last-child { padding-right: 1.25rem; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .sub { display: block; font-size: .84rem; color: var(--muted); }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--sunken); }
.tbl tr.dim td { color: var(--muted); }

/* ---------- a list of rows ---------- */
.rows { list-style: none; display: grid; }
.rows > li { border-top: 1px solid var(--grid); }
.rows > li:first-child { border-top: 0; }
.rowline { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; padding: .7rem 1.25rem; min-width: 0; }
a.rowline { color: inherit; text-decoration: none; }
a.rowline:hover { background: var(--sunken); }
.rowline .grow { flex: 1 1 12rem; min-width: 0; }
.rowline .title { font-weight: 600; overflow-wrap: anywhere; }
.rowline .sub { display: block; font-size: .87rem; color: var(--muted); overflow-wrap: anywhere; }
.rowline .side { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* A matter that waits for someone: a coloured edge says how bad. */
.matter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .8rem 1.25rem .8rem 1rem; border-left: 4px solid var(--border); min-width: 0; }
.matter.bad { border-left-color: var(--bad); }
.matter.warn { border-left-color: var(--warn); }
.matter .grow { flex: 1 1 16rem; min-width: 0; }
.matter .title { font-weight: 600; }
.matter .sub { display: block; font-size: .87rem; color: var(--muted); overflow-wrap: anywhere; }
.matter .age { font-size: .84rem; color: var(--faint); white-space: nowrap; }

/* ---------- details ---------- */
.kv { display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: .45rem 1.25rem; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.empty { padding: 1.75rem 1.25rem; text-align: center; color: var(--muted); }
.divider { border: 0; border-top: 1px solid var(--grid); margin: .25rem 0; }
pre.raw { margin: .5rem 0 .25rem; padding: .6rem .75rem; border-radius: var(--radius-s); background: var(--sunken); border: 1px solid var(--grid); font: 12px/1.55 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; word-break: break-all; max-height: 24rem; overflow: auto; }

/* ---------- forms ---------- */
label.field, .field { display: grid; gap: .3rem; font-size: .87rem; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: .95rem; min-height: 2.5rem; padding: .4rem .65rem; border: 1px solid var(--border);
  border-radius: var(--radius-s); background: var(--raised); color: var(--ink); min-width: 0; max-width: 100%;
}
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.05rem; height: 1.05rem; accent-color: var(--primary); }
textarea { min-height: 4.5rem; resize: vertical; }
label.check { display: flex; align-items: center; gap: .5rem; font-size: .93rem; color: var(--ink); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); gap: .75rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.toolbar .spacer { flex: 1; }
input.search { min-width: min(16rem, 100%); }

/* ---------- dialogs ---------- */
dialog { margin: auto; width: min(520px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink); padding: 1.35rem 1.4rem; box-shadow: 0 18px 48px rgba(8, 20, 26, .22); }
dialog::backdrop { background: rgba(8, 20, 26, .45); }
dialog form { display: grid; gap: .9rem; }
dialog h3 { font-size: 1.15rem; font-weight: 600; }
dialog label { display: grid; gap: .3rem; font-size: .87rem; color: var(--muted); }
dialog label.check { display: flex; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: .25rem; }
/* Buttons the shared order forms make carry no class. */
dialog button:not(.btn) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: 0 1rem;
  border: 1px solid var(--primary); border-radius: var(--radius-s); background: var(--primary); color: var(--on-primary);
  font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer;
}
dialog button.ghost:not(.btn) { background: var(--raised); border-color: var(--border); color: var(--ink); font-weight: 500; }
dialog button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- a machine, as a tile ---------- */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(18.5rem, 100%), 1fr)); gap: .75rem; }
.mtile {
  display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; align-items: center; padding: .8rem .95rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; min-width: 0;
}
.mtile:hover { border-color: var(--primary); }
.mtile-num {
  grid-row: 1 / span 2; display: grid; place-items: center; min-width: 2.9rem; height: 2.9rem; padding: 0 .35rem; border-radius: 10px;
  background: var(--quiet-wash); color: var(--muted); font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.mtile-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.mtile-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mtile-line { font-size: .87rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mtile.s-run { border-color: var(--good); }
.mtile.s-run .mtile-num { background: var(--good-wash); color: var(--good); }
.mtile.s-idle .mtile-num { background: var(--primary-wash); color: var(--primary-strong); }
.mtile.s-bad { border-color: var(--bad); }
.mtile.s-bad .mtile-num { background: var(--bad-wash); color: var(--bad); }
.mtile.s-warn .mtile-num { background: var(--warn-wash); color: var(--warn); }
.mtile.s-off { background: transparent; border-style: dashed; }
.mtile.s-off .mtile-name { color: var(--muted); }
.progress { height: .3rem; border-radius: 999px; background: var(--quiet-wash); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--good); }

/* ---------- a line of what happened ---------- */
.feed { list-style: none; display: grid; }
.feed > li { display: grid; grid-template-columns: 4.2rem minmax(0, 1.5fr) minmax(0, 1fr) minmax(7rem, auto) minmax(0, 1.5fr); gap: .15rem 1rem; align-items: baseline; padding: .6rem 1.25rem; border-top: 1px solid var(--grid); }
.feed > li:first-child { border-top: 0; }
.feed .t { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed .who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed a.who { color: inherit; text-decoration: none; }
.feed a.who:hover { color: var(--primary-strong); text-decoration: underline; }
.feed .what { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .amt { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed .res { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1000px) {
  .feed > li { grid-template-columns: 4.2rem minmax(0, 1fr) auto; }
  .feed .what { grid-column: 2; grid-row: 2; }
  .feed .amt { grid-column: 3; grid-row: 1; }
  .feed .res { grid-column: 2 / -1; grid-row: 3; white-space: normal; }
}

@media (max-width: 640px) {
  .page-head h1 { font-size: 1.15rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .stat { padding: .75rem .85rem; }
  .stat-value { font-size: 1.45rem; }
  .stat-sub { font-size: .8rem; }
  .card { padding: 1rem; }
  .card.flush > .card-head, .rowline, .tabpanel { padding-left: 1rem; padding-right: 1rem; }
  .matter { padding-left: .75rem; padding-right: 1rem; }
  .tabs { padding: 0 1rem; gap: 1.1rem; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 1rem; }
  .tbl th:last-child, .tbl td:last-child { padding-right: 1rem; }
  .feed > li { padding: .6rem 1rem; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .45rem; }
}

/* ---------- asking before something that cannot be taken back ---------- */
.confirm { display: grid; gap: .8rem; }
.confirm-text { display: grid; gap: .4rem; color: var(--muted); font-size: .95rem; }
.confirm-text b { color: var(--ink); }

/* ---------- a log: one line each, the message as it came behind a click ---------- */
.log { list-style: none; display: grid; }
.log > li { border-top: 1px solid var(--grid); }
.log > li:first-child { border-top: 0; }
.log summary { display: grid; grid-template-columns: 4.6rem 3.3rem minmax(6.5rem, 10rem) minmax(0, 1fr); gap: .15rem .8rem; align-items: baseline; padding: .5rem 1.25rem; cursor: pointer; list-style: none; }
.log.with-machine summary { grid-template-columns: 4.6rem 3.3rem minmax(8rem, 13rem) minmax(6.5rem, 10rem) minmax(0, 1fr); }
.log summary::-webkit-details-marker { display: none; }
.log summary:hover { background: var(--sunken); }
.log .t { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.log .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log summary a { color: inherit; text-decoration: none; }
.log summary a:hover { color: var(--primary-strong); text-decoration: underline; }
.log .kind { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .text { color: var(--muted); overflow-wrap: anywhere; }
.log .text.key { color: var(--ink); }
.log li.dim .kind { font-weight: 400; color: var(--muted); }
.log pre.raw { margin: 0 1.25rem .8rem; }
@media (max-width: 760px) {
  .log summary, .log.with-machine summary { grid-template-columns: 4.6rem 3.3rem minmax(0, 1fr); padding: .5rem 1rem; }
  .log .who { grid-column: 3; }
  .log .kind { grid-column: 1 / -1; }
  .log .text { grid-column: 1 / -1; }
  .log pre.raw { margin: 0 1rem .8rem; }
}

/* ---------- the control room: a wall of machines, and what is happening ---------- */
.deck { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.1rem; }
.deck-main { flex: 999 1 44rem; min-width: 0; display: grid; gap: 1rem; }
.deck-side { flex: 1 1 24rem; max-width: 34rem; min-width: 0; display: grid; gap: 1rem; align-content: start; }
.deck-feed { flex: 1 1 21rem; max-width: 27rem; min-width: 0; position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow-y: auto; }

.alerts { display: flex; flex-wrap: wrap; gap: .6rem; }
.alert { flex: 1 1 17rem; min-width: 0; display: flex; flex-direction: column; gap: .15rem; padding: .6rem .85rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--ink); text-decoration: none; }
.alert.bad { background: var(--bad-wash); border-color: var(--bad); color: var(--bad-ink); }
.alert.warn { background: var(--warn-wash); border-color: var(--warn); color: var(--warn-ink); }
.alert .title { font-weight: 600; }
.alert .sub { font-size: .84rem; opacity: .88; overflow-wrap: anywhere; }
.alert .sub a { color: inherit; }
.alert .btn-row { margin-top: .35rem; }
.alert .btn { background: transparent; border-color: currentColor; color: inherit; }

.wall { display: grid; gap: .9rem; }
.wall-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .75rem; margin-bottom: .45rem; }
.wall-head h2 { font-size: .98rem; font-weight: 600; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(11.5rem, 100%), 1fr)); gap: .6rem; }
.mblock {
  display: flex; flex-direction: column; gap: .15rem; min-height: 9.6rem; padding: .7rem .85rem; border-radius: var(--radius);
  background: var(--raised); border: 1px solid var(--border); color: var(--ink); text-decoration: none; min-width: 0;
}
.mblock:hover { border-color: var(--primary); }
.mblock[aria-current="true"] { box-shadow: 0 0 0 3px var(--primary); border-color: transparent; }
.mb-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.mb-num { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.mb-state { font-size: .82rem; font-weight: 600; color: var(--idle); white-space: nowrap; }
.mb-name { font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-id { font-family: var(--mono); font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; min-width: 0; }
.mb-big { font-family: var(--mono); font-size: 1.85rem; font-weight: 600; line-height: 1; }
.mb-what { font-size: .84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mb-what.strong { font-size: .92rem; font-weight: 700; color: inherit; white-space: normal; }
.mb-what.wrap { white-space: normal; }
.mb-money { font-family: var(--mono); font-size: .88rem; white-space: nowrap; }
.mb-flag { font-size: .82rem; font-weight: 600; }
.mblock.s-run { background: var(--good-wash); border-color: transparent; color: var(--good-ink); }
.mblock.s-run .mb-state { color: var(--good); }
.mblock.s-run .mb-id, .mblock.s-run .mb-what { color: inherit; opacity: .8; }
.mblock.s-bad { background: var(--bad-wash); border-color: transparent; color: var(--bad-ink); }
.mblock.s-bad .mb-state { color: var(--bad); }
.mblock.s-bad .mb-id { color: inherit; opacity: .8; }
.mblock.s-warn { background: var(--warn-wash); border-color: transparent; color: var(--warn-ink); }
.mblock.s-warn .mb-state { color: var(--warn); }
.mblock.s-warn .mb-id, .mblock.s-warn .mb-what { color: inherit; opacity: .8; }
.mblock.s-off { background: transparent; border-style: dashed; color: var(--faint); }
.mblock.s-off .mb-state, .mblock.s-off .mb-id, .mblock.s-off .mb-what { color: var(--faint); }

.ticker { list-style: none; display: grid; }
.ticker > li { display: flex; gap: .75rem; padding: .55rem 1.1rem; border-top: 1px solid var(--grid); min-width: 0; }
.ticker .t { flex: none; width: 2.9rem; font-family: var(--mono); font-size: .82rem; color: var(--muted); padding-top: .1rem; }
.ticker .body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ticker .body a { color: inherit; text-decoration: none; }
.ticker .body a:hover { text-decoration: underline; }
.ticker .sub { display: block; font-size: .84rem; color: var(--muted); }
.ticker .tone-good { color: var(--good); }
.ticker .tone-bad { color: var(--bad); }
.ticker .tone-warn { color: var(--warn); }

@media (max-width: 860px) {
  .deck-feed { position: static; max-width: none; max-height: none; }
  .deck-side { max-width: none; }
}
