:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --surface-hover: #e6e9ef;
  --border: #dcdfe6;
  --text: #1a1d24;
  --text-2: #4e5564;
  --text-3: #6a7180;
  --accent: #2a5fc4;
  --accent-hover: #234fa5;
  --on-accent: #ffffff;
  --danger: #c0392b;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-muted: #8a909c;
  --grid: #e3e5ea;
  --todo-bg: #e4e7ec;
  --todo-fg: #3c4352;
  --progress-bg: #d9e6fb;
  --progress-fg: #1c4a9c;
  --done-bg: #d6f0e3;
  --done-fg: #14663f;
  --ok-bg: #d6f0e3;
  --ok-fg: #14663f;
  --err-bg: #fbe0dd;
  --err-fg: #8f231a;
  --shadow: 0 1px 2px rgb(20 24 32 / 12%);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #15171c;
    --surface: #1d2027;
    --surface-2: #272b34;
    --surface-hover: #30353f;
    --border: #363b46;
    --text: #eceef2;
    --text-2: #bdc2cc;
    --text-3: #9299a6;
    --accent: #5b92ea;
    --accent-hover: #79a7ef;
    --on-accent: #0f1420;
    --danger: #ef7d70;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-muted: #8f96a3;
    --grid: #30343d;
    --todo-bg: #343946;
    --todo-fg: #d3d7df;
    --progress-bg: #1f3a68;
    --progress-fg: #bcd4fb;
    --done-bg: #164a33;
    --done-fg: #b4ecd0;
    --ok-bg: #164a33;
    --ok-fg: #b4ecd0;
    --err-bg: #5a2420;
    --err-fg: #f9c9c3;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; line-height: 1.3; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
