:root {
  --bg: #141d31; --card: #1e2a47; --cell: #1a2440; --tile: #22305a; --line: #4a6394; --line-soft: #33486e;
  --text: #e9eefb; --muted: #9fb3d6; --link: #7dbcff;
  --ok: #2dd4bf; --ok-text: #06231f; --bad: #ff7b7b; --bad-text: #2b0000; --bad-soft: #ff9f9f; --warn: #ffe08a;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--line-soft); }
.top h1 { margin: 0; font-size: 20px; font-weight: 800; }
.top .arrow { color: var(--ok); }
.who { color: var(--muted); }
.link { background: none; border: 0; color: var(--link); padding: 0 0 0 8px; }
main { padding: 18px 24px 40px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.narrow { max-width: 520px; margin: 40px auto; }
.card h2 { margin: 0 0 4px; font-size: 20px; }
form label { display: block; margin: 14px 0 0; font-weight: 600; color: var(--muted); font-size: 13px; }
form input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-soft); background: #16203a; color: var(--text); font: inherit; }
form input:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px rgba(79,156,249,.22); }
.primary { margin-top: 18px; width: 100%; height: 42px; border-radius: 10px; border: 1px solid #4a7cc4; background: #31578f; color: #f2f7ff; font-weight: 700; }
.error { color: var(--bad); min-height: 1.2em; margin: 10px 0 0; }

.releases { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.release { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--cell); color: var(--text); }
.release:hover { border-color: var(--ok); }

/* board header */
.bar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.bar .title { flex: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ghost { height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid #6f9ad8; background: var(--cell); color: var(--text); font-weight: 700; }
.notice { margin: 0 0 12px; padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.notice.ok { background: rgba(45,212,191,.12); border: 1px solid var(--ok); color: var(--ok); }
.notice.bad { background: rgba(255,123,123,.12); border: 1px solid var(--bad); color: var(--bad-soft); }

/* one row per task: task tile on the left, its PRs flowing to the right */
.board { display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: stretch; }
.tid { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--tile); border: 1px solid var(--line); border-left: 4px solid var(--ok); min-width: 0; }
.tid a { font-weight: 800; font-size: 14px; }
.tid .subject { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }

/* a PR block: info on the left, its own action on the right */
/* the action column has its own fixed track - pills never run under the Merge button */
.pr { display: grid; grid-template-columns: minmax(0, 1fr) 104px; min-height: 58px; border: 1px solid var(--line); border-radius: 10px; background: var(--cell); overflow: hidden; }
.pr.is-ready { border-color: rgba(45,212,191,.55); }
.pr.is-merged { opacity: .8; }
.pr .info { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 7px 10px; min-width: 0; overflow: hidden; }
.pr .act { display: flex; align-items: center; justify-content: center; border-left: 1px dashed var(--line-soft); padding: 4px; text-align: center; }
/* narrow block or large font: pills wrap to a second line instead of overflowing */
.line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.num { font-weight: 800; font-size: 13.5px; margin-right: 2px; }
.why { flex-wrap: wrap; font-size: 11.5px; font-weight: 700; color: var(--bad-soft); }
.why a { color: var(--bad-soft); text-decoration: underline dotted; }
.note { font-size: 11.5px; font-weight: 700; color: var(--ok); }
.done { color: var(--ok); font-size: 12px; font-weight: 700; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.pill.ok { background: var(--ok); color: var(--ok-text); }
.pill.bad { background: var(--bad); color: var(--bad-text); }
.bar .pill { font-size: 13px; padding: 3px 12px; }

.merge { width: 88px; height: 32px; white-space: nowrap; border-radius: 9px; border: 1px solid var(--ok); background: rgba(45,212,191,.12); color: var(--ok); font-weight: 800; }
.merge:hover:not(:disabled) { background: var(--ok); color: var(--ok-text); }

.toast { position: fixed; right: 20px; bottom: 20px; max-width: 420px; padding: 12px 16px; border-radius: 10px; background: var(--ok); color: var(--ok-text); font-weight: 700; box-shadow: 0 10px 28px rgba(0,0,0,.4); }
.toast.bad { background: var(--bad); color: var(--bad-text); }

@media (max-width: 760px) {
  .task { grid-template-columns: 1fr; }
  main { padding: 12px; }
}
