/* ===========================================================================
   import-wizard.css — Phase 1D
   ===========================================================================
   Plan: IMPORT-V2-PHASE-1-PLAN-2026-05-13.md §6.1D step 3
   Design: CLAUDE.md Wireline + Light Sidebar Chrome
     • teal #298084 CTA
     • Geist Sans body, JetBrains Mono for grid + metrics, Newsreader 24px hero
     • no border-left stripes
     • drawer vs modal vs full-page (this is full-page per R6.13)
   =========================================================================== */

#view-import {
  padding: 28px 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.iw-hero {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
  color: #1A1F26;
  margin: 4px 0 4px;
}
.iw-sub {
  font-size: 13px;
  color: #6B7480;
  margin: 0 0 24px;
}
.iw-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.iw-header-copy {
  min-width: 0;
}
.iw-cancel-import {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #D2D7DD;
  border-radius: 4px;
  background: #FFFFFF;
  color: #49515A;
  font: 12px 'Geist Sans', system-ui, sans-serif;
  cursor: pointer;
}
.iw-cancel-import:hover {
  border-color: #B7BFC9;
  background: #F7F9FB;
  color: #1A1F26;
}
.iw-cancel-import:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Stage breadcrumb */
.iw-steps {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6B7480;
}
.iw-step {
  padding: 6px 10px;
  border-radius: 4px;
  background: #F0F4F8;
  border: 1px solid #E2E5EA;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.iw-step.done {
  background: oklch(0.93 0.04 200);
  color: #1A1F26;
  border-color: oklch(0.78 0.06 200);
}
.iw-step.current {
  background: #FFFFFF;
  color: #298084;
  border-color: #298084;
  font-weight: 600;
}
.iw-step .iw-step-num {
  background: rgba(255,255,255,.65);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 10px;
  color: #6B7480;
}
.iw-step.current .iw-step-num {
  background: #298084;
  color: #fff;
}

/* Card surface (no nested cards — single flat surface per stage) */
.iw-card {
  background: #FFFFFF;
  border: 1px solid #E2E5EA;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Drop zone */
.iw-drop {
  border: 1px dashed #B7BFC9;
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
  background: oklch(0.98 0.005 200);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.iw-drop:hover, .iw-drop.is-dragover {
  background: oklch(0.96 0.01 200);
  border-color: #298084;
}
.iw-drop input[type="file"] { display: none; }
.iw-drop-icon {
  color: #6B7480;
  margin-bottom: 10px;
}
.iw-drop.is-dragover .iw-drop-icon, .iw-drop:hover .iw-drop-icon { color: #298084; }
.iw-drop-hint { font-size: 13px; color: #49515A; margin-top: 14px; }
.iw-drop-title {
  font-size: 14px;
  color: #1A1F26;
  margin: 0 0 4px;
}
.iw-drop-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #298084;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  margin-top: 8px;
  cursor: pointer;
  border: none;
}
.iw-drop-btn:hover { filter: brightness(1.08); }

.iw-import-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid oklch(0.89 0.025 210);
  background: #FBFCFD;
}
.iw-import-option-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.iw-import-option-wide {
  grid-column: 1 / -1;
}
.iw-import-option-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #56616E;
}
.iw-import-segment {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #D2D7DD;
  background: #fff;
  overflow: hidden;
}
.iw-import-seg {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid #D2D7DD;
  background: transparent;
  color: #56616E;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.iw-import-seg:last-child { border-right: 0; }
.iw-import-seg.is-active {
  background: #298084;
  color: #fff;
}
.iw-import-seg.is-disabled,
.iw-import-seg:disabled {
  color: #98A1AB;
  background: #F3F5F7;
  cursor: not-allowed;
}
.iw-import-option-note {
  max-width: 560px;
  color: #6B7480;
  font-size: 12px;
  line-height: 1.45;
}
/* T2: Scout template download — full-width footer in the import-options block. */
.iw-import-template {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-top: 12px;
  border-top: 1px solid oklch(0.89 0.025 210);
}
.iw-import-template-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #298084;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.iw-import-template-link:hover { text-decoration: underline; }
.iw-import-template-link svg { flex: none; }
.iw-import-template-note { color: #6B7480; font-size: 12px; }
/* "Before you import" tips — calm Field-Desk reference block (text-led, no dots). */
.iw-import-tips {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid #E2E5EA;
  border-radius: 8px;
  background: #F8F9FB;
}
.iw-import-tips-head {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #56616E; margin: 0 0 8px;
}
.iw-import-tips-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.iw-import-tips-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; color: #3D4651; }
.iw-tip-ic { flex: none; margin-top: 2px; color: #298084; }
.iw-import-client-select {
  width: min(520px, 100%);
  height: 36px;
  padding: 0 10px;
  border: 1px solid #D2D7DD;
  background: #FFFFFF;
  color: #1A1F26;
  font: 13px 'Geist Sans', system-ui, sans-serif;
}
.iw-import-client-select:focus {
  outline: 2px solid #298084;
  outline-offset: -1px;
  border-color: #298084;
}

@media (max-width: 760px) {
  .iw-import-options { grid-template-columns: 1fr; }
}

/* Parse progress */
.iw-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  gap: 12px;
}
.iw-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #E2E5EA;
  border-top-color: #298084;
  border-radius: 50%;
  animation: iw-spin 800ms linear infinite;
}
@keyframes iw-spin { to { transform: rotate(360deg); } }
.iw-progress-msg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #6B7480;
}

/* Buttons */
.iw-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}
.iw-btn {
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.iw-btn-primary {
  background: #298084;
  color: #fff;
}
.iw-btn-primary:hover { filter: brightness(1.08); }
.iw-btn-primary:disabled {
  background: #B7BFC9;
  cursor: not-allowed;
}
.iw-btn-secondary {
  background: #FFFFFF;
  border-color: #E2E5EA;
  color: #1A1F26;
}
.iw-btn-secondary:hover { border-color: #B7BFC9; }

/* Review grid */
.iw-grid {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.iw-grid thead th {
  text-align: left;
  background: #F0F4F8;
  border-bottom: 1px solid #E2E5EA;
  padding: 8px 10px;
  font-weight: 500;
  font-size: 11px;
  color: #6B7480;
  font-family: 'Geist Sans', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iw-grid tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #F0F4F8;
  vertical-align: top;
}
.iw-grid tbody tr.flagged { background: oklch(0.985 0.025 80 / 0.45); }
.iw-grid tbody tr.error { background: oklch(0.98 0.04 25 / 0.45); }

/* Stage summary panel */
.iw-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.iw-summary-tile {
  background: #F8F9FB;
  border: 1px solid #E2E5EA;
  border-radius: 6px;
  padding: 12px 14px;
}
.iw-summary-tile .iw-tile-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B7480;
  font-family: 'Geist Sans', system-ui, sans-serif;
}
.iw-summary-tile .iw-tile-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  color: #1A1F26;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.iw-inspect-tile-note {
  margin-top: 4px;
  font-size: 11px;
  color: #6B7480;
}

/* Inspector stage */
.iw-inspect-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.iw-inspect-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #298084;
}
.iw-inspect-hero h1 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #1A1F26;
}
.iw-inspect-hero p {
  margin: 0;
  max-width: 680px;
  color: #6B7480;
  font-size: 13px;
  line-height: 1.45;
}
.iw-inspect-status {
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid #E2E5EA;
  background: #F8F9FB;
  text-align: right;
}
.iw-inspect-status span {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7480;
}
.iw-inspect-status strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  color: #1A1F26;
}
.iw-inspect-status.ok {
  border-color: oklch(0.82 0.07 145);
  background: oklch(0.97 0.025 145);
}
.iw-inspect-status.blocker {
  border-color: oklch(0.82 0.08 25);
  background: oklch(0.97 0.025 25);
}
.iw-inspect-section {
  margin-top: 18px;
}
.iw-inspect-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.iw-inspect-section-head h2 {
  margin: 0;
  font-size: 14px;
  color: #1A1F26;
}
.iw-inspect-section-head span {
  color: #6B7480;
  font-size: 12px;
}
.iw-inspect-findings {
  display: grid;
  gap: 10px;
}
.iw-inspect-finding {
  padding: 12px 14px;
  border: 1px solid #E2E5EA;
  background: #F8F9FB;
}
.iw-inspect-finding.blocker {
  border-color: oklch(0.82 0.08 25);
  background: oklch(0.98 0.02 25);
}
.iw-inspect-finding.warning {
  border-color: oklch(0.82 0.08 80);
  background: oklch(0.98 0.025 80);
}
.iw-inspect-finding-kicker {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6B7480;
}
.iw-inspect-finding-title {
  color: #1A1F26;
  font-weight: 760;
  font-size: 13px;
}
.iw-inspect-finding-detail {
  margin-top: 4px;
  color: #56616E;
  font-size: 12px;
  line-height: 1.45;
}
.iw-inspect-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.iw-inspect-examples span {
  padding: 3px 6px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #49515A;
}
.iw-inspect-provenance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #E2E5EA;
  background: #FBFCFD;
}
.iw-inspect-provenance span {
  display: block;
  margin-bottom: 4px;
  color: #6B7480;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.iw-inspect-provenance strong {
  color: #1A1F26;
  font-size: 13px;
}
.iw-inspect-group-table {
  border: 1px solid #E2E5EA;
  overflow: hidden;
}
.iw-inspect-group-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 80px 130px 130px 100px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-top: 1px solid #F0F4F8;
  font-size: 12px;
}
.iw-inspect-group-row:first-child { border-top: 0; }
.iw-inspect-group-row.head {
  background: #F0F4F8;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6B7480;
}
.iw-inspect-group-row span:not(:first-child) {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .iw-inspect-hero { flex-direction: column; }
  .iw-inspect-status { width: 100%; text-align: left; }
  .iw-prop-context { grid-template-columns: 1fr; }
  .iw-inspect-group-row {
    grid-template-columns: 1fr 64px 100px;
  }
  .iw-inspect-group-row span:nth-child(4),
  .iw-inspect-group-row span:nth-child(5) {
    display: none;
  }
}

