/* Issue tracker styles (the command chrome lives in shared/chrome.css, shared pieces in shared/kit.css, charts in shared/charts.css). */
:root {
  --lane: var(--sunk);
  --cat-todo-bg: var(--line-soft); --cat-todo-fg: var(--text-2);
  --cat-progress-bg: var(--info-soft); --cat-progress-fg: var(--info);
  --cat-done-bg: var(--ok-soft); --cat-done-fg: var(--ok);
  --epic-bg: #f3f1ff; --epic-fg: #5b4c98;
  --key: #5f5f6b;
}
#app { background: var(--page); }
#main { background: var(--page); display: flex; flex-direction: column; min-width: 0; flex: 1; min-height: 0; }

/* ---------- search box and the person you are (row 1 of the header) ---------- */
.cmd-header .cmd-context#doc-title:hover { border-color: transparent; }

/* ---------- tabs, banner, main ---------- */
#iss-main { flex: 1; min-height: 0; overflow: auto; padding: 20px 24px 32px; outline: none; }

/* ---------- common ---------- */
.page { max-width: 1480px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px 8px; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.focus-card { box-shadow: 0 0 0 2px var(--prog-soft); border-color: var(--prog); }
.pad { padding: 12px 16px 16px; }
.pad-s { padding: 4px 0 8px; }
.mt { margin-top: 12px; }
.grow { flex: 1; }
.small { font-size: 12px; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:disabled:hover { background: var(--surface); }
body[data-chrome="command"] .btn.primary:disabled:hover { background: #18181b; }
.btn.danger { color: var(--danger); border-color: #f2c4bf; }
.btn .btn-label { white-space: nowrap; }
.icon-btn.on { background: var(--prog-soft); color: var(--prog-strong); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn:disabled:hover { background: none; }
.icon-btn .material-symbols-outlined { font-size: 20px; }
kbd { font: 12px var(--mono); background: var(--hover); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.kbd-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.kbd-table td { padding: 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
code { font-family: var(--mono); font-size: 12px; background: var(--sunk); border-radius: 4px; padding: 1px 4px; }
ul.feat { padding-left: 18px; margin: 4px 0; line-height: 1.55; font-size: 13px; }
.load-error { max-width: 520px; padding: 16px; color: var(--danger); }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-stack .field { display: flex; flex-direction: column; gap: 4px; }
.cf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.cf-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cf-grid .field, .create-form > .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.create-form { display: flex; flex-direction: column; gap: 12px; }
.create-form .link-btn { align-self: flex-start; padding: 2px 0; font-size: 12px; }
.req { color: var(--danger); text-decoration: none; }
.check-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.modal-foot .check-label.left { margin-right: auto; }
.fg-hint { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin-top: 4px; }
.err-list { margin: 6px 0; padding-left: 18px; font-size: 13px; line-height: 1.55; max-height: 40vh; overflow: auto; }
textarea.inp { resize: vertical; line-height: 1.45; }
.inp.overdue { color: var(--danger); }
select.inp { padding-right: 24px; }
.with-ico { display: flex; align-items: center; gap: 6px; min-width: 0; }
.with-ico .inp { min-width: 0; }

/* ---------- icons, lozenges, avatars, tags ---------- */
.it-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; flex: none; }
.it-ico .material-symbols-outlined { font-size: 13px; font-variation-settings: 'wght' 600; }
.it-ico.sm { width: 16px; height: 16px; } .it-ico.sm .material-symbols-outlined { font-size: 11.5px; }
.it-ico.xs { width: 13px; height: 13px; } .it-ico.xs .material-symbols-outlined { font-size: 9.5px; }
.pr-ico { display: inline-flex; flex: none; } .pr-ico .material-symbols-outlined { font-size: 16px; }
.lozenge { display: inline-flex; align-items: center; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 10px; line-height: 16px; flex: none; }
.cat-todo.lozenge, .lozenge.cat-todo { background: var(--cat-todo-bg); color: var(--cat-todo-fg); }
.lozenge.cat-progress { background: var(--cat-progress-bg); color: var(--cat-progress-fg); }
.lozenge.cat-done { background: var(--cat-done-bg); color: var(--cat-done-fg); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 600; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.lg { width: 30px; height: 30px; font-size: 12px; }
.avatar.none { background: var(--surface); color: var(--faint); box-shadow: inset 0 0 0 1px var(--line-strong); }
.avatar.none .material-symbols-outlined { font-size: 15px; }
.avatar.lg.none .material-symbols-outlined { font-size: 19px; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.uc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.key-link { color: var(--key); text-decoration: none; font-size: 12.5px; font-weight: 500; white-space: nowrap; flex: none; }
.key-link:hover { color: var(--prog-strong); text-decoration: underline; }
.key-link.done { text-decoration: line-through; }
.epic-tag { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 10px; background: var(--epic-bg); color: var(--epic-fg); text-decoration: none; flex: none; }
a.epic-tag:hover { text-decoration: underline; }
.tag { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; padding: 1px 4px 1px 7px; border-radius: 4px; background: var(--line-soft); color: var(--text-2); max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag.sm { font-size: 11px; padding: 0 6px; }
.pick-btn .tag { padding-right: 7px; }
.tag-x { border: 0; background: none; padding: 0; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; cursor: pointer; color: var(--muted); }
.tag-x:hover { background: var(--line-strong); }
.tag-x .material-symbols-outlined { font-size: 14px; }
.pts { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--line-soft); color: var(--text-2); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.pts.empty { background: none; color: var(--faint); }
.pts.cat-progress { background: var(--cat-progress-bg); color: var(--cat-progress-fg); }
.pts.cat-done { background: var(--cat-done-bg); color: var(--cat-done-fg); }
.due { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.due .material-symbols-outlined { font-size: 14px; }
.due.late { color: var(--danger); font-weight: 500; }
.kids { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.kids .material-symbols-outlined { font-size: 14px; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ph-text { min-width: 0; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; text-wrap: balance; }
.page-head .muted { font-size: 13px; margin-top: 3px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumb { color: var(--muted); text-decoration: none; }
a.crumb:hover { color: var(--text); text-decoration: underline; }
.crumb-sep { color: #b9bcc6; }
.crumb-issue { display: inline-flex; align-items: center; gap: 5px; }
.proj-select { width: auto; min-width: 180px; padding: 6px 28px 6px 10px; font-size: 13.5px; border-radius: 8px; }
.sprint-sub { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: baseline; margin-top: 4px; font-size: 13px; }
.sprint-goal { color: var(--text); }

/* ---------- filters ---------- */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fb-search { width: 200px; border-radius: 8px; padding: 6px 10px; font-size: 13.5px; }
.avatar-filter { display: flex; align-items: center; }
.af-btn { border: 0; background: none; padding: 0; margin-left: -4px; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px var(--page); display: inline-flex; position: relative; }
.af-btn:first-child { margin-left: 0; }
.af-btn:hover { z-index: 2; transform: translateY(-2px); }
.af-btn.on { z-index: 1; box-shadow: 0 0 0 2px var(--prog); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 4px 12px; font-size: 13px; cursor: pointer; color: var(--text-2); white-space: nowrap; text-decoration: none; font-family: inherit; }
.chip-btn:hover { background: var(--sunk); }
.chip-btn.on { background: var(--prog-soft); border-color: var(--prog-soft); color: var(--prog-strong); font-weight: 500; }
.chip-caret { font-size: 16px; margin-right: -4px; }
.chip-n { font-size: 11px; background: var(--line-soft); color: var(--muted); border-radius: 10px; padding: 0 7px; font-weight: 500; font-variant-numeric: tabular-nums; }
.group-select { width: auto; padding: 5px 26px 5px 10px; font-size: 13px; border-radius: 16px; }

/* ---------- board ---------- */
.board-page { display: flex; flex-direction: column; min-height: 100%; }
.board-wrap { overflow-x: auto; padding-bottom: 8px; flex: 1; }
.board { --cols: 4; display: grid; grid-template-columns: repeat(var(--cols), minmax(210px, 1fr)); column-gap: 10px; min-width: min-content; align-content: start; }
.board-heads { display: contents; }
.col-head { position: sticky; top: -20px; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; background: var(--lane); border-radius: 8px 8px 0 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.col-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-count { font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 12px; }
.col-pts { margin-left: auto; font-weight: 600; font-size: 11px; color: var(--text-2); background: var(--surface); border-radius: 9px; padding: 0 7px; }
.col-head.cat-done { color: var(--cat-done-fg); }
.lane { display: contents; }
.col { background: var(--lane); padding: 4px 6px 8px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; border-radius: 0 0 8px 8px; margin-bottom: 14px; transition: background-color .12s; }
.col.drop-over { background: var(--line); }
.has-lanes .col { border-radius: 0; margin-bottom: 0; min-height: 60px; border-bottom: 1px solid var(--line); }
.has-lanes .col-head { margin-bottom: 0; }
.lane-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 10px 6px 6px; border: 0; background: var(--page); font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; position: sticky; left: 0; }
.lane-head:hover .lane-label { text-decoration: underline; }
.lane-head .material-symbols-outlined { font-size: 20px; color: var(--muted); }
.lane-key { color: var(--muted); font-weight: 500; }
.lane-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.board-empty { grid-column: 1 / -1; padding: 24px; text-align: center; }
.icard {
  display: flex; flex-direction: column; gap: 8px; padding: 9px 10px 8px; background: var(--surface); border-radius: 6px; color: var(--text); text-decoration: none;
  border: 1px solid var(--line); cursor: grab; outline-offset: 2px; user-select: none;
}
.icard:hover { border-color: var(--line-strong); }
.icard:active { cursor: grabbing; }
.icard:focus-visible { outline: 2px solid var(--prog); }
.icard.dragging, .bl-row.dragging { opacity: .35; }
.icard.done .icard-sum { color: var(--muted); }
.icard-sum { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.icard-parent { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-bottom: -4px; }
.icard-parent span:last-child { overflow: hidden; text-overflow: ellipsis; }
.icard-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.icard-foot { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.icard-key { font-size: 12px; font-weight: 500; color: var(--key); white-space: nowrap; }
.icard.done .icard-key { text-decoration: line-through; }
.drop-marker { height: 3px; border-radius: 2px; background: var(--prog); margin: -2px 2px; flex: none; }
.quick-create { margin-top: 2px; }
.qc-btn { width: 100%; display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 6px; border-radius: 6px; font: inherit; font-size: 13.5px; color: var(--text-2); cursor: pointer; text-align: left; }
.qc-btn:hover { background: var(--line); color: var(--text); }
.qc-btn .material-symbols-outlined { font-size: 18px; }
.qc-edit { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 6px; padding: 6px; box-shadow: 0 0 0 2px var(--prog); }
.qc-edit select { width: auto; align-self: flex-start; padding: 3px 24px 3px 6px; font-size: 12.5px; }
.qc-edit textarea { border: 0; padding: 4px; resize: none; font-size: 14px; }
.qc-edit textarea:focus { outline: none; }

/* ---------- backlog ---------- */
.bl-section { background: var(--lane); border-radius: 10px; padding: 6px 8px 8px; margin-bottom: 14px; }
.bl-section.sprint.active { box-shadow: inset 3px 0 0 var(--prog); }
.bl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 2px 8px; min-height: 36px; }
.bl-toggle { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 2px 4px 2px 0; font: inherit; font-weight: 600; font-size: 14px; color: var(--text); cursor: pointer; border-radius: 4px; }
.bl-toggle:hover .bl-name { text-decoration: underline; }
.bl-toggle .material-symbols-outlined { font-size: 20px; color: var(--muted); }
.bl-sums { display: inline-flex; gap: 4px; }
.bl-head .btn { padding: 4px 12px; font-size: 13px; }
.bl-goal { font-size: 13px; color: var(--text-2); padding: 0 4px 8px 26px; }
.bl-list { display: flex; flex-direction: column; min-height: 40px; border-radius: 6px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.bl-list.drop-over { box-shadow: 0 0 0 2px var(--prog); }
.bl-list .drop-marker { margin: 0; height: 2px; border-radius: 0; }
.bl-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; min-height: 40px; border-bottom: 1px solid var(--line-soft); background: var(--surface); cursor: grab; }
.bl-row:last-child { border-bottom: 0; }
.bl-row:hover { background: var(--bg); }
.bl-row:focus-visible { outline: 2px solid var(--prog); outline-offset: -2px; }
.bl-sum { flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-sum:hover { text-decoration: underline; }
.bl-empty { padding: 14px; text-align: center; font-size: 13px; }
.bl-section .quick-create { margin-top: 6px; }
.closed-sprints { margin-top: 6px; font-size: 13px; }
.closed-sprints summary { cursor: pointer; color: var(--muted); padding: 6px 2px; }
.cs-row { display: flex; gap: 12px; align-items: baseline; padding: 4px 2px 4px 18px; flex-wrap: wrap; }
.closed-sprint { color: var(--text); font-weight: 500; }

/* ---------- issue page ---------- */
.issue-page { max-width: 1280px; }
.issue-head { margin-bottom: 18px; }
.key-copy { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 2px 4px; margin: -2px -4px; border-radius: 4px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.key-copy:hover { background: var(--hover); color: var(--text); }
.issue-title { margin: 4px 0 12px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.issue-title .ie-text { display: block; padding: 2px 6px; margin: 0 -6px; border-radius: 6px; overflow-wrap: anywhere; }
.issue-title .ie-inp { font-size: 22px; font-weight: 600; padding: 4px 6px; }
.issue-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.status-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 8px; padding: 6px 8px 6px 12px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.status-btn.cat-todo { background: var(--cat-todo-bg); color: var(--cat-todo-fg); }
.status-btn.cat-progress { background: var(--cat-progress-bg); color: var(--cat-progress-fg); }
.status-btn.cat-done { background: var(--cat-done-bg); color: var(--cat-done-fg); }
.status-btn:hover { filter: brightness(.96); }
.status-btn .material-symbols-outlined { font-size: 18px; }
.issue-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.issue-main { min-width: 0; }
.issue-section { margin-bottom: 26px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; min-height: 32px; }
.sec-head h2 { margin: 0; font-size: 15px; font-weight: 600; margin-right: auto; }
.sec-head .progress { width: 120px; }
.link-group { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
.inline-edit .ie-text { cursor: text; }
.inline-edit .ie-text:hover { background: var(--hover); }
.inline-edit .ie-text:focus-visible { outline: 2px solid var(--prog); }
.ie-small .ie-text { display: inline-block; min-width: 60px; padding: 3px 6px; margin-left: -6px; border-radius: 4px; font-size: 13.5px; }
.ie-small .ie-inp { padding: 4px 6px; font-size: 13.5px; }
.desc .md { padding: 8px 10px; margin: 0 -10px; border-radius: 8px; cursor: text; min-height: 40px; }
.desc .md:hover { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.desc .md:focus-visible { outline: 2px solid var(--prog); }
.md-empty { color: var(--muted); }
.desc-edit { font-family: inherit; font-size: 14px; min-height: 120px; }
.desc .row-gap { margin-top: 8px; }
.md { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.md p { margin: 0 0 10px; }
.md > :last-child { margin-bottom: 0; }
.md .md-h { margin: 16px 0 6px; font-weight: 600; line-height: 1.3; }
.md h3.md-h { font-size: 17px; } .md h4.md-h { font-size: 15px; } .md h5.md-h, .md h6.md-h, .md h7.md-h, .md h8.md-h { font-size: 14px; }
.md > .md-h:first-child { margin-top: 0; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 2px 0; }
.md .md-code { background: var(--sunk); border: 1px solid var(--line-soft); border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; margin: 0 0 10px; }
.md .md-code code { background: none; padding: 0; font-size: 12.5px; }
.md blockquote { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--line-strong); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.md-link { color: var(--accent); }
.md-table-wrap { overflow-x: auto; margin-bottom: 10px; }
.md-table { border-collapse: collapse; font-size: 13px; }
.md-table td { border: 1px solid var(--line); padding: 4px 8px; }
.md-table tr:first-child td { background: var(--sunk); font-weight: 500; }
.mini-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.mini-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line-soft); min-height: 38px; }
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: var(--bg); }
.mini-sum { flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-sum:hover { text-decoration: underline; }
.mini-row .icon-btn { width: 28px; height: 28px; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.progress-bar { height: 100%; background: #22a06b; border-radius: 3px; }
.progress-bar.over { background: #e2483d; }
.seg { display: inline-flex; background: var(--line-soft); border-radius: 8px; padding: 2px; gap: 2px; }
.seg-btn { border: 0; background: none; padding: 4px 12px; border-radius: 6px; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg-btn.on { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.comment-new { display: flex; gap: 10px; margin-bottom: 14px; }
.cn-col { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cn-col textarea { min-height: 38px; }
.feed { display: flex; flex-direction: column; gap: 14px; }
.feed-item { display: flex; gap: 10px; }
.fi-col { flex: 1; min-width: 0; }
.fi-top { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 3px; }
.fi-top b { font-weight: 600; }
.fi-top .muted { font-size: 12px; }
.fi-tools { display: flex; gap: 2px; margin-top: 2px; }
.fi-tools .link-btn { padding: 2px 4px; font-size: 12px; color: var(--muted); }
.feed-item.hist { font-size: 13px; }
.feed-item.hist .avatar { margin-top: 1px; }
.hist-change { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.hv { overflow-wrap: anywhere; }
.hist-arrow { font-size: 16px; color: var(--muted); }
.issue-side { position: sticky; top: 0; min-width: 0; }
.details { padding: 4px 0 8px; margin-bottom: 10px; }
.details-title { font-size: 14px; font-weight: 600; margin: 0; padding: 12px 16px 6px; }
.dt-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; padding: 5px 16px; min-height: 40px; }
.dt-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.dt-value { min-width: 0; font-size: 13.5px; }
.dt-value .inp { padding: 5px 8px; font-size: 13.5px; }
.dt-value select.inp { padding-right: 24px; }
.dates { font-size: 12px; line-height: 1.7; padding: 0 4px; }

/* pickers */
.pick-btn { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; width: 100%; min-height: 34px; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.pick-btn:hover { background: var(--hover); }
.pick-btn:focus-visible { outline: 2px solid var(--prog); }
.create-form .pick-btn, .cf-grid .pick-btn { border-color: var(--line-strong); }
.pick { width: 300px; max-width: calc(100vw - 16px); display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.pick-q { padding: 6px 8px; font-size: 13.5px; }
.pick-list { max-height: 300px; overflow: auto; display: flex; flex-direction: column; }
.pick-opt { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 8px; border-radius: 6px; font: inherit; cursor: pointer; text-align: left; color: var(--text); }
.pick-opt:hover, .pick-opt.hi { background: var(--hover); }
.pick-opt.sel { font-weight: 500; }
.pick-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; text-align: right; }
.pick-check { font-size: 18px; color: var(--prog-strong); margin-left: auto; }
.checklist { gap: 2px; max-height: 320px; overflow: auto; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.check-row:hover { background: var(--hover); }
.tags { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 34px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); cursor: text; }
.dt-value .tags { border-color: transparent; }
.dt-value .tags:hover, .dt-value .tags:focus-within { border-color: var(--line-strong); }
.tags:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.tags-in { flex: 1; min-width: 70px; border: 0; outline: 0; padding: 3px 2px; font: inherit; font-size: 13.5px; background: none; }
.dd { position: fixed; z-index: 1500; background: var(--surface); border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); padding: 4px 0; max-height: 320px; overflow: auto; max-width: min(520px, calc(100vw - 16px)); }
.dd-opt { padding: 6px 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.dd-opt:hover, .dd-opt.hi { background: var(--hover); }
.dd-main { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-empty { padding: 8px 12px; font-size: 13px; color: var(--muted); }
.who-list { display: flex; flex-direction: column; gap: 4px; }
.who-list p { margin: 0 0 8px; }
.who-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; }
.who-btn:hover { border-color: var(--prog); background: var(--prog-soft); }

/* ---------- issues list ---------- */
.issues-page { display: flex; flex-direction: column; height: 100%; min-height: 520px; }
.filter-chips { margin-bottom: 10px; }
.quick-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.qf-text { width: 200px; padding: 5px 10px; font-size: 13px; border-radius: 16px; }
.jql-box { display: flex; gap: 8px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 10px; }
.jql-box.bad { border-color: #f1a9a2; box-shadow: 0 0 0 3px #fdeceb; }
.jql-label { font: 600 11px var(--mono); color: var(--prog-strong); background: var(--prog-soft); border-radius: 4px; padding: 3px 6px; margin-top: 6px; letter-spacing: .04em; }
.jql-input { flex: 1; border: 0; resize: none; font-family: var(--mono); font-size: 13px; line-height: 1.5; padding: 5px 2px; min-height: 32px; }
.jql-input:focus { outline: none; }
.jql-help { margin: 6px 2px 12px; line-height: 1.6; }
.jql-help.err { color: var(--danger); font-weight: 500; }
.jql-help code { font-size: 11.5px; }
.jql-preview { font: 12px/1.5 var(--mono); background: var(--sunk); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; margin: 0; }
.tbl-wrap.fixed { flex: 1; min-height: 0; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.iss-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.iss-table th { background: var(--panel); color: var(--text-2); font-weight: 500; text-align: left; padding: 0 10px; height: 38px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.iss-table td { padding: 0 10px; height: 40px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.iss-table tbody tr:hover td { background: var(--hover); }
.iss-table tr.done .sum-link { color: var(--muted); }
.iss-table tr.spacer td, .iss-table tr.spacer:hover td { padding: 0; border: 0; height: auto; background: none; }
.iss-table .c-type { width: 30px; padding-right: 0; }
.iss-table .c-key { width: 90px; }
/* the summary takes what is left and shortens with … (max-width: 0 lets a table cell shrink) */
.iss-table .c-sum { width: 46%; max-width: 0; }
.iss-table .c-num { text-align: right; width: 60px; font-variant-numeric: tabular-nums; }
.iss-table .c-date { width: 90px; color: var(--muted); }
.iss-table .c-prio { width: 110px; }
.iss-table.plain th { position: static; }
.iss-table.plain td { height: auto; padding: 6px 10px; overflow: visible; }
.iss-table.plain .inp { padding: 5px 8px; font-size: 13.5px; }
.sum-link { color: var(--text); text-decoration: none; }
.sum-link:hover { text-decoration: underline; }
.par-key { font-size: 12px; }
.th-btn { border: 0; background: none; font: inherit; color: inherit; font-weight: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; padding: 0; }
.th-btn:hover { color: var(--text); }
.sort-ic { font-size: 15px; color: var(--prog-strong); }

/* ---------- home ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
a.tile:hover { border-color: var(--prog); }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 12px; color: var(--muted); }
.tile.bad .tile-sub { color: var(--danger); font-weight: 500; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.home-col { min-width: 0; display: flex; flex-direction: column; }
.home-list { display: flex; flex-direction: column; padding: 0 8px 8px; }
.hl-group { font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 8px 4px; }
.hl-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.hl-row:hover { background: var(--sunk); }
.hl-text { flex: 1; min-width: 0; }
.hl-sum { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-card .card-head { align-items: flex-start; flex-wrap: nowrap; }
.chart-body { padding: 4px 16px 14px; overflow-x: auto; }
.chart-host { min-height: 120px; }
.sprint-cards { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.sprint-card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; color: var(--text); text-decoration: none; }
.sprint-card:hover { border-color: var(--prog); }
.sc-name { font-weight: 600; font-size: 14px; }
.stack-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--line-soft); }
.sb-done { background: #22a06b; } .sb-progress { background: #1d7afc; } .sb-todo { background: var(--line-strong); }
.filter-link { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.filter-link:hover { background: var(--sunk); }
.filter-link .material-symbols-outlined { font-size: 18px; color: var(--muted); }
.filter-link span:nth-child(2) { flex: 1; }

/* ---------- projects and settings ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.project-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; }
.pc-top { display: flex; gap: 12px; align-items: center; padding: 14px 16px 10px; color: var(--text); text-decoration: none; }
.pc-top:hover .pc-name { text-decoration: underline; }
.pc-badge { width: 40px; height: 40px; border-radius: 8px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.pc-text { min-width: 0; }
.pc-name { font-weight: 600; font-size: 15px; }
.pc-nums { display: flex; gap: 14px; flex-wrap: wrap; padding: 0 16px 10px 68px; font-size: 13px; color: var(--muted); }
.pc-links { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line-soft); font-size: 13px; margin-top: auto; }
.pc-links a { color: var(--accent); text-decoration: none; }
.pc-links a:hover { text-decoration: underline; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; padding: 4px 16px 16px; }
.fg-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fg-cell.wide { grid-column: 1 / -1; }
.cols-edit { display: flex; flex-direction: column; padding: 0 10px 10px; }
.ce-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-bottom: 1px solid var(--line-soft); }
.ce-row select { width: auto; padding: 4px 24px 4px 8px; font-size: 13px; }
.ce-add { padding: 10px 6px 4px; }
.ce-add select { width: auto; min-width: 200px; }
.versions { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.versions .iss-table { border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.setup-tabs { margin-bottom: 14px; }
.people { display: flex; flex-direction: column; padding: 0 8px 8px; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); }
.person-row:last-child { border-bottom: 0; }
.person-row.inactive { opacity: .6; }
.pr-name { font-weight: 500; font-size: 14px; }
.person-row .btn { padding: 4px 12px; font-size: 13px; }
.data-actions p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }

/* ---------- Jira ---------- */
.imp-pick { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.4fr); gap: 16px; padding: 4px 16px 16px; align-items: stretch; }
.imp-drop { border: 2px dashed #c3c7d0; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 26px 16px; text-align: center; background: var(--bg); }
.imp-drop.over { border-color: var(--prog); background: var(--prog-soft); }
.imp-drop > .material-symbols-outlined { font-size: 38px; color: var(--accent-strong); }
.imp-drop-title { font-size: 16px; font-weight: 600; }
.imp-drop .btn { margin-top: 8px; }
.imp-kinds { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.imp-kinds p { margin: 0 0 10px; }
.imp-kinds code { font-size: 11.5px; word-break: break-all; }
.imp-busy { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.imp-busy .spinner { width: 20px; height: 20px; border-width: 2px; }
.imp-list { list-style: none; padding: 0; margin: 10px 0 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.imp-list li { display: flex; align-items: flex-start; gap: 8px; line-height: 1.45; }
.imp-list .material-symbols-outlined { font-size: 18px; color: var(--prog-strong); margin-top: 1px; }
.imp-more { margin-top: 8px; font-size: 13px; }
.imp-more summary { cursor: pointer; font-weight: 500; }
.imp-more.bad summary { color: var(--danger); }
.imp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.radio-card.on { border-color: var(--prog); background: var(--prog-soft); }
.radio-card input { margin-top: 3px; }
.rc-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.ok-title .material-symbols-outlined { color: var(--ok); }
.exp-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 14px 0; }
.exp-format { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.exp-format .muted { line-height: 1.5; flex: 1; }
.exp-format .btn { margin-top: 6px; }
.jira-page .fg-cell, .jira-page .field { display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.imp-help { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.imp-help > summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.steps { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .issue-body, .home-grid { grid-template-columns: minmax(0, 1fr); }
  .issue-side { position: static; }
}
@media (max-width: 800px) {
  .imp-pick { grid-template-columns: 1fr; }
  .bl-row .epic-tag, .bl-row .kids { display: none; }
  .iss-table .c-sprint, .iss-table .c-created, .iss-table .c-num { display: none; }
}
@media (max-width: 700px) {
  #iss-main { padding: 14px 16px 24px; }
  .iss-search-kbd { display: none; }
  .page-head h1 { font-size: 20px; }
  .issue-title { font-size: 20px; }
  .tile-value { font-size: 24px; }
  .cf-grid, .cf-grid.three { grid-template-columns: minmax(0, 1fr); }
  .fb-search, .qf-text { width: 100%; }
  .board { grid-template-columns: repeat(var(--cols), minmax(78vw, 1fr)); }
  .col-head { top: -14px; }
  .bl-row .lozenge { display: none; }
  .dt-row { grid-template-columns: 96px minmax(0, 1fr); }
}
