* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #141414;
  --surface: #1a1a1a;
  --border: #333;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --text: #f6f6f6;
  --text-dim: #545454;
  --success: #22c55e;
  --warning: #eab308;
  --aax: #d97706;
}

body {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  font-size: 14px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  height: 40px;
  width: auto;
}

h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0;
}

.header-bottom {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* Tab buttons (shared by all tabs: text tabs + runner tabs) */
a.tab-btn,
a.tab-btn:visited,
a.tab-btn:link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

a.tab-btn:hover {
  background: var(--border);
  color: var(--text);
}
a.tab-btn:hover .runner-os { color: var(--text); }

a.tab-btn.active,
a.tab-btn.active:visited {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
a.tab-btn.active .runner-os { color: var(--text); }

/* Runner tab: dim when offline, restore on hover/active */
a.tab-btn.is-offline { opacity: 0.5; }
a.tab-btn.is-offline:hover,
a.tab-btn.is-offline.active { opacity: 1; }

.runner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-dim);
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: transparent;
  transition: background 0.3s ease;
}
.runner-dot.online { background: var(--success); }
.runner-dot.busy { background: var(--accent); color: #fff; }
.runner-dot.busy::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  animation: ring-spin 1s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
.runner-os {
  flex-shrink: 0;
  color: var(--text-dim);
}
.runner-meters {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.runner-meter {
  width: 60px;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.runner-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--success);
  transition: width 0.8s ease, background-color 0.8s ease;
}

/* ── Runner page ─────────────────────────────────────────────────── */
.runner-page h2 {
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.runner-page-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.runner-page-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
  position: relative;
  transition: background 0.3s ease;
}
.runner-page-dot.online { background: var(--success); }
.runner-page-dot.busy { background: var(--accent); }
.runner-page-dot.busy::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  animation: ring-spin 1s linear infinite;
}

.runner-page-os { flex-shrink: 0; color: var(--text-dim); }

.runner-page-status {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-left: auto;
}
.runner-page-status.online { color: var(--success); }
.runner-page-status.busy { color: var(--accent); }
.runner-page-status.offline { color: var(--text-dim); }

.runner-job-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.runner-job-link:hover { text-decoration: underline; }

.runner-page-meters {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.runner-page-meter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.runner-page-meter .meter-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
  min-width: 52px;
}

.meter-bar {
  flex: 1;
  max-width: 240px;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--success);
  transition: width 0.8s ease, background-color 0.8s ease;
}

.meter-value {
  font-size: 0.8rem;
  color: var(--text-dim);
  min-width: 36px;
}

.runner-page-actions {
  display: flex;
  gap: 0.75rem;
}

.runner-action-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--text-dim);
  transition: background 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}
.runner-action-btn:hover:not(:disabled) {
  background: var(--border);
  color: var(--text);
}
.runner-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.runner-action-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.runner-action-btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.runner-action-btn.pending {
  opacity: 0.6;
}

/* Placeholder for empty pages */
.placeholder {
  color: var(--text-dim);
  text-align: center;
  padding: 3rem;
}

/* Build page: repo input row */
.repo-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.repo-row input {
  flex: 1;
}

.repo-row input.locked {
  opacity: 0.6;
  pointer-events: none;
}

/* Arrow / go button */
.btn-go {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-go:hover:not(:disabled) {
  background: #444;
  color: var(--text);
}

.btn-go.ready {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-go.ready:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-go:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Reset (X) button */
.btn-reset-sm {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
}

.btn-reset-sm:hover {
  background: var(--border);
  color: var(--text);
}

/* Branch dropdown */
.branch-select {
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  max-width: 200px;
  transition: border-color 0.3s ease;
}

.branch-select:focus {
  outline: none;
  border-color: var(--accent);
}

.repo-status {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  min-height: 1.2em;
  color: var(--text-dim);
}

.repo-status.success { color: var(--success); }
.repo-status.error { color: #ef4444; }

/* Build page: config display */
.config-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.5rem;
}

.config-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.2rem 0;
  font-size: 0.85rem;
}

.config-label {
  color: var(--text-dim);
  min-width: 80px;
  font-weight: 500;
}

.config-value {
  color: var(--text);
}

h2 {
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

/* Form inputs */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* Side-by-side platforms */
.platforms-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.platform-section h2 { margin-top: 0; }

/* Divider between binaries and presets */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.75rem 0;
}

/* Drop zones */
.drop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.drop-zone {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
}

.drop-zone.has-file {
  border-color: var(--success);
  border-style: solid;
  background: rgba(34, 197, 94, 0.06);
}

.drop-zone .format-label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.drop-zone .file-info {
  font-size: 0.7rem;
  color: var(--text-dim);
  word-break: break-all;
}

.drop-zone .file-info.ready {
  color: var(--success);
}

/* AAX special styling */
.drop-zone.aax-zone {
  border-color: rgba(217, 119, 6, 0.3);
  background: rgba(217, 119, 6, 0.03);
}

.drop-zone.aax-zone:hover,
.drop-zone.aax-zone.drag-over {
  border-color: var(--aax);
  background: rgba(217, 119, 6, 0.08);
}

.drop-zone.aax-zone.has-file {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.06);
}

