/* ImageLab chrome styles. */

html, body {
  font: 13.5px/1.5 var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  margin: 0;
}

a {
  color: var(--accent);
}

h1, h2, h3, .h1, .h2, .h3 {
  letter-spacing: 0.2px;
  font-weight: 600;
}

h1, .h1 { font-size: 20px; line-height: 1.25; }
h2, .h2 { font-size: 16px; line-height: 1.3; }
h3, .h3 { font-size: 13px; line-height: 1.35; }
.blankslate-heading { font-size: 14px; font-weight: 600; }

code, kbd, pre, .imagelab-timeline-row {
  font-family: var(--font-mono);
}

code {
  background: var(--panel2);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--ink);
  font-size: 12px;
}

/* --- Primer controls, restyled to the demo --- */

.btn,
button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px 13px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.3;
  box-shadow: none;
}

.btn:hover,
button.ghost:hover {
  background: var(--code);
  border-color: var(--faint);
  color: var(--ink);
  text-decoration: none;
}

.btn-primary,
button.primary {
  background: var(--accent2) !important;
  border: 1px solid var(--line) !important;
  color: var(--color-fg-on-emphasis) !important;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover,
button.primary:hover {
  background: var(--accent2) !important;
  filter: brightness(0.88);
}

.btn-primary:disabled,
button.primary:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-large {
  padding: 10px 18px;
  font-size: 14px;
}

.btn-sm {
  padding: 5px 9px;
  font-size: 12px;
}

.btn-invisible,
.linkish {
  background: transparent;
  border: 0;
  color: var(--accent);
  padding: 0;
  font-size: 12px;
  cursor: pointer;
  box-shadow: none;
}

.btn-invisible:hover,
.linkish:hover {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
}

.btn-danger {
  color: var(--bad);
  border-color: var(--line);
}

.form-control,
textarea.form-control {
  background: var(--code);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 13.5px;
  outline: none;
  box-shadow: none;
}

.form-select {
  background-color: var(--code);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236e7781' d='M4.427 9.573l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 9H4.604a.25.25 0 00-.177.427zM4.427 6.427L7.823 3.03a.25.25 0 01.354 0l3.396 3.397a.25.25 0 01-.177.427H4.604a.25.25 0 01-.177-.427z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 32px 9px 11px;
  font-size: 13.5px;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: none;
  outline: none;
}

.form-group label,
.field label,
label.text-bold,
label.text-small.text-bold {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--faint);
}

.note,
.keyhint {
  font-size: 11px;
  color: var(--faint);
  margin-top: 2px;
}

.Box,
.il-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.Box-header,
.il-panel-header {
  padding: 13px 16px;
  background: var(--code);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.Box-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.Box-body,
.il-panel .p-3 {
  padding: 14px 16px;
}

.Box-row {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

.Box-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  background: var(--code);
}

.flash,
.il-banner {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--muted);
  box-shadow: none;
}

.flash b,
.il-banner b {
  color: var(--ink);
}

.flash-success {
  border-left-color: var(--good);
  background: var(--good-muted);
  color: var(--good);
}

.flash-warn {
  border-left-color: var(--warn);
  background: var(--warn-muted);
  color: var(--warn);
}

.flash-error {
  border-left-color: var(--bad);
  background: var(--bad-muted);
  color: var(--bad);
}

.blankslate {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  color: var(--faint);
  text-align: center;
  padding: 26px;
}

.Label,
.Counter {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
}

.Label--success {
  color: var(--good);
  border-color: var(--good);
  background: var(--good-muted);
}

.Label--danger {
  color: var(--bad);
  border-color: var(--bad);
  background: var(--bad-muted);
}

.Label--accent {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.UnderlineNav {
  border-bottom: 1px solid var(--line);
}

.UnderlineNav-item.selected {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* --- Header --- */

.il-header {
  background: var(--bg);
  border-bottom: 0;
}

.il-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 22px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.il-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.il-brand:hover {
  text-decoration: none;
  color: var(--ink);
}

.il-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent2);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.il-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.il-wordmark {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.2px;
  line-height: 1.2;
  margin: 0;
}

.il-brand-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
}

.il-badge {
  display: none;
}

.il-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  flex: 1;
}

.il-nav-link {
  display: inline-flex;
  align-items: center;
  height: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

.il-nav-link:hover {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
  text-decoration: none;
}

.il-nav-link.is-active {
  color: var(--ink);
  font-weight: 600;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 999px;
}

.il-nav-sep {
  width: 1px;
  height: 16px;
  background: var(--line);
  margin: 0 8px;
  flex-shrink: 0;
}

.il-header-end {
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.il-pill {
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel);
  white-space: nowrap;
}

.il-status {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
  text-decoration: none;
}

.il-status:hover {
  text-decoration: none;
}

.il-status.is-live {
  color: var(--good);
  border-color: var(--good);
  background: var(--good-muted);
}

.il-status.is-demo {
  color: var(--warn);
  border-color: var(--warn);
  background: var(--warn-muted);
}

.il-icon-btn {
  width: auto;
  height: auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.il-icon-btn:hover {
  background: var(--code);
  color: var(--ink);
}

/* --- Page shell --- */

.il-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 22px 80px;
}

.il-pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 0;
  border-bottom: 0;
}

