/* The AIMetaClean Workspace (plan §27–§32) — the application itself, and the
 * primary above-the-fold CTA. Every state (empty / drag-over / ready /
 * processing / verifying / completed / warnings / error / cancelled) is
 * styled here; app.js toggles which one is visible via [hidden]/data-state.
 */

.workspace-wrap {
  max-width: var(--container-workspace);
  margin-inline: auto;
  padding: 0 var(--space-6) var(--space-7);
}

.workspace {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surf) 96%, transparent),
    color-mix(in srgb, var(--bg) 94%, transparent)
  );
  border: 1px solid var(--brd2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34), 0 0 0 1px color-mix(in srgb, var(--accent) 5%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.workspace__titlebar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--brd);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workspace__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.workspace__label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.workspace__dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.workspace__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brd2);
}

/* -- Dropzone -------------------------------------------------------------- */

.upload-stage__inner {
  padding: var(--space-5) var(--space-5) var(--space-4);
}

.dropzone {
  width: 100%;
  border: 1.5px dashed var(--brd2);
  border-radius: var(--radius-lg);
  padding: 52px 40px;
  text-align: center;
  cursor: pointer;
  background: var(--accent-b);
  transition: background var(--transition-base), border-color var(--transition-base),
    box-shadow var(--transition-base);
  display: block;
  font-family: inherit;
}

.dropzone:hover,
.dropzone:focus-visible {
  background: var(--accent-a);
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--glow);
}

.dropzone[data-dragover='true'] {
  background: var(--accent-a);
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--glow);
  border-style: solid;
}

.dropzone__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: var(--radius-lg);
  background: var(--accent-a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.dropzone__hint {
  font-size: var(--text-base);
  color: var(--t3);
  margin-bottom: var(--space-4);
}

.format-chips {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.format-chip {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--t4);
  background: var(--surf2);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.dropzone__note {
  font-size: var(--text-xs);
  color: var(--t4);
}

.file-input {
  /* Visually hidden but reachable — the real <input type=file>, activated by
     the dropzone button (keyboard-accessible drag/drop alternative, §27.2). */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* -- Cleaning mode selector -------------------------------------------------- */

.mode-selector {
  padding: 0 var(--space-5) var(--space-5);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1.5px solid var(--brd2);
  background: transparent;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.mode-card[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-b);
}

.mode-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 5px;
}

.mode-card__radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--t4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mode-card[aria-pressed='true'] .mode-card__radio {
  border-color: var(--accent);
}

.mode-card__radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.mode-card[aria-pressed='true'] .mode-card__radio::after {
  opacity: 1;
}

.mode-card__name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}

.mode-card__pill {
  /* 9px was below the readable floor on a phone; clamp keeps the desktop
     proportion while giving touch screens something legible. */
  font-size: clamp(10px, 2.6vw, 11px);
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-a);
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.mode-card__desc {
  font-size: var(--text-sm);
  color: var(--t3);
  line-height: 1.5;
  padding-left: 24px;
}

.mode-card__caution {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 24px;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--warn);
  font-weight: 600;
}

/* -- Queue toolbar ---------------------------------------------------------- */

