:root {
  color-scheme: dark;
  --bg: #111315;
  --panel: #181b1e;
  --card: #1f2327;
  --line: #2a2f34;
  --text: #c9cdd1;
  --muted: #7d858c;
  --accent: #6f9fc8;
  --ok: #6fae86;
  --warn: #c9a45c;
  --bad: #c2706a;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
h1, h2 { margin: 0; font-weight: 600; }
h1 { font-size: 1.05rem; }
h2 { font-size: .85rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
code { font: .85em ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

button, .button {
  font: inherit; color: var(--text); background: #263039; border: 1px solid #33414d;
  border-radius: 6px; padding: .35rem .75rem; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: #2d3a45; }
button:disabled { opacity: .5; cursor: default; }
button.ghost { background: transparent; border-color: var(--line); }
input {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: .4rem .6rem; min-width: 0;
}
input:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
  padding: .75rem 16px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.status { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; font-size: .85rem; }
.meta { color: var(--muted); }
.who { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.who img { border-radius: 50%; background: var(--line); }

.badge { padding: .1rem .5rem; border-radius: 999px; border: 1px solid currentColor; font-size: .8rem; }
.badge[data-state="live"] { color: var(--ok); }
.badge[data-state="connecting"], .badge[data-state="reconnecting"] { color: var(--warn); }
.badge[data-state="degraded"], .badge[data-state="offline"] { color: var(--bad); }

#app { display: grid; grid-template-columns: 1fr 18rem; gap: 1rem; padding: 1rem 16px; }
.create { display: flex; gap: .5rem; margin-bottom: .75rem; }
.create input { flex: 1; }
.toast { margin: 0 0 .75rem; padding: .4rem .6rem; border-left: 3px solid var(--warn); background: var(--panel); font-size: .9rem; }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .6rem; min-height: 8rem; }
.col h2 { margin-bottom: .5rem; }
.col ul, .notes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.job { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .6rem; }
.job .title { overflow-wrap: anywhere; }
.job .by { color: var(--muted); font-size: .78rem; margin: .2rem 0 .4rem; }
.job .moves { display: flex; flex-wrap: wrap; gap: .3rem; }
.job .moves button { font-size: .75rem; padding: .1rem .45rem; }
.job.flash { border-color: var(--accent); transition: border-color 1.2s; }

.notes { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .75rem; align-self: start; }
.notes .hint { color: var(--muted); font-size: .8rem; margin: .2rem 0 .6rem; }
.notes li { font-size: .88rem; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.notes time { display: block; color: var(--muted); font-size: .75rem; }

.message { max-width: 32rem; margin: 3rem auto; padding: 0 16px; }
.message h1, .message h2 { font-size: 1.2rem; color: var(--text); text-transform: none; letter-spacing: 0; margin-bottom: .5rem; }

@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .board { grid-template-columns: 1fr; }
  .who { margin-left: 0; }
}
