/* Industrial. Black lines, boxes, bare elements. No rounding, no shadows, no
   gradients, no framework. Readability and density only. */

:root {
  --line: #000;
  --line-soft: #999;
  --bg: #fff;
  --fg: #000;
  --muted: #555;
  --fill: #f2f2f2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 13px/1.45 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

a { color: #000; }
a:hover { background: #ff0; }

/* ---------- chrome ---------- */

header.bar {
  width: 100%;
  border-bottom: 2px solid var(--line);
  padding: 6px 10px;
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
}
header.bar .brand { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
header.bar .who { margin-left: auto; color: var(--muted); }
header.bar form { display: inline; }

nav.tabs {
  border-bottom: 1px solid var(--line);
  padding: 0 10px;
  display: flex;
  flex-wrap: wrap;
}
nav.tabs a {
  display: block;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-bottom: none;
  margin: 4px 4px 0 0;
  text-decoration: none;
  background: var(--bg);
}
nav.tabs a.on { background: var(--fg); color: var(--bg); }
nav.tabs a .n { color: var(--muted); }
nav.tabs a.on .n { color: #ccc; }

main { padding: 12px 10px 40px; }

/* ---------- boxes ---------- */

section.box {
  border: 1px solid var(--line);
  margin: 0 0 14px;
}
section.box > h2 {
  margin: 0;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--fill);
}
section.box > .inner { padding: 8px; }

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

/* Fixed layout so the columns obey the widths below. With auto layout the
   browser sized them by content, which gave the confidence meter a quarter of
   the screen and squeezed the subject - the one column anyone actually reads -
   down to about twenty characters. */
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
table.queue col.c-when { width: 5.5rem; }
table.queue col.c-subj { width: auto; }
table.queue col.c-from { width: 12rem; }
table.queue col.c-cat  { width: 8rem; }
table.queue col.c-conf { width: 6rem; }
table.queue col.c-quote{ width: 7rem; }
table.queue col.c-prio { width: 7rem; }
table.queue col.c-src  { width: 6rem; }
table.queue col.c-corr { width: 7rem; }
th, td {
  border: 1px solid var(--line);
  padding: 3px 6px;
  text-align: left;
  vertical-align: top;
}
th { background: var(--fill); font-weight: 700; white-space: nowrap; }
tr:hover td { background: #f8f8f8; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tags ---------- */

.tag {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 0 4px;
  white-space: nowrap;
  background: var(--bg);
}
.tag.on { background: var(--fg); color: var(--bg); }
.tag.warn { border-width: 2px; font-weight: 700; }

/* A confidence meter drawn with a border, not a graphic.
   Named .meter, NOT .bar: the page header is <header class="bar">, and a bare
   .bar rule here set width:60px/height:9px on it, collapsing the header to 60
   pixels and letting the nav render on top of it. */
.meter { display: inline-block; width: 60px; border: 1px solid var(--line); height: 9px; vertical-align: -1px; }
.meter > i { display: block; height: 100%; background: var(--fg); }

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

button, input[type=submit] {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 2px 8px;
  cursor: pointer;
}
button:hover { background: var(--fg); color: var(--bg); }
button[disabled] { color: var(--line-soft); border-color: var(--line-soft); cursor: default; }
button.on { background: var(--fg); color: var(--bg); }
input[type=text], textarea, select {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 2px 4px;
}

/* ---------- message detail ---------- */

pre.body {
  border: 1px solid var(--line);
  padding: 8px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 60vh;
  overflow: auto;
  background: var(--bg);
}
dl.kv { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0; }
dl.kv dt { border: 1px solid var(--line); border-right: none; padding: 2px 6px; background: var(--fill); white-space: nowrap; }
dl.kv dd { border: 1px solid var(--line); padding: 2px 6px; margin: 0; }
dl.kv dt + dd { border-left: 1px solid var(--line); }

.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.err { border: 2px solid var(--line); padding: 6px; font-weight: 700; }

.probs td.num { font-variant-numeric: tabular-nums; }