.queue-toolbar {
  padding: var(--space-3) 20px;
  border-bottom: 1px solid var(--brd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.queue-toolbar__info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.queue-toolbar__count {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}

.queue-toolbar__mode {
  font-size: var(--text-xs);
  color: var(--t4);
  background: var(--surf2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* Compact mode toggle shown in the queue toolbar while still READY (plan
   §27.3 — mode must stay changeable without losing an already-scanned
   queue); becomes the plain read-only badge above once processing starts. */
.queue-mode-toggle {
  display: flex;
  border: 1px solid var(--brd2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.queue-mode-toggle__btn {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--t3);
  background: var(--surf2);
  padding: 3px 10px;
  border: none;
  border-right: 1px solid var(--brd2);
}

.queue-mode-toggle__btn:last-child {
  border-right: none;
}

.queue-mode-toggle__btn[aria-pressed='true'] {
  background: var(--accent-a);
  color: var(--accent);
}

.queue-mode-toggle__btn:hover:not([aria-pressed='true']) {
  color: var(--text);
}

.queue-toolbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* -- Progress ---------------------------------------------------------------- */

.progress-row {
  display: flex;
  padding: 14px 20px;
  border-bottom: 1px solid var(--brd);
  align-items: center;
  gap: var(--space-3);
}

.spinner {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  animation: spin 1s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

.progress-row__body {
  flex: 1;
  min-width: 0;
}

.progress-row__labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: var(--space-2);
}

.progress-row__text {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
}

.progress-row__pct {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--t4);
}

.progress-track {
  height: 4px;
  background: var(--surf2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-track__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 2px;
  transition: width var(--transition-base);
}

.processing-note {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--t3);
}

/* -- File queue ---------------------------------------------------------- */

.file-queue {
  max-height: 420px;
  overflow-y: auto;
}

.file-row {
  display: grid;
  grid-template-columns: 40px 1fr 56px 84px 64px 96px 108px auto;
  gap: var(--space-2);
  align-items: center;
  padding: 9px 20px;
  border-bottom: 1px solid var(--brd);
}

.file-row:hover {
  background: var(--accent-b);
}

.file-row__thumb {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-a);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

/* Clickable now (Feature 1/2: opens the same metadata-drawer preview as
   "View") — reset the shared <button> baseline back to a plain thumbnail
   tile rather than a text button. */
.file-row__thumb:hover {
  filter: brightness(1.1);
}

.file-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-row__thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Preview fallback visibility, previously carried by inline style attributes
   and an inline onerror handler. Moved into CSS so the production build can
   ship a strict Content-Security-Policy (script-src 'self') instead of
   weakening the policy to accommodate markup — see Docs/DEPLOYMENT.md. */
.is-hidden {
  display: none !important;
}

.file-row__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.file-row__meta {
  font-size: var(--text-xs);
  color: var(--t4);
}

.file-row__fields {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--t2);
}

.file-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}

.file-status__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Status color mapping — always paired with a text label (never color-only,
   plan §28) via .file-status__dot + the visible text in the same element. */
.file-status[data-status='waiting'] .file-status__dot,
.file-status[data-status='scanning'] .file-status__dot {
  background: var(--t4);
}
.file-status[data-status='ready'] .file-status__dot,
.file-status[data-status='metadata-found'] .file-status__dot {
  background: var(--warn);
}
.file-status[data-status='ready'],
.file-status[data-status='metadata-found'] {
  color: var(--warn);
}
.file-status[data-status='cleaning'] .file-status__dot,
.file-status[data-status='verifying'] .file-status__dot {
  background: var(--accent);
}
.file-status[data-status='cleaning'],
.file-status[data-status='verifying'] {
  color: var(--accent);
}
.file-status[data-status='clean'] .file-status__dot {
  background: var(--ok);
}
.file-status[data-status='clean'] {
  color: var(--ok);
}
.file-status[data-status='warning'] .file-status__dot {
  background: var(--warn);
}
.file-status[data-status='warning'] {
  color: var(--warn);
}
.file-status[data-status='error'] .file-status__dot {
  background: var(--err);
}
.file-status[data-status='error'] {
  color: var(--err);
}
.file-status[data-status='cancelled'] .file-status__dot {
  background: var(--t4);
}
.file-status[data-status='cancelled'] {
  color: var(--t4);
}

.file-row__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-self: end;
}

@media (max-width: 768px) {
  .file-row {
    grid-template-columns: 36px 1fr auto;
    grid-template-areas:
      'thumb name actions'
      'thumb meta meta'
      'thumb status status';
    row-gap: 2px;
  }

  .file-row__thumb {
    grid-area: thumb;
  }

  .file-row__name {
    grid-area: name;
  }

  .file-row__actions {
    grid-area: actions;
  }

  .file-row__meta-group {
    grid-area: meta;
    display: flex;
    gap: var(--space-2);
  }

  .file-status {
    grid-area: status;
  }
}

/* -- Empty-queue / error / cancelled states ------------------------------ */

.queue-empty-note,
.workspace-error,
.workspace-cancelled {
  padding: var(--space-6) var(--space-5);
  text-align: center;
  color: var(--t3);
  font-size: var(--text-base);
}

.workspace-error {
  color: var(--err);
}

/* -- Results / completion (plan §31) -------------------------------------- */

.result-panel {
  padding: var(--space-5);
  border-top: 1px solid var(--brd);
}

.result-summary {
  background: var(--ok-a);
  border: 1px solid color-mix(in srgb, var(--ok) 20%, transparent);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
}

/* Failed/cancelled jobs still show the result panel (completed files remain
   downloadable, plan §27.1) but not with success-green styling. */
.result-summary--failed {
  background: color-mix(in srgb, var(--err) 6%, transparent);
  border-color: color-mix(in srgb, var(--err) 20%, transparent);
}

.result-summary--failed .result-summary__icon {
  background: color-mix(in srgb, var(--err) 10%, transparent);
}

.result-summary--failed .result-summary__icon svg path {
  stroke: var(--err);
}

.result-summary--cancelled {
  background: var(--surf2);
  border-color: var(--brd2);
}

.result-summary--cancelled .result-summary__icon {
  background: var(--surf3);
}

.result-summary--cancelled .result-summary__icon svg path {
  stroke: var(--t3);
}

.result-summary__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ok-a);
  margin-bottom: var(--space-3);
}