.aax-badge {
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--aax);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 3px;
  padding: 0.08rem 0.25rem;
  vertical-align: middle;
  margin-left: 0.2rem;
}

/* Buttons */
.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

button {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s ease, opacity 0.3s ease;
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#btn-submit {
  background: var(--accent);
  color: #fff;
}

#btn-submit:hover:not(:disabled) {
  background: var(--accent-hover);
}

#btn-reset {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

#btn-reset:hover {
  background: var(--border);
  color: var(--text);
}

.submit-status {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Status panel */

.status-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.status-indicator.queued { background: var(--warning); }
.status-indicator.in_progress { background: var(--accent); animation: pulse 1.2s infinite; }
.status-indicator.completed { background: var(--success); }
.status-indicator.failure { background: #ef4444; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.job-list {
  list-style: none;
  margin-top: 0.5rem;
}

.job-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.8rem;
}

.gh-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
}

.gh-link:hover { text-decoration: underline; }

/* Download panel */
.download-list {
  list-style: none;
}

.download-list li {
  padding: 0.4rem 0;
}

.download-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.download-list a:hover { text-decoration: underline; }

.download-list .size {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

/* ── Test page ─────────────────────────────────────────────────────── */

/* Source toggle */
.source-toggle {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.toggle-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  transition: background 0.3s ease, color 0.3s ease;
}

.toggle-btn:hover {
  background: var(--border);
  color: var(--text);
}

.toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Installer drop zones (side-by-side) */
.installer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.installer-drop-zone {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.installer-drop-zone:hover,
.installer-drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
}

.installer-drop-zone.has-file {
  border-color: var(--success);
  border-style: solid;
  background: rgba(34, 197, 94, 0.06);
}

.installer-drop-zone .format-label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.installer-drop-zone .file-info {
  font-size: 0.7rem;
  color: var(--text-dim);
  word-break: break-all;
}

.installer-drop-zone .file-info.ready {
  color: var(--success);
}

/* From-run mode */
.runs-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn-secondary {
  padding: 0.4rem 0.85rem;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

.runs-status {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.runs-list {
  max-height: 360px;
  overflow-y: auto;
}

/* Run dropdown */
.run-dropdown {
  margin-bottom: 0.35rem;
}

.run-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.run-dropdown-header:hover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.04);
}

.run-dropdown-header.open {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.run-arrow {
  font-size: 0.6rem;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.run-dropdown-header.open .run-arrow {
  transform: rotate(90deg);
}

.run-name {
  font-weight: 500;
  flex: 1;
}

.run-conclusion {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.run-conclusion.success { color: var(--success); }
.run-conclusion.failure { color: #ef4444; }

.run-date {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.run-artifact-count {
  font-size: 0.65rem;
  color: var(--text-dim);
  background: var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  min-width: 1.2rem;
  text-align: center;
}

/* Dropdown body */
.run-dropdown-body {
  border: 1px solid var(--accent);
  border-top: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  padding: 0.25rem;
  background: rgba(37, 99, 235, 0.02);
}

.artifact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.artifact-item:hover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.04);
}

.artifact-item.selected {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.06);
}

.artifact-name {
  flex: 1;
  font-weight: 500;
}

.artifact-platform {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.artifact-size {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Checkbox groups */
.checkbox-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.checkbox-group {
  margin-bottom: 0;
}

.group-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

label.cb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 0;
}

label.cb input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
}

.platform-badge {
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 3px;
  padding: 0.08rem 0.25rem;
  vertical-align: middle;
  margin-left: 0.15rem;
}

.config-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Test results panel */
#results-panel {
  display: none;
}

.result-job {
  margin-bottom: 1rem;
}

.result-job:last-child {
  margin-bottom: 0;
}

.result-job-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.result-step {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.8rem;
}

.result-step-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-step-header.expandable {
  cursor: pointer;
  border-radius: 3px;
  padding: 0.15rem 0.25rem;
  margin: -0.15rem -0.25rem;
  transition: background 0.2s ease;
}

.result-step-header.expandable:hover {
  background: rgba(239, 68, 68, 0.06);
}

.result-arrow {
  font-size: 0.55rem;
  color: #ef4444;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  width: 10px;
}

.result-step-header.open .result-arrow {
  transform: rotate(90deg);
}

.result-step-details {
  margin-top: 0.35rem;
  margin-left: 1.5rem;
  border-left: 2px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.04);
  border-radius: 0 4px 4px 0;
  padding: 0.5rem 0.75rem;
}

.failure-detail-content {
  font-family: "SF Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

.result-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.result-step.success .result-icon { color: var(--success); }
.result-step.failure .result-icon { color: #ef4444; }
.result-step.skipped .result-icon { color: var(--text-dim); }

.result-name {
  flex: 1;
}

.result-conclusion {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.result-step.success .result-conclusion { color: var(--success); }
.result-step.failure .result-conclusion { color: #ef4444; }

/* ── Format toggle buttons (test page) ────────────────────────────── */

.format-toggles { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.format-toggle {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.6rem 1.2rem; background: transparent;
  color: var(--text-dim); font-weight: 600; font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s ease;
}
.format-toggle:hover { border-color: var(--accent); color: var(--text); }
.format-toggle.active {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.1); color: var(--text);
}

/* Cleanup toggle (orange variant) */
.format-toggles-divider {
  width: 1px; background: var(--border);
  align-self: stretch; margin: 0 0.25rem;
}
.format-toggle.cleanup-toggle:hover { border-color: var(--aax); color: var(--text); }
.format-toggle.cleanup-toggle.active {
  border-color: var(--aax);
  background: rgba(217, 119, 6, 0.1); color: var(--text);
}

/* ── Test configure collapsible ───────────────────────────────────── */

.test-configure { margin-top: 0.75rem; }
.test-configure summary {
  font-size: 0.75rem; color: var(--text-dim);
  cursor: pointer; list-style: none;
}
.test-configure summary::-webkit-details-marker { display: none; }
.test-configure summary::before { content: ""; }
.test-configure summary:hover { color: var(--text); }
.test-configure .configure-body { margin-top: 0.75rem; }

/* ── Build page: test chaining panel ──────────────────────────────── */

.test-status-panel { display: none; }

#run-tests-label {
  margin-top: 0.75rem;
}

/* ── Login Overlay ────────────────────────────────────────────────── */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 340px;
  width: 100%;
}

.login-logo {
  height: 48px;
  margin-bottom: 1.25rem;
}

.login-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 0.3rem;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.login-denied {
  color: #ef4444;
}

.btn-google {
  width: 100%;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-google:hover {
  background: #e8e8e8;
}

/* ── Header User Info ─────────────────────────────────────────────── */

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.user-email {
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signout-link {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.signout-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  /* Header: stack into two rows */
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .header-top {
    justify-content: flex-start;
  }

  h1 {
    font-size: 1.15rem;
  }

  .header-bottom {
    justify-content: space-between;
  }

  .user-email {
    display: none;
  }

  .format-toggles {
    gap: 0.35rem;
  }

  .format-toggle {
    padding: 0.5rem 0.9rem;
    font-size: 0.75rem;
  }

  /* All 2-col and 3-col grids → single column */
  .platforms-row,
  .config-grid,
  .config-grid-3,
  .config-display,
  .drop-grid,
  .installer-row,
  .checkbox-groups {
    grid-template-columns: 1fr;
  }

  /* Section padding */
  section {
    padding: 1rem;
  }

  /* Repo input row */
  .repo-row {
    flex-wrap: wrap;
  }

  .repo-row input {
    min-width: 0;
  }

  .branch-select {
    max-width: none;
    flex: 1;
  }

  /* Run dropdowns: allow text wrapping */
  .run-dropdown-header {
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
  }

  .run-name {
    min-width: 0;
  }

  /* Login card: margin for small screens */
  .login-card {
    margin: 1rem;
  }
}

/* ── Workflow timers ──────────────────────────────────────────────── */

.job-timer {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  white-space: nowrap;
}

.step-timer {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Step progress bar ───────────────────────────────────────────── */

.step-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
  margin-left: 1.6rem;
}

.step-progress {
  flex: 1;
  max-width: 240px;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.step-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.step-progress-fill.indeterminate {
  width: 40% !important;
  animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

@media (max-width: 480px) {
  body {
    padding: 0.75rem;
    font-size: 13px;
  }

  .header {
    gap: 0.4rem;
  }

  .logo {
    height: 32px;
  }

  h1 {
    font-size: 1rem;
  }

  a.tab-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  .runner-meters {
    display: none;
  }

  /* Drop zones smaller */
  .drop-zone {
    min-height: 64px;
    padding: 0.75rem 0.5rem;
  }

  .installer-drop-zone {
    min-height: 72px;
    padding: 1rem 0.75rem;
  }

  /* Actions stack */
  .actions {
    flex-wrap: wrap;
  }

  .submit-status {
    width: 100%;
  }
}
