*, *::before, *::after { box-sizing: border-box; margin: 0; }

:root {
  --bg: #181818;
  --text: #cccccc;
  --muted: #888888;
  --accent: #18648e;
  --max-width: 1024px;
  --element-spacing: 48px;
  --major-spacing: 12px;
  --minor-spacing: 4px;

  --border: #333333;
  --surface: #242424;
  --radius: 6px;

  --green: #4ade80;  --green-bg: #14241b;
  --amber: #fbbf24;  --amber-bg: #2a2212;
  --red:   #f87171;  --red-bg:   #2a1818;
  --blue:  #60a5fa;  --blue-bg:  #16233a;

  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

html { overflow-y: scroll; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: underline; text-underline-offset: 2px; color: inherit; }

p { line-height: 1.5; }

img, svg, video, canvas { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--major-spacing);
}

/* top bar */
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--element-spacing);
  padding-bottom: var(--element-spacing);
}
.brand { font-size: 18px; font-weight: 600; letter-spacing: -0.08em; }
.topbar nav { display: flex; align-items: center; gap: var(--element-spacing); }
.topbar nav a { display: flex; align-items: center; color: var(--muted); font-weight: 500; }
.topbar nav a:hover { color: var(--text); }
/* desktop shows text labels; the narrow media query swaps these for icons */
.topbar nav .nav-icon { display: none; }
.signin { font-weight: 500; }
.signin:hover { color: var(--muted); }

/* right-hand cluster: user menu */
.topbar-actions { display: flex; align-items: center; gap: var(--major-spacing); }

/* user menu dropdown (shared shell) */
.dropdown { position: relative; }
.user-menu-button { display: flex; }
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  margin-top: var(--minor-spacing);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  z-index: 10;
}
.dropdown.show .dropdown-content { display: block; }
.dropdown-content a {
  display: flex;
  align-items: center;
  gap: var(--major-spacing);
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
}
.dropdown-content a:hover { background: #2a2a2a; }

/* main area: centered flex row holding the sidebar + content */
.main { flex: 1; }
.layout {
  display: flex;
  gap: var(--element-spacing);
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--major-spacing);
}

/* wide variant: content fills the viewport instead of capping at --max-width */
.layout-wide { max-width: none; }

.sidebar {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--major-spacing);
}
.nav-group { display: flex; flex-direction: column; gap: var(--major-spacing); }
.nav-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.nav-title img { width: 14px; height: 14px; flex-shrink: 0; }
/* extra separation before each new group's title */
.nav-title:not(:first-child) { margin-top: var(--element-spacing); }
.nav-group:not(:first-child) { margin-top: var(--element-spacing); }
.sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.sidebar a svg, .sidebar a img { width: 14px; height: 14px; flex-shrink: 0; }
.sidebar a:hover { color: var(--text); }
.sidebar a.active { color: var(--accent); }

/* nav links (also used by the client-side rendered nav) */
.nav-link { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; text-decoration: none; }
.nav-link img, .nav-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent); }

.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--element-spacing);
}
.content h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.08em; line-height: 1; }
.content .lead {
  max-width: 42rem;
  font-size: 16px;
  letter-spacing: -0.08em;
  line-height: 1.5;
  color: #aaaaaa;
}

/* columns: a 12-column grid; size children with .col-1 .. .col-12 */
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--element-spacing);
}
.col-1  { grid-column: span 1; }
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }
/* columns stack their own content with major spacing */
.row > * { display: flex; flex-direction: column; gap: var(--major-spacing); min-width: 0; }

/* footer */
.footer-inner {
  padding-top: var(--element-spacing);
  padding-bottom: var(--element-spacing);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- components ---------- */

/* section wrapper for grouped content */
.section { display: flex; flex-direction: column; gap: var(--major-spacing); }
.section > h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.08em; }