.result-summary__title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.result-summary__subtitle {
  font-size: var(--text-sm);
  color: var(--t3);
  margin-bottom: var(--space-4);
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.result-stat__value {
  font-size: var(--text-xl);
  font-weight: 800;
}

.result-stat__value--ok {
  color: var(--ok);
}
.result-stat__value--warn {
  color: var(--warn);
}
.result-stat__value--err {
  color: var(--err);
}

.result-stat__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* -- Shared form controls (rename / alt-text inputs) --------------------- */
/* No text input existed anywhere else in the app before this feature (the
   file <input> is visually hidden) — safe to style input[type=text]/textarea
   generically rather than repeating the same rule under every component. */

input[type='text'],
textarea {
  width: 100%;
  background: var(--surf2);
  border: 1px solid var(--brd2);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 7px 10px;
  font-size: var(--text-sm);
  font-family: inherit;
}

input[type='text']:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 44px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label,
.form-field__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--t3);
}

/* -- Rename Before Download (Features 3/4) -------------------------------- */

.rename-panel {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--brd);
}

.rename-panel__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.rename-panel__controls {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.rename-panel__controls .form-field {
  flex: 1 1 220px;
  min-width: 160px;
}

.rename-panel__numbering-hint {
  font-size: var(--text-sm);
  color: var(--t4);
  padding: 7px 0;
}

.rename-panel__error {
  color: var(--err);
  font-size: var(--text-xs);
  margin-top: var(--space-2);
}

/* -- Image Results list (per-file rename/alt-text/AI/download) ----------- */

.image-results {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.image-result {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surf2);
  border: 1px solid var(--brd);
  border-radius: var(--radius-md);
}

/* Anchor for the hover/focus zoom. Deliberately does NOT clip (the thumb
   itself keeps overflow:hidden to crop its image), so the zoom can escape
   the 48px cell. */
.image-result__preview {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.image-result__thumb {
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-a);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.image-result__thumb:hover,
.image-result__thumb:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Enlarged peek at the same local object URL. Sits above the thumb rather
   than beside it so it never covers the Output Filename field being typed
   into, and is pointer-events:none so it can't swallow the click that opens
   the drawer. Hover-capable pointers only — on touch, the tap opens the
   drawer instead, which is the better affordance there. */
.image-result__zoom {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: 216px;
  padding: 8px;
  border: 1px solid var(--brd2);
  border-radius: var(--radius-md);
  background: var(--surf);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  pointer-events: none;
}

.image-result__zoom img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  background: var(--bg);
}

.image-result__zoom-name {
  display: block;
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--t3);
  word-break: break-word;
}

