:root {
  /* Palette: neutral greys and near-black text; color only on fills and highlights:
     primary #A62349 (fills under white), accent #DB4A6B (focus), surface #F3C5C5 (soft highlights). */
  --bg: #f6f6f8;
  --panel: #ffffff;
  --panel-2: #fbfbfc;
  --line: #e4e4ea;
  --text: #1c1c22;
  --muted: #6b6b78;
  --accent: #a62349;
  --accent-2: #db4a6b;
  --accent-fill: #a62349;
  --accent-soft: #f3c5c5;
  --accent-wash: #fbeaec;
  --glow: color-mix(in srgb, var(--accent-soft) 50%, transparent);
  --ok: #15803d;
  --ok-soft: #e6f4ea;
  --warn: #b45309;
  --bad: #d92d20;
  --bad-soft: #fdecea;
  --shadow: 0 1px 2px rgba(20, 20, 40, .06), 0 1px 1px rgba(20, 20, 40, .04);
  --shadow-lg: 0 10px 30px rgba(20, 20, 40, .14);
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131317;
    --panel: #1c1c22;
    --panel-2: #202027;
    --line: #2e2e38;
    --text: #e9e9ef;
    --muted: #9696a3;
    --accent: #f08aa3;
    --accent-2: #f26d8c;
    --accent-fill: #a62349;
    --accent-soft: #4a1a2c;
    --accent-wash: #2e1520;
    --ok: #4ade80;
    --ok-soft: #173123;
    --bad: #f87171;
    --bad-soft: #3a1c1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
/* Pages grow with their content (so the footer follows it); the board fills the window and scrolls inside. */
html { height: 100%; }
body { min-height: 100%; }
body:has(> main.board-main) { height: 100%; }
body:has(> main.board-main) > .site-foot { display: none; }
body {
  margin: 0;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Navigable names (projects, boards) that read as plain text until hovered. */
a.plain { color: inherit; }
a.plain:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 15px; margin: 32px 0 12px; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.right { margin-left: auto; }
[hidden] { display: none !important; }

/* controls */
input, select, textarea {
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--glow); border-color: var(--accent-2); }
/* Fixed line height so a one-line box's height matches what autogrow computes (line + padding + 2px border). */
textarea { resize: vertical; width: 100%; line-height: 20px; }
button { font: inherit; cursor: pointer; }
.btn, button.primary, button.btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  white-space: nowrap;
  text-decoration: none !important;
  list-style: none;
}
.btn:hover { border-color: var(--muted); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
button.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
button.primary:hover { filter: brightness(1.08); }
.btn.approve { background: var(--ok-soft); border-color: transparent; color: var(--ok); font-weight: 600; }
button.link { background: none; border: none; padding: 0; color: var(--text); }
button.link:hover { text-decoration: underline; }
.danger { color: var(--bad) !important; }
.error { color: var(--bad); background: var(--bad-soft); padding: 6px 10px; border-radius: 6px; }
.pill { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }

/* layout */
header.top {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.logo { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--text); }
.logo .logo-bg { fill: var(--accent-fill); }
.logo:hover { text-decoration: none; }
header.top nav { display: flex; gap: 4px; }
header.top nav a { color: var(--muted); padding: 4px 8px; border-radius: 6px; }
header.top nav a.active, header.top nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.capture { flex: 1; display: flex; gap: 6px; max-width: 720px; margin: 0 auto; align-items: flex-start; }
.switcher { flex: none; }
.switcher > summary { font-weight: 600; color: var(--text); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.switcher .menu-body { max-height: 70vh; overflow-y: auto; }
.switcher .menu-item.project { font-weight: 600; }
.switcher .menu-item.board { padding-left: 20px; color: var(--muted); }
.switcher .menu-item.board:hover { color: var(--text); }
.capture textarea { min-height: 34px; height: 34px; resize: none; overflow: hidden; }
.capture textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent-2); }
details.me { margin-left: auto; flex: none; }
.capture + details.me { margin-left: 0; }
details.me .menu-body { left: auto; right: 0; min-width: 180px; }
.menu-body form { margin: 0; }
.menu-body form .menu-item { width: 100%; }
a.menu-item:hover { text-decoration: none; }
main { flex: 1 0 auto; padding: 24px; }
main.narrow { max-width: 920px; width: 100%; margin: 0 auto; padding-bottom: 48px; }
.site-foot { border-top: 1px solid var(--line); padding: 14px 24px 18px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
main.center { display: grid; place-items: center; }
main.board-main { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.tabs { display: flex; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.tabs a { padding: 3px 10px; border-radius: 6px; color: var(--muted); }
.tabs a.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.tabs a:hover { text-decoration: none; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label, .grid2 label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.check { flex-direction: row !important; align-items: center; gap: 6px; font-weight: 400 !important; }
.checks { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.list { list-style: none; padding: 0; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.list li { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: none; }
section { margin-bottom: 40px; }
section > p.muted { margin: 0 0 14px; }
.secret { filter: blur(5px); }
.revealed .secret { filter: none; }
pre.copy, pre.cmd { background: var(--panel); border: 1px solid var(--line); padding: 8px 10px; border-radius: 6px; overflow-x: auto; }
pre.copy { user-select: all; }
.card-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: var(--shadow-lg); }
.auth { width: 340px; display: flex; flex-direction: column; gap: 12px; }
.auth label { display: flex; flex-direction: column; gap: 4px; }
.brand { color: var(--accent); margin: 0; }

/* landing */
.landing { max-width: 520px; padding: 24px 0; }
.landing .lede { font-size: 22px; font-weight: 600; margin: 6px 0 10px; }
.landing .how { padding-left: 22px; margin: 22px 0; display: flex; flex-direction: column; gap: 12px; }
.landing .cta { display: flex; gap: 8px; margin: 24px 0 18px; }
.landing .small { font-size: 13px; }
a.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
a.btn.primary:hover { filter: brightness(1.08); text-decoration: none; }

/* menus */
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-body {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0;
  min-width: 220px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 4px;
}
.drawer-top .menu-body { left: auto; right: 0; }
.menu-body hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.menu-item { display: flex; gap: 8px; align-items: baseline; text-align: left; background: none; border: none; padding: 6px 8px; border-radius: 6px; color: var(--text); }
.menu-item:hover { background: var(--accent-wash); }
.menu-item span { color: var(--muted); font-size: 12px; }
.menu-body label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }

/* board */
.board-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.boards { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: wrap; }
.boards a { padding: 3px 10px; border-radius: 6px; color: var(--muted); }
.boards a.active { color: var(--text); background: var(--panel); box-shadow: var(--shadow); font-weight: 600; }
.boards a:hover { text-decoration: none; color: var(--text); }
.boards .project-name { font-weight: 700; color: var(--text); margin-right: 8px; padding-left: 0; }
.boards .project-name:hover { text-decoration: underline; }
.settings-gear { font-size: 16px; padding: 3px 8px; flex: none; }
.columns {
  flex: 1; display: flex; gap: 12px; padding: 12px 16px;
  overflow-x: auto; overflow-y: hidden; min-height: 0; align-items: stretch;
}
.column {
  flex: 0 0 280px; width: 280px; min-width: 0; display: flex; flex-direction: column; min-height: 0;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
}
.column > header { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.column h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.column .count { font-size: 12px; color: var(--muted); background: var(--panel); border-radius: 99px; padding: 0 7px; border: 1px solid var(--line); }
.column .add { padding: 0 8px 6px; }
.column .add textarea { min-height: 30px; height: 30px; padding: 4px 8px; resize: none; overflow: hidden; background: transparent; border-style: dashed; }
.column .add textarea:focus { background: var(--panel); border-style: solid; }
.cards { flex: 1; overflow-y: auto; padding: 2px 8px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
.card {
  display: block; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 10px; box-shadow: var(--shadow); cursor: pointer;
}
.card:hover { text-decoration: none; border-color: var(--muted); }
.card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--glow); }
.card.busy { border-left: 3px solid var(--accent); }
.card.ghost { opacity: .4; }
.card-title { word-break: break-word; }
.num { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.card-meta > * { min-width: 0; }
.tag {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 11.5px; padding: 0 7px; border-radius: 99px; line-height: 18px;
  color: var(--text); background: var(--line);
}
.tag button { border: none; background: none; color: inherit; padding: 0 0 0 2px; opacity: .6; }
.tag button:hover { opacity: 1; }

.agent-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; padding: 1px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agent-badge i, .run-line i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.agent-badge.running i, .run-line.running i { animation: pulse 1.2s ease-in-out infinite; }
.agent-badge.queued { background: var(--panel-2); color: var(--muted); border: 1px dashed var(--line); }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

/* drawer */
.drawer {
  position: fixed; top: 49px; right: 0; bottom: 0; width: min(560px, 100vw);
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translateX(105%); transition: transform .18s ease; z-index: 15;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
/* The head is display: contents so its bar can stick to the top of .thread-wrap, the drawer's one
   scroll area, while tags, branch and description scroll away with the thread. Menus in the bar
   drop down over the scrolled content. */
.drawer-head { display: contents; }
.drawer-bar { position: sticky; top: 0; z-index: 2; background: var(--panel); margin: 0 -20px 10px; padding: 12px 20px 2px; border-bottom: 1px solid var(--line); }
.drawer-head .body-view { margin-bottom: 12px; }
.drawer-top { display: flex; align-items: center; gap: 8px; }
.crumbs { color: var(--muted); font-size: 12px; }
.drawer-inner .title { font-size: 19px; margin: 6px 0 10px; padding: 2px 4px; margin-left: -4px; border-radius: 4px; outline: none; }
.drawer-inner .title:hover { background: var(--panel-2); }
.drawer-inner .title:focus { background: var(--panel-2); box-shadow: 0 0 0 2px var(--glow); }
.props { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 8px; }
.tag-add input { border: 1px dashed var(--line); padding: 1px 6px; font-size: 12px; border-radius: 99px; background: transparent; width: 70px; }
.branch-line { font-size: 12px; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.body-view { padding: 6px 8px; margin: 0 -8px; border-radius: 6px; cursor: text; }
.body-view:hover { background: var(--panel-2); }
.body-edit .row, .comment-form .row { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; align-items: center; }
.thread-wrap { flex: 1; overflow-y: auto; padding: 0 20px 12px; min-height: 0; }
.thread-wrap > .thread { border-top: 1px solid var(--line); padding-top: 12px; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.comment { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.comment.agent { background: var(--panel-2); }
.comment.summary { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.comment header { display: flex; gap: 6px; align-items: center; font-size: 12.5px; margin-bottom: 2px; }
.comment time, .event time { color: var(--muted); font-size: 12px; margin-left: auto; }
.avatar { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--line); color: var(--text); }
.avatar.bot { background: var(--accent-fill); color: #fff; }
.event { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.run-line { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--accent); padding: 4px 10px; border-radius: 6px; background: var(--accent-wash); }
.run-line.succeeded { color: var(--ok); background: var(--ok-soft); }
.run-line.failed { color: var(--bad); background: var(--bad-soft); }
.run-line.cancelled, .run-line.queued, .run-line.held { color: var(--muted); background: var(--panel-2); }
.run-line.held { border: 1px dashed var(--line); }
.comment-form { padding: 10px 20px 12px; border-top: 1px solid var(--line); }
/* One line until focused or filled; the send row only shows then. */
.comment-form textarea { min-height: 34px; height: 34px; resize: none; overflow: hidden; }
.comment-form:focus-within textarea { min-height: 76px; }
.comment-form .row { display: none; }
.comment-form:focus-within .row, .comment-form:has(textarea:not(:placeholder-shown)) .row { display: flex; }
.hint { color: var(--muted); font-size: 12px; margin-right: auto; }
.empty-thread { text-align: center; padding: 24px 0; }

/* full task page */
.task-full { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.task-full .drawer-inner { height: auto; }
.task-full .drawer-bar { position: static; }
.task-full .thread-wrap { overflow: visible; }
.task-full .open-full, .task-full .close { display: none; }
.task-full .crumbs { font-size: 14px; }

/* markdown */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol { margin: 6px 0; }
.md pre { background: var(--bg); padding: 8px 10px; border-radius: 6px; overflow-x: auto; }
.md code { background: var(--bg); padding: 1px 4px; border-radius: 4px; }
.md pre code { padding: 0; background: none; }
.md h1, .md h2, .md h3 { font-size: 14px; margin: 10px 0 4px; }
.md table { border-collapse: collapse; }
.md td, .md th { border: 1px solid var(--line); padding: 3px 8px; }
.md img { display: block; max-width: 100%; max-height: 360px; margin: 6px 0; border: 1px solid var(--line); border-radius: 6px; cursor: zoom-in; }
.dropping { outline: 2px dashed var(--accent-2) !important; outline-offset: 2px; }
.md blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }
.mention { color: var(--accent); font-weight: 600; }
.clamp { max-height: 110px; overflow: hidden; }
.clamp.clamped { cursor: pointer; mask-image: linear-gradient(to bottom, #000 60%, transparent); }
.clamp.expanded { max-height: none; }
button.clamp-toggle { font-size: 12px; color: var(--muted); }
button.clamp-toggle:hover { color: var(--text); }

/* review */
.working { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.working a:hover { text-decoration: none; }
.review-item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.review-item header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.review-item .dismiss { margin-left: auto; color: var(--muted); font-size: 13px; }
.review-item .dismiss:hover { color: var(--text); }
.review-item .title { font-weight: 600; font-size: 15px; color: var(--text); }
.review-item .summary { border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; margin: 6px 0 10px; }
.review-item .who { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.review-item footer { display: flex; gap: 8px; align-items: flex-start; }
.sendback { flex: 1; display: flex; gap: 6px; align-items: flex-start; }
.sendback textarea { min-height: 32px; height: 32px; padding: 5px 8px; resize: none; overflow: hidden; }
.sendback .menu-body { left: auto; right: 0; }
.empty-state { text-align: center; padding: 60px 0; }
.project-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.project-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; box-shadow: var(--shadow); }
.project-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.project-card header .btn { padding: 2px 6px; }
.project-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.project-card li a { display: block; padding: 4px 8px; margin: 0 -8px; border-radius: 6px; color: var(--text); }
.project-card li a:hover { background: var(--accent-wash); text-decoration: none; }

/* runs */
table.runs { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
table.runs th, table.runs td { text-align: left; padding: 6px 10px; border-top: 1px solid var(--line); vertical-align: top; }
table.runs th { color: var(--muted); font-weight: 500; border-top: none; }
.status { font-size: 12px; padding: 1px 7px; border-radius: 99px; background: var(--panel-2); }
.status.running { background: var(--accent-soft); color: var(--accent); }
.status.succeeded { background: var(--ok-soft); color: var(--ok); }
.status.failed { background: var(--bad-soft); color: var(--bad); }
pre.log { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line); padding: 10px; border-radius: 6px; max-height: 400px; overflow: auto; }
.log-lines { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.log-line pre { margin: 0; white-space: pre-wrap; word-break: break-word; padding: 6px 10px; border-radius: 6px; }
.log-line.text pre { font-family: inherit; font-size: 14px; background: var(--panel); border: 1px solid var(--line); }
.log-line.tool pre { color: var(--accent); background: var(--accent-wash); }
.log-line.result pre { color: var(--muted); background: var(--panel-2); max-height: 160px; overflow: auto; }
.log-line.error pre { color: var(--bad); background: var(--bad-soft); }
.log-line.system pre { color: var(--muted); }

/* settings */
details.agent { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
details.agent > summary { cursor: pointer; }
details.agent[open] > summary { margin-bottom: 10px; }
ul.stages { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.stages li { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
.grip { cursor: grab; color: var(--muted); user-select: none; }

/* autocomplete + toast */
.ac { position: fixed; z-index: 50; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 4px; display: flex; flex-direction: column; overflow-y: auto; max-width: calc(100vw - 16px); }
.ac-item { text-align: left; border: none; background: none; padding: 5px 8px; border-radius: 5px; color: var(--text); display: flex; gap: 8px; }
.ac-item span { color: var(--muted); font-size: 12px; }
.ac-item.active { background: var(--accent-wash); }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 60; }
.toast-msg { background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 560px; }
.toast-msg.error { background: var(--bad); color: #fff; }
a.toast-msg { display: flex; gap: 12px; align-items: baseline; }
a.toast-msg:hover { text-decoration: none; }
.toast-msg { display: flex; gap: 12px; align-items: baseline; }
.toast-go { font-weight: 600; opacity: .8; }
.toast-msg button.toast-go { color: inherit; }
.toast-msg button.toast-go:hover { opacity: 1; text-decoration: underline; }
a.toast-msg:hover .toast-go { opacity: 1; text-decoration: underline; }

@media (max-width: 760px) {
  header.top { flex-wrap: wrap; }
  .capture { order: 3; flex-basis: 100%; max-width: none; }
  .grid2 { grid-template-columns: 1fr; }
  /* Stages stack into one list the board scrolls through, instead of side-by-side columns. */
  main.board-main { overflow-y: auto; }
  .columns { flex: none; flex-direction: column; overflow: visible; padding: 12px; }
  .column { flex: none; width: auto; }
  .cards { flex: none; overflow: visible; }
  .card { -webkit-touch-callout: none; }
  /* The drawer is a full-screen sheet over the header (which would otherwise cover its top bar). */
  .drawer { top: 0; width: 100%; z-index: 25; border-left: none; }
  .drawer-bar { margin: 0 -14px 10px; padding: 10px 14px 2px; }
  .thread-wrap { padding: 0 14px 12px; overscroll-behavior: contain; }
  .comment-form { padding: 8px 14px 10px; }
  .drawer-top .btn.ghost { padding: 6px 10px; }
  .drawer-top .open-full { display: none; }
}
details.deleted-list > summary { cursor: pointer; margin: 4px 0 8px; }