/* Form fields (assign stage) */
.iw-field {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}
.iw-field label {
  font-size: 12px;
  color: #6B7480;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iw-field select,
.iw-field input {
  padding: 8px 10px;
  border: 1px solid #E2E5EA;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  background: #FFFFFF;
}
.iw-field select:focus,
.iw-field input:focus {
  outline: 2px solid #298084;
  outline-offset: -1px;
  border-color: #298084;
}

/* Banner messages */
.iw-banner {
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}
.iw-banner-info  { background: oklch(0.96 0.02 200); color: #1A4448; }
.iw-banner-warn  { background: oklch(0.96 0.05 80);  color: #4A3614; }
.iw-banner-error { background: oklch(0.96 0.04 25);  color: #5C1A1A; }
.iw-banner-ok    { background: oklch(0.96 0.04 145); color: #1A4424; }

/* Phase 4 saved-template auto-suggest banner */
.iw-tmpl-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: oklch(0.97 0.02 200);
  border: 1px solid oklch(0.86 0.04 200);
  border-radius: 6px;
  font-size: 13px;
  color: #1A4448;
}
.iw-tmpl-text { flex: 1; min-width: 0; line-height: 1.4; }
.iw-tmpl-icon {
  color: #CC9C42; /* brass — display accent for saved-template moments */
  font-size: 15px;
  margin-right: 4px;
}
.iw-tmpl-more { color: #6B7480; font-size: 12px; }
.iw-tmpl-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.iw-btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 4px;
}
.iw-btn-ghost {
  background: transparent;
  color: #298084;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.iw-btn-ghost:hover {
  background: oklch(0.96 0.02 200);
  border-color: oklch(0.86 0.04 200);
}

/* Phase 4 — Manage saved templates modal */
.iw-tmpl-mgr-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: oklch(0.20 0.010 200 / 0.50);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.iw-tmpl-mgr-modal {
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
  width: 100%; max-width: 640px; max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 16px 48px oklch(0.20 0.010 200 / 0.18);
}
.iw-tmpl-mgr-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #E2E5EA;
}
.iw-tmpl-mgr-head h2 {
  font-family: 'Newsreader', Georgia, serif; font-style: italic;
  font-weight: 500; font-size: 20px; margin: 0; color: #1A1F26;
}
.iw-tmpl-mgr-close {
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: transparent; cursor: pointer;
  font-size: 22px; line-height: 1; color: #6B7480;
}
.iw-tmpl-mgr-close:hover { background: #F3F4F6; color: #1A1F26; }
.iw-tmpl-mgr-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.iw-tmpl-mgr-empty {
  padding: 32px 16px; text-align: center; color: #6B7480; font-size: 13px;
  line-height: 1.6;
}
.iw-tmpl-mgr-list { display: flex; flex-direction: column; gap: 10px; }
.iw-tmpl-mgr-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 14px;
  border: 1px solid #E2E5EA; border-radius: 6px;
  background: #FFFFFF;
}
.iw-tmpl-mgr-row-main { flex: 1; min-width: 0; }
.iw-tmpl-mgr-name {
  font-family: 'Geist Sans', sans-serif; font-size: 14px;
  font-weight: 600; color: #1A1F26; margin-bottom: 4px;
}
.iw-tmpl-mgr-meta {
  font-size: 12px; color: #6B7480;
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
}
.iw-tmpl-mgr-row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.iw-tmpl-mgr-delete { color: #5C1A1A; }
.iw-tmpl-mgr-delete:hover { background: oklch(0.96 0.06 25); border-color: oklch(0.82 0.10 25); }

/* AI runs-quota panel inside the templates modal (runs, NOT dollars) */
.iw-tmpl-mgr-usage {
  background: oklch(0.97 0.02 200);
  border: 1px solid oklch(0.86 0.04 200);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.iw-tmpl-mgr-usage-title {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #6B7480;
  margin-bottom: 8px;
}
.iw-tmpl-mgr-usage-row {
  display: flex; align-items: baseline; gap: 12px;
}
.iw-tmpl-mgr-usage-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 600; color: #1A4448;
  font-variant-numeric: tabular-nums;
}
.iw-tmpl-mgr-usage-lbl {
  font-size: 12px; color: #6B7480;
}
.iw-tmpl-mgr-usage-bar {
  margin-top: 10px;
  height: 6px;
  background: oklch(0.92 0.02 200);
  border-radius: 999px;
  overflow: hidden;
}
.iw-tmpl-mgr-usage-bar-fill {
  height: 100%;
  background: #298084;
  border-radius: 999px;
  transition: width .25s ease;
}
.iw-tmpl-mgr-section-title {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #6B7480;
  margin: 6px 0 10px;
}

/* Phase 4 — Bulk find/replace modal */
.iw-rv-fr-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: oklch(0.20 0.010 200 / 0.50);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.iw-rv-fr-modal {
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
  width: 100%; max-width: 720px; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 16px 48px oklch(0.20 0.010 200 / 0.18);
}
.iw-rv-fr-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #E2E5EA;
}
.iw-rv-fr-head h2 {
  font-family: 'Newsreader', Georgia, serif; font-style: italic;
  font-weight: 500; font-size: 20px; margin: 0; color: #1A1F26;
}
.iw-rv-fr-close {
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: transparent; cursor: pointer;
  font-size: 22px; line-height: 1; color: #6B7480;
}
.iw-rv-fr-close:hover { background: #F3F4F6; color: #1A1F26; }
.iw-rv-fr-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.iw-rv-fr-target {
  font-size: 12px; color: #6B7480; line-height: 1.5;
  margin-bottom: 14px;
  padding: 10px 12px; background: oklch(0.97 0.02 200);
  border: 1px solid oklch(0.86 0.04 200); border-radius: 6px;
}
.iw-rv-fr-target strong { color: #1A4448; }
.iw-rv-fr-field {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 10px;
}
.iw-rv-fr-lbl {
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: #6B7480;
}
.iw-rv-fr-input {
  font-family: 'Geist Sans', sans-serif; font-size: 14px;
  padding: 8px 10px; border: 1px solid #D1D5DB; border-radius: 4px;
  color: #1A1F26; background: #FFFFFF;
}
.iw-rv-fr-input:focus {
  outline: 2px solid #298084; outline-offset: -1px; border-color: #298084;
}
.iw-rv-fr-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #6B7480; margin: 8px 0 12px;
  cursor: pointer;
}
.iw-rv-fr-preview {
  margin-top: 14px; padding: 12px;
  background: #FBFBFD; border: 1px solid #E2E5EA; border-radius: 6px;
  min-height: 60px;
}
.iw-rv-fr-help { font-size: 12px; color: #6B7480; font-style: italic; }
.iw-rv-fr-error {
  font-size: 12px; color: #5C1A1A;
  background: oklch(0.96 0.06 25); padding: 8px 10px; border-radius: 4px;
}
.iw-rv-fr-preview-head { font-size: 13px; margin-bottom: 10px; color: #1A1F26; }
.iw-rv-fr-preview-head strong { color: #1A4448; }
.iw-rv-fr-sample-list { display: flex; flex-direction: column; gap: 6px; }
.iw-rv-fr-sample-row {
  display: grid;
  grid-template-columns: 40px 1fr 18px 1fr;
  gap: 8px; align-items: center;
  font-size: 12px;
  padding: 6px 8px; background: #FFFFFF; border: 1px solid #F3F4F6;
  border-radius: 4px;
}
.iw-rv-fr-sample-num {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: #6B7480;
}
.iw-rv-fr-sample-before { color: #6B7480; }
.iw-rv-fr-sample-arrow { text-align: center; color: #6B7480; }
.iw-rv-fr-sample-after { color: #1A1F26; font-weight: 500; }
.iw-rv-fr-footer {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 12px 20px; border-top: 1px solid #E2E5EA;
}
.iw-rv-bulk-btn-secondary {
  background: transparent; color: #1A4448;
  border-color: oklch(0.78 0.06 200);
}
.iw-rv-bulk-btn-secondary:hover {
  background: oklch(0.96 0.04 200); border-color: oklch(0.66 0.10 200);
}

/* Permission-denied state */
.iw-deny {
  text-align: center;
  padding: 64px 24px;
  color: #6B7480;
}
.iw-deny-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 22px;
  font-style: italic;
  color: #1A1F26;
  margin: 0 0 8px;
}

/* ===========================================================================
   Stage 3 — Map (Phase 2D)
   =========================================================================== */

.iw-map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.iw-map-counts {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-family: 'Geist Sans', system-ui, sans-serif;
  font-size: 12px;
  color: #6B7480;
}
.iw-map-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.iw-map-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.iw-map-cost {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6B7480;
  font-variant-numeric: tabular-nums;
}

.iw-map-grid-wrap {
  border: 1px solid #E2E5EA;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}
.iw-map-grid {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Geist Sans', system-ui, sans-serif;
  font-size: 13px;
}
.iw-map-grid thead th {
  text-align: left;
  background: #F0F4F8;
  border-bottom: 1px solid #E2E5EA;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 11px;
  color: #6B7480;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iw-map-grid tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #F0F4F8;
  vertical-align: middle;
}
.iw-map-grid tbody tr:last-child td { border-bottom: 0; }

.iw-map-src-name {
  font-weight: 500;
  color: #1A1F26;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.iw-map-src-sample {
  font-size: 11px;
  color: #6B7480;
  margin-top: 2px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iw-map-arrow {
  color: #B7BFC9;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  width: 22px;
}
.iw-map-dst { width: 36%; }
.iw-map-select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #E2E5EA;
  border-radius: 4px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  color: #1A1F26;
}
.iw-map-select:focus {
  outline: 2px solid #298084;
  outline-offset: -1px;
  border-color: #298084;
}
.iw-map-reason {
  font-size: 11px;
  color: #6B7480;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iw-map-conf { width: 60px; text-align: center; }

/* Confidence pills */
.iw-conf-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.iw-conf-high          { background: oklch(0.93 0.05 145); color: #1A4424; }
.iw-conf-medium        { background: oklch(0.95 0.06 80);  color: #4A3614; }
.iw-conf-low           { background: oklch(0.95 0.05 25);  color: #5C1A1A; }
.iw-conf-user_override { background: oklch(0.93 0.05 200); color: #1A4448; }
.iw-conf-none          { background: #F0F4F8;              color: #6B7480; }

/* Row tint by confidence — subtle left-edge background, no border-stripe (BAN 1) */
.iw-map-cell-high   td { background: oklch(0.99 0.01 145 / 0.55); }
.iw-map-cell-medium td { background: oklch(0.995 0.015 80 / 0.65); }
.iw-map-cell-low    td { background: oklch(0.99 0.015 25 / 0.55); }
.iw-map-cell-user   td { background: oklch(0.99 0.012 200 / 0.55); }
.iw-map-cell-none   td { background: transparent; }

/* Spinner used by parse + map stages */
.iw-progress {
  text-align: center;
  padding: 48px 24px;
}
.iw-progress-msg {
  font-size: 14px;
  color: #1A1F26;
  margin: 16px 0 6px;
}
.iw-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #E2E5EA;
  border-top-color: #298084;
  border-radius: 50%;
  margin: 0 auto;
  animation: iw-spin 0.9s linear infinite;
}
@keyframes iw-spin { to { transform: rotate(360deg); } }

/* ===========================================================================
   Phase 2I-f — Context stage (formerly Properties) (Mock I locked 2026-05-14)
   Spec: IMPORT-V2-PHASE-2I-E-GROUPS-STAGE-UI-SPEC-2026-05-14.md
   Canonical source: src/mock/groups-stage-v7.html (Mock I)
   =========================================================================== */

/* Hero */
.iw-prop-hero {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 6px 0 14px;
}
.iw-prop-hero h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  margin: 0;
  color: #1A1F26;
}
.iw-prop-hero-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #6B7480;
  font-variant-numeric: tabular-nums;
}
.iw-prop-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #E2E5EA;
  background: #FBFCFD;
}
.iw-prop-context-main,
.iw-prop-context-create {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.iw-prop-context-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #56616E;
}
.iw-prop-context-select,
.iw-prop-context-input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #D2D7DD;
  background: #FFFFFF;
  color: #1A1F26;
  font: 13px 'Geist Sans', system-ui, sans-serif;
}
.iw-prop-context-select:focus,
.iw-prop-context-input:focus {
  outline: 2px solid #298084;
  outline-offset: -1px;
  border-color: #298084;
}
.iw-prop-context-note,
.iw-prop-context-count {
  color: #6B7480;
  font-size: 12px;
  line-height: 1.4;
}
.iw-prop-context-btn {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #298084;
  background: #298084;
  color: #FFFFFF;
  font: 12px 'Geist Sans', system-ui, sans-serif;
  cursor: pointer;
}
.iw-prop-context-btn:disabled {
  border-color: #D2D7DD;
  background: #F0F4F8;
  color: #8C95A0;
  cursor: not-allowed;
}
.iw-prop-context-btn:not(:disabled):hover { filter: brightness(1.06); }

.iw-prop-loading {
  text-align: center;
  padding: 64px 24px;
  font-size: 14px;
  color: #6B7480;
}

/* ─── Bulk apply panel ─── */
.iw-prop-bulk {
  background: #FFFFFF;
  border: 1px solid #E2E5EA;
  border-radius: 8px;
  margin: 0 0 16px;
  overflow: hidden;
}
.iw-prop-bulk.has-selection {
  border-color: #298084;
  box-shadow: 0 0 0 1px #298084;
}
.iw-prop-bulk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: oklch(0.97 0.012 200);
  cursor: pointer;
  transition: background 100ms ease;
}
.iw-prop-bulk.has-selection .iw-prop-bulk-head {
  background: oklch(0.95 0.04 200);
}
.iw-prop-bulk:not(.is-expanded) .iw-prop-bulk-head { border-bottom: none; }
.iw-prop-bulk.is-expanded .iw-prop-bulk-head { border-bottom: 1px solid oklch(0.86 0.04 200); }
.iw-prop-bulk-head:hover { background: oklch(0.96 0.018 200); }

.iw-prop-bulk-title {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #1A4448;
}
.iw-prop-bulk-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  transition: transform 120ms ease;
}
.iw-prop-bulk.is-expanded .iw-prop-bulk-chev { transform: rotate(90deg); }
.iw-prop-bulk-chev svg { width: 9px; height: 9px; }
.iw-prop-bulk-title-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.iw-prop-bulk-subtitle {
  font-weight: 400;
  color: #6B7480;
  font-size: 10px;
}
.iw-prop-bulk-scope {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 11px;
  background: #FFFFFF;
  border: 1px solid oklch(0.86 0.04 200);
  font: 600 11px 'Geist Sans', system-ui, sans-serif;
  color: #1A4448;
}
.iw-prop-bulk.has-selection .iw-prop-bulk-scope {
  background: #298084;
  color: #FFFFFF;
  border-color: #298084;
}
.iw-prop-clear-x {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  cursor: pointer;
  margin-left: 2px;
}

.iw-prop-bulk-body {
  display: none;
  padding: 16px 18px 16px;
}
.iw-prop-bulk.is-expanded .iw-prop-bulk-body { display: block; }
.iw-prop-bulk-scope-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  margin: 0 0 12px;
  border: 1px solid #E2E5EA;
  border-radius: 6px;
  background: #F8F9FB;
  font-size: 12px;
  color: #4D5560;
}
.iw-prop-bulk-scope-line strong {
  color: #1A4448;
  font-weight: 700;
}
.iw-prop-bulk-scope-line small {
  color: #6B7480;
  font-size: 11px;
  line-height: 1.35;
}
.iw-prop-bulk-failures {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 11px;
  margin: 0 0 12px;
  border: 1px solid oklch(0.84 0.08 60);
  border-radius: 6px;
  background: oklch(0.97 0.035 75);
  color: #4A3614;
}
.iw-prop-bulk-failure-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.iw-prop-bulk-failure-head div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.iw-prop-bulk-failure-head strong { font-size: 12px; }
.iw-prop-bulk-failure-head span { font-size: 11px; color: #6D5524; }
.iw-prop-bulk-select-failed {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid oklch(0.72 0.10 60);
  border-radius: 4px;
  background: #FFFFFF;
  color: #4A3614;
  font: 600 11px 'Geist Sans', system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.iw-prop-bulk-select-failed:hover { border-color: oklch(0.62 0.13 60); }
.iw-prop-bulk-failures ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 5px;
}
.iw-prop-bulk-failures li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}
.iw-prop-bulk-failures li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iw-prop-bulk-failures li small {
  color: #6D5524;
  text-align: right;
}

.iw-prop-bulk-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 10px;
}
.iw-prop-bulk-cat-head {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #8C95A0;
  margin: 0 0 8px;
}
.iw-prop-bulk-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}
.iw-prop-bulk-row + .iw-prop-bulk-row {
  border-top: 1px solid #F0F4F8;
}
.iw-prop-bulk-note-row .iw-prop-bulk-static {
  color: #6B7480;
  font-size: 11px;
  font-weight: 500;
}
.iw-prop-bulk-assign-row {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid #E2E5EA;
}
.iw-prop-bulk-label {
  font-size: 11px;
  color: #4D5560;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.iw-prop-bulk-input-wrap { position: relative; }
.iw-prop-bulk-input,
.iw-prop-bulk-select {
  padding: 7px 10px;
  border: 1px solid #E2E5EA;
  border-radius: 4px;
  background: #FFFFFF;
  font: 13px 'Geist Sans', system-ui, sans-serif;
  color: #1A1F26;
  appearance: none;
  height: 32px;
  box-sizing: border-box;
  width: 100%;
}
.iw-prop-bulk-input::placeholder {
  color: #B7BFC9;
  font-style: italic;
}
.iw-prop-bulk-static {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: #56616E;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.iw-prop-bulk-input:focus,
.iw-prop-bulk-select:focus {
  outline: 2px solid #298084;
  outline-offset: -1px;
  border-color: #298084;
}
.iw-prop-bulk-input.is-money {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  padding-left: 20px;
}
.iw-prop-money-prefix {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: #6B7480;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  pointer-events: none;
}
.iw-prop-bulk-apply {
  padding: 6px 14px;
  background: #FFFFFF;
  border: 1px solid #E2E5EA;
  border-radius: 4px;
  font: 600 11px 'Geist Sans', system-ui, sans-serif;
  color: #6B7480;
  cursor: pointer;
  white-space: nowrap;
  transition: all 100ms ease;
}
.iw-prop-bulk-apply:hover {
  border-color: #B7BFC9;
  color: #1A1F26;
}
.iw-prop-bulk-apply.is-ready {
  background: oklch(0.96 0.02 200);
  border-color: oklch(0.78 0.06 200);
  color: #1A4448;
}
.iw-prop-bulk.has-selection .iw-prop-bulk-apply.is-ready {
  background: #298084;
  border-color: #298084;
  color: #FFFFFF;
}
.iw-prop-bulk-apply.applied {
  background: oklch(0.93 0.05 145);
  border-color: oklch(0.78 0.07 145);
  color: #1A4424;
}

/* Status line */
.iw-prop-status {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  padding: 9px 14px;
  margin: 0 0 14px;
  font-size: 12px;
  color: #4D5560;
}
.iw-prop-status-stat {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}
.iw-prop-status-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #1A1F26;
}
.iw-prop-status-stat.warn { color: oklch(0.45 0.12 55); }
.iw-prop-status-divider {
  width: 1px;
  height: 14px;
  background: #C7CDD5;
}

/* Layout: rail + detail */
.iw-prop-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: start;
  min-height: 480px;
  margin-bottom: 80px; /* room for sticky action bar */
}

/* Rail */
.iw-prop-rail {
  background: #FFFFFF;
  border: 1px solid #E2E5EA;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.iw-prop-rail-head {
  padding: 10px 14px;
  border-bottom: 1px solid #E2E5EA;
  background: #F8F9FB;
  font-size: 10px;
  font-weight: 600;
  color: #6B7480;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.iw-prop-rail-clear {
  padding: 2px 8px;
  border: 1px solid #E2E5EA;
  border-radius: 3px;
  background: #FFFFFF;
  cursor: pointer;
  font: 500 10px 'Geist Sans', system-ui, sans-serif;
  color: #4D5560;
  text-transform: none;
  letter-spacing: 0;
}
.iw-prop-rail-clear:hover { border-color: #B7BFC9; }
.iw-prop-rail-list {
  max-height: 540px;
  overflow-y: auto;
  padding: 4px 0;
}
.iw-prop-rail-item {
  padding: 11px 12px 11px 10px;
  border-bottom: 1px solid #F0F4F8;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: background 100ms ease;
  cursor: pointer;
}
.iw-prop-rail-item:hover { background: #F8F9FB; }
.iw-prop-rail-item.is-selected { background: oklch(0.95 0.02 200); }
.iw-prop-rail-item.is-checked { background: oklch(0.97 0.012 200); }
.iw-prop-rail-item.is-selected.is-checked { background: oklch(0.94 0.025 200); }
.iw-prop-rail-item.is-failed {
  background: oklch(0.98 0.03 75);
  box-shadow: inset 0 0 0 1px oklch(0.86 0.07 65);
}
.iw-prop-rail-checkbox {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1.5px solid #B7BFC9;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 1px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  transition: all 100ms ease;
  cursor: pointer;
}
.iw-prop-rail-checkbox:hover { border-color: #298084; }
.iw-prop-rail-item.is-checked .iw-prop-rail-checkbox {
  background: #298084;
  border-color: #298084;
}
.iw-prop-rail-item.is-checked .iw-prop-rail-checkbox::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.iw-prop-rail-chev {
  width: 8px;
  height: 8px;
  color: #298084;
  visibility: hidden;
  margin-top: 4px;
  flex-shrink: 0;
}
.iw-prop-rail-item.is-selected .iw-prop-rail-chev { visibility: visible; }
.iw-prop-rail-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.iw-prop-rail-label {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: #1A1F26;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iw-prop-rail-meta {
  font-size: 11px;
  color: #6B7480;
  display: flex;
  gap: 8px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.iw-prop-rail-num { font-family: 'JetBrains Mono', monospace; }
.iw-prop-dim { color: #8C95A0; }
.iw-prop-rail-status {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iw-prop-rail-status.ready { background: oklch(0.93 0.05 145); color: #1A4424; }
.iw-prop-rail-status.partial { background: oklch(0.96 0.05 80); color: #4A3614; }
.iw-prop-rail-status.needs { background: oklch(0.96 0.04 25); color: #5C1A1A; }
.iw-prop-rail-status.failed { background: oklch(0.95 0.06 70); color: #4A3614; }
.iw-prop-rail-sub {
  font-size: 10px;
  color: #8C95A0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Detail card */
.iw-prop-detail {
  background: #FFFFFF;
  border: 1px solid #E2E5EA;
  border-radius: 8px;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.iw-prop-detail.iw-prop-empty {
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: #6B7480;
  font-size: 13px;
}
.iw-prop-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.iw-prop-detail-label {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: #1A1F26;
  margin: 0;
  line-height: 1.2;
}
.iw-prop-source {
  font-size: 11px;
  color: #6B7480;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
  display: inline-block;
}
.iw-prop-detail-rowcount {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F0F4F8;
  padding: 4px 10px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #1A4448;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.iw-prop-block-head {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #8C95A0;
  margin: 6px 0 -2px;
}
.iw-prop-block-dest {
  display: grid;
  grid-template-columns: 1.6fr 1fr 60px;
  gap: 12px;
  align-items: end;
}

.iw-prop-price-assign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.iw-prop-price-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.iw-prop-assign-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iw-prop-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.iw-prop-field-label {
  font-size: 10px;
  font-weight: 500;
  color: #6B7480;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iw-prop-input,
.iw-prop-select {
  padding: 8px 11px;
  border: 1px solid #E2E5EA;
  border-radius: 4px;
  background: #FFFFFF;
  font: 13px 'Geist Sans', system-ui, sans-serif;
  color: #1A1F26;
  appearance: none;
  height: 34px;
  box-sizing: border-box;
  width: 100%;
}
.iw-prop-input:focus,
.iw-prop-select:focus {
  outline: 2px solid #298084;
  outline-offset: -1px;
  border-color: #298084;
}
.iw-prop-input.is-money {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  padding-left: 22px;
}
.iw-prop-field-note {
  min-height: 34px;
  display: flex;
  align-items: center;
  color: #6B7480;
  font-size: 12px;
  line-height: 1.35;
}
.iw-prop-money-wrap {
  position: relative;
  display: block;
}
.iw-prop-money-wrap::before {
  content: '$';
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: #6B7480;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.iw-prop-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border: 1px solid #B7BFC9;
  border-radius: 50%;
  color: #6B7480;
  font-size: 9px;
  cursor: help;
  margin-left: 4px;
}
.iw-prop-assign-help {
  margin-top: auto;
  font-size: 11px;
  color: #8C95A0;
  line-height: 1.4;
  padding-top: 8px;
}

/* Sticky bottom action bar */
.iw-prop-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid #E2E5EA;
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.iw-prop-actions-info {
  font-size: 12px;
  color: #6B7480;
  font-variant-numeric: tabular-nums;
}
.iw-prop-actions-info strong {
  color: #1A1F26;
  font-weight: 600;
}
.iw-prop-actions-buttons {
  display: flex;
  gap: 10px;
}
.iw-prop-btn-primary {
  background: #298084;
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  font: 600 13px 'Geist Sans', system-ui, sans-serif;
  cursor: pointer;
}
.iw-prop-btn-primary:hover { filter: brightness(1.08); }
.iw-prop-btn-primary[disabled] {
  background: #D2D7DD;
  cursor: not-allowed;
}
.iw-prop-btn-secondary {
  background: #FFFFFF;
  color: #1A1F26;
  border: 1px solid #E2E5EA;
  padding: 9px 14px;
  border-radius: 4px;
  font: 500 12px 'Geist Sans', system-ui, sans-serif;
  cursor: pointer;
}
.iw-prop-btn-secondary:hover { border-color: #B7BFC9; }

/* Phase 2I-g — error toast inside the Context stage (formerly Properties) */
.iw-prop-toast {
  background: oklch(0.96 0.06 25);
  border: 1px solid oklch(0.7 0.12 25);
  color: #5C1A1A;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin: 0 0 12px;
  font-weight: 500;
}

/* ===========================================================================
   Phase 2L — Review stage (Mock A locked 2026-05-14)
   Spec: src/mock/review-stage-v1.html
   =========================================================================== */

.iw-rv-loading { text-align: center; padding: 64px 24px; font-size: 14px; color: #6B7480; }

.iw-rv-hero { margin: 6px 0 14px; }
.iw-rv-hero h1 { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-weight: 500; font-size: 24px; margin: 0; color: #1A1F26; }
.iw-rv-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; }
.iw-rv-hero-meta { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #6B7480; font-variant-numeric: tabular-nums; }

/* Phase 3 — AI extract trigger + state */
.iw-rv-ai-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 4px; cursor: pointer;
  font-family: 'Geist Sans', sans-serif; font-size: 12px; font-weight: 600;
  background: oklch(0.96 0.04 200); color: #1A4448;
  border: 1px solid oklch(0.86 0.06 200);
  transition: background-color .12s, border-color .12s;
}
.iw-rv-ai-btn:hover { background: oklch(0.93 0.06 200); border-color: oklch(0.78 0.10 200); }
.iw-rv-ai-pending { font-size: 12px; color: #6B7480; font-style: italic; }
.iw-rv-ai-done { font-size: 12px; color: #1A4448; font-weight: 500; }

/* Phase 3 — AI suggestions inside drawer */
.iw-rv-ai-model { font-size: 11px; font-weight: 400; color: #6B7480; }
.iw-rv-ai-list { display: flex; flex-direction: column; gap: 10px; }
.iw-rv-ai-cell {
  border: 1px solid #E2E5EA; border-radius: 6px;
  padding: 10px 12px; background: #FFFFFF;
}
.iw-rv-ai-cell.accepted { background: oklch(0.96 0.04 145); border-color: oklch(0.78 0.06 145); }
.iw-rv-ai-cell.rejected { opacity: .55; background: #FBFBFD; }
.iw-rv-ai-cell-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.iw-rv-ai-field {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  background: #F3F4F6; color: #1A1F26; padding: 2px 6px; border-radius: 3px;
}
.iw-rv-ai-conf {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  padding: 2px 6px; border-radius: 3px; letter-spacing: .04em;
}
.iw-rv-ai-conf.high { background: oklch(0.93 0.06 145); color: #1A4424; }
.iw-rv-ai-conf.mid  { background: oklch(0.93 0.06 80);  color: #4A3614; }
.iw-rv-ai-conf.low  { background: oklch(0.93 0.06 25);  color: #5C1A1A; }
.iw-rv-ai-diff { font-size: 13px; line-height: 1.5; }
.iw-rv-ai-current { color: #6B7480; }
.iw-rv-ai-suggested { color: #1A1F26; }
.iw-rv-ai-label { color: #8C95A0; font-weight: 600; margin-right: 4px; }
.iw-rv-ai-reason { font-size: 11px; color: #6B7480; margin-top: 6px; line-height: 1.4; font-style: italic; }
.iw-rv-ai-actions { display: flex; gap: 8px; margin-top: 10px; }
.iw-rv-ai-btn-accept,
.iw-rv-ai-btn-reject {
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  border-radius: 4px; cursor: pointer; border: 1px solid;
  font-family: inherit;
}
.iw-rv-ai-btn-accept { background: #298084; color: #FFFFFF; border-color: #298084; }
.iw-rv-ai-btn-accept:hover { background: #1F5E61; border-color: #1F5E61; }
.iw-rv-ai-btn-reject { background: transparent; color: #6B7480; border-color: #D1D5DB; }
.iw-rv-ai-btn-reject:hover { background: #F3F4F6; color: #1A1F26; }
.iw-rv-ai-decided { font-size: 11px; color: #6B7480; margin-top: 8px; font-weight: 500; }
/* B3: "Un-accept" reuses the reject treatment (quiet secondary), inline beside the "Accepted" label */
.iw-rv-ai-btn-unaccept {
  margin-left: 8px; padding: 3px 10px; font-family: inherit; font-size: 11px; font-weight: 600;
  border-radius: 4px; cursor: pointer; border: 1px solid #D1D5DB;
  background: transparent; color: #6B7480;
}
.iw-rv-ai-btn-unaccept:hover { background: #F3F4F6; color: #1A1F26; }

.iw-rv-toast {
  background: oklch(0.96 0.06 25); border: 1px solid oklch(0.7 0.12 25);
  color: #5C1A1A; padding: 10px 14px; border-radius: 6px;
  font-size: 13px; margin: 0 0 12px; font-weight: 500;
}

/* Phase 3D — multi-sheet banner */
.iw-rv-ms-banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; margin: 0 0 14px;
  border-radius: 6px; font-size: 13px; line-height: 1.5;
}
.iw-rv-ms-banner.ok {
  background: oklch(0.97 0.04 145); border: 1px solid oklch(0.84 0.06 145);
  color: #1A4424;
}
.iw-rv-ms-banner.warn {
  background: oklch(0.97 0.05 80); border: 1px solid oklch(0.82 0.10 80);
  color: #4A3614;
}
.iw-rv-ms-icon { font-size: 16px; line-height: 1.2; flex-shrink: 0; }
.iw-rv-ms-text { flex: 1; min-width: 0; }
.iw-rv-ms-text strong { display: block; margin-bottom: 2px; }
.iw-rv-ms-hint { color: #6B7480; font-size: 12px; font-style: italic; }

/* Filter chips */
.iw-rv-chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 14px 16px; margin: 0 0 14px;
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
}
.iw-rv-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid #E2E5EA; border-radius: 16px;
  background: #FFFFFF; cursor: pointer;
  font: 500 12px 'Geist Sans', system-ui, sans-serif; color: #4D5560;
  transition: all 80ms ease;
}
.iw-rv-chip:hover { border-color: #B7BFC9; color: #1A1F26; }
.iw-rv-chip.is-active { background: #298084; border-color: #298084; color: #FFFFFF; }
.iw-rv-chip-count {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  padding: 1px 6px; border-radius: 8px;
  background: #F0F4F8; color: #6B7480; font-variant-numeric: tabular-nums;
}
.iw-rv-chip.is-active .iw-rv-chip-count { background: rgba(255,255,255,.2); color: #FFFFFF; }
.iw-rv-chip.warn .iw-rv-chip-count { background: oklch(0.93 0.07 25); color: #5C1A1A; }
.iw-rv-chip.ready .iw-rv-chip-count { background: oklch(0.93 0.05 145); color: #1A4424; }
.iw-rv-chip-divider { width: 1px; background: #E2E5EA; margin: 4px 0; }

/* W2 calm Workbook — 3-cell summary bar (Ready · Needs review · Ready offer).
   Flat, 1px neutral hairlines between cells (no accent stripe), money green. */
.iw-wb-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 8px;
  background: #E2E5EA;
  border: 1px solid #E2E5EA;
  border-radius: 8px;
  overflow: hidden;
}
.iw-wb-cell { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; background: #FFFFFF; }
.iw-wb-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #6B7480;
}
.iw-wb-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 600; color: #1A1F26;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.iw-wb-of { font-size: 13px; font-weight: 400; color: #8C95A0; }
.iw-wb-review.is-active .iw-wb-num { color: var(--color-warning, #B26B00); }
.iw-wb-money { color: var(--color-success, #1F8A4C); }
.iw-wb-setaside {
  display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 4px 2px; border: 0; background: transparent;
  color: #6B7480; font-size: 12px; cursor: pointer;
}
.iw-wb-setaside:hover { text-decoration: underline; }
.iw-wb-setaside-num { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: #4D5560; font-variant-numeric: tabular-nums; }
.iw-wb-setaside-break { color: #8C95A0; }
/* Narrow viewports: stack the 3 cells so a large (7-figure) Ready offer never
   overflows its cell. minmax(0,1fr) alone can't shrink a 22px mono number. */
@media (max-width: 560px) {
  .iw-wb-bar { grid-template-columns: 1fr; }
  .iw-wb-cell { padding: 10px 14px; }
}

/* Grid */
.iw-rv-grid-wrap {
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
  overflow: hidden; margin-bottom: 80px;
}
.iw-rv-grid-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: #F8F9FB; border-bottom: 1px solid #E2E5EA;
  font-size: 11px; color: #6B7480;
}
.iw-rv-match-bulk {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; background: oklch(0.985 0.018 85);
  border-bottom: 1px solid oklch(0.86 0.07 80);
  font-size: 12px; color: #4A3614;
}
.iw-rv-match-bulk strong { display: block; color: #1A1F26; margin-bottom: 2px; }
.iw-rv-match-bulk span { color: #6B5B2A; }
.iw-rv-match-bulk-actions {
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; flex-shrink: 0;
}
.iw-rv-match-bulk-actions button {
  min-height: 30px; padding: 0 10px; border-radius: 5px;
  border: 1px solid oklch(0.78 0.08 80);
  background: #FFFFFF; color: #4A3614;
  font: 650 11px 'Geist Sans', system-ui, sans-serif; cursor: pointer;
}
.iw-rv-match-bulk-actions button:hover {
  border-color: #298084; color: #1F6F73;
}
.iw-rv-cluster-bulk {
  border-bottom: 1px solid #E2E5EA;
  background: #FFFFFF;
}
.iw-rv-cluster-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px 6px;
  font-size: 12px; color: #6B7480;
}
.iw-rv-cluster-head strong { display: block; color: #1A1F26; margin-bottom: 2px; }
.iw-rv-cluster-list {
  max-height: 260px; overflow: auto;
  border-top: 1px solid #F0F4F8;
}
.iw-rv-cluster-row {
  display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .9fr) auto;
  gap: 12px; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid #F0F4F8;
}
.iw-rv-cluster-row:last-child { border-bottom: 0; }
.iw-rv-cluster-main,
.iw-rv-cluster-candidate {
  min-width: 0; display: flex; flex-direction: column; gap: 2px;
}
.iw-rv-cluster-main span,
.iw-rv-cluster-candidate span {
  font-weight: 650; color: #1A1F26; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iw-rv-cluster-main small,
.iw-rv-cluster-candidate small {
  color: #6B7480; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iw-rv-cluster-candidate small.is-strong { color: #1A6635; }
.iw-rv-cluster-candidate small.is-weak { color: #8A5A00; }
.iw-rv-cluster-actions {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end;
}
.iw-rv-cluster-actions button {
  min-height: 30px; padding: 0 9px; border-radius: 5px;
  border: 1px solid #D8DEE6; background: #FFFFFF; color: #2E3742;
  font: 650 11px 'Geist Sans', system-ui, sans-serif; cursor: pointer;
}
.iw-rv-cluster-actions button:hover { border-color: #298084; color: #1F6F73; }
.iw-rv-cluster-actions button[disabled] { opacity: .55; cursor: not-allowed; }
.iw-rv-search {
  padding: 5px 10px; border: 1px solid #E2E5EA; border-radius: 4px;
  font: 12px 'Geist Sans', system-ui, sans-serif; width: 240px;
}
.iw-rv-bulk-btn {
  padding: 5px 12px; border: 1px solid oklch(0.84 0.07 25); border-radius: 4px;
  background: oklch(0.97 0.04 25); color: #5C1A1A;
  font: 500 11px 'Geist Sans', system-ui, sans-serif; cursor: pointer;
}
.iw-rv-bulk-btn:hover { filter: brightness(0.96); }
.iw-rv-bulk-btn[disabled],
.iw-rv-match-bulk-actions button[disabled] {
  opacity: .55; cursor: not-allowed; filter: none;
}
.iw-rv-grid-scroll { max-height: 560px; overflow: auto; }
.iw-rv-empty { padding: 48px; text-align: center; color: #6B7480; font-size: 13px; }

.iw-rv-grid { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 12px; }
.iw-rv-grid thead th {
  background: #F8F9FB; padding: 8px 10px; text-align: left;
  font-size: 10px; font-weight: 600; color: #6B7480;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid #E2E5EA; white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.iw-rv-grid tbody td {
  padding: 9px 10px; border-bottom: 1px solid #F0F4F8;
  vertical-align: middle;
}
.iw-rv-row { cursor: pointer; }
.iw-rv-row:hover { background: oklch(0.99 0.005 200); }
.iw-rv-row.is-issue { background: oklch(0.99 0.012 25); }
.iw-rv-row.is-issue:hover { background: oklch(0.97 0.018 25); }
/* W1 P3 (Codex review): non-estate missing-NRA demoted-ready rows — amber
   warning tint (hue 80), distinct from the blocking red is-issue (hue 25). */
.iw-rv-row.is-warn { background: oklch(0.98 0.035 80); }
.iw-rv-row.is-warn:hover { background: oklch(0.96 0.05 80); }
.iw-rv-row.is-selected { background: oklch(0.95 0.02 200); }
.iw-rv-row.is-rejected { opacity: 0.55; }
.iw-rv-row.is-rejected td { text-decoration: line-through; }
.iw-rv-row.is-rejected .iw-rv-row-actions,
.iw-rv-row.is-rejected .iw-rv-row-actions button { text-decoration: none; }

.iw-rv-select-col { width: 34px; text-align: center; }
.iw-rv-actions-col { width: 76px; }
.iw-rv-row-check {
  width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: #298084;
}
.iw-rv-selected-count {
  font: 600 11px 'JetBrains Mono', monospace;
  color: #1A4448; background: oklch(0.96 0.025 190);
  border: 1px solid oklch(0.86 0.04 190); border-radius: 10px;
  padding: 3px 7px; white-space: nowrap;
}
.iw-rv-num-col { width: 40px; }
.iw-rv-rownum {
  width: 40px;
  max-width: 40px;
  font-family: 'JetBrains Mono', monospace;
  color: #8C95A0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.iw-rv-rownum span {
  display: block;
}
.iw-rv-owner { font-weight: 500; color: #1A1F26; }
.iw-rv-owner-sub { font-size: 10px; color: #8C95A0; margin-top: 2px; }
.iw-rv-addr {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #4D5560;
  max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.iw-rv-nra { font-family: 'JetBrains Mono', monospace; text-align: right; font-variant-numeric: tabular-nums; }
.iw-rv-prop-chip {
  display: inline-block; padding: 1px 7px; border-radius: 11px;
  font: 500 10px 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  background: oklch(0.96 0.018 200); color: #1A4448;
  border: 1px solid oklch(0.86 0.04 200);
}
.iw-rv-type {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600;
  color: #4D5560;
}
.iw-rv-type.is-wi { color: oklch(0.45 0.12 55); }
.iw-rv-interest-cell,
.iw-rv-price-cell,
.iw-rv-route-cell,
.iw-rv-match-cell {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.iw-rv-interest-cell small,
.iw-rv-price-cell small,
.iw-rv-route-cell small,
.iw-rv-match-cell small {
  display: block; max-width: 160px;
  color: #8C95A0; font-size: 10px; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iw-rv-price-cell,
.iw-rv-route-cell {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
}
.iw-rv-price-cell span,
.iw-rv-route-cell span,
.iw-rv-match-cell span {
  color: #1A1F26; font-weight: 600; white-space: nowrap;
}
/* Owner-match candidate names can be long — let them wrap inside the yellow box
   instead of running out of it (price/route stay nowrap; they're short numbers). */
.iw-rv-match-cell span {
  white-space: normal;
  overflow-wrap: anywhere;
}
.iw-rv-price-cell .is-muted,
.iw-rv-route-cell .is-muted,
.iw-rv-match-cell .is-muted {
  color: #8C95A0; font-weight: 500; font-family: 'Geist Sans', system-ui, sans-serif;
}
.iw-rv-match-cell {
  max-width: 220px;
  font-size: 11px;
}
.iw-rv-match-cell.is-warn {
  background: oklch(0.98 0.035 80);
  border: 1px solid oklch(0.86 0.07 80);
  border-radius: 6px;
  padding: 6px 7px;
}
.iw-rv-match-cell.is-set {
  background: oklch(0.97 0.035 145);
  border: 1px solid oklch(0.84 0.06 145);
  border-radius: 6px;
  padding: 6px 7px;
}
.iw-rv-match-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.iw-rv-match-actions button,
.iw-rv-row-actions button {
  border: 1px solid #D8DEE6; background: #FFFFFF; color: #2E3742;
  border-radius: 5px; padding: 4px 7px; white-space: nowrap;
  font: 650 10px 'Geist Sans', system-ui, sans-serif; cursor: pointer;
}
.iw-rv-match-actions button:hover,
.iw-rv-row-actions button:hover {
  border-color: #298084; color: #1F6F73;
}
.iw-rv-row-actions { white-space: nowrap; }
.iw-rv-class-pill {
  display: inline-block; padding: 1px 6px; border-radius: 2px;
  font: 600 9px 'Geist Sans', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.iw-rv-class-pill.target { background: oklch(0.94 0.04 145); color: #1A4424; }
.iw-rv-class-pill.pro { background: oklch(0.94 0.05 80); color: #4A3614; }
.iw-rv-class-pill.government { background: oklch(0.94 0.02 250); color: #1F3057; }
.iw-rv-class-pill.charity { background: oklch(0.94 0.04 320); color: #4B1A47; }
.iw-rv-class-pill.unclassified { background: #F0F4F8; color: #6B7480; }

/* Issue dots */
.iw-rv-issues { display: inline-flex; gap: 4px; }
.iw-rv-issue-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font: 600 9px 'JetBrains Mono', monospace;
}
.iw-rv-issue-dot.math { background: oklch(0.93 0.08 55); color: #5C3D0E; }
.iw-rv-issue-dot.fuzzy { background: oklch(0.93 0.08 250); color: #1F3057; }
.iw-rv-issue-dot.flag { background: oklch(0.93 0.08 25); color: #5C1A1A; }
.iw-rv-issue-dot.wi { background: oklch(0.96 0.06 55); color: #5C3D0E; border: 1px solid oklch(0.78 0.10 55); }
.iw-rv-issue-dot.ready { background: oklch(0.93 0.05 145); color: #1A4424; }
.iw-rv-issue-dot.dim { background: #F0F4F8; color: #8C95A0; }

/* Sticky bottom */
.iw-rv-actions {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #FFFFFF; border-top: 1px solid #E2E5EA;
  padding: 12px 32px; display: flex; justify-content: space-between;
  align-items: center; z-index: 50;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  transition: right 200ms ease;
}
.iw-rv-actions-info { font-size: 12px; color: #6B7480; }
.iw-rv-actions-info strong { color: #1A1F26; }
.iw-rv-btn-primary {
  background: #298084; color: #FFFFFF; border: none; padding: 10px 18px;
  border-radius: 4px; font: 600 13px 'Geist Sans', system-ui, sans-serif;
  cursor: pointer;
}
.iw-rv-btn-primary:hover { filter: brightness(1.08); }
.iw-rv-btn-primary[disabled] { background: #D2D7DD; cursor: not-allowed; }
.iw-rv-btn-secondary {
  background: #FFFFFF; color: #1A1F26; border: 1px solid #E2E5EA;
  padding: 9px 14px; border-radius: 4px;
  font: 500 12px 'Geist Sans', system-ui, sans-serif; cursor: pointer;
}
.iw-rv-btn-secondary:hover { border-color: #B7BFC9; }

/* Drawer */
.iw-rv-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px;
  background: #FFFFFF; border-left: 1px solid #E2E5EA;
  box-shadow: -8px 0 24px rgba(0,0,0,0.08);
  display: flex; flex-direction: column; z-index: 60;
}
.iw-rv-drawer-head {
  padding: 18px 22px 14px; border-bottom: 1px solid #E2E5EA;
  position: relative;
}
.iw-rv-drawer-head h2 {
  font-family: 'Newsreader', Georgia, serif; font-style: italic;
  font-weight: 500; font-size: 20px; margin: 0;
  color: #1A1F26; line-height: 1.2;
}
.iw-rv-drawer-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: #6B7480; margin-top: 6px;
}
.iw-rv-drawer-close {
  position: absolute; top: 14px; right: 16px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #F0F4F8; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; color: #6B7480;
  z-index: 2;
}
.iw-rv-drawer-body {
  flex: 1; overflow-y: auto; padding: 18px 22px;
  display: flex; flex-direction: column; gap: 18px;
}
.iw-rv-drawer-section h3 {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600; color: #8C95A0; margin: 0 0 8px;
}
.iw-rv-banner-warn {
  padding: 8px 11px; border-radius: 4px;
  background: oklch(0.96 0.05 25); border: 1px solid oklch(0.84 0.07 25);
  color: #5C1A1A; font-size: 12px;
}
.iw-rv-banner-info {
  padding: 8px 11px; border-radius: 4px;
  background: oklch(0.96 0.02 250); border: 1px solid oklch(0.84 0.04 250);
  color: #1F3057; font-size: 12px;
}
/* W2b: "QA passed with warning" — calm, muted, NEUTRAL (deliberately NOT amber/
   warn-colored) so a ready row's notice reads as quiet provenance, not an alarm. */
.iw-rv-qa-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 0 12px; padding: 8px 12px;
  font-size: 12px; line-height: 1.45; color: #5B6470;
  background: #F8F9FB; border: 1px solid #E2E5EA; border-radius: 6px;
}
.iw-rv-qa-ic { flex: none; margin-top: 1px; color: #6B7480; }
.iw-rv-qa-label { font-weight: 650; color: #3D4651; }
.iw-rv-math-review {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.iw-rv-math-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.iw-rv-math-note {
  min-height: 74px;
  line-height: 1.4;
}
.iw-rv-help-note {
  font-size: 10px; color: #8C95A0; line-height: 1.4; margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
}

/* Fuzzy match cards */
.iw-rv-fuzzy-list { display: flex; flex-direction: column; gap: 8px; }
.iw-rv-fuzzy-card {
  border: 1px solid #E2E5EA; border-radius: 6px;
  padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer; transition: border-color 80ms ease;
}
.iw-rv-fuzzy-card:hover { border-color: #298084; }
.iw-rv-fuzzy-card.is-recommended { border-color: oklch(0.78 0.06 200); background: oklch(0.99 0.012 200); }
.iw-rv-fuzzy-card.is-selected { border-color: #298084; background: oklch(0.985 0.015 190); }
.iw-rv-fuzzy-radio {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid #B7BFC9; flex-shrink: 0; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
}
.iw-rv-fuzzy-radio.is-checked { border-color: #298084; }
.iw-rv-fuzzy-radio.is-checked::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #298084;
}
.iw-rv-fuzzy-body { flex: 1; min-width: 0; }
.iw-rv-fuzzy-name { font-weight: 600; font-size: 13px; color: #1A1F26; line-height: 1.2; }
.iw-rv-fuzzy-detail { font-size: 11px; color: #6B7480; margin-top: 3px; }
.iw-rv-fuzzy-choice { font-size: 11px; color: #298084; margin-top: 5px; font-weight: 650; }
.iw-rv-fuzzy-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.iw-rv-fuzzy-btn {
  border: 1px solid #D8DEE6; background: #fff; color: #2E3742;
  border-radius: 6px; padding: 5px 8px; font-size: 11px; font-weight: 650;
  cursor: pointer;
}
.iw-rv-fuzzy-btn:hover { border-color: #298084; color: #1F6F73; }
.iw-rv-fuzzy-btn.primary { background: #298084; border-color: #298084; color: #fff; }
.iw-rv-fuzzy-score {
  display: inline-block; padding: 1px 6px; border-radius: 2px;
  font: 600 9px 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
}
.iw-rv-fuzzy-score.high { background: oklch(0.93 0.05 145); color: #1A4424; }
.iw-rv-fuzzy-score.mid { background: oklch(0.93 0.05 80); color: #4A3614; }
.iw-rv-fuzzy-score.low { background: oklch(0.93 0.05 25); color: #5C1A1A; }

/* Drawer edit fields */
.iw-rv-field { display: flex; flex-direction: column; gap: 4px; }
.iw-rv-field-label {
  font-size: 10px; font-weight: 500; color: #6B7480;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.iw-rv-input {
  padding: 8px 11px; border: 1px solid #E2E5EA; border-radius: 4px;
  background: #FFFFFF; font: 13px 'Geist Sans', system-ui, sans-serif;
  height: 34px; box-sizing: border-box; width: 100%;
}
.iw-rv-textarea {
  height: 86px; min-height: 86px; resize: vertical; line-height: 1.35;
}
.iw-rv-input:focus {
  outline: 2px solid #298084; outline-offset: -1px; border-color: #298084;
}
.iw-rv-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.iw-rv-drawer-footer {
  padding: 14px 22px; border-top: 1px solid #E2E5EA;
  display: flex; justify-content: space-between; gap: 10px;
}

/* ===========================================================================
   Phase 2I-g — Assign (commit confirmation) + Finalized stages
   =========================================================================== */

.iw-as-loading, .iw-fz-loading {
  text-align: center; padding: 64px 24px;
  font-size: 14px; color: #6B7480;
}

/* Hero (shared) */
.iw-as-hero, .iw-fz-hero {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 6px 0 18px;
}
.iw-as-hero h1, .iw-fz-hero h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic; font-weight: 500; font-size: 24px;
  margin: 0; color: #1A1F26;
}
.iw-as-hero-meta, .iw-fz-hero-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #6B7480; font-variant-numeric: tabular-nums;
}

/* Sections */
.iw-as-section { margin-bottom: 18px; }
.iw-as-section-head {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600; color: #8C95A0; margin: 0 0 8px;
}
.iw-as-section-note {
  font-size: 11px; color: #8C95A0; margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
}
.iw-as-section-note a {
  color: #298084; text-decoration: none; border-bottom: 1px solid currentColor;
}

/* Routing table */
.iw-as-table-wrap {
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
  overflow: hidden;
}
.iw-as-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.iw-as-table thead th {
  background: #F8F9FB; padding: 9px 14px; text-align: left;
  font-size: 10px; font-weight: 600; color: #6B7480;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid #E2E5EA;
}
.iw-as-table tbody td {
  padding: 11px 14px; border-bottom: 1px solid #F0F4F8; vertical-align: middle;
}
.iw-as-table tbody tr:last-child td { border-bottom: none; }
.iw-as-prop-label {
  font-family: 'Newsreader', Georgia, serif; font-style: italic;
  font-weight: 500; font-size: 13px; color: #1A1F26;
}
.iw-as-money {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  color: #1A4448;
}
.iw-as-num {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  text-align: right; font-weight: 600;
}

/* Tile grid (shared with finalized) */
.iw-as-tiles, .iw-fz-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.iw-as-tile, .iw-fz-tile {
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
  padding: 14px 16px;
}
.iw-as-tile-label, .iw-fz-tile-label {
  font-size: 10px; font-weight: 500; color: #6B7480;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.iw-as-tile-value, .iw-fz-tile-value {
  font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 600;
  color: #1A1F26; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.iw-as-tile-sub, .iw-fz-tile-sub {
  font-size: 10px; color: #8C95A0; margin-top: 4px;
}

/* Sticky bottom action bar */
.iw-as-actions {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #FFFFFF; border-top: 1px solid #E2E5EA;
  padding: 12px 32px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 50; box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.iw-as-actions-info { font-size: 12px; color: #6B7480; }
.iw-as-actions-info strong { color: #1A1F26; }

.iw-fz-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px;
}

.iw-fz-undo {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(220,38,38,.18);
  background: rgba(220,38,38,.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.iw-fz-undo-title {
  font: 700 13px 'Geist Sans', system-ui, sans-serif;
  color: #1A1F26;
}
.iw-fz-undo-copy,
.iw-fz-undo-meta {
  margin-top: 3px;
  font: 500 12px 'Geist Sans', system-ui, sans-serif;
  color: #6B7480;
}
.iw-as-btn-danger {
  color: var(--color-danger, #DC2626);
  border-color: rgba(220,38,38,.22);
  white-space: nowrap;
}
.iw-as-btn-danger:hover {
  border-color: rgba(220,38,38,.42);
  background: rgba(220,38,38,.06);
}

.iw-as-btn-primary {
  background: #298084; color: #FFFFFF; border: none; padding: 10px 18px;
  border-radius: 4px; font: 600 13px 'Geist Sans', system-ui, sans-serif;
  cursor: pointer;
}
.iw-as-btn-primary:hover { filter: brightness(1.08); }
.iw-as-btn-primary[disabled] { background: #D2D7DD; cursor: not-allowed; }
.iw-as-btn-secondary {
  background: #FFFFFF; color: #1A1F26; border: 1px solid #E2E5EA;
  padding: 9px 14px; border-radius: 4px;
  font: 500 12px 'Geist Sans', system-ui, sans-serif; cursor: pointer;
}
.iw-as-btn-secondary:hover { border-color: #B7BFC9; }
.iw-as-btn-secondary[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ===========================================================================
   Phase 2L-h — Validate stage (parse summary + confidence matrix)
   =========================================================================== */

.iw-vd-loading { text-align: center; padding: 64px 24px; font-size: 14px; color: #6B7480; }

.iw-vd-hero {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 6px 0 18px;
}
.iw-vd-hero h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic; font-weight: 500; font-size: 24px;
  margin: 0; color: #1A1F26;
}
.iw-vd-hero-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #6B7480; font-variant-numeric: tabular-nums;
}

/* Tile grid */
.iw-vd-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.iw-vd-tile {
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
  padding: 14px 16px;
}
.iw-vd-tile-label {
  font-size: 10px; font-weight: 500; color: #6B7480;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.iw-vd-tile-value {
  font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 600;
  color: #1A1F26; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.iw-vd-tile-value.is-warn { color: oklch(0.45 0.12 55); }
.iw-vd-tile-sub { font-size: 10px; color: #8C95A0; margin-top: 4px; }

/* Sections */
.iw-vd-section { margin-bottom: 18px; }
.iw-vd-section-head {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600; color: #8C95A0; margin: 0 0 10px;
}
.iw-vd-section-note {
  font-size: 11px; color: #8C95A0; margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.iw-vd-section-note a {
  color: #298084; text-decoration: none; border-bottom: 1px solid currentColor;
}
.iw-vd-empty {
  background: oklch(0.97 0.04 145); border: 1px solid oklch(0.84 0.07 145);
  color: #1A4424; font-size: 12px;
  padding: 14px 16px; border-radius: 6px;
}

/* Confidence matrix */
.iw-vd-conf-grid {
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
  padding: 12px 16px; display: flex; flex-direction: column; gap: 12px;
}
.iw-vd-conf-row {
  display: grid;
  grid-template-columns: 140px 1fr 180px;
  align-items: center;
  gap: 14px;
}
.iw-vd-conf-label {
  font-size: 12px; color: #4D5560; font-weight: 500;
  text-transform: capitalize;
}
.iw-vd-conf-bar {
  display: flex; height: 8px; border-radius: 4px; overflow: hidden;
  background: #F0F4F8;
}
.iw-vd-conf-seg { display: inline-block; height: 100%; }
.iw-vd-conf-seg.high { background: oklch(0.7 0.12 145); }
.iw-vd-conf-seg.med  { background: oklch(0.72 0.12 80); }
.iw-vd-conf-seg.low  { background: oklch(0.65 0.15 25); }
.iw-vd-conf-numbers {
  display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.iw-vd-conf-num {
  padding: 1px 6px; border-radius: 8px;
}
.iw-vd-conf-num.high { background: oklch(0.93 0.05 145); color: #1A4424; }
.iw-vd-conf-num.med  { background: oklch(0.94 0.05 80); color: #4A3614; }
.iw-vd-conf-num.low  { background: oklch(0.93 0.07 25); color: #5C1A1A; }

/* Classification breakdown */
.iw-vd-class-bar {
  display: flex; height: 16px; border-radius: 8px; overflow: hidden;
  background: #F0F4F8; margin-bottom: 10px;
}
.iw-vd-class-seg { display: inline-block; height: 100%; }
.iw-vd-class-seg.target       { background: oklch(0.7 0.12 145); }
.iw-vd-class-seg.pro          { background: oklch(0.72 0.12 80); }
.iw-vd-class-seg.government   { background: oklch(0.65 0.10 250); }
.iw-vd-class-seg.charity      { background: oklch(0.68 0.10 320); }
.iw-vd-class-seg.unclassified { background: #B7BFC9; }
.iw-vd-class-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.iw-vd-class-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #4D5560;
  text-transform: capitalize;
}
.iw-vd-class-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.iw-vd-class-dot.target       { background: oklch(0.7 0.12 145); }
.iw-vd-class-dot.pro          { background: oklch(0.72 0.12 80); }
.iw-vd-class-dot.government   { background: oklch(0.65 0.10 250); }
.iw-vd-class-dot.charity      { background: oklch(0.68 0.10 320); }
.iw-vd-class-dot.unclassified { background: #B7BFC9; }
.iw-vd-class-num {
  font-family: 'JetBrains Mono', monospace; font-weight: 600;
  color: #1A1F26; font-variant-numeric: tabular-nums;
}

/* Validate actions row */
.iw-vd-actions {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0 4px;
}
.iw-vd-actions-info { font-size: 12px; color: #6B7480; }
.iw-vd-actions-info strong { color: #1A1F26; }

/* Phase 2O — unset money label + rejected-count badge */
.iw-as-money-unset {
  color: #8C95A0; font-style: italic; font-size: 11px;
  font-family: 'Geist Sans', system-ui, sans-serif;
}
.iw-as-num-rejected {
  color: oklch(0.55 0.18 25); font-weight: 400;
  font-size: 10px; margin-left: 4px;
}

/* F2 — draft resume panel (offered on the upload stage) */
.iw-resume-panel {
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
  padding: 16px 18px; margin-bottom: 20px;
}
.iw-resume-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.iw-resume-title {
  font: 600 14px 'Geist Sans', system-ui, sans-serif; color: #1A1F26;
}
.iw-resume-sub { font-size: 12px; color: #6B7480; }
.iw-resume-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid #E2E5EA; border-radius: 6px;
  background: #F8F9FB;
}
.iw-resume-row + .iw-resume-row { margin-top: 8px; }
.iw-resume-rowmain { min-width: 0; }
.iw-resume-file {
  font: 500 13px 'Geist Sans', system-ui, sans-serif; color: #1A1F26;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iw-resume-meta { font-size: 11px; color: #8C95A0; margin-top: 2px; }
.iw-resume-rowactions { display: flex; gap: 8px; flex-shrink: 0; }
.iw-resume-btn {
  background: #298084; color: #FFFFFF; border: none; padding: 7px 14px;
  border-radius: 4px; font: 600 12px 'Geist Sans', system-ui, sans-serif; cursor: pointer;
}
.iw-resume-btn:hover { filter: brightness(1.08); }
.iw-resume-discard {
  background: #FFFFFF; color: #6B7480; border: 1px solid #E2E5EA; padding: 7px 12px;
  border-radius: 4px; font: 500 12px 'Geist Sans', system-ui, sans-serif; cursor: pointer;
}
.iw-resume-discard:hover { color: #1A1F26; border-color: #D2D7DD; }
.iw-resume-discard[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ========================================================================= */
/* W1 Import Workspace (2026-06-04)                                          */
/* Composes propertiesStage bulk bar + rail, reviewStage owner grid, and     */
/* assignStage commit summary into one surface. Suppresses each stage's own  */
/* page chrome (hero/actions) inside the workspace regions; the workspace     */
/* owns the single fixed Commit bar. Spec: IMPORT-W1-PLAN-2026-06-04.md.     */
/* ========================================================================= */
.iw-ws {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 84px;   /* clear the fixed commit bar */
}

/* --- W3: the bulk place/price region was removed (Context owns place/price). - */

/* --- Grid region: reviewStage owner table. Suppress the stage's own hero +
   fixed actions bar — the workspace provides the title + commit. The grid,
   chips, status line, drawer, and toasts all stay intact. ----------------- */
#iw-ws-grid .iw-rv-hero,
#iw-ws-grid .iw-rv-actions { display: none; }
#iw-ws-grid .iw-rv-grid-wrap { margin-bottom: 0; }
/* The workspace review grid is the one intrinsically-wide surface in the wizard
   (its table has min-width:1180px). #view-import caps the whole view at 1280px,
   which left the grid ~1164px — 16px short of the table, so the rightmost column
   ("Remove") clipped and the row needed a horizontal scroll to reach it (users
   zoomed the whole browser out to cope — observed 2026-06-30). Reclaim the card's
   horizontal padding for the grid so the table fits at desktop widths. The grid
   still sits inside the card border, and .iw-rv-grid-scroll (overflow:auto) keeps
   scrolling it internally on narrow / zoomed viewports — no page-level overflow.
   Scoped >768px so the mobile sticky-column layout below is untouched. Verified
   live at 1718w (fits, no scroll) and 1120w (scrolls, no page overflow) 2026-06-30. */
@media (min-width: 769px) {
  #iw-ws-grid { margin-left: -16px; margin-right: -16px; }
}

/* --- Commit summary region: assignStage tiles (no actions bar) ----------- */
.iw-ws-commit .iw-as-actions { display: none; }   /* defensive — summary body has none */
.iw-ws-commit .iw-as-hero { margin-bottom: 12px; }

/* --- Single fixed Commit bar (mirrors the legacy .iw-rv-actions pattern) -- */
.iw-ws-commitbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center;
  background: #FFFFFF; border-top: 1px solid #E2E5EA;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
/* Cap + center the bar's content to match #view-import (max-width 1280, margin
   auto) so the "Add owners" button aligns with the centered grid's right edge
   instead of the true content-area right edge (which on >1280px viewports pushed
   the button ~200px past the visible grid, reading as off-center / overflowing).
   The white band itself still spans full width (sidebar edge → viewport edge). */
.iw-ws-commitbar-inner {
  width: 100%; max-width: 1280px; margin: 0 auto;
  box-sizing: border-box; padding: 12px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.iw-ws-commitbar-info { font-size: 13px; color: #6B7480; }
.iw-ws-commitbar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.iw-ws-commitbar-info.is-ok { color: #1A1F26; }
.iw-ws-commitbar-info.is-warn { color: oklch(0.50 0.13 65); font-weight: 500; }
.iw-ws-commitbar-info.is-error { color: oklch(0.52 0.18 25); font-weight: 500; }
.iw-ws-commit-btn {
  background: #298084; color: #FFFFFF; border: none;
  padding: 11px 22px; border-radius: 4px;
  font: 600 14px 'Geist Sans', system-ui, sans-serif; cursor: pointer;
  flex-shrink: 0;
}
.iw-ws-commit-btn:hover { filter: brightness(1.08); }
.iw-ws-commit-btn[disabled] { background: #D2D7DD; cursor: not-allowed; }

/* --- Mobile / narrow ----------------------------------------------------- */
/* The owner table scrolls horizontally inside the grid region. Row checkboxes
   are only for row status actions; property rail selection remains the bulk
   acres/pricing scope. The commit bar stacks. */
@media (max-width: 768px) {
  .iw-ws { gap: 14px; padding-bottom: 120px; }
  #iw-ws-grid .iw-rv-grid-wrap { overflow-x: auto; }
  #iw-ws-grid .iw-rv-grid-wrap::after {
    content: 'Scroll table sideways';
    display: block;
    padding: 7px 10px 0;
    color: #6B7480;
    font-size: 11px;
    text-align: right;
  }
  #iw-ws-grid .iw-rv-grid th:nth-child(1),
  #iw-ws-grid .iw-rv-grid td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 34px;
    min-width: 34px;
    background: #FFFFFF;
  }
  #iw-ws-grid .iw-rv-grid th:nth-child(2),
  #iw-ws-grid .iw-rv-grid td:nth-child(2) {
    position: sticky;
    left: 34px;
    z-index: 2;
    width: 44px;
    min-width: 44px;
    background: #FFFFFF;
  }
  #iw-ws-grid .iw-rv-grid th:nth-child(3),
  #iw-ws-grid .iw-rv-grid td:nth-child(3) {
    position: sticky;
    left: 78px;
    z-index: 2;
    min-width: 190px;
    background: #FFFFFF;
    box-shadow: 1px 0 0 #E2E5EA;
  }
  #iw-ws-grid .iw-rv-grid thead th:nth-child(-n+3) {
    z-index: 4;
    background: #F8F9FB;
  }
  #iw-ws-grid .iw-rv-row:hover td:nth-child(-n+3) { background: oklch(0.99 0.005 200); }
  #iw-ws-grid .iw-rv-row.is-issue td:nth-child(-n+3) { background: oklch(0.99 0.012 25); }
  #iw-ws-grid .iw-rv-row.is-issue:hover td:nth-child(-n+3) { background: oklch(0.97 0.018 25); }
  #iw-ws-grid .iw-rv-row.is-warn td:nth-child(-n+3) { background: oklch(0.98 0.035 80); }
  #iw-ws-grid .iw-rv-row.is-warn:hover td:nth-child(-n+3) { background: oklch(0.96 0.05 80); }
  #iw-ws-grid .iw-rv-row.is-selected td:nth-child(-n+3) { background: oklch(0.95 0.02 200); }
  #iw-ws-grid .iw-rv-row.is-rejected td:nth-child(-n+3) { background: #FFFFFF; }
  .iw-ws-commitbar-inner {
    flex-direction: column; align-items: stretch; gap: 10px;
    padding: 12px 16px;
  }
  .iw-ws-commit-btn { width: 100%; }
  .iw-prop-bulk-head {
    align-items: flex-start;
    gap: 10px;
  }
  .iw-prop-bulk-scope { min-height: 32px; }
  .iw-prop-bulk-scope-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .iw-prop-rail-checkbox::before {
    content: '';
    position: absolute;
    inset: -14px;
  }
  .iw-prop-rail-clear,
  .iw-prop-bulk-select-failed,
  .iw-prop-bulk-apply {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .iw-prop-bulk-head {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
  }
  .iw-prop-bulk-scope {
    justify-content: center;
    align-self: flex-start;
  }
  .iw-prop-bulk-body { padding: 14px; }
  .iw-prop-bulk-cats {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .iw-prop-bulk-row,
  .iw-prop-bulk-assign-row {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }
  .iw-prop-bulk-input,
  .iw-prop-bulk-select {
    height: 44px;
  }
  .iw-prop-bulk-apply { width: 100%; }
  .iw-prop-bulk-failure-head {
    flex-direction: column;
    align-items: stretch;
  }
  .iw-prop-bulk-failures li {
    flex-direction: column;
    gap: 1px;
  }
  .iw-prop-bulk-failures li small { text-align: left; }
}

/* ── Remediation Phase 2 (F1/F3): routing link, toast region, responsive ── */
.iw-linklike {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--brand-og-accent, #298084); text-decoration: underline;
  cursor: pointer;
}

/* F3: fixed toast region — toasts self-remove without a grid rerender */
#iw-toasts {
  position: fixed; right: 20px; bottom: 76px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  pointer-events: none;
}
#iw-toasts .iw-rv-toast { position: static; pointer-events: auto; }

/* F3: fixed bottom bars respect the app sidebar (240px / 52px collapsed) */
@media (min-width: 769px) {
  .iw-rv-actions, .iw-ws-commitbar { left: 240px; }
  body.sb-collapsed .iw-rv-actions,
  body.sb-collapsed .iw-ws-commitbar,
  body.sb-hover .iw-rv-actions,
  body.sb-hover .iw-ws-commitbar { left: 52px; }
}
@media (max-width: 768px) {
  /* stacked commit bar is ~100px tall on mobile — keep toasts clear of it */
  #iw-toasts { bottom: 116px; right: 12px; }
}

/* F3: drawer never exceeds the viewport; full-width on small screens */
.iw-rv-drawer { max-width: 100vw; }
@media (max-width: 768px) {
  .iw-rv-drawer { width: 100vw; border-left: none; }
}

/* F3: respect reduced-motion for wizard spinners */
@media (prefers-reduced-motion: reduce) {
  .iw-spinner { animation: none; }
}

/* ── E1: iwDialog on the .modal-frame primitive ── */
#iw-dialog-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 20, 25, 0.45);
  backdrop-filter: blur(2px);
}
#iw-dialog-overlay .modal-frame { z-index: 201; }
#iw-dialog-overlay .modal-frame-card {
  background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px;
  box-shadow: 0 16px 48px rgba(15, 20, 25, 0.18);
  display: flex; flex-direction: column; overflow: hidden;
}
#iw-dialog-overlay .modal-frame-body { padding: 20px 22px 8px; }
#iw-dialog-overlay .modal-frame-title {
  font-size: 15px; font-weight: 600; color: #1A2027; margin: 0 0 8px;
}
#iw-dialog-overlay .iw-dialog-msg {
  font-size: 13px; color: #4A5462; line-height: 1.5; margin: 0 0 12px;
  white-space: pre-line;
}
#iw-dialog-overlay .iw-dialog-input {
  width: 100%; box-sizing: border-box; padding: 8px 10px;
  border: 1px solid #C9CFD8; border-radius: 6px;
  font: inherit; font-size: 13px; margin-bottom: 8px;
}
#iw-dialog-overlay .iw-dialog-input:focus {
  outline: none; border-color: #298084; box-shadow: 0 0 0 2px rgba(41, 128, 132, 0.18);
}
#iw-dialog-overlay .modal-frame-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px; border-top: 1px solid #EDF0F4;
}
.iw-dialog-btn {
  padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
  border: 1px solid #C9CFD8; background: #FFFFFF; color: #1A2027; cursor: pointer;
}
.iw-dialog-btn-primary { background: #298084; border-color: #298084; color: #FDFEFE; }
.iw-dialog-btn-danger { background: #B3413A; border-color: #B3413A; }
/* E1: map-stage legal-context tag */
.iw-map-tag-legal {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.03em;
  background: rgba(41, 128, 132, 0.10); color: #1F6266;
  border: 1px solid rgba(41, 128, 132, 0.25);
}

/* ── E2: Set-aside drawer ── */
.iw-sa-drawer { z-index: 70; }
.iw-sa-body { overflow-y: auto; padding: 12px 16px; flex: 1; }
.iw-sa-empty { color: #6A7382; font-size: 13px; padding: 24px 8px; }
.iw-sa-group { border-bottom: 1px solid #EDF0F4; padding-bottom: 10px; margin-bottom: 10px; }
.iw-sa-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 8px 12px; min-height: 48px; font: inherit; text-align: left;
}
.iw-sa-head:hover { background: #F6F8FA; border-radius: 6px; }
.iw-sa-label { font-size: 13px; font-weight: 600; color: #1A2027; }
.iw-sa-count {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: 13px; color: #4A5462;
}
.iw-sa-detail { font-size: 12px; color: #6A7382; padding: 0 12px 6px; line-height: 1.45; }
.iw-sa-rows { padding: 2px 12px 8px; max-height: 240px; overflow-y: auto; }
.iw-sa-row { font-size: 12px; color: #4A5462; padding: 3px 0; }
.iw-sa-row-num { font-family: 'JetBrains Mono', monospace; color: #8C95A0; margin-right: 6px; }
.iw-sa-actions { padding: 0 12px; }
.iw-sa-auto { font-size: 11px; color: #8C95A0; font-style: italic; }

/* ── E3: source-trace popover ── */
.iw-trace-btn {
  background: none; border: none; padding: 0 0 0 6px; cursor: pointer;
  font-size: 10px; color: #298084; letter-spacing: 0.02em;
}
.iw-trace-btn:hover { text-decoration: underline; }
.iw-trace-pop {
  position: absolute; top: 44px; right: 16px; z-index: 75;
  width: 300px; background: #FFFFFF; border: 1px solid #E2E5EA;
  border-radius: 8px; box-shadow: 0 16px 48px rgba(15, 20, 25, 0.18);
  padding: 12px 14px;
}
.iw-trace-close {
  position: absolute; top: 6px; right: 8px; background: none; border: none;
  font-size: 14px; color: #8C95A0; cursor: pointer;
}
.iw-trace-row { display: flex; gap: 10px; padding: 3px 0; font-size: 12px; }
.iw-trace-k { color: #8C95A0; width: 80px; flex-shrink: 0; }
.iw-trace-v { color: #1A2027; word-break: break-word; }
.iw-trace-mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; }
/* B3: "Revert to imported" — quiet teal text-action at the foot of the trace popover */
.iw-trace-revert-row { margin-top: 8px; padding-top: 8px; border-top: 1px solid #E2E5EA; display: flex; justify-content: flex-end; }
.iw-trace-revert {
  background: none; border: none; padding: 2px 6px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600; color: #298084; border-radius: 4px;
}
.iw-trace-revert:hover { background: #F0F4F8; }

/* ── E4: QA receipt ── */
.iw-qa-receipt { margin: 0 0 10px; }
.iw-qa-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(41, 128, 132, 0.3); background: rgba(41, 128, 132, 0.08);
  color: #1F6266; font-size: 12px; font-weight: 500;
}
.iw-qa-pill.has-warn {
  border-color: rgba(176, 108, 38, 0.35); background: rgba(176, 108, 38, 0.08); color: #8A5419;
}
.iw-qa-ledger {
  margin-top: 8px; border: 1px solid #E2E5EA; border-radius: 8px;
  background: #FFFFFF; padding: 10px 14px;
}
.iw-qa-item { display: flex; gap: 10px; padding: 5px 0; font-size: 12px; }
.iw-qa-item-title { font-weight: 600; color: #1A2027; flex-shrink: 0; }
.iw-qa-item-detail { color: #6A7382; }

/* ── E6: Done-screen reconciliation strip ── */
.iw-fz-reconcile {
  margin-top: 10px; font-size: 13px; color: #4A5462; line-height: 1.6;
}
.iw-fz-rec-num {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-weight: 600; color: #1A2027;
}
.iw-fz-rec-legacy { color: #8C95A0; font-style: italic; }
.iw-recent-panel {
  margin-top: 10px;
  padding: 0;
  overflow: hidden;
}
.iw-recent-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.iw-recent-summary::-webkit-details-marker { display: none; }
.iw-recent-summary-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.iw-recent-toggle {
  flex: 0 0 auto;
  min-width: 42px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: #298084;
}
.iw-recent-toggle::before { content: "Show"; }
.iw-recent-panel[open] .iw-recent-toggle::before { content: "Hide"; }
.iw-recent-list {
  border-top: 1px solid #E2E5EA;
  padding: 4px 12px 12px;
}

/* E4: anomaly "Show affected rows" link inside the QA ledger */
.iw-qa-rows-link {
  display: inline-block; margin-top: 4px; padding: 0;
  background: none; border: none; cursor: pointer;
  font-size: 12px; font-weight: 500; color: #298084;
  text-decoration: underline; text-underline-offset: 2px;
}
.iw-qa-rows-link:hover { color: #1F6164; }

/* ── X2: inline cell editing ── */
td[data-cell-edit] { cursor: text; }
td[data-cell-edit]:hover { box-shadow: inset 0 0 0 1px #C5CBD4; border-radius: 4px; }
.iw-rv-cell-input {
  width: 100%; box-sizing: border-box; padding: 4px 6px;
  border: 1px solid #298084; border-radius: 4px;
  font: inherit; font-size: 13px; color: #1A2027; background: #FFFFFF;
  outline: none;
}
.iw-rv-cell-input:focus { box-shadow: 0 0 0 2px rgba(41, 128, 132, 0.18); }

/* ── X3: cell-level issue tints + labeled chips ── */
td.iw-cell-warn { background: oklch(0.55 0.18 55 / 0.12); }
td.iw-cell-block { background: oklch(0.55 0.16 25 / 0.10); }
.iw-rv-issue-chip {
  display: inline-block; padding: 1px 7px; margin-right: 4px;
  border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 16px;
  white-space: nowrap;
}
.iw-rv-issue-chip.warn { background: oklch(0.55 0.18 55 / 0.14); color: oklch(0.45 0.14 55); }
.iw-rv-issue-chip.block { background: oklch(0.55 0.16 25 / 0.12); color: oklch(0.45 0.14 25); }
.iw-rv-issue-chip.dim { background: #EEF1F5; color: #5A6472; }
.iw-rv-issue-chip.ready { background: oklch(0.55 0.08 200 / 0.12); color: #1F6164; }

/* ── X5: mapping trust sentence + required tags ── */
.iw-map-trust { font-size: 14px; color: #1A2027; margin: 0 0 10px; font-weight: 500; }
/* T1b: quiet "ignored unknown columns" note — calm, muted, never an alarm. */
.iw-map-ignored { font-size: 13px; color: #5B6470; margin: -2px 0 12px; font-weight: 400; line-height: 1.45; }
.iw-map-tag-required {
  display: inline-block; padding: 1px 7px; margin-right: 4px;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  background: oklch(0.55 0.08 200 / 0.12); color: #1F6164;
}

/* ── X6: credits meter ── */
.iw-header-side { display: flex; align-items: center; gap: 12px; }
.iw-credits-meter {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: 12px; color: #49515A; padding: 4px 10px;
  border: 1px solid #E2E5EA; border-radius: 999px; background: #FFFFFF;
  white-space: nowrap;
}
.iw-credits-meter strong { color: #1A2027; }

/* ── X4: parse checklist + commit progress strip ── */
.iw-parse-check { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.iw-parse-step { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #49515A; }
.iw-parse-step.done { color: #1F6164; }
.iw-parse-step.done svg { color: #298084; }
.iw-parse-step.active { color: #1A2027; font-weight: 500; }
.iw-spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.iw-parse-leave { font-size: 13px; color: #8C95A0; margin-top: 10px; }
.iw-ws-commit-strip {
  position: absolute; top: 0; left: 0; right: 0; height: 2px; overflow: hidden;
}
.iw-ws-commit-strip::after {
  content: ''; display: block; height: 100%; width: 40%;
  background: #298084; animation: iw-strip-slide 1.2s ease-in-out infinite;
}
/* The commit-strip (position:absolute) anchors to .iw-ws-commitbar, which is already
   position:fixed (see the .iw-ws-commitbar rule above) — a fixed element is a
   containing block for its absolute descendants, so no extra positioning context is
   needed here. Do NOT set .iw-ws-commitbar to position:relative: it overrides the
   fixed rule, drops the bar into normal flow, and the `left:240px` sidebar offset
   then shoves the "Add owners to Project Area" button off the right edge of the
   viewport (measured overflow +52px at 1718w; verified 2026-06-30). */
@media (prefers-reduced-motion: reduce) {
  .iw-ws-commit-strip::after { animation: none; width: 100%; opacity: 0.4; }
}
@keyframes iw-strip-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* H7c: read-only API-number line in the row drawer */
.iw-rv-field-static { font-size: 13px; color: #1A2027; padding: 4px 0; }

/* ============================================================================
   Phase 2C — Context stage (Field Desk). Stacked property cards that replace
   the standalone master-detail; the Workspace mount still uses .iw-prop-* rail.
   Calm by default; the earned loud number is the per-card row count.
   ========================================================================== */
.iw-ctx-hero { margin: 4px 0 18px; }
.iw-ctx-steps { display: flex; gap: 8px; font-size: 11px; color: #8C95A0; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; font-family: 'JetBrains Mono', monospace; }
.iw-ctx-steps .on { color: #298084; font-weight: 600; }
.iw-ctx-h1 { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-weight: 400; font-size: 28px; line-height: 1.2; color: #1A2027; margin-bottom: 6px; }
.iw-ctx-sub { color: #4A5560; font-size: 13px; max-width: 640px; line-height: 1.5; }
.iw-ctx-sub strong { color: #1A2027; font-weight: 600; }

.iw-ctx-summary { display: flex; flex-wrap: wrap; gap: 18px; align-items: baseline; padding: 12px 16px; background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px; margin: 16px 0; font-size: 12px; color: #4A5560; }
.iw-ctx-summary strong { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: #1A2027; font-weight: 500; }
.iw-ctx-summary .ok { color: #298084; }
.iw-ctx-summary .ok strong { color: #298084; }
.iw-ctx-summary .warn { color: #92660A; }
.iw-ctx-summary .warn strong { color: #92660A; }

.iw-ctx-cards { margin: 16px 0; }
.iw-ctx-card { background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px; padding: 18px 20px; margin-bottom: 14px; }
.iw-ctx-card.is-sug-legal { border-color: #E8D7AC; }
.iw-ctx-chead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.iw-ctx-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #8C95A0; margin-bottom: 3px; }
.iw-ctx-pname { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-weight: 400; font-size: 19px; color: #1A2027; line-height: 1.25; }
.iw-ctx-evidence { font-size: 12px; color: #8C95A0; margin-top: 5px; }
.iw-ctx-count { text-align: right; flex-shrink: 0; }
.iw-ctx-count .iw-ctx-n { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 500; color: #1A2027; display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.iw-ctx-count .iw-ctx-lbl { font-size: 11px; color: #8C95A0; }

.iw-ctx-pill-row { margin-top: 10px; }
.iw-ctx-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 999px; border: 1px solid; }
.iw-ctx-pill .iw-ctx-ico { width: 12px; height: 12px; flex-shrink: 0; }
.iw-ctx-pill.ok { color: #298084; border-color: #BFD7D6; background: #EFF5F4; }
.iw-ctx-pill.sug { color: #92660A; border-color: #E8D7AC; background: #FBF2DC; }
.iw-ctx-pill.glance { color: #4A5560; border-color: #E2E5EA; background: #F6F8FA; font-weight: 500; }

.iw-ctx-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #E2E5EA; }
.iw-ctx-f { display: block; }
.iw-ctx-f > span { display: block; font-size: 11px; color: #8C95A0; margin-bottom: 3px; }
.iw-ctx-ctl { width: 100%; font-size: 13px; color: #1A2027; border: 1px solid #E2E5EA; border-radius: 6px; padding: 6px 8px; background: #FCFDFE; font-family: inherit; line-height: 1.3; }
.iw-ctx-ctl:focus { outline: none; border-color: #298084; box-shadow: 0 0 0 3px rgba(41, 128, 132, .14); }
.iw-ctx-ctl.is-money { font-family: 'JetBrains Mono', monospace; color: #157347; font-variant-numeric: tabular-nums; }
.iw-ctx-ctl.needfix { border-color: #E8D7AC; background-color: #FBF2DC; color: #92660A; font-weight: 500; }
select.iw-ctx-ctl { appearance: none; -webkit-appearance: none; padding-right: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238C95A0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
select.iw-ctx-ctl.needfix { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2392660A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

.iw-ctx-cardfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; min-height: 30px; }
.iw-ctx-foot-hint { font-size: 12px; color: #8C95A0; }
.iw-ctx-confirm { font-size: 12px; font-weight: 600; color: #FFFFFF; background: #298084; border: 1px solid #298084; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-family: inherit; }
.iw-ctx-confirm:hover { filter: brightness(1.08); }
.iw-ctx-confirm[disabled] { background: #C5CDD4; border-color: #C5CDD4; cursor: default; }

.iw-ctx-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #E2E5EA; }
.iw-ctx-gatehint { font-size: 12px; color: #92660A; }
.iw-ctx-gatehint.is-ok { color: #4A5560; }
.iw-ctx-footbtns { display: flex; gap: 10px; flex-shrink: 0; }

@media (max-width: 768px) {
  .iw-ctx-fields { grid-template-columns: repeat(2, 1fr); }
  .iw-ctx-footer { flex-direction: column; align-items: stretch; }
}

/* ── Slice 2a: reassign drawer (subset move/split/create) ──────────────────── */
.iw-ctx-foot-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.iw-ctx-reassign-link { font-size: 12px; font-weight: 600; color: #298084; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.iw-ctx-reassign-link:hover { text-decoration: underline; }

.iw-ctx-drawer-backdrop { position: fixed; inset: 0; background: rgba(26,32,39,0.18); z-index: 59; }
.iw-ctx-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 92vw;
  background: #FFFFFF; border-left: 1px solid #E2E5EA;
  box-shadow: -8px 0 24px rgba(0,0,0,0.08);
  display: flex; flex-direction: column; z-index: 60;
}
.iw-ctx-drawer-head { padding: 18px 22px 14px; border-bottom: 1px solid #E2E5EA; position: relative; }
.iw-ctx-drawer-head h2 { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-weight: 400; font-size: 20px; margin: 0; color: #1A2027; line-height: 1.2; }
.iw-ctx-drawer-meta { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #6B7480; margin-top: 6px; }
.iw-ctx-drawer-close { position: absolute; top: 14px; right: 16px; width: 24px; height: 24px; border-radius: 50%; background: #F0F4F8; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #6B7480; z-index: 2; }
.iw-ctx-drawer-close:hover { background: #E2E5EA; color: #1A2027; }

.iw-ctx-drawer-tools { padding: 12px 22px; border-bottom: 1px solid #E2E5EA; display: flex; flex-direction: column; gap: 8px; }
.iw-ctx-drawer-search { width: 100%; }
.iw-ctx-drawer-selbar { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #4A5560; }
.iw-ctx-drawer-selactions { display: flex; gap: 12px; }
.iw-ctx-drawer-selactions button { font-size: 12px; font-weight: 600; color: #298084; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.iw-ctx-drawer-selactions button:hover { text-decoration: underline; }

.iw-ctx-drawer-body { flex: 1; overflow-y: auto; padding: 6px 0; }
.iw-ctx-drawer-empty { padding: 24px 22px; color: #8C95A0; font-size: 13px; text-align: center; }
.iw-ctx-rr-row { display: flex; align-items: center; gap: 10px; padding: 8px 22px; border-bottom: 1px solid #EEF1F4; cursor: pointer; }
.iw-ctx-rr-row:hover { background: #F8F9FB; }
.iw-ctx-rr-row.is-checked { background: #EFF5F4; }
.iw-ctx-rr-row.is-hidden { display: none; }
.iw-ctx-rr-check { flex-shrink: 0; accent-color: #298084; width: 15px; height: 15px; }
.iw-ctx-rr-main { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.iw-ctx-rr-owner { font-size: 13px; color: #1A2027; font-weight: 500; }
.iw-ctx-rr-ctx { font-size: 11px; color: #8C95A0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iw-ctx-rr-interest { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #4A5560; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.iw-ctx-rr-rownum { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #B7BFC9; flex-shrink: 0; min-width: 38px; text-align: right; }

.iw-ctx-drawer-footer { padding: 14px 22px; border-top: 1px solid #E2E5EA; display: flex; flex-direction: column; gap: 8px; }
.iw-ctx-drawer-targetlabel { font-size: 11px; color: #8C95A0; }
.iw-ctx-drawer-targetrow { display: flex; gap: 8px; }
.iw-ctx-drawer-targetrow .iw-ctx-ctl { flex: 1; }
.iw-ctx-drawer-footbtns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }

/* ── Slice 2b: Unassigned bucket + set-aside ───────────────────────────────── */
.iw-ctx-card.iw-ctx-unassigned { border-style: dashed; background: #FBFCFD; }
.iw-ctx-ua-title { font-size: 15px; font-weight: 600; color: #1A2027; line-height: 1.3; }
.iw-ctx-ua-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.iw-ctx-ua-btn { font-size: 12px; font-weight: 600; font-family: inherit; border-radius: 6px; padding: 6px 12px; cursor: pointer; border: 1px solid #E2E5EA; background: #FFFFFF; color: #4A5560; }
.iw-ctx-ua-btn:hover { border-color: #B7BFC9; }
.iw-ctx-ua-btn[disabled] { opacity: 0.5; cursor: default; }
.iw-ctx-card.iw-ctx-rowserr { border-color: #E8D7AC; background: #FBF2DC; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.iw-ctx-rowserr .iw-ctx-ua-title { color: #92660A; }
.iw-ctx-rowserr .iw-ctx-ua-actions { margin-top: 0; flex-shrink: 0; }

/* ── Slice 2c: whole-group merge — quiet card link + focused centered modal ── */
/* Intentionally quieter than the teal Split link and the filled Confirm button:
   merge is powerful/destructive-ish, so the entry point must feel deliberate. */
.iw-ctx-merge-link { font-size: 12px; font-weight: 500; color: #6B7480; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.iw-ctx-merge-link:hover { color: #298084; text-decoration: underline; }

.iw-ctx-merge-backdrop { position: fixed; inset: 0; background: rgba(26,32,39,0.32); backdrop-filter: blur(2px); z-index: 64; }
.iw-ctx-merge { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 440px; max-width: 92vw; background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 10px; box-shadow: 0 16px 48px rgba(15,20,25,0.2); z-index: 65; display: flex; flex-direction: column; }
.iw-ctx-merge-head { padding: 20px 22px 12px; position: relative; }
.iw-ctx-merge-head h2 { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-weight: 400; font-size: 21px; margin: 0; color: #1A2027; line-height: 1.25; padding-right: 28px; }
.iw-ctx-merge-meta { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #6B7480; margin-top: 6px; }
.iw-ctx-merge-close { position: absolute; top: 16px; right: 16px; width: 24px; height: 24px; border-radius: 50%; background: #F0F4F8; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #6B7480; }
.iw-ctx-merge-close:hover { background: #E2E5EA; color: #1A2027; }
.iw-ctx-merge-body { padding: 4px 22px 8px; display: flex; flex-direction: column; gap: 14px; }
.iw-ctx-merge-warn { font-size: 12px; line-height: 1.5; color: #92660A; background: #FBF2DC; border: 1px solid #E8D7AC; border-radius: 6px; padding: 10px 12px; }
.iw-ctx-merge-warn strong { font-weight: 600; }
.iw-ctx-merge-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px 18px; }

/* ── W1: Calculate transition interstitial ─────────────────────────────────── */
.iw-calc { max-width: 880px; margin: 4px auto; padding: 8px 0 40px; }
.iw-calc-steps { display: flex; gap: 8px; font-size: 11px; color: #8C95A0; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; font-family: 'JetBrains Mono', monospace; }
.iw-calc-steps .on { color: #298084; font-weight: 600; }
.iw-calc-h1 { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-weight: 400; font-size: 28px; line-height: 1.2; color: #1A2027; margin-bottom: 6px; }
.iw-calc-sub { color: #4A5560; font-size: 13px; max-width: 640px; line-height: 1.5; margin-bottom: 18px; }
.iw-calc-card { background: #FFFFFF; border: 1px solid #E2E5EA; border-radius: 8px; padding: 20px 22px; }
.iw-calc-working { font-size: 14px; font-weight: 600; color: #1A2027; }
.iw-calc-note { font-size: 12px; color: #8C95A0; line-height: 1.5; margin: 8px 0 16px; max-width: 640px; }
.iw-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.iw-calc-grid > div { display: flex; flex-direction: column; gap: 4px; padding-left: 12px; border-left: 1px solid #E2E5EA; }
.iw-calc-grid b { font-size: 12px; font-weight: 600; color: #1A2027; }
.iw-calc-grid span { font-size: 11px; color: #8C95A0; line-height: 1.4; }
.iw-calc-progress { height: 5px; border-radius: 999px; background: #EEF1F4; overflow: hidden; }
.iw-calc-progress-fill { height: 100%; width: 40%; border-radius: 999px; background: #298084; animation: iwCalcSlide 1.1s ease-in-out infinite; }
@keyframes iwCalcSlide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.iw-calc-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@media (max-width: 768px) { .iw-calc-grid { grid-template-columns: repeat(2, 1fr); } }

/* Phase G - AI Import lane: pre-run cost screen (G3) */
.iw-airun-lead { margin: 0 0 16px; max-width: 64ch; line-height: 1.55; }
.iw-airun-loading { color: var(--color-text-tertiary); margin: 4px 0; }
.iw-airun-est { margin: 22px 0 14px; padding-top: 18px; border-top: 1px solid #E2E5EA; }
.iw-airun-est-head { font-size: 11px; letter-spacing: 0; text-transform: uppercase; color: var(--color-text-tertiary); margin-bottom: 10px; }
.iw-airun-est-figure { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.iw-airun-est-num { font-family: var(--font-mono); font-size: 34px; font-weight: 600; line-height: 1; color: var(--color-money); font-variant-numeric: tabular-nums; }
.iw-airun-est-unit { font-size: 15px; color: var(--color-text-secondary); }
.iw-airun-cap { font-size: 12px; line-height: 1.5; color: var(--color-text-tertiary); margin: 12px 0 0; max-width: 62ch; }
.iw-airun-quota { font-size: 13px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; margin: 2px 0 0; }
.iw-airun-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.iw-airun-foot { font-size: 12px; color: var(--color-text-tertiary); margin: 14px 0 0; }
/* G4: determinate run progress */
.iw-airun-progress { height: 8px; border-radius: 999px; background: #EEF1F4; overflow: hidden; margin: 18px 0 8px; }
.iw-airun-progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--color-secondary); transition: width 0.4s ease; }
.iw-airun-stage { font-size: 13px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; margin: 0; }
/* G5: results breakdown */
.iw-airun-results { margin: 18px 0 0; }
.iw-airun-table { width: 100%; max-width: 440px; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.iw-airun-table th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--color-text-tertiary); font-weight: 600; padding: 0 12px 8px; border-bottom: 1px solid #E2E5EA; }
.iw-airun-table td { padding: 8px 12px; border-bottom: 1px solid #F0F2F5; color: var(--color-text-primary); }
.iw-airun-table tfoot td { border-bottom: none; border-top: 1px solid #E2E5EA; font-weight: 600; }
.iw-airun-credits { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.iw-airun-table td:first-child, .iw-airun-table th:first-child { white-space: normal; }
th.iw-airun-credits { font-family: inherit; }
.iw-airun-table td.iw-airun-credits { color: var(--color-money); }
.iw-airun-improve { font-size: 13px; color: var(--color-text-secondary); margin: 12px 0 0; }
@media (max-width: 480px) { .iw-airun-table { font-size: 12px; } .iw-airun-table th, .iw-airun-table td { padding: 8px 6px; } }