@media (hover: hover) {
  .image-result__preview:hover .image-result__zoom {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

/* Keyboard parity: the zoom is also reachable without a pointer. */
.image-result__thumb:focus-visible ~ .image-result__zoom {
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .image-result__thumb:hover,
  .image-result__thumb:focus-visible {
    transform: none;
  }
  .image-result__zoom {
    transition: none;
    transform: none;
  }
}

.image-result__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-result__thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-result__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.image-result__original {
  font-size: var(--text-xs);
  color: var(--t4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-result__original span {
  color: var(--t3);
  font-weight: 600;
}

.image-result__filename-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.image-result__ext {
  font-size: var(--text-sm);
  color: var(--t4);
  flex-shrink: 0;
}

.image-result__ai-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.image-result__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
}

.image-result__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ok);
  white-space: nowrap;
}

/* External-AI vs local-processing indicator: deliberately NOT var(--ok)
   (the color already used everywhere for "100% local"/verified) — a
   request that leaves the machine must never look visually identical to a
   local one. */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-size: 10px;
  font-weight: 700;
  color: var(--warn);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.ai-status {
  font-size: var(--text-xs);
  color: var(--t4);
}

.ai-status[data-tone='error'] {
  color: var(--err);
}

.ai-status[data-tone='ok'] {
  color: var(--ok);
}

.export-details-row {
  margin-top: var(--space-3);
  text-align: right;
}

@media (max-width: 640px) {
  .image-result {
    grid-template-columns: 40px 1fr;
  }

  .image-result__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .rename-panel__controls {
    flex-direction: column;
    align-items: stretch;
  }

  /* Reset the row layout's flex-basis.
     `flex: 1 1 220px` sizes the main axis, so once the direction flips to
     column that 220px stops being a sensible minimum WIDTH and becomes a
     220px minimum HEIGHT — three stacked controls each 220px tall, separated
     by enormous empty gaps. Sized by content instead. */
  .rename-panel__controls .form-field {
    flex: 0 0 auto;
    min-width: 0;
  }
}

/* -- AI privacy confirmation dialog --------------------------------------- */

.ai-confirm-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  background: var(--surf);
  border: 1px solid var(--brd2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  z-index: var(--z-drawer);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.ai-confirm-dialog__title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.ai-confirm-dialog__desc {
  font-size: var(--text-sm);
  color: var(--t3);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

.ai-confirm-dialog__desc strong {
  color: var(--ok);
}

.ai-confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

.comparison-grid {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.comparison-card {
  background: var(--surf2);
  border: 1px solid var(--brd);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.comparison-card--after {
  background: var(--ok-a);
  border-color: color-mix(in srgb, var(--ok) 15%, transparent);
}

.comparison-card__label {
  font-size: 10px;
  font-weight: 700;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: var(--space-3);
}

.comparison-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 4px 0;
}

.comparison-row__label {
  font-size: var(--text-xs);
  color: var(--t4);
}

.comparison-row__value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--t2);
}

.comparison-row__value--warn {
  color: var(--warn);
}
.comparison-row__value--err {
  color: var(--err);
}
.comparison-row__value--ok {
  color: var(--ok);
}

.verified-banner {
  margin-top: var(--space-3);
  background: var(--ok-a);
  border: 1px solid color-mix(in srgb, var(--ok) 15%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ok);
}

.warnings-note {
  margin-top: var(--space-3);
  background: color-mix(in srgb, var(--warn) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 20%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--warn);
}

@media (max-width: 640px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .mode-selector {
    grid-template-columns: 1fr;
  }
}

/* -- Trust strip (plan §34) ------------------------------------------------ */

.trust-strip {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding: 28px 0 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--t4);
}