.il-eyebrow {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 4px;
}

.il-pagehead h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.il-lede {
  margin: 4px 0 0;
  max-width: 640px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.il-pagehead-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.il-stat-row,
.il-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.il-stat,
.il-metric {
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  box-shadow: none;
}

.il-stat .label,
.il-metric .k {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--faint);
}

.il-stat .value,
.il-metric .v {
  margin-top: 3px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.il-metric.accent .v,
.il-stat.accent .value {
  color: var(--accent);
}

.il-stat .text-small,
.il-metric .s {
  font-size: 10.5px;
  color: var(--faint);
}

.il-narrow {
  max-width: 760px;
  margin: 0 auto;
}

.il-footer {
  margin-top: 34px;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}

/* --- Library grid --- */

.imagelab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.imagelab-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.12s ease;
}

.imagelab-card:hover {
  border-color: var(--faint);
}

.imagelab-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--code);
}

.imagelab-dhash-grid {
  display: grid;
  grid-template-columns: repeat(8, 18px);
  gap: 2px;
}

.imagelab-dhash-cell {
  width: 18px;
  height: 18px;
  border-radius: 2px;
}

.imagelab-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 48px;
}

.imagelab-sparkline span {
  width: 4px;
  display: block;
}

.imagelab-signal-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--code);
}

.imagelab-signal-bar span {
  display: block;
  height: 100%;
}

.signal-vis { background: var(--accent); }
.signal-dup { background: var(--good); }
.signal-sem { background: var(--color-done-fg); }
.signal-time { background: var(--warn); }

.imagelab-timeline-row {
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--code);
  border-bottom: 1px solid var(--line);
}

.imagelab-timeline-row:nth-child(odd) {
  background: var(--code);
}

/* --- Search --- */

.imagelab-dropzone {
  position: relative;
  display: block;
  border: 1.5px dashed var(--line);
  border-radius: 6px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  background: var(--code);
  box-shadow: none;
  transition: 0.15s;
}

.imagelab-dropzone:hover,
.imagelab-dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-muted);
  box-shadow: none;
}

.imagelab-dropzone b {
  color: var(--ink);
  font-size: 14px;
}

.imagelab-dropzone span,
.imagelab-dropzone .color-fg-muted {
  color: var(--faint);
  font-size: 12.5px;
}

.imagelab-sr-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.imagelab-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.imagelab-result {
  text-decoration: none;
  color: var(--ink);
  padding: 10px 12px;
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
  transition: 0.12s;
}

.imagelab-result:hover {
  text-decoration: none;
  color: var(--ink);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.imagelab-result-rank {
  width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--muted);
}

.imagelab-result-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--code);
  border: 1px solid var(--line);
}

.imagelab-match-pct {
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.1;
  color: var(--accent);
}

.imagelab-query-thumb {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--code);
  border: 1px solid var(--line);
  box-shadow: none;
}

.imagelab-compare-diff {
  background: var(--warn-muted);
}

.il-filterbar,
.il-settingsbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0;
  box-shadow: var(--shadow-card);
}

details.il-concept,
details.concept {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  margin-top: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

details.il-concept > summary,
details.concept > summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
}

details.il-concept > summary::-webkit-details-marker,
details.concept > summary::-webkit-details-marker {
  display: none;
}

details.il-concept > summary::before,
details.concept > summary::before {
  content: "▸";
  color: var(--accent);
  margin-right: 9px;
  display: inline-block;
  transition: 0.15s;
}

details.il-concept[open] > summary::before,
details.concept[open] > summary::before {
  transform: rotate(90deg);
}

.Box-row details.il-concept,
.Box-row details.concept {
  margin-top: 0;
  box-shadow: none;
  border: 0;
}

.Box-row details.il-concept > summary,
.Box-row details.concept > summary {
  padding: 0;
}

.il-req,
.req {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  overflow: auto;
  white-space: pre;
  margin-top: 8px;
}

.il-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: il-spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes il-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 940px) {
  .il-stat-row,
  .il-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .il-header-inner,
  .il-main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .il-nav-sep,
  .il-brand-sub {
    display: none;
  }
  .il-pagehead {
    flex-direction: column;
    align-items: flex-start;
  }
  .il-pagehead h1 {
    font-size: 18px;
  }
}

/* --- Combined search bar --- */

.il-search-bar {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.il-search-text {
  flex: 1;
  font-size: 13.5px;
  padding: 9px 11px;
}

.il-search-hint {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--faint);
  text-align: center;
}

