/* Enrichment Forge page-specific styling.
   Scoped entirely to this page (loaded only by enrichment-forge.html) so it
   cannot collide with the separate, app-wide crispness pass on style.css.
   Matches the approved mockup's layout/structure/component shapes using the
   live app's existing color tokens, not the mockup's own distinct palette;
   the color-token swap is the app-wide pass's job, this is everything else. */

.section-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 4px;
}

.card-title h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.step-n {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--accent-dim);
  color: var(--accent-dim-text);
  font-size: 0.72rem;
  font-weight: 700;
}

.search-box {
  position: relative;
  max-width: 420px;
}

.search-box .icon {
  position: absolute;
  top: 50%;
  left: 11px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.85rem;
  pointer-events: none;
}

#seriesSearch {
  width: 100%;
  padding-left: 32px;
}

#seriesResults {
  margin-top: 8px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

#seriesResults:not(:empty) {
  border: 1px solid var(--border);
}

.series-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: var(--surface-soft);
  transition: background 120ms ease;
}

.series-result-row:last-child {
  border-bottom: none;
}

.series-result-row:hover {
  background: var(--surface-hover);
}

.series-result-name {
  font-weight: 650;
  font-size: 14px;
}

.series-result-count {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.series-footnote {
  margin-top: 8px;
}

#compileSub {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.source-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12.5px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.source-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.source-chip.audible .dot {
  background: #d9954f;
}

.source-chip.goodreads .dot {
  background: #5fae9c;
}

.source-chip.skipped {
  color: var(--muted);
}

.source-chip.skipped .dot {
  background: var(--border-strong);
}

.source-strip .sep {
  width: 1px;
  height: 13px;
  background: var(--border);
}

.source-strip .time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

#compileCard .grid {
  grid-template-columns: 1fr 1fr;
}

#compileCard .field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

#compileCard .field label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

#compileCard .field-label {
  font-size: var(--font-2xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-hint {
  margin-left: 6px;
  color: var(--muted);
  font-size: var(--font-2xs);
  font-weight: 500;
  opacity: 0.85;
}

.chip-field {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px 3px 10px;
}

.chip-remove {
  all: unset;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  line-height: 13px;
  text-align: center;
  cursor: pointer;
  opacity: 0.75;
}

.chip-remove:hover {
  background: rgb(0 0 0 / 15%);
  opacity: 1;
}

.chip-field-add-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.chip-field-add-row input {
  flex: 1;
}

.explicit-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.explicit-toggle-row input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.explicit-toggle-label {
  font-size: 13.5px;
  font-weight: 650;
}

/* Explicit evidence note: a filled callout box, distinct from the page's
   existing left-border-only .dryrun-notice (which the "Heads up" strip
   below already reuses correctly). Base text is muted, not full warning
   color; only the leading dot is warning-colored and only the bolded
   headline clause (a <strong>) uses full text color, matching the mockup. */
.context-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.context-note .dot {
  flex: none;
  margin-top: 1px;
  color: var(--warning);
  font-size: 0.9em;
}

.context-note strong {
  color: var(--text);
  font-weight: 600;
}

.explicit-footnote {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.explicit-footnote code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-soft);
  font-size: 0.92em;
}

#compileCard .divider {
  margin: 18px 0;
  border: none;
  border-top: 1px solid var(--border);
}

#compileCard .section-label {
  margin: 0 0 10px;
  font-size: 15px;
}

#bookList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.book-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: opacity 120ms ease, border-color 120ms ease;
}

.book-row:hover {
  border-color: var(--border-strong);
}

.book-row.excluded {
  opacity: 0.55;
}

.book-main {
  flex: 1;
  min-width: 0;
}

.book-title {
  font-size: 14px;
  font-weight: 650;
}

.book-src-line {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.book-src-line .audible {
  color: #d9954f;
}

.book-src-line .goodreads {
  color: #5fae9c;
}

.book-src-line .local {
  color: var(--accent);
}

.evidence-pill {
  flex: none;
  white-space: nowrap;
  background: var(--warning-soft);
  color: var(--warning);
}

.include-toggle {
  flex: none;
  white-space: nowrap;
  min-height: 0;
  border-radius: 999px;
  padding: var(--space-xs) 10px;
  font-size: var(--font-2xs);
  font-weight: 600;
}

.include-toggle.in {
  border-color: var(--accent);
  color: var(--accent-dim-text);
  background: var(--accent-dim);
}

#compileCard .dryrun-notice {
  margin-top: 18px;
}

#includedCount {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}