small { color: var(--text-3); font-weight: 400; }
code { background: var(--surface-2); border-radius: 3px; padding: 1px 4px; font-size: 13px; overflow-wrap: anywhere; }
pre { background: var(--surface-2); border-radius: 6px; padding: 12px; overflow-x: auto; }
pre code { background: none; padding: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

input, select, textarea {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font: inherit;
}
input[type="checkbox"] { width: auto; }
input:disabled { background: var(--surface-2); color: var(--text-3); }
textarea { resize: vertical; }

.muted { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow, .spacer { flex: 1; min-width: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 12px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.button:hover { background: var(--surface-hover); text-decoration: none; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-hover); }
.button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.button.subtle { background: transparent; color: var(--text-2); }
.button.subtle:hover { background: var(--surface-2); }
.button.block { width: 100%; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 20px; height: 20px; border-radius: 5px; background: var(--accent); transform: rotate(45deg) scale(.8); }
.topnav { display: flex; align-items: center; gap: 2px; }
.topnav > a, .topnav summary {
  display: block;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--text-2);
  font-weight: 500;
  cursor: pointer;
}
.topnav > a:hover, .topnav summary:hover { background: var(--surface-2); text-decoration: none; }
.topnav .active { color: var(--accent); background: var(--surface-2); }
.topsearch { margin-left: auto; width: 240px; }
@media (max-width: 1400px) { .topbar { flex-wrap: wrap; } .topsearch { width: 200px; } }
.bell { position: relative; display: flex; color: var(--text-2); padding: 6px; border-radius: 6px; }
.bell:hover { background: var(--surface-2); }
.count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgb(0 0 0 / 18%);
}
.menu-right .menu-panel { left: auto; right: 0; }
.menu-panel a, .menu-button {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.menu-panel a:hover, .menu-button:hover { background: var(--surface-2); text-decoration: none; }
.menu-footer { border-top: 1px solid var(--border); margin-top: 4px; color: var(--accent) !important; }
.menu-note { display: block; padding: 6px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }

.shell { display: flex; min-height: calc(100vh - 53px); }
.sidebar {
  flex: 0 0 216px;
  padding: 14px 10px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.sidebar-title { display: flex; flex-direction: column; padding: 4px 10px 12px; }
.sidebar a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text-2); font-weight: 500; }
.sidebar a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar a.active { background: var(--surface-2); color: var(--accent); }
.content { flex: 1; min-width: 0; padding: 20px 24px 48px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 2px 0 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 16px; min-width: 0; }
.panel h2 small { margin-left: 6px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-line { display: flex; align-items: center; gap: 8px; padding: 5px 0; flex-wrap: wrap; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain > li { padding: 4px 0; }
.empty { text-align: center; padding: 48px 16px; color: var(--text-2); }
.empty h1, .empty h2 { margin-bottom: 8px; }
.error-detail { text-align: left; white-space: pre-wrap; margin: 16px auto; max-width: 720px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.stack label.check, .check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 400; white-space: nowrap; }
.form-narrow { max-width: 480px; }
.form-wide { max-width: 760px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.inline-form input, .inline-form select { width: auto; flex: 0 1 200px; min-width: 0; }
.inline-form input[type="checkbox"] { flex: none; }
.inline-form input[type="file"] { flex-basis: 320px; }
.inline-form.tight { margin-top: 0; }
.page-head > .inline-form { margin-top: 0; flex-wrap: nowrap; }
.actions > select { width: auto; flex: 0 1 240px; min-width: 0; }

.flash { padding: 9px 12px; border-radius: 6px; margin-bottom: 12px; }
.flash-success { background: var(--ok-bg); color: var(--ok-fg); }
.flash-error { background: var(--err-bg); color: var(--err-fg); }
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--err-bg);
  color: var(--err-fg);
  box-shadow: 0 4px 14px rgb(0 0 0 / 25%);
}

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: var(--text-3); font-size: 12px; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 7px 8px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.table tr.dimmed td { opacity: .55; }
.plain-link { color: var(--text); }
.overdue { color: var(--danger); font-weight: 600; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.avatar.small { width: 24px; height: 24px; font-size: 10px; }
.avatar-none { background: var(--surface-hover); color: var(--text-3); }
.tone-0 { background: #2d62b5; }
.tone-1 { background: #1a7a57; }
.tone-2 { background: #8a4fb5; }
.tone-3 { background: #b4532a; }
.tone-4 { background: #2b7c8f; }
.tone-5 { background: #a83e6e; }

.type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}
.type-epic { background: #6f4bc4; }
.type-story { background: #2f8a55; }
.type-task { background: #2a78d6; }
.type-bug { background: #c9372c; }
.type-subtask { background: #2b7c8f; }

.priority { display: inline-block; width: 16px; text-align: center; font-weight: 700; }
.priority-highest, .priority-high { color: var(--danger); }
.priority-medium { color: #b77a00; }
.priority-low, .priority-lowest { color: var(--accent); }

.lozenge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lozenge-todo { background: var(--todo-bg); color: var(--todo-fg); }
.lozenge-in_progress { background: var(--progress-bg); color: var(--progress-fg); }
.lozenge-done { background: var(--done-bg); color: var(--done-fg); }
.issue-key { color: var(--text-3); font-size: 12px; font-weight: 500; white-space: nowrap; }
.points {
  display: inline-block;
  min-width: 20px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.board-filters { display: flex; gap: 8px; }
.board-filters input, .board-filters select { width: 180px; }
.board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.column { flex: 1 0 230px; max-width: 340px; background: var(--surface-2); border-radius: 8px; padding: 8px; }
.column > header { padding: 4px 6px 8px; font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.column-count { margin-left: 4px; font-weight: 500; }
.column-body { display: flex; flex-direction: column; gap: 6px; min-height: 120px; border-radius: 6px; }
.column-body.drop-target { outline: 2px dashed var(--accent); outline-offset: 2px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border-radius: 6px;
  box-shadow: var(--shadow);
  color: var(--text);
}
.card:hover { background: var(--surface-hover); text-decoration: none; }
.card[draggable="true"] { cursor: grab; }
.card.dragging, .backlog-row.dragging { opacity: .45; }
.card-summary { overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; gap: 6px; }

.sprint-block { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 14px; }
.sprint-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; }
.sprint-head strong { margin-right: 6px; }
.backlog-list { padding: 0 6px 6px; min-height: 44px; }
.backlog-list.drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; border-radius: 6px; }
.backlog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-top: 1px solid var(--grid);
  color: var(--text);
}
.backlog-row:hover { background: var(--surface-2); text-decoration: none; }
.backlog-row[draggable="true"] { cursor: grab; }
.backlog-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone-hint { display: none; margin: 0; padding: 8px 6px; color: var(--text-3); font-size: 13px; }
.backlog-list > .dropzone-hint:first-child { display: block; }

dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 18px;
}
dialog::backdrop { background: rgb(10 14 22 / 55%); }
dialog h2 { margin: 0; }

.jql-form { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.jql-form textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
}
.chip:hover { background: var(--surface-hover); text-decoration: none; }
.chip-saved { background: var(--progress-bg); }
.chip-saved a { color: var(--progress-fg); }
.chip-saved button { border: 0; background: none; color: var(--progress-fg); cursor: pointer; padding: 0 2px; }
.jql-help { margin-bottom: 14px; color: var(--text-2); font-size: 13px; }
.jql-help p { margin: 6px 0; }
.result-head { margin-bottom: 8px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; }

.crumbs { color: var(--text-3); font-size: 13px; margin-bottom: 8px; }
.issue { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
.issue-main h1 { margin-bottom: 10px; overflow-wrap: anywhere; }
.issue-section { margin-top: 24px; }
.issue-section > details > summary { cursor: pointer; }
.prose { overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.mention { background: var(--progress-bg); color: var(--progress-fg); border-radius: 4px; padding: 0 3px; }
.status-select { font-weight: 600; background: var(--progress-bg); color: var(--progress-fg); border-color: transparent; }
.fields { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 10px; margin: 14px 0; }
.fields dt { color: var(--text-3); }
.fields dd { margin: 0; overflow-wrap: anywhere; }
.worklog summary, .comment-tools summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
.worklog form { margin-top: 8px; }
.worklog-list { margin-top: 10px; font-size: 13px; }
.comments { list-style: none; margin: 0 0 12px; padding: 0; }
.comments > li { display: flex; gap: 10px; padding: 8px 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-tools form { margin-top: 6px; }
.activity { list-style: none; margin: 8px 0 0; padding: 0; }
.activity li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; overflow-wrap: anywhere; }

.dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash .panel { margin: 0; }
.dash-wide { grid-column: 1 / -1; }

.notifications { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.notifications li + li { border-top: 1px solid var(--grid); }
.notifications a { display: flex; gap: 10px; padding: 10px 12px; color: var(--text); }
.notifications a:hover { background: var(--surface-2); text-decoration: none; }
.notifications .unread { box-shadow: inset 3px 0 0 var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.tile-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.tile-label { color: var(--text-3); font-size: 13px; }

.chart { margin: 0; }
.chart figcaption { color: var(--text-2); font-size: 13px; margin-bottom: 6px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-plot { position: relative; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.series-1 { stroke: var(--series-1); }
.chart .line.series-2 { stroke: var(--series-2); }
.chart .line.series-muted { stroke: var(--series-muted); }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.series-1, .chart .bar.series-1 { fill: var(--series-1); }
.chart .dot.series-2, .chart .bar.series-2 { fill: var(--series-2); }
.chart .dot.series-muted { fill: var(--series-muted); }
.chart .axis-label { fill: var(--text-3); font-size: 11px; }
.chart .end-label { fill: var(--text-2); font-size: 12px; font-weight: 500; }
.chart .value { fill: var(--text-2); font-size: 11px; font-weight: 600; }
.chart .crosshair { stroke: var(--text-3); stroke-width: 1; pointer-events: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; list-style: none; margin: 0 0 6px; padding: 0; color: var(--text-2); font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.key { display: inline-block; flex: none; }
.key-rect { width: 12px; height: 12px; border-radius: 3px; }
.key-rect.series-1 { background: var(--series-1); }
.key-rect.series-2 { background: var(--series-2); }
.key-line { width: 16px; height: 0; border-top: 2px solid; }
.key-line.series-1 { border-color: var(--series-1); }
.key-line.series-2 { border-color: var(--series-2); }
.key-line.series-muted { border-color: var(--series-muted); }
.key-dashed { border-top-style: dashed; }
.chart-tip {
  position: absolute;
  top: 8px;
  left: var(--tip-x, 0);
  transform: translateX(12px);
  z-index: 5;
  min-width: 130px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgb(0 0 0 / 18%);
  font-size: 12px;
  pointer-events: none;
}
.chart-tip.flip { transform: translateX(calc(-100% - 12px)); }
.chart-tip-title { color: var(--text-3); margin-bottom: 4px; }
.chart-tip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-table { margin-top: 8px; font-size: 13px; }
.chart-table summary { cursor: pointer; color: var(--text-3); }

.bare { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.bare-card { width: min(380px, 100%); padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.bare-card h1 { margin: 16px 0 12px; }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .topsearch { order: 10; width: 100%; margin-left: 0; }
  .shell.with-sidebar { flex-direction: column; }
  .sidebar { flex: none; display: flex; align-items: center; gap: 2px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 6px 16px; }
  .sidebar a { white-space: nowrap; }
  .sidebar-title { display: none; }
  .content { padding: 16px; }
  .issue, .dash { grid-template-columns: minmax(0, 1fr); }
  .tiles, .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .column { flex-basis: 260px; }
}

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .topnav { flex-wrap: wrap; min-width: 0; }
  .board-filters { width: 100%; }
  .board-filters input, .board-filters select { width: auto; flex: 1; min-width: 0; }
  .backlog-row .lozenge { display: none; }
  .jql-form { flex-direction: column; align-items: stretch; }
  /* Line and bar charts share a 720-unit viewBox, so their text shrinks with the phone width. */
  .chart-plot .axis-label { font-size: 22px; }
  .chart-plot .value { font-size: 20px; }
  .chart-plot .end-label { font-size: 22px; }
}

/* Work management views */
:root {
  --group-blue: #2a78d6;
  --group-green: #2e9e68;
  --group-orange: #eb6834;
  --group-purple: #8355d6;
  --group-pink: #d6478f;
  --group-teal: #1f9aa8;
  --mark-todo: #8a909c;
  --mark-progress: #2a78d6;
  --mark-done: #2e9e68;
  --load-1: #dbe8fa;
  --load-2: #b0cdf3;
  --load-3: #6fa3e6;
  --load-4: #2a78d6;
  --load-strong: #ffffff;
  --tone-0-bg: #d9e6fb; --tone-0-fg: #1c4a9c;
  --tone-1-bg: #fde6d9; --tone-1-fg: #8f3d14;
  --tone-2-bg: #d6f0e3; --tone-2-fg: #14663f;
  --tone-3-bg: #e9dffa; --tone-3-fg: #52309c;
  --tone-4-bg: #fbdfee; --tone-4-fg: #93245f;
  --tone-5-bg: #d5eff2; --tone-5-fg: #135f68;
}

@media (prefers-color-scheme: dark) {
  :root {
    --group-blue: #3987e5;
    --group-green: #3fb07a;
    --group-orange: #d95926;
    --group-purple: #9a74e2;
    --group-pink: #e0639f;
    --group-teal: #33adba;
    --mark-todo: #8f96a3;
    --mark-progress: #3987e5;
    --mark-done: #3fb07a;
    --load-1: #1e3048;
    --load-2: #24456f;
    --load-3: #2c5f9e;
    --load-4: #3987e5;
    --load-strong: #0f1420;
    --tone-0-bg: #1f3a68; --tone-0-fg: #bcd4fb;
    --tone-1-bg: #55301c; --tone-1-fg: #f8cdb5;
    --tone-2-bg: #164a33; --tone-2-fg: #b4ecd0;
    --tone-3-bg: #3a2a60; --tone-3-fg: #d8c8f8;
    --tone-4-bg: #562443; --tone-4-fg: #f6c3df;
    --tone-5-bg: #174a50; --tone-5-fg: #b3e6ec;
  }
}

.group-blue { --group: var(--group-blue); }
.group-green { --group: var(--group-green); }
.group-orange { --group: var(--group-orange); }
.group-purple { --group: var(--group-purple); }
.group-pink { --group: var(--group-pink); }
.group-teal { --group: var(--group-teal); }

.stack label[hidden] { display: none; }
.work-group { margin-bottom: 20px; border-left: 4px solid var(--group); border-radius: 4px; background: var(--surface); }
.work-group > summary { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; cursor: pointer; }
.work-group-name { font-weight: 700; font-size: 15px; }
.work-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.work-table th { padding: 6px 8px; text-align: left; color: var(--text-2); font-weight: 500; white-space: nowrap; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.work-table td { padding: 2px 8px; border-bottom: 1px solid var(--border); height: 36px; }
.work-row:hover td { background: var(--surface-2); }
.work-row.dragging { opacity: .5; }
.drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-handle { width: 22px; padding: 0 2px !important; color: var(--text-3); text-align: center; cursor: grab; user-select: none; }
.col-item { min-width: 280px; position: sticky; left: 0; background: var(--surface); }
.dropzone-hint td { color: var(--text-3); text-align: center; }
.work-row ~ .dropzone-hint { display: none; }
.cell { white-space: nowrap; }
.cell-input { width: 100%; min-width: 96px; padding: 3px 4px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text); font: inherit; }
.cell-input:hover { border-color: var(--border); }
.cell-input:focus { border-color: var(--accent); background: var(--surface); }
select.cell-input { min-width: 136px; }
.cell-number { min-width: 72px; text-align: right; }
.cell-select { width: 100%; min-width: 118px; padding: 4px 6px; border: 0; border-radius: 4px; background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; text-align: center; }
.cell-select[data-look="todo"] { background: var(--todo-bg); color: var(--todo-fg); }
.cell-select[data-look="in_progress"] { background: var(--progress-bg); color: var(--progress-fg); }
.cell-select[data-look="done"] { background: var(--done-bg); color: var(--done-fg); }
.cell-select[data-look="t0"] { background: var(--tone-0-bg); color: var(--tone-0-fg); }
.cell-select[data-look="t1"] { background: var(--tone-1-bg); color: var(--tone-1-fg); }
.cell-select[data-look="t2"] { background: var(--tone-2-bg); color: var(--tone-2-fg); }
.cell-select[data-look="t3"] { background: var(--tone-3-bg); color: var(--tone-3-fg); }
.cell-select[data-look="t4"] { background: var(--tone-4-bg); color: var(--tone-4-fg); }
.cell-select[data-look="t5"] { background: var(--tone-5-bg); color: var(--tone-5-fg); }
.cell-select option { background: var(--surface); color: var(--text); font-weight: 400; }
.cell-total { text-align: right; font-weight: 600; white-space: nowrap; }
.add-item input { width: 100%; padding: 4px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text); font: inherit; }
.add-item input:focus { border-color: var(--accent); background: var(--surface); }
.battery { display: block; width: 100%; min-width: 118px; height: 10px; border-radius: 3px; background: var(--surface-2); }
.battery-todo { fill: var(--mark-todo); }
.battery-in_progress { fill: var(--mark-progress); }
.battery-done { fill: var(--mark-done); }

.timeline-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.timeline { display: block; max-width: none; }
.tl-grid { stroke: var(--grid); stroke-width: 1; }
.tl-day { fill: var(--text-3); font-size: 11px; }
.tl-month { fill: var(--text); font-size: 12px; font-weight: 600; }
.tl-today { stroke: var(--danger); stroke-width: 2; }
.tl-group-band { fill: var(--group); fill-opacity: .14; }
.tl-group { fill: var(--text); font-size: 13px; font-weight: 700; }
.tl-label { fill: var(--text); font-size: 12px; }
.tl-fill { stroke: var(--surface); stroke-width: 1; }
.tl-todo { fill: var(--mark-todo); background: var(--mark-todo); }
.tl-in_progress { fill: var(--mark-progress); background: var(--mark-progress); }
.tl-done { fill: var(--mark-done); background: var(--mark-done); }
.tl-movable { cursor: ew-resize; touch-action: none; }
.tl-dep { fill: none; stroke: var(--text-2); stroke-width: 1.5; }
.tl-dep-head { fill: var(--text-2); }
.undated { margin-top: 16px; }

.calendar-wrap { overflow-x: auto; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); min-width: 660px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.calendar-head { padding: 6px 8px; color: var(--text-2); font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--border); }
.calendar-day { min-height: 104px; min-width: 0; padding: 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: var(--surface-2); }
.calendar-day.outside .calendar-date { color: var(--text-3); }
.calendar-day.today .calendar-date { background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 0 6px; }
.calendar-date { display: inline-block; font-size: 12px; margin-bottom: 2px; }
.calendar-item { display: block; margin-top: 2px; padding: 1px 4px; border-radius: 3px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.calendar-todo { background: var(--todo-bg); color: var(--todo-fg); }
.calendar-in_progress { background: var(--progress-bg); color: var(--progress-fg); }
.calendar-done { background: var(--done-bg); color: var(--done-fg); }

.workload td, .workload th { text-align: center; }
.workload td:first-child, .workload th:first-child { text-align: left; }
.load-1 { background: var(--load-1); }
.load-2 { background: var(--load-2); }
.load-3 { background: var(--load-3); }
.load-4 { background: var(--load-4); color: var(--load-strong); font-weight: 600; }

.rules { margin: 0; }
.grow { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.dimmed-row { opacity: .6; }
.trap { position: absolute; left: -9999px; }
.widget-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.widget-grid .panel { margin-bottom: 0; }
.widget-wide { grid-column: 1 / -1; }
.widget-grid .chart figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.widget-grid + .panel { margin-top: 16px; }

@media (max-width: 900px) {
  .widget-grid { grid-template-columns: minmax(0, 1fr); }
  .col-item { min-width: 200px; }
}

.col-check { width: 28px; padding: 0 4px !important; text-align: center; }
.cell-computed { font-variant-numeric: tabular-nums; text-align: right; }
.bulk-bar { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--accent); border-radius: 8px; box-shadow: var(--shadow); }
.bulk-bar[hidden] { display: none; }
.bulk-bar select { width: auto; }
.rule-inline { display: contents; }

.release-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.release-head h2 { margin: 0; }
.release-head progress { flex: 0 1 160px; min-width: 80px; height: 8px; accent-color: var(--accent); }

.input-tiny { width: 52px; }
.is-required::before, .is-required > label::before { content: '* '; color: var(--danger); font-weight: 700; }
.transitions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.prose blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--border); color: var(--text-3); }
.move-issue { margin-bottom: 12px; }
.result-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-right: auto; }
.result-head .inline-form select { width: auto; }

/* Board configuration and agile reports */
.board-lanes { display: flex; flex-direction: column; gap: 8px; }
.lane-title { font-size: 14px; margin: 8px 0 0; }
.column.over-limit { background: var(--tone-1-bg); }
.column.over-limit > header { color: var(--danger); }
.column.under-limit > header { color: var(--tone-0-fg); }
.column-limit { margin-left: 3px; font-weight: 500; }
.card-tone-0 { border-left: 3px solid var(--group-blue); }
.card-tone-1 { border-left: 3px solid var(--group-orange); }
.card-tone-2 { border-left: 3px solid var(--group-green); }
.card-tone-3 { border-left: 3px solid var(--group-purple); }
.card-tone-4 { border-left: 3px solid var(--group-pink); }
.card-tone-5 { border-left: 3px solid var(--group-teal); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.board-column-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.board-column-form input[name="name"] { flex: 1 1 160px; width: auto; }
.board-column-form input[type="number"] { width: 76px; }
.board-column-statuses { display: flex; flex-wrap: wrap; gap: 10px; flex: 2 1 240px; }
.report-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.report-tabs a { padding: 5px 10px; border-radius: 6px; color: var(--text-2); }
.report-tabs a:hover { background: var(--surface-2); text-decoration: none; }
.report-tabs a.active { background: var(--surface-2); color: var(--accent); }
.report-picker { margin-bottom: 12px; }
.report-picker select { width: auto; }
.report-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.report-progress progress { flex: 1 1 140px; min-width: 100px; }
.over-capacity { color: var(--danger); }
.danger-zone { border-color: var(--danger); }
.admin-tabs { margin-bottom: 14px; }
.jql-form { position: relative; }
.jql-suggest { position: absolute; top: 100%; left: 0; z-index: 30; margin: 2px 0 0; padding: 4px; list-style: none; min-width: 240px; max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.jql-suggest li { padding: 5px 8px; border-radius: 4px; cursor: pointer; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.jql-suggest li:hover, .jql-suggest li.active { background: var(--surface-2); }
.rule-steps { margin-top: 6px; }
.step-depth-1 { padding-left: 18px; }
.step-depth-2 { padding-left: 36px; }
.step-depth-3 { padding-left: 54px; }
.sla-over { color: var(--danger); font-weight: 600; }
.service-panel { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.hidden-field { position: absolute; left: -9999px; }
.portal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.portal-head .brand { color: inherit; text-decoration: none; }
.portal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.portal-main { width: min(860px, 100%); margin: 0 auto; padding: 20px 16px 48px; }
.portal-card, .portal-type { display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; }
.portal-type { padding: 10px 0; border-top: 1px solid var(--border); }
.portal-type:first-of-type { border-top: 0; }
.portal-main > .inline-form { margin-bottom: 14px; }
.portal-card:hover strong, .portal-type:hover strong { color: var(--accent); }
.rules > .row-line { align-items: flex-start; }
.code-block { overflow-x: auto; padding: 10px 12px; border-radius: 6px; background: var(--surface-2); font-size: 13px; }
.announcement { padding: 9px 12px; border-radius: 6px; margin-bottom: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.announcement-warning { background: var(--err-bg); color: var(--err-fg); }
[data-field][hidden] { display: none; }
.workflow-diagram { display: block; }
.wf-node { fill: var(--surface-2); stroke: var(--border); }
.wf-done { stroke: var(--ok-fg); }
.wf-in_progress { stroke: var(--accent); }
.wf-name { font-size: 13px; font-weight: 600; fill: currentColor; }
.wf-edge { fill: none; stroke: var(--text-3); stroke-width: 1.5; }
.wf-edge-open { stroke-dasharray: 4 3; }
.wf-head { fill: var(--text-3); }
.wf-label { font-size: 11px; fill: var(--text-3); }
.backlog-row a { color: inherit; }
.backlog-row input[type="checkbox"] { width: auto; flex: none; }
.sprint-head input[type="number"] { width: 96px; }
:root { --series-3: var(--group-green); --series-4: var(--group-purple); --series-5: var(--group-pink); --series-6: var(--group-teal); }
.chart .line.series-3 { stroke: var(--series-3); }
.chart .line.series-4 { stroke: var(--series-4); }
.chart .line.series-5 { stroke: var(--series-5); }
.chart .line.series-6 { stroke: var(--series-6); }
.chart .dot.series-3 { fill: var(--series-3); }
.chart .dot.series-4 { fill: var(--series-4); }
.chart .dot.series-5 { fill: var(--series-5); }
.chart .dot.series-6 { fill: var(--series-6); }
.sprint-head .inline-form { margin-top: 0; flex-wrap: nowrap; }
.key-line.series-3 { border-color: var(--series-3); }
.key-line.series-4 { border-color: var(--series-4); }
.key-line.series-5 { border-color: var(--series-5); }
.key-line.series-6 { border-color: var(--series-6); }
.key-rect.series-3 { background: var(--series-3); }
.key-rect.series-4 { background: var(--series-4); }
.key-rect.series-5 { background: var(--series-5); }
.key-rect.series-6 { background: var(--series-6); }

/* Collaboration */
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.reaction { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 12px; padding: 1px 8px; font-size: 13px; cursor: pointer; }
.reaction:hover { background: var(--surface-2); }
.reaction.mine { border-color: var(--accent); color: var(--accent); }
.star { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0 4px; font-size: 15px; }
.star-cell { white-space: nowrap; }
.star-cell form { display: inline; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.attachment-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
[data-inline-summary] { cursor: text; }
.file-over { outline: 2px dashed var(--accent); outline-offset: 4px; }
.palette { width: min(560px, calc(100vw - 32px)); padding: 12px; }
.palette ul { list-style: none; margin: 8px 0 0; padding: 0; }
.palette li a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--text); }
.palette li a:hover, .palette li:first-child a { background: var(--surface-2); text-decoration: none; }
.shortcut-help dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.shortcut-help dd { margin: 0; }
.shortcut-help dt { font-weight: 700; }

/* Archive and flag */
.banner { padding: 8px 12px; border-radius: 6px; margin: 0 0 12px; border: 1px solid var(--border); background: var(--surface-2, var(--bg)); }
.banner-flag { border-color: var(--danger); color: var(--danger); }
.flag-mark { color: var(--danger); font-weight: 600; }
.card.card-flagged { box-shadow: inset 3px 0 0 var(--danger); }
.template-picker { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 12px; }
.template-picker a[aria-current] { font-weight: 600; text-decoration: underline; }
.approval-panel { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.approval-panel h2 { font-size: 1rem; margin: 0 0 4px; }
.dev-panel { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.dev-panel h2 { font-size: 1rem; margin: 0 0 4px; }
.dev-panel h3 { font-size: .85rem; margin: 8px 0 2px; color: var(--text-3); }
.dev-panel li { overflow-wrap: anywhere; }
.sso-divider { text-align: center; margin: 12px 0 8px; }
.banner-warning { border-color: var(--danger); }
.plan-scenario .actions { margin-top: 6px; }
.chip-danger { border-color: var(--danger); color: var(--danger); }
.plan-changed { outline: 2px solid var(--accent, var(--danger)); outline-offset: 1px; }
.plan-table input[type="date"], .plan-table select { min-width: 8.5rem; }
.check-group { min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; max-height: 220px; overflow: auto; }
.check-group legend { padding: 0 4px; font-weight: 600; }
.check-group label.check, .stack .check-group label.check { white-space: normal; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .grid-3 { grid-template-columns: 1fr; } }
.chart .heat { fill: var(--series-1); }
.chart .heat-0 { fill: var(--border); }
.chart .heat-1 { fill-opacity: .3; }
.chart .heat-2 { fill-opacity: .5; }
.chart .heat-3 { fill-opacity: .75; }
.chart .heat-4 { fill-opacity: 1; }
.chart-heatmap svg { max-width: 260px; }
.matrix td, .matrix th { text-align: right; }
.matrix th[scope="row"], .matrix thead th:first-child { text-align: left; }
.matrix .mx-1 { background: color-mix(in srgb, var(--series-1) 12%, transparent); }
.matrix .mx-2 { background: color-mix(in srgb, var(--series-1) 22%, transparent); }
.matrix .mx-3 { background: color-mix(in srgb, var(--series-1) 32%, transparent); }
.matrix .mx-4 { background: color-mix(in srgb, var(--series-1) 42%, transparent); }
.team-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.team-form select { max-width: 12rem; }

/* Printable issue */
.print-page { background: var(--surface); }
.print-page main { max-width: 860px; margin: 0 auto; padding: 24px 16px; }
.print-doc h1 { font-size: 1.5rem; margin: 0 0 16px; overflow-wrap: anywhere; }
.print-doc h2 { font-size: 1.1rem; margin: 24px 0 8px; }
.print-doc h3 { font-size: .95rem; margin: 0 0 4px; color: var(--text-2); }
.print-meta th { width: 30%; color: var(--text-2); font-weight: 600; }
.print-comment { border-top: 1px solid var(--border); padding: 10px 0; }
.print-tools { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 16px; }
.share-form { display: grid; gap: 8px; }
.share-form select { min-height: 6rem; }
@media print {
  .print-tools { display: none; }
  .print-page, .print-page main { background: #fff; color: #000; padding: 0; max-width: none; }
  .print-doc a { color: inherit; }
}
.card-status { font-size: .75rem; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.right > form.inline-form { display: inline-flex; vertical-align: middle; }

/* Split issue navigator */
.split-view { display: grid; grid-template-columns: minmax(260px, 2fr) 3fr; gap: 16px; align-items: start; }
.split-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); max-height: 75vh; overflow-y: auto; }
.split-list li + li { border-top: 1px solid var(--border); }
.split-list a { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 12px; color: inherit; text-decoration: none; }
.split-list a:hover { background: var(--surface-hover); }
.split-list a[aria-current] { background: var(--progress-bg); box-shadow: inset 3px 0 0 var(--accent); }
.split-key { font-size: 12px; color: var(--text-3); grid-column: 1; }
.split-summary { grid-column: 1; overflow-wrap: anywhere; }
.split-list .lozenge { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.split-pane { position: sticky; top: 16px; margin: 0; min-width: 0; }
.peek h2 { margin: 4px 0 8px; overflow-wrap: anywhere; }
@media (max-width: 900px) {
    .split-view { grid-template-columns: 1fr; }
    .split-list { max-height: 50vh; }
    .split-pane { position: static; }
}
/* Project summary */
a.tile { color: inherit; }
a.tile:hover { text-decoration: none; border-color: var(--accent); }
.summary-grid { align-items: start; }
.summary-grid .panel { margin: 0; min-width: 0; }
.category-bar { display: block; width: 100%; height: 14px; margin: 8px 0 12px; border-radius: 4px; }
.category-todo { fill: var(--mark-todo); background: var(--mark-todo); }
.category-in_progress { fill: var(--mark-progress); background: var(--mark-progress); }
.category-done { fill: var(--mark-done); background: var(--mark-done); }
.category-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.category-legend li { display: flex; align-items: center; gap: 8px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
@media (max-width: 900px) { .summary-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .summary-grid { grid-template-columns: minmax(0, 1fr); } }
/* Wallboard */
.wall { padding: 24px 32px; }
.wall-page { font-size: 16px; }
.wall .page-head h1 { font-size: 30px; }
.wall .tile-value { font-size: 44px; }
.wall .tile-label { font-size: 16px; }
@media (max-width: 560px) { .wall { padding: 16px; } }
/* Mentions, drafts, comment history, image viewer */
.mention-list { list-style: none; margin: 4px 0 0; padding: 4px; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.mention-list li { padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.mention-list li[aria-selected="true"], .mention-list li:hover { background: var(--surface-hover); }
.draft-note { display: block; }
.comment-revisions { margin-top: 6px; font-size: 13px; }
.comment-revisions summary { color: var(--text-3); cursor: pointer; }
.comment-revisions ol { margin: 6px 0 0; padding-left: 18px; }
.comment-revisions li { margin-bottom: 8px; }
.lightbox { max-width: min(96vw, 1200px); max-height: 94vh; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.lightbox::backdrop { background: rgba(0, 0, 0, .7); }
.lightbox img { display: block; max-width: 100%; max-height: calc(94vh - 90px); margin: 0 auto; object-fit: contain; }
.lightbox-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.lightbox-bar p { flex: 1; margin: 0; overflow-wrap: anywhere; text-align: center; }
/* Request participants and article suggestions */
.participant-list li { display: flex; align-items: center; gap: 8px; }
.participant-list li + li { margin-top: 4px; }
.service-panel .inline-form { margin-top: 6px; }
.service-panel .inline-form input { min-width: 0; flex: 1; }
.kb-suggest { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.kb-suggest p { margin: 0 0 6px; }
.kb-suggest li + li { margin-top: 4px; }.participant-add { align-items: flex-end; margin-top: 12px; }
.participant-add label { display: flex; flex-direction: column; gap: 4px; }
.participant-add label input { flex: none; }

/* Checklists */
.checklist-progress { display: block; width: 100%; height: 6px; margin: 0 0 10px; accent-color: var(--mark-done); }
.checklist-items li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.checklist-items li:last-child { border-bottom: 0; }
.checklist-items form { margin: 0; }
.checklist-box { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 2px solid var(--text-3); border-radius: 4px; background: var(--surface); color: var(--on-accent); font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; }
span.checklist-box { cursor: default; }
.checklist-item.is-done .checklist-box { border-color: var(--accent); background: var(--accent); }
.checklist-item.is-done .checklist-text { color: var(--text-3); text-decoration: line-through; }
.checklist-items + .inline-form, #checklist > .inline-form { margin-top: 8px; }
.checklist-badge { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.checklist-badge.is-complete { color: var(--ok-fg); }
.api-tiles .api-top { font-size: 18px; overflow-wrap: anywhere; }
.api-secret pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
