:root {
  --border: #dfe1e6;
  --muted: #6b778c;
  --link: #0052cc;
  --alt: #f7f8f9;
}
* { box-sizing: border-box }
body {
  margin: 0;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #172b4d;
  background: #fff;
}
header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 2px solid var(--border);
}
.brand { font-weight: 700; font-size: 18px; text-decoration: none; color: #172b4d }
header.top nav a { margin-left: 14px }
header.top .user { margin-left: 14px; color: var(--muted) }
main { padding: 12px 16px }
a { color: var(--link); text-decoration: none }
a:hover { text-decoration: underline }

.qform textarea {
  width: 100%;
  font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  resize: vertical;
}
.qrow { display: flex; gap: 12px; margin-top: 6px; align-items: center }
.qrow label { flex: 1; display: flex; gap: 8px; align-items: center; color: var(--muted); white-space: nowrap }
.qrow input {
  font: 13px ui-monospace, Menlo, Consolas, monospace;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  flex: 1;
}
button {
  padding: 6px 18px;
  background: #0052cc;
  border: 0;
  color: #fff;
  border-radius: 3px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { background: #0747a6 }

.errbox {
  background: #ffebe6;
  border: 1px solid #ff8f73;
  color: #601e16;
  padding: 8px 12px;
  border-radius: 3px;
  margin: 10px 0;
}
.errbox ul { margin: 4px 0; padding-left: 20px }
.meta { color: var(--muted); margin: 10px 0 6px }

table.issues { border-collapse: collapse; width: 100% }
.issues th, .issues td {
  text-align: left;
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.issues td { white-space: nowrap }
.issues td.wrap { white-space: normal }
.issues thead th {
  position: sticky;
  top: 0;
  background: #f4f5f7;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.issues tbody tr:nth-child(even) { background: var(--alt) }
.issues tbody tr:hover { background: #e9f2ff }
/* issues the logged-in user is actively working on */
.issues tbody tr.hl, .issues tbody tr.hl:nth-child(even) { background: lightyellow }
.issues tbody tr.hl:hover { background: #fff3a8 }

.lz {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.lz-gray { background: #dfe1e6; color: #42526e }
.lz-yellow { background: #fff0b3; color: #974f0c }
.lz-green { background: #e3fcef; color: #006644 }

.chip {
  display: inline-block;
  background: #f4f5f7;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 6px;
  font-size: 12px;
  margin: 0 2px 2px 0;
  white-space: nowrap;
}
.muted { color: var(--muted) }
img.av { vertical-align: -3px; border-radius: 50% }
img.ic { vertical-align: -3px; border-radius: 2px }

.pager { margin: 12px 0; display: flex; gap: 4px; flex-wrap: wrap }
.pager a, .pager .cur, .pager .gap {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 3px;
  min-width: 30px;
  text-align: center;
}
.pager .cur { background: #0052cc; color: #fff; border-color: #0052cc; font-weight: 700 }
.pager .gap { border: 0 }

.hero { margin: 40px auto; text-align: center; color: var(--muted) }
.loginbtn {
  display: inline-block;
  background: #0052cc;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 3px;
  font-weight: 600;
}
table.fields code, main code { background: #f4f5f7; padding: 0 4px; border-radius: 3px }

/* --- single-issue page --- */
/* compact issue header inside the top bar */
.issue-head { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; margin: 0 6px }
.issue-head h1 { font-size: 16px; margin: 0; white-space: nowrap }
.issue-summary {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.issue-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start }
@media (max-width: 900px) { .issue-grid { grid-template-columns: 1fr } }
.issue-main h3, .issue-side h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin: 18px 0 8px;
}
.issue-side h4 { margin: 10px 0 4px; font-size: 13px }
.props { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 }
.props dt { color: var(--muted); white-space: nowrap }
.props dd { margin: 0; min-width: 0 }
.reflist { list-style: none; margin: 0; padding: 0 }
.reflist li { padding: 3px 0; border-bottom: 1px dotted var(--border) }
.reflist .refsum { color: #172b4d }
/* PR source branch: own line; one click selects the whole name for copying */
.prbranch {
  display: block;
  color: var(--muted);
  font: 12px/1.6 ui-monospace, Menlo, Consolas, monospace;
  user-select: all;
  -webkit-user-select: all;
}
.comment { border-top: 1px solid var(--border); padding: 8px 0 }
.comment-head { margin-bottom: 4px }
.adf p { margin: 6px 0 }
.adf pre {
  background: #f4f5f7;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px;
  overflow-x: auto;
  font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace;
}
.adf blockquote { border-left: 3px solid var(--border); margin: 6px 0; padding: 2px 12px; color: var(--muted) }
.adf .mention { background: #e9f2ff; border-radius: 8px; padding: 0 5px; white-space: nowrap }
.adf-tablewrap { overflow-x: auto }
.adf-table { border-collapse: collapse; margin: 8px 0 }
.adf-table th, .adf-table td { border: 1px solid var(--border); padding: 4px 8px; text-align: left }
.adf-table th { background: #f4f5f7 }
.adf .panel { border-radius: 3px; padding: 8px 12px; margin: 8px 0; background: #e9f2ff }
.adf .panel-warning { background: #fff0b3 }
.adf .panel-error { background: #ffebe6 }
.adf .panel-success { background: #e3fcef }
.adf .panel-note { background: #eae6ff }
.adf ul.tasks { list-style: none; padding-left: 8px }
.lz-red { background: #ffebe6; color: #ae2a19 }
.lz-blue { background: #e9f2ff; color: #0055cc }
.lz-purple { background: #eae6ff; color: #5e4db2 }
