:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --panel-2: #222630;
  --text: #e7eaf0;
  --muted: #9aa3b2;
  --line: #2b303b;
  --urgent: #e5484d;
  --urgent-soft: #3a1d20;
  --attention: #f5a623;
  --attention-soft: #362c12;
  --overdue: #ff5a5f;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}

.board-header__title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.board-header h1 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.board-header__updated {
  font-size: 0.8rem;
  color: var(--muted);
}

.refresh-btn {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.refresh-btn:hover { background: #2b313d; }
.refresh-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Failure banners ─────────────────────────────────────────────────────── */
.failures { padding: 0 1.25rem; }
.failures:empty { padding: 0; }

.failure {
  margin-top: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--urgent-soft);
  border: 1px solid var(--urgent);
  border-radius: 8px;
  color: #ffd7d8;
  font-size: 0.85rem;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.board { padding: 1.25rem; max-width: 1100px; margin: 0 auto; }

.section { margin-bottom: 1.75rem; }
.section[hidden] { display: none; }

.section__label {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ── Today strip: single-action buttons ──────────────────────────────────── */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.action {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  border-left-width: 4px;
}
.action:hover { background: var(--panel-2); }
.action:disabled { cursor: default; opacity: 0.7; }

.action--urgent { border-left-color: var(--urgent); }
.action--attention { border-left-color: var(--attention); }
.action--overdue { border-left-color: var(--overdue); box-shadow: inset 0 0 0 1px var(--urgent); }

.action__title { font-weight: 600; font-size: 0.95rem; }
.action__detail { font-size: 0.85rem; color: var(--muted); }
.action__meta { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.action--overdue .action__meta { color: var(--overdue); font-weight: 600; }

/* ── Lanes: count chips ──────────────────────────────────────────────────── */
.lanes { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.lane {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.85rem 0.5rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
}
.lane:hover { background: var(--panel-2); }
.lane:disabled { cursor: default; opacity: 0.7; }

.lane__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--panel-2);
}
.lane--urgent .lane__count { background: var(--urgent); color: #fff; }
.lane--attention .lane__count { background: var(--attention); color: #1a1207; }

.lane__title { color: var(--text); }

/* ── All-clear ───────────────────────────────────────────────────────────── */
.all-clear {
  color: var(--muted);
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.95rem;
}
.all-clear[hidden] { display: none; }
