/* Forge — dark-first. All colour comes from the tokens below. */
:root {
  --bg: #0e0f11;
  --surface: #16171a;
  --surface-2: #1c1e22;
  --surface-3: #24272c;
  --surface-hover: #2a2d33;
  --border: #2a2d33;
  --border-strong: #3a3e46;
  --text: #e8e9eb;
  --text-2: #a9adb5;
  --text-3: #737882;
  --accent: #f97316;
  --accent-hover: #fb8a3a;
  --accent-text: #1a0d02;
  --accent-weak: rgba(249, 115, 22, .14);
  --accent-line: rgba(249, 115, 22, .45);
  --danger: #f05252;
  --danger-weak: rgba(240, 82, 82, .14);
  --ok: #34c77b;
  --ok-weak: rgba(52, 199, 123, .14);
  --warn: #f5b041;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 .75em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
[hidden] { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ------------------------------------------------------------ forms */
input, select, textarea, button { font: inherit; color: inherit; }
input:where(:not([type=checkbox]):not([type=radio])), select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  min-height: 34px;
}
input:disabled, select:disabled, textarea:disabled { opacity: .6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
input[type=date] { color-scheme: dark; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span:first-child { font-weight: 600; font-size: 13px; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span { display: flex; align-items: center; padding: 0 10px; background: var(--surface-3); border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--text-2); }
.input-prefix > input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
.input-key { text-transform: uppercase; font-family: var(--mono); max-width: 160px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.row-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.row-form > input, .row-form > select { width: auto; flex: 1 1 160px; }
.inline-form { display: inline; }
.copy-row { display: flex; gap: 8px; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 6px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-3); color: var(--text);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { min-height: 28px; padding: 3px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.danger, .btn-ghost.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-weak); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; background: transparent; color: var(--text-2); border-radius: var(--radius-sm); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-weak); }

/* ------------------------------------------------------------ chrome */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 16px;
  background: rgba(14, 15, 17, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 750; letter-spacing: .01em; font-size: 15px; }
.brand:hover { color: var(--text); text-decoration: none; }
.crumb-sep { color: var(--text-3); }
.crumb { color: var(--text); font-weight: 600; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb:hover { color: var(--text); }
.tabs { display: flex; gap: 2px; margin-left: 10px; }
.tabs a { padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 550; }
.tabs a:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }
.tabs a.active { color: var(--text); background: var(--surface-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-link { color: var(--text-2); font-weight: 550; }
.topbar-link:hover { color: var(--text); text-decoration: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-weak); }
.live-dot.offline { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 176, 65, .15); }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column;
}
.menu-right .menu-panel { right: 0; }
.menu-head { display: flex; flex-direction: column; padding: 6px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 13px; }
.menu-panel a, .menu-item {
  display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text); background: none; border: 0; cursor: pointer; font-weight: 500;
}
.menu-panel a:hover, .menu-item:hover { background: var(--surface-3); text-decoration: none; color: var(--text); }
.menu-item.danger { color: var(--danger); }
.menu-item:disabled { opacity: .45; cursor: not-allowed; }
.avatar-button { border-radius: 50%; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: var(--av, #5b6170); color: #fff;
}
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar.empty { background: transparent; border: 1px dashed var(--border-strong); color: var(--text-3); }

.page { max-width: 1100px; margin: 0 auto; padding: 28px 16px 64px; }
.page-narrow { max-width: 680px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card-danger { border-color: rgba(240, 82, 82, .3); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; }
.admin-grid > .card { margin-bottom: 18px; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }

.notice { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 14px; }
.notice p:last-child { margin: 0; }
.notice-ok { background: var(--ok-weak); border-color: rgba(52, 199, 123, .35); }
.notice-error { background: var(--danger-weak); border-color: rgba(240, 82, 82, .4); }

.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 650; background: var(--accent-weak); color: var(--accent); vertical-align: 2px; }
.pill-muted { background: var(--surface-3); color: var(--text-2); }
.key-chip, .task-ref { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.key-chip { padding: 1px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); }
.version-chip { font-family: var(--mono); font-size: 15px; padding: 2px 8px; border-radius: 6px; background: var(--accent-weak); color: var(--accent); vertical-align: 3px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table a { color: var(--text); }
.table a:hover { color: var(--accent); text-decoration: none; }
.table select { width: auto; min-width: 120px; }
.row-muted td { opacity: .55; }
.card .table { margin: 0 -10px; width: calc(100% + 20px); }
@media (max-width: 700px) {
  .table { display: block; overflow-x: auto; }
}

.empty-state { text-align: center; padding: 56px 16px; max-width: 520px; margin: 0 auto; }
.empty-code { font-family: var(--mono); color: var(--accent); font-size: 13px; margin-bottom: 6px; }
.plain-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }

.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(480px, calc(100% - 32px)); }
.toast { pointer-events: auto; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
.toast.error { border-color: rgba(240, 82, 82, .55); }

/* ------------------------------------------------------------ auth */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(800px 400px at 50% -10%, rgba(249, 115, 22, .12), transparent 70%); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; margin-bottom: 22px; }
.auth-card h1 { font-size: 20px; }
.auth-foot { text-align: center; margin: 16px 0 0; font-size: 13px; }