/* page wrapper + long-form content */
.page { display: flex; flex-direction: column; gap: var(--element-spacing); }
.wiki-content { margin-top: var(--major-spacing); line-height: 1.6; max-width: 48rem; }
.wiki-content h1, .wiki-content h2, .wiki-content h3 { margin-bottom: var(--major-spacing); letter-spacing: -0.08em; line-height: 1.2; }
.wiki-content h1 { margin-top: 48px; font-size: 24px; font-weight: 700; }
.wiki-content h2 { margin-top: 36px; font-size: 18px; font-weight: 600; }
.wiki-content h3 { margin-top: 24px; font-size: 15px; font-weight: 600; }
.wiki-content > :first-child { margin-top: 0; }
.wiki-content p { margin-bottom: var(--major-spacing); }
.wiki-content pre { margin: var(--major-spacing) 0 20px; padding: var(--major-spacing); overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font-mono); font-size: 13px; line-height: 1.5; tab-size: 4; }
.wiki-content img { display: block; margin: 20px 0; border-radius: var(--radius); }

/* icon action buttons inside table / card action groups */
.actions button, .row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.actions button:hover, .row-actions button:hover { background: #2a2a2a; }
.actions button img, .row-actions button img { width: 14px; height: 14px; }

/* typography utilities */
.title { font-size: 18px; font-weight: 600; letter-spacing: -0.025em; color: var(--text); }
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.muted { color: var(--muted); }
.id { font-family: var(--font-mono); color: var(--muted); }
.separator { height: 1px; background: var(--border); }

/* breadcrumbs */
.breadcrumbs { display: flex; align-items: center; gap: var(--minor-spacing); font-size: 13px; color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { color: #555555; }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

/* forms */
.form { display: flex; flex-direction: column; gap: var(--major-spacing); }
.field { display: flex; flex-direction: column; gap: var(--minor-spacing); }
.field > label, .label { font-size: 13px; font-weight: 500; }
.input, .textarea, .select {
  font: inherit;
  width: 100%;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 25%, transparent);
}
.textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.checkbox { display: flex; align-items: center; gap: var(--minor-spacing); }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }
.input-invalid { border-color: var(--red); }
.input-validation-message { color: var(--red); font-size: 13px; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--minor-spacing); }
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--major-spacing); }
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--major-spacing); background: rgba(0, 0, 0, 0.6); }
.modal { display: flex; flex-direction: column; gap: var(--major-spacing); width: 100%; max-width: 420px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.modal-message { line-height: 1.5; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--minor-spacing);
  font: inherit;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
}
.btn:hover { background: #28b4ff; }
.btn svg, .btn img { width: 14px; height: 14px; flex-shrink: 0; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.actions button:disabled, .row-actions button:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.is-busy, .actions button.is-busy, .row-actions button.is-busy { cursor: progress; }
.is-busy img { animation: busy-spin 0.8s linear infinite; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #2a2a2a; }
.btn-danger { background: #a12d2d; }
.btn-danger:hover { background: #c03737; }

/* badges */
.badge-row { display: flex; flex-wrap: wrap; gap: var(--minor-spacing); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--minor-spacing);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius);
  background: #2a2a2a;
  color: #cccccc;
}
.badge svg, .badge img { width: 12px; height: 12px; flex-shrink: 0; vertical-align: -0.1em; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red   { background: var(--red-bg);   color: var(--red); }
.badge-blue  { background: var(--blue-bg);  color: var(--blue); }
button.badge {
  font-size: 12px;
  font-weight: 500;
  line-height: inherit;
  border: none;
  cursor: pointer;
}
button.badge:hover { box-shadow: inset 0 0 0 1px currentColor; }
.badge.badge-off { opacity: 0.5; }
a.badge { display: inline-block; cursor: pointer; }
a.badge svg, a.badge img { margin-right: var(--minor-spacing); }
a.badge:hover { text-decoration-thickness: 2px; }

/* badge-styled action button */
.badge-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--minor-spacing);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.badge-btn:hover { background: #2a2a2a; }
.badge-btn svg, .badge-btn img { width: 12px; height: 12px; flex-shrink: 0; }

.checklist { display: flex; flex-direction: column; gap: var(--minor-spacing); }
.checklist-progress { display: flex; align-items: center; gap: var(--major-spacing); }
.checklist-progress .progress { flex: 1; }
.checklist-count {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.checklist-item { display: flex; align-items: center; gap: var(--minor-spacing); }
.checklist-check {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px;
  border: none;
  background: none;
  cursor: pointer;
}
.checklist-check img { width: 16px; height: 16px; }
.checklist-input {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
}
.checklist-input:hover { border-color: var(--border); }
.checklist-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.checklist-input:disabled { cursor: progress; }
.checklist-done .checklist-input { color: var(--muted); text-decoration: line-through; }
.checklist-item .actions { display: flex; gap: var(--minor-spacing); margin-left: auto; }

/* progress bars */
.progress-group { display: flex; flex-direction: column; gap: var(--major-spacing); }
.progress { width: 100%; height: 8px; background: #333333; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); }

/* tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 0; }
.table th { font-size: 12px; font-weight: 600; color: var(--muted); }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
.table-wrap th, .table-wrap td { padding-right: 16px; vertical-align: top; }
.table-wrap th { white-space: nowrap; }
.table-wrap td.cell-wrap { overflow-wrap: anywhere; }
.actions-cell { width: 1%; white-space: nowrap; text-align: right; }
.row-actions { display: flex; gap: var(--minor-spacing); justify-content: flex-end; }

/* bar chart */
.bar-chart { position: relative; margin: 0 0 var(--major-spacing) 0; }
.bar-chart-plot { display: flex; gap: 8px; height: 160px; }
.bar-chart-axis { position: relative; width: 28px; flex-shrink: 0; }
.bar-chart-tick { position: absolute; right: 0; transform: translateY(50%); font-size: 11px; font-family: var(--font-mono); color: var(--muted); line-height: 1; }
.bar-chart-area { position: relative; flex: 1; min-width: 0; }
.bar-chart-grid { position: absolute; inset: 0; pointer-events: none; }
.bar-chart-gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.bar-chart-baseline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--muted); }
.bar-chart-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.bar-chart-slot { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; }
.bar-chart-slot:hover .bar-chart-bar, .bar-chart-slot:focus .bar-chart-bar { filter: brightness(1.25); }
.bar-chart-bar { width: 100%; max-width: 24px; background: var(--blue); border-radius: 4px 4px 0 0; min-height: 0; }
.bar-chart-bar-empty { background: transparent; }
.bar-chart-labels { display: flex; gap: 2px; margin-left: 36px; margin-top: 6px; }
.bar-chart-label { flex: 1; min-width: 0; text-align: center; font-size: 11px; font-family: var(--font-mono); color: var(--muted); white-space: nowrap; overflow: visible; }
.bar-chart-tooltip { position: absolute; top: -4px; transform: translate(-50%, -100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 8px; font-size: 12px; white-space: nowrap; pointer-events: none; display: flex; gap: 6px; align-items: baseline; z-index: 2; }
.bar-chart-tooltip[hidden] { display: none; }
.bar-chart-tooltip strong { color: var(--text); }
.bar-chart-tooltip span { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }

/* description list */
.desc-list { display: flex; flex-direction: column; }
.desc-list > div {
  display: flex;
  gap: var(--major-spacing);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.desc-list dt { width: 140px; flex-shrink: 0; color: var(--muted); }
.desc-list dd { line-height: 1.5; }

/* info rows: icon + label + value on one line */
.info-list { display: flex; flex-direction: column; gap: var(--major-spacing); }
.info-row { display: flex; align-items: center; gap: var(--minor-spacing); }
.info-row-icon { width: 14px; height: 14px; flex-shrink: 0; }
.info-row-label { font-family: var(--font-mono); text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }
.info-row-value { color: var(--text); }

/* stacked list */
.stacked-list { display: flex; flex-direction: column; }
.stacked-item {
  display: flex;
  flex-direction: column;
  gap: var(--minor-spacing);
  padding: 12px 0;
}
.stacked-item-highlighted { border-left: 3px solid var(--amber); padding-left: 12px; background: var(--amber-bg); }
.stacked-head { display: flex; align-items: center; gap: var(--minor-spacing); }
.stacked-head svg, .stacked-head img { width: 14px; height: 14px; flex-shrink: 0; }
.stacked-head .id { font-family: var(--font-mono); color: var(--muted); }
.stacked-head .name { font-weight: 600; }
.stacked-head .actions { margin-left: auto; display: flex; gap: var(--minor-spacing); }
.stacked-item .desc, .card .desc { font-size: 13px; line-height: 1.5; color: var(--muted); }

.stacked-item-graph { flex-direction: row; gap: 0; padding: 0; }
.stacked-item-graph .stacked-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--minor-spacing); padding: 12px 0; }
.commit-graph { position: relative; flex-shrink: 0; margin-right: var(--major-spacing); }
.commit-graph svg { display: block; }
.commit-graph-top { position: absolute; top: 0; left: 0; overflow: visible; }
.commit-graph-bottom { position: absolute; top: 19px; left: 0; width: 100%; height: calc(100% - 19px); } /* 19px = GRAPH_DOT_Y in html.js */
.commit-graph path { fill: none; stroke-width: 2; }

/* card grid: narrow cards that wrap side-by-side to fill the available width */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--major-spacing);
  align-items: start;
}
.card-grid-container {
  display: flex;
  flex-direction: column;
  gap: var(--major-spacing);
}
.card {
  display: flex;
  flex-direction: column;
  gap: var(--minor-spacing);
  padding: 0 0 0 var(--radius);
  border-radius: var(--radius);
}

/* task cards: fixed height with a colored priority accent on the left edge */
.task-card { height: 120px; border-left: var(--radius) solid; overflow: hidden; }
.task-card .name {
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-card .badge-row { margin-top: auto; }
.task-card.card-notified { background: #4a1414; }

/* alerts */
.alert-group { display: flex; flex-direction: column; gap: var(--major-spacing); }
.alert { padding: 12px 16px; line-height: 1.5; border-left: var(--radius) solid; border-radius: var(--radius); }
.alert-info    { background: var(--blue-bg);  border-color: var(--blue);  color: #bfdbfe; }
.alert-success { background: var(--green-bg); border-color: var(--green); color: #bbf7d0; }
.alert-warning { background: var(--amber-bg); border-color: var(--amber); color: #fde68a; }
.alert-error   { background: var(--red-bg);   border-color: var(--red);   color: #fecaca; }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--minor-spacing); }
.pagination a {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.pagination a:hover { background: #2a2a2a; }
.pagination a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination a.disabled { color: #555555; pointer-events: none; }

/* file upload */
.file-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
}
.file-upload-zone:hover, .file-upload-zone.dragover { border-color: var(--accent); background: #2a2a2a; }
.file-upload-zone .upload-icon { color: var(--muted); }
.file-upload-zone .upload-text { color: var(--muted); }

.attachment { display: flex; flex-direction: column; align-items: flex-start; gap: var(--minor-spacing); }
.attachment .btn { text-decoration: none; }
.attachment-preview { display: block; max-width: 100%; cursor: zoom-in; }
.attachment-preview img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* crash callstack / preformatted code */
.crash-callstack {
  margin: 0;
  padding: 12px;
  background: #111111;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
}

/* CI job log: colored terminal output */
.ci-log {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
}

/* nested sections indent like a real terminal tree */
.ci-log-body .ci-log-group { margin-left: 1ch; }

.ci-log-header {
  display: flex;
  align-items: baseline;
  gap: 1ch;
  white-space: pre;
}

/* only the caret + title toggle expansion; underlined to read as clickable */
.ci-log-toggle { cursor: pointer; user-select: none; }
.ci-log-toggle:hover .ci-log-title { color: #ffffff; }
.ci-log-caret { color: var(--muted); margin-right: 1ch; }
.ci-log-caret::before { content: "\25B8"; }
.ci-log-group.open > .ci-log-header > .ci-log-toggle > .ci-log-caret::before { content: "\25BE"; }
.ci-log-title { text-decoration: underline; text-underline-offset: 2px; }
.ci-log-group.ci-log-error > .ci-log-header > .ci-log-toggle > .ci-log-title { color: var(--red); }

/* per-section duration, muted, sitting just left of the status */
.ci-log-time { margin-left: auto; color: var(--muted); white-space: pre; }
/* with a time present the status no longer needs to claim the free space */
.ci-log-time + .ci-log-status { margin-left: 0; }

/* status: pushed to the right; either a text progress bar or a tag */
.ci-log-status { margin-left: auto; white-space: pre; }

/* overall wall-clock total, pinned to the bottom of the terminal */
.ci-log-overall { margin-top: 6px; color: var(--muted); white-space: pre; }

/* terminal tag: solid background block with contrasting dark text */
.ci-tag { padding: 0 1ch; font-weight: 600; color: #0d0d0d; }
.ci-tag-green { background: var(--green); }
.ci-tag-red   { background: var(--red); }
.ci-tag-blue  { background: var(--blue); color: #0d0d0d; }
.ci-tag-blue { animation: ci-log-blink 1.4s step-end infinite; }
@keyframes ci-log-blink { 50% { opacity: 0.55; } }

/* first error echoed below the header, red, visible while collapsed */
.ci-log-error-summary {
  display: none;
  padding-left: 3ch;
  color: var(--red);
  white-space: pre-wrap;
  word-break: break-all;
}

.ci-log-body { display: none; padding-left: 3ch; white-space: pre-wrap; word-break: break-all; }
.ci-log-group.open > .ci-log-body { display: block; }
.ci-log-line { white-space: pre-wrap; word-break: break-all; }
.ci-log-line.ci-log-error { color: var(--red); }

/* palette for colored runs of terminal text (fg = text, bg = highlight) */
.ci-fg-green { color: var(--green); }
.ci-fg-amber { color: var(--amber); }
.ci-fg-red   { color: var(--red); }
.ci-fg-blue  { color: var(--blue); }
.ci-fg-muted { color: var(--muted); }
.ci-bg-green { background: var(--green); color: #0d0d0d; }
.ci-bg-amber { background: var(--amber); color: #0d0d0d; }
.ci-bg-red   { background: var(--red);   color: #0d0d0d; }
.ci-bg-blue  { background: var(--blue);  color: #0d0d0d; }
.ci-bg-muted { background: var(--muted); color: #0d0d0d; }

/* mono label treatment: monospace + uppercase for labels and controls */
.table th,
.field > label,
.desc-list dt,
.badge,
.breadcrumbs {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* dark mode: render the monochrome <img> icons light (invert(80%) maps black -> #cccccc); the logo is left untouched */
.sidebar a img, .nav-link img, .nav-title img,
.btn img, .badge img, .badge-btn img,
.stacked-head img, .info-row-icon,
.actions button img, .row-actions button img, .checklist-check img,
.dropdown-content a img, .user-menu-button img,
img.icon {
  filter: invert(80%);
}

/* responsive: stack the sidebar above the content on narrow screens */
@media (max-width: 640px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .row > [class*="col-"] { grid-column: 1 / -1; }

  /* swap the top-bar text links for icons, kept inline next to the user menu */
  .topbar nav { gap: var(--major-spacing); }
  .topbar nav .nav-text { display: none; }
  .topbar nav .nav-icon { display: block; }

  /* keep wide content from spilling off the right edge */
  .table { display: block; overflow-x: auto; }
  .desc-list > div { flex-direction: column; gap: var(--minor-spacing); }
  .desc-list dt { width: auto; }
}
