/* Dual-operator merge review — FR-CAP-07.
 *
 * The three states a row can be in are carried by colour AND by a word.
 * A commissioner reading this is deciding what the official record says,
 * often at speed and often on somebody else's laptop, and a status that
 * exists only as a shade of red is a status that does not exist on a
 * projector, in sunlight, or to a colour-blind reader.
 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #1d4ed8;
  --bad: #b91c1c;
  --good: #0a7d32;
  --panel: #f8fafc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --fg: #e2e8f0;
    --muted: #94a3b8;
    --line: #1e293b;
    --panel: #111b2e;
  }
}

* { box-sizing: border-box; }

/* The attribute beats any display rule below it. A `label { display:
 * block }` quietly overriding `hidden` has shipped twice in this tree. */
[hidden] { display: none !important; }

body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  margin: 0 auto;
  max-width: 72rem;
  padding: 1.5rem 1rem 4rem;
}

h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }

.lede { color: var(--muted); margin: 0 0 1.25rem; max-width: 46rem; }
.note { color: var(--muted); font-size: .85rem; margin: .75rem 0 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: 1rem;
  margin: 0 0 1rem;
}

label { display: grid; gap: .25rem; font-size: .85rem; margin: 0 0 .6rem; }
input, select {
  font: inherit; padding: .4rem .5rem; border-radius: .35rem;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
button {
  font: inherit; font-weight: 600; padding: .45rem .9rem;
  border-radius: .35rem; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; cursor: pointer;
}

.status { margin: .4rem 0 0; font-size: .85rem; color: var(--muted); }
.status.ok { color: var(--good); }
.status.warn { color: #b45309; }
.status.error { color: var(--bad); }

.operators { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .operators { grid-template-columns: 1fr 1fr; } }
.operator { border: 1px solid var(--line); border-radius: .4rem; padding: .75rem; }

.headline { font-weight: 600; margin: 0 0 .75rem; }
.headline.score_mismatch { color: var(--bad); }
.headline.ready { color: var(--good); }
.headline.open, .headline.refused { color: #b45309; }

table { border-collapse: collapse; width: auto; font-size: .9rem; }
th, td { text-align: right; padding: .3rem .7rem; border-bottom: 1px solid var(--line); }
th[scope="row"] { text-align: left; font-weight: 500; color: var(--muted); }
thead th { color: var(--muted); font-size: .75rem; text-transform: uppercase; }

.decider { max-width: 22rem; }
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.item {
  border: 1px solid var(--line); border-left-width: 4px;
  border-radius: .4rem; padding: .6rem .75rem;
}
/* The word is in the badge; the stripe only repeats it. */
.item.conflict { border-left-color: var(--bad); }
.item.single_source { border-left-color: #b45309; }
.item.agreed { border-left-color: var(--good); }

.item .head { display: flex; gap: .6rem; align-items: baseline;
              flex-wrap: wrap; margin: 0 0 .4rem; }
.badge {
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.item.conflict .badge { color: var(--bad); }
.flag {
  font-size: .7rem; border: 1px solid var(--line); border-radius: .25rem;
  padding: .05rem .3rem; color: var(--muted);
}
.when { color: var(--muted); font-size: .8rem; }

.differences { margin: 0 0 .5rem; padding-left: 1.1rem; color: var(--bad);
               font-size: .85rem; }
.accounts { list-style: none; margin: 0; padding: 0; display: grid;
            gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .accounts { grid-template-columns: 1fr 1fr; } }
.account { border: 1px solid var(--line); border-radius: .35rem; padding: .5rem; }
.account .who { margin: 0 0 .2rem; font-weight: 600; font-size: .8rem; }
.account .what { margin: 0 0 .4rem; font-size: .85rem; color: var(--muted); }
.account button { font-size: .8rem; padding: .25rem .6rem; }

.resolved { margin: .5rem 0 0; font-size: .8rem; color: var(--good); }
.empty { color: var(--muted); }

.actions { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; }
.actions .post { flex: 1 1 20rem; }