.il-tags-inline {
  display: inline;
}

.il-signal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.il-signal-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--faint);
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--line);
}

.il-signal-table td {
  padding: 5px 10px 5px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.il-signal-table tr:last-child td {
  border-bottom: none;
}

/* --- Description panel (detail page) --- */

.il-desc-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  flex-wrap: wrap;
}

.il-desc-tab {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  background: transparent;
  transition: 0.12s;
}

.il-desc-tab:hover {
  color: var(--ink);
  background: var(--code);
  border-color: var(--faint);
  text-decoration: none;
}

.il-desc-tab.is-active {
  color: var(--ink);
  font-weight: 600;
  background: var(--code);
  border-color: var(--accent);
}

.il-desc-tab-sep {
  margin: 0 5px;
  color: var(--faint);
}

.il-desc-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.il-desc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.il-desc-fields--meta {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.il-desc-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.il-desc-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--faint);
}

.il-desc-value {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.4;
}

.il-desc-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.il-desc-section--para {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.il-desc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.il-pill-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--code);
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.4;
}

.il-pill-tag--color {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}

.il-pill-tag--sm {
  padding: 2px 7px;
  font-size: 11px;
}

.il-desc-paragraph {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
  max-width: 72ch;
}

@media (prefers-reduced-motion: reduce) {
  .imagelab-card,
  .imagelab-result,
  .imagelab-dropzone,
  details.il-concept > summary::before,
  details.concept > summary::before {
    transition: none;
  }
  .il-spinner {
    animation: none;
  }
}

/* -------------------------------------------------------- inspection styles */

.imagelab-card.is-selected {
  outline: 2px solid var(--good);
  outline-offset: 2px;
}

.il-quality-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.il-quality-stat {
  display: flex;
  align-items: center;
  gap: 5px;
}

.il-quality-label {
  font-size: 10px;
  color: var(--muted);
  width: 50px;
  flex-shrink: 0;
}

.il-quality-bar {
  flex: 1;
  height: 4px;
  background: var(--panel2);
  border-radius: 2px;
  overflow: hidden;
}

.il-quality-fill {
  height: 100%;
  background: var(--accent2);
  border-radius: 2px;
}

.il-quality-fill.il-quality-warn {
  background: var(--color-attention-fg, #d4a72c);
}

.il-quality-val {
  font-size: 10px;
  color: var(--muted);
  width: 32px;
  text-align: right;
}

.il-quality-score {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
}

.il-quality-score.is-good {
  background: var(--good-muted);
  color: var(--good);
}

.il-quality-score.is-ok {
  background: var(--panel2);
  color: var(--muted);
}

.il-quality-score.is-poor {
  background: var(--panel2);
  color: var(--color-danger-fg, #cf222e);
}

/* inspection card list */
.il-inspection-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.il-inspection-card {
  display: block;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.il-inspection-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  text-decoration: none;
}

.il-inspection-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.il-inspection-card-name {
  font-weight: 600;
  font-size: 13px;
}

.il-inspection-card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.il-inspection-card-stats {
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* form card */
.il-form-card {
  max-width: 540px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.il-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--ink);
}

.il-input {
  width: 100%;
  box-sizing: border-box;
}

/* ── Tag chips ── */
.il-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: var(--color-neutral-subtle);
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  font-size: 11px;
  color: var(--color-fg-default);
  line-height: 1.4;
}

.il-tag-remove {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--color-fg-muted);
  font-size: 13px;
  line-height: 1;
}
.il-tag-remove:hover { color: var(--color-danger-fg); }

/* ── Wizard ── */
.il-wizard-answer-saved {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
}

/* ── Corpus card check overlay ── */
.il-card-check {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  cursor: pointer;
}

/* quality bar tiny text */
.text-tiny {
  font-size: 10px;
}

/* ── Dark-mode fallback for data-color-mode="auto" ──────────────────────────
   primer-theme.css only declares html[data-color-mode="dark"].  When the user
   picks "auto" the OS preference drives the theme, so we mirror the dark
   token set here under a prefers-color-scheme media query.                  */
@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] {
    --bg: #0d1117;
    --panel: #161b22;
    --panel2: #0d1117;
    --line: #3d444d;
    --ink: #e6edf3;
    --muted: #9198a1;
    --faint: #6e7681;
    --accent: #58a6ff;
    --accent2: #3fb950;
    --good: #3fb950;
    --warn: #d29922;
    --bad: #f85149;
    --accent-muted: #121d2f;
    --good-muted: #122117;
    --warn-muted: #2b2111;
    --bad-muted: #2d1117;
    --code: #0d1117;
    --shadow-card: 0 0 0 1px #3d444d, 0 6px 12px -3px #01040980;
    --color-bg-disabled: #21262d;
    --color-bg-emphasis: #161b22;
    --color-done-muted: #23182d;
  }
}