/* ------------------------------------------------------------ dashboard */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 26px; }
.project-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); min-height: 150px; }
.project-card:hover { border-color: var(--accent-line); text-decoration: none; color: var(--text); background: var(--surface-2); }
.project-card h2 { margin: 2px 0 0; }
.project-card p { margin: 0; font-size: 13px; }
.project-card-head { display: flex; justify-content: space-between; align-items: center; }
.project-card-stats { margin-top: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); padding-top: 10px; }
.project-card-stats strong { color: var(--text); }
.archived-list { margin-bottom: 26px; color: var(--text-2); }
.archived-list summary { cursor: pointer; }
.my-tasks { margin-top: 10px; }
.due-overdue { color: var(--danger); font-weight: 600; }
.due-soon { color: var(--warn); font-weight: 600; }

/* ------------------------------------------------------------ labels */
.lbl-slate { --c: #9aa3b2; } .lbl-red { --c: #f87171; } .lbl-orange { --c: #fb923c; } .lbl-amber { --c: #fbbf24; }
.lbl-green { --c: #4ade80; } .lbl-teal { --c: #2dd4bf; } .lbl-blue { --c: #60a5fa; } .lbl-indigo { --c: #818cf8; }
.lbl-violet { --c: #c084fc; } .lbl-pink { --c: #f472b6; }
.label-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 650; line-height: 18px; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
}
button.label-chip { cursor: pointer; opacity: .45; }
button.label-chip.on { opacity: 1; }
button.label-chip:hover { opacity: .85; }
.label-rows .row-form .label-chip { min-width: 80px; justify-content: center; }

/* ------------------------------------------------------------ board */
.board-page { padding: 0; display: flex; flex-direction: column; height: calc(100vh - 52px); }
.board-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.board-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.board-filters input { width: 220px; }
.board-filters select { width: auto; min-width: 140px; }
.board {
  flex: 1; display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px 24px; overflow-x: auto; overflow-y: hidden;
}
.board-loading { padding: 20px; }
.column {
  flex: 0 0 290px; max-height: 100%; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.column.release { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(249, 115, 22, .07), var(--surface) 120px); }
.column-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px 12px; }
.column-head.draggable { cursor: grab; }
.column-name { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-name input { min-height: 28px; padding: 3px 7px; font-weight: 650; }
.column-count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.column.release .column-name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 7px; vertical-align: 1px; }
.column-release-bar { padding: 0 10px 8px; }
.column-release-bar .btn { width: 100%; }
.cards { flex: 1; overflow-y: auto; padding: 2px 8px 6px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.column-foot { padding: 4px 8px 8px; }
.add-task-btn { width: 100%; justify-content: flex-start; color: var(--text-2); font-weight: 550; }
.add-task-form textarea { min-height: 60px; resize: none; }
.add-task-form .form-actions { margin-top: 6px; justify-content: flex-start; }
.add-column { flex: 0 0 240px; }
.add-column .btn { width: 100%; justify-content: flex-start; border-style: dashed; background: transparent; color: var(--text-2); }

.card-task {
  position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 11px; cursor: pointer; user-select: none;
  transition: border-color .12s, background .12s;
}
.card-task:hover { border-color: var(--border-strong); background: var(--surface-3); }
.card-task:focus-visible { box-shadow: var(--focus); }
.card-task.open { border-color: var(--accent); }
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card-title { font-weight: 550; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--text-3); font-size: 12px; }
.card-meta .spacer { flex: 1; }
.meta { display: inline-flex; align-items: center; gap: 3px; }
.meta svg { width: 13px; height: 13px; }
.meta.done { color: var(--ok); }
.meta.due-overdue { color: var(--danger); }
.meta.due-soon { color: var(--warn); }
.prio { display: inline-flex; align-items: center; }
.prio svg { width: 13px; height: 13px; }
.prio-1 { color: #9aa3b2; } .prio-2 { color: #fbbf24; } .prio-3 { color: #fb923c; } .prio-4 { color: #f87171; }
.sortable-ghost { opacity: .35; }
.sortable-chosen { box-shadow: var(--shadow); }
.sortable-drag { transform: rotate(2deg); }
.column.sortable-ghost { opacity: .4; }

/* ------------------------------------------------------------ drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: min(620px, 100%); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.drawer:focus { outline: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--border); }
.drawer-head-actions { margin-left: auto; display: flex; gap: 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 40px; }
.drawer-title { font-size: 20px; font-weight: 650; line-height: 1.3; border: 1px solid transparent !important; background: transparent !important; padding: 4px 6px !important; margin: 0 -7px 10px; resize: none; overflow: hidden; }
.drawer-title:hover { border-color: var(--border-strong) !important; }
.drawer-title:focus { border-color: var(--accent) !important; background: var(--surface-2) !important; }
.drawer-title[readonly] { cursor: default; }
.drawer-title[readonly]:hover { border-color: transparent !important; }
.props { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; align-items: center; margin-bottom: 22px; }
.props > .prop-label { color: var(--text-2); font-size: 13px; }
.props select, .props input { max-width: 280px; }
.props .label-picker { display: flex; flex-wrap: wrap; gap: 5px; }
.prop-value { min-height: 30px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drawer-section { margin-top: 24px; }
.drawer-section > h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin-bottom: 10px; }
.drawer-section > h3 .count { color: var(--text-3); font-weight: 500; }
.description { min-height: 110px; }
.text-block { white-space: pre-wrap; overflow-wrap: anywhere; }
.text-block a { overflow-wrap: anywhere; }
.mention { color: var(--accent); font-weight: 600; }

.progress { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex: 1; max-width: 180px; }
.progress > span { display: block; height: 100%; background: var(--ok); width: 0; }
.checklist { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: var(--radius-sm); }
.check-item:hover { background: var(--surface-2); }
.check-item .text { flex: 1; overflow-wrap: anywhere; }
.check-item.done .text { color: var(--text-3); text-decoration: line-through; }
.check-item .icon-btn { width: 24px; height: 24px; opacity: 0; }
.check-item:hover .icon-btn, .check-item .icon-btn:focus-visible { opacity: 1; }
.add-row { display: flex; gap: 8px; }

.dropzone { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 14px; text-align: center; color: var(--text-2); cursor: pointer; }
.dropzone.over { border-color: var(--accent); background: var(--accent-weak); color: var(--text); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.file { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 0; }
.file a { color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .thumb { display: block; height: 90px; border-radius: 4px; background: var(--surface-3) center/cover no-repeat; overflow: hidden; }
.file .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file .icon-btn { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; background: rgba(0, 0, 0, .55); color: #fff; }

.timeline { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.event { display: flex; gap: 8px; font-size: 13px; color: var(--text-3); align-items: baseline; }
.event strong { color: var(--text-2); font-weight: 600; }
.comment { display: flex; gap: 10px; }
.comment-body { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; }
.comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.comment-head .muted { font-size: 12px; }
.comment-actions { margin-left: auto; display: flex; gap: 4px; }
.comment-actions button { background: none; border: 0; color: var(--text-3); cursor: pointer; font-size: 12px; padding: 0 2px; }
.comment-actions button:hover { color: var(--text); }
.composer { position: relative; display: flex; flex-direction: column; gap: 8px; }
.composer textarea { min-height: 70px; }
.composer .form-actions { justify-content: space-between; align-items: center; }
.mention-list { position: absolute; left: 0; bottom: calc(100% + 4px); z-index: 5; min-width: 220px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; }
.mention-list button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 6px 8px; background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; text-align: left; }
.mention-list button.active, .mention-list button:hover { background: var(--surface-3); }

/* ------------------------------------------------------------ dialogs and releases */
.dialog { border: 1px solid var(--border-strong); border-radius: 12px; padding: 0; background: var(--surface); color: var(--text); width: min(520px, calc(100% - 32px)); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(0, 0, 0, .55); }
.dialog-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog-body h2 { margin: 0; font-size: 18px; }
.dialog-body p { margin: 0; }
.release-preview { margin: 0; padding: 8px 12px; list-style: none; max-height: 200px; overflow-y: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.release-preview li { padding: 3px 0; overflow-wrap: anywhere; }
.release-notes { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; }

/* ------------------------------------------------------------ small screens */
@media (max-width: 720px) {
  .topbar { gap: 6px; padding: 0 12px; }
  .brand span { display: none; }
  .crumb { max-width: 14ch; }
  .tabs { margin-left: 0; }
  .tabs a { padding: 6px 7px; }
  .topbar-link { display: none; }
  .board-filters input { width: 100%; }
  .board-filters { width: 100%; }
  .board-filters select { flex: 1; min-width: 0; }
  .column { flex-basis: 84vw; }
  .props { grid-template-columns: 1fr; gap: 4px; }
  .props > .prop-label { margin-top: 6px; }
  .drawer-body { padding: 16px 16px 40px; }
  .page { padding: 20px 16px 48px; }
}

/* ------------------------------------------------------------ code links */
.subhead { margin-top: 22px; }
.link-repo { margin-top: 12px; gap: 8px; }
.link-repo .check { align-items: flex-start; font-size: 13px; color: var(--text-2); }
.link-repo .check input { margin-top: 2px; }
.code-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.code-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.code-item svg { flex: none; color: var(--text-3); }
.code-item a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.code-item a:hover { color: var(--accent); }
.code-item .sha { font-family: var(--mono); font-size: 12px; color: var(--text-2); flex: none; }
.code-item .where { margin-left: auto; flex: none; font-size: 12px; color: var(--text-3); }
.code-item.deleted a { text-decoration: line-through; color: var(--text-3); }
.pr-state { flex: none; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 99px; }
.pr-open { color: var(--ok); background: var(--ok-weak); }
.pr-merged { color: #c084fc; background: rgba(192, 132, 252, .15); }
.pr-closed { color: var(--danger); background: var(--danger-weak); }
.meta.code-open { color: var(--ok); }
.meta.code-merged { color: #c084fc; }
