:root {
  color-scheme: light;
  --canvas: #f5f4ef;
  --surface: #fffefa;
  --surface-raised: #ffffff;
  --ink: #191a18;
  --muted: #676962;
  --faint: #8e9089;
  --line: #dedfd8;
  --line-strong: #c8cbc2;
  --accent: #315bdb;
  --accent-dark: #2447b2;
  --accent-soft: #edf1ff;
  --success: #167553;
  --success-soft: #e9f6f0;
  --warning: #9a5a0a;
  --warning-soft: #fff4df;
  --danger: #a33b35;
  --danger-soft: #fbecea;
  --shadow: 0 18px 60px rgba(31, 35, 27, .08);
  --small-shadow: 0 8px 24px rgba(31, 35, 27, .08);
  --radius: 16px;
  --focus: 0 0 0 3px rgba(49, 91, 219, .25);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% -10%, rgba(49, 91, 219, .08), transparent 34rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button { color: inherit; }

button, summary, input[type="checkbox"] { cursor: pointer; }

button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

[hidden] { display: none !important; }

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.upload-view {
  width: min(760px, calc(100vw - 32px));
  margin: 0 auto;
  padding: clamp(64px, 11vh, 128px) 0 64px;
}

.hero { text-align: center; }

.hero h1,
.workspace-head h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 740;
  letter-spacing: -.052em;
  line-height: 1.02;
}

.hero h1 span {
  position: relative;
  display: inline-block;
  color: var(--accent);
}

.hero h1 span::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -2px;
  bottom: .03em;
  left: -2px;
  height: .18em;
  border-radius: 999px;
  background: rgba(49, 91, 219, .14);
  transform: rotate(-1deg);
}

.hero > p {
  max-width: 620px;
  margin: 24px auto 36px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.drop-card {
  padding: 16px;
  border: 1px solid rgba(200, 203, 194, .8);
  border-radius: 22px;
  background: rgba(255, 254, 250, .86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.drop-zone {
  display: flex;
  width: 100%;
  min-height: 300px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.upload-mark {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid #d5dcff;
  border-radius: 17px;
  color: var(--accent);
  background: #f4f6ff;
  box-shadow: 0 8px 20px rgba(49, 91, 219, .10);
}

.upload-mark svg { width: 26px; height: 26px; }

.drop-zone strong {
  font-size: 21px;
  font-weight: 690;
  letter-spacing: -.025em;
}

.drop-zone > span:not(.upload-mark) {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.drop-zone small {
  margin-top: 24px;
  color: var(--faint);
  font-size: 12px;
}

.file-ready {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
}

.file-ready div { min-width: 0; }

.file-ready strong,
.file-ready span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-ready strong { font-size: 14px; }
.file-ready span { margin-top: 3px; color: var(--muted); font-size: 12px; }

.primary-button,
.soft-button,
.text-button,
.icon-button,
.back-link,
.review-next-button {
  border: 0;
  border-radius: 10px;
  font-weight: 650;
}

.primary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 7px 16px rgba(49, 91, 219, .18);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
  box-shadow: 0 9px 20px rgba(49, 91, 219, .24);
  transform: translateY(-1px);
}

.primary-button:active:not(:disabled) { transform: translateY(0); }

.primary-button:disabled {
  cursor: not-allowed;
  color: #9b9e97;
  background: #e5e6e1;
  box-shadow: none;
}

.parse-button {
  width: 100%;
  margin-top: 12px;
}

.demo-button {
  display: block;
  margin: 12px auto 0;
  padding: 5px 8px;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.demo-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-note {
  margin: 14px 0 2px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.text-button,
.back-link {
  padding: 5px;
  color: var(--accent);
  background: transparent;
}

.text-button:hover,
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.processing-view {
  display: grid;
  min-height: 100vh;
  place-content: center;
  text-align: center;
}

.processing-view h2 {
  margin: 24px 0 8px;
  font-size: 26px;
  letter-spacing: -.03em;
}

.processing-view p { margin: 0; color: var(--muted); }

.processing-orbit {
  position: relative;
  width: 56px;
  height: 56px;
  margin: auto;
  border: 1px solid #d8def8;
  border-radius: 50%;
}

.processing-orbit::before,
.processing-orbit span {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
}

.processing-orbit::before {
  inset: 18px;
  opacity: .22;
}

.processing-orbit span {
  top: -3px;
  left: 24px;
  width: 8px;
  height: 8px;
  animation: orbit 1.25s linear infinite;
  transform-origin: 4px 31px;
}

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

.workspace {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 44px 0 80px;
}

.workspace-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.workspace-head .back-link {
  display: block;
  margin: 0 0 24px -5px;
  color: var(--muted);
  font-size: 13px;
}

.workspace-head .eyebrow { margin-bottom: 8px; }

.workspace-head h1 {
  font-size: clamp(34px, 4vw, 48px);
}

.workspace-head p {
  margin: 13px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.file-meta {
  max-width: 320px;
  padding-bottom: 5px;
  text-align: right;
}

.file-meta strong,
.file-meta span { display: block; }
.file-meta strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.file-meta span { margin-top: 5px; color: var(--faint); font-size: 12px; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 38px;
}

.summary-card {
  position: relative;
  min-height: 130px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, .82);
  text-align: left;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.summary-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--small-shadow);
  transform: translateY(-2px);
}

.summary-card.is-active { border-color: rgba(49, 91, 219, .48); box-shadow: inset 0 0 0 1px rgba(49, 91, 219, .14); }

.summary-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  opacity: .25;
}

.summary-card.ready-card::after { background: var(--success); }
.summary-card.review-card::after { background: var(--warning); }
.summary-card.skipped-card::after { background: var(--danger); }

.summary-card span,
.summary-card small { display: block; }
.summary-card span { color: var(--muted); font-size: 12px; font-weight: 650; }
.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}
.summary-card small { margin-top: 7px; color: var(--faint); }

.mapping-panel {
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, .82);
}

.mapping-panel summary {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  list-style: none;
}

.mapping-panel summary::-webkit-details-marker,
.columns-menu summary::-webkit-details-marker { display: none; }
.mapping-panel summary span span,
.mapping-panel summary small { display: block; }
.mapping-panel summary strong { font-size: 14px; }
.mapping-panel summary small { margin-top: 4px; color: var(--faint); font-size: 12px; font-weight: 450; }
.mapping-panel[open] summary svg { transform: rotate(180deg); }

.mapping-content {
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
}

.mapping-content > p { margin: 16px 0; color: var(--muted); font-size: 13px; }

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.mapping-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f5f5f1;
}

.mapping-item > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapping-item > i { color: var(--faint); font-size: 12px; font-style: normal; text-align: center; }

.mapping-item select {
  width: 100%;
  padding: 5px 24px 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
}

.command-bar {
  position: sticky;
  z-index: 20;
  top: 10px;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 12px;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(200, 203, 194, .85);
  border-radius: 14px;
  background: rgba(255, 254, 250, .94);
  box-shadow: 0 10px 35px rgba(31, 35, 27, .10);
  backdrop-filter: blur(16px);
}

.inclusion-count strong,
.inclusion-count span { display: block; }
.inclusion-count strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.inclusion-count span { margin-top: 3px; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }

.review-next-button {
  min-height: 38px;
  padding: 0 13px;
  color: var(--warning);
  background: var(--warning-soft);
}
.review-next-button span { margin-left: 4px; font-variant-numeric: tabular-nums; }

.export-group { display: flex; align-items: center; gap: 14px; }

.debug-option {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.export-button { min-width: 180px; }
.export-button svg { width: 18px; height: 18px; }

.table-module {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(31, 35, 27, .055);
}

.table-toolbar {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
}

.search-field {
  display: flex;
  width: min(480px, 45vw);
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafaf7;
}

.search-field:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.search-field svg { width: 17px; color: var(--faint); }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-field input::placeholder { color: var(--faint); }
.shortcut { padding: 3px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--faint); font-size: 10px; }

.toolbar-actions { display: flex; align-items: center; gap: 7px; }

.soft-button,
.density-select {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #4f514b;
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 620;
}

.soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.soft-button:hover { border-color: var(--line-strong); background: #f8f8f4; }
.soft-button svg { width: 15px; height: 15px; }

.columns-menu { position: relative; }
.columns-menu summary { list-style: none; }

.menu-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
  box-shadow: var(--small-shadow);
}
.menu-popover label { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 7px; font-size: 12px; }
.menu-popover label:hover { background: #f6f6f2; }

.filter-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 16px;
  border-top: 1px solid #ecece7;
  border-bottom: 1px solid var(--line);
  background: #fafaf7;
}

.filter-chips { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 620;
  white-space: nowrap;
}
.filter-chip:hover { background: #efefea; }
.filter-chip.is-active { color: var(--ink); background: #e9e9e3; }
.filter-chip span { margin-left: 4px; color: var(--faint); font-variant-numeric: tabular-nums; }
.filter-row > p { margin: 0; color: var(--faint); font-size: 12px; white-space: nowrap; }

.table-scroll { overflow: auto; max-height: min(66vh, 760px); }

  table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

thead { position: sticky; z-index: 5; top: 0; }

th {
  height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: rgba(250, 250, 247, .96);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  backdrop-filter: blur(8px);
}

td {
  height: 64px;
  padding: 10px 12px;
  border-bottom: 1px solid #ecece7;
  vertical-align: middle;
  transition: background .15s ease, opacity .15s ease;
}

tbody tr { cursor: pointer; }
tbody tr td.select-cell { position: relative; }
tbody tr td.select-cell::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
tbody tr:hover td { background: #f4f6ff; }
tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
tbody tr:last-child td { border-bottom: 0; }

tbody tr.is-excluded td.select-cell::before { background: transparent; }
tbody tr.is-excluded td { color: var(--faint); background: #fafaf8; }
tbody tr.is-excluded .strike-value { text-decoration: line-through; text-decoration-color: #8f918a; text-decoration-thickness: 1px; }
tbody tr.is-excluded .cell-main,
tbody tr.is-excluded .cell-sub { opacity: .62; }
tbody tr.is-excluded .initcall-link { opacity: 1; }

.select-cell { width: 46px; min-width: 46px; padding-right: 4px; text-align: center; }
.phone-cell { width: 142px; max-width: 148px; padding-right: 8px; }
.phone-cell .cell-main { max-width: 142px; }
.initcall-cell { width: 76px; min-width: 76px; padding-left: 4px; padding-right: 8px; }
.action-cell { width: 54px; text-align: right; }

.initcall-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.initcall-link:hover { color: #fff; background: var(--accent); }
.initcall-link svg { width: 13px; height: 13px; }
.initcall-empty { color: #c4c6bf; }

.phone-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.phone-field input { width: auto; flex: 1; min-width: 0; }
.drawer-fields .initcall-link { flex: 0 0 auto; }

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.sort-button {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
}
.sort-button:hover { color: var(--ink); }
.sort-mark { width: 9px; color: var(--accent); font-size: 9px; }
.sort-button.is-active { color: var(--ink); }

.cell-main {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 620;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-sub {
  display: block;
  max-width: 260px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-value {
  color: #3d464e;
  font-variant-numeric: tabular-nums;
}
.date-value {
  color: #3d464e;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.blank-value { color: #b0b2ab; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px currentColor; opacity: .72; }
.status-ready { color: var(--success); }
.status-needs_review { color: var(--warning); }
.status-skipped { color: var(--danger); }
.status-excluded { color: var(--faint); }

.confidence {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.confidence-track { width: 42px; height: 4px; overflow: hidden; border-radius: 99px; background: #e4e5df; }
.confidence-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  background: transparent;
}
.icon-button:hover { color: var(--accent); background: var(--accent-soft); }
.icon-button svg { width: 17px; height: 17px; }

.table-module.is-compact td { height: 48px; padding-top: 6px; padding-bottom: 6px; }
.table-module.is-compact .cell-sub { display: none; }

.empty-table { padding: 70px 20px; color: var(--muted); text-align: center; }
.empty-table span { display: block; margin-bottom: 8px; font-weight: 620; }

.edit-drawer {
  width: min(620px, 100vw);
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--surface-raised);
  box-shadow: -24px 0 70px rgba(25, 26, 24, .18);
}
.edit-drawer::backdrop { background: rgba(25, 26, 24, .34); backdrop-filter: blur(3px); }
.edit-drawer[open] { animation: drawer-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .5; } }

.drawer-shell { display: flex; height: 100%; flex-direction: column; }

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head .eyebrow { margin-bottom: 7px; }
.drawer-head h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }

.issue-callout {
  margin: 18px 30px 0;
  padding: 13px 14px;
  border: 1px solid #f0d8aa;
  border-radius: 10px;
  color: #754609;
  background: var(--warning-soft);
  font-size: 13px;
  line-height: 1.45;
}

.drawer-fields { flex: 1; padding: 26px 30px 40px; overflow-y: auto; }

fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 30px;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ecece7;
  font-size: 14px;
  font-weight: 720;
}

.drawer-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.drawer-fields label.span-two { grid-column: span 2; }

.drawer-fields input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fbfbf8;
  font-size: 13px;
}
.drawer-fields input:focus { border-color: var(--accent); outline: 0; box-shadow: var(--focus); }

.audit-details { border-top: 1px solid var(--line); padding-top: 15px; }
.audit-details summary { color: var(--muted); font-size: 12px; font-weight: 650; }
.audit-details ul { padding-left: 19px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 30px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}
.drawer-actions > div { display: flex; gap: 8px; }

.toast {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 24px;
  display: flex;
  min-width: 260px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 14px 13px 16px;
  border: 1px solid #3d403a;
  border-radius: 12px;
  color: #fff;
  background: #252723;
  box-shadow: 0 16px 45px rgba(25, 26, 24, .24);
  font-size: 13px;
  animation: toast-in .18s ease-out;
}
.toast button { border: 0; color: #b9c9ff; background: transparent; font-weight: 720; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

[data-column].is-hidden,
td.is-hidden { display: none; }

@media (max-width: 960px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .toolbar-actions { flex-wrap: wrap; }
  .command-bar { flex-wrap: wrap; }
  .review-next-button { order: 3; width: 100%; }
}

@media (max-width: 680px) {
  .workspace { width: min(100% - 20px, 1480px); padding-top: 24px; }
  .upload-view { width: calc(100vw - 24px); padding-top: 48px; }
  .hero h1 { font-size: 40px; }
  .hero > p { font-size: 15px; }
  .drop-card { padding: 10px; }
  .drop-zone { min-height: 250px; padding: 24px; }
  .workspace-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .file-meta { max-width: 100%; padding: 10px 0 0; text-align: left; }
  .summary-grid { gap: 8px; margin-top: 26px; }
  .summary-card { min-height: 112px; padding: 15px; }
  .summary-card strong { font-size: 28px; }
  .mapping-grid { grid-template-columns: 1fr; }
  .command-bar { top: 5px; padding: 10px; }
  .inclusion-count { flex: 1; }
  .debug-option { display: none; }
  .export-group { margin-left: auto; }
  .export-button { min-width: 0; }
  .filter-row { align-items: flex-start; flex-direction: column; }
  .filter-row > p { align-self: flex-end; }
  .shortcut { display: none; }
  .density-select { display: none; }

  table { min-width: 0; }
  thead { display: none; }
  tbody { display: grid; gap: 8px; padding: 10px; }
  tbody tr {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 38px;
    padding: 13px 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }
  td.select-cell::before { top: 10px; bottom: 10px; border-radius: 0 4px 4px 0; }
  td { display: none; height: auto; padding: 3px 8px; border: 0; }
  td.select-cell { display: block; grid-column: 1; grid-row: 1 / span 4; align-self: center; }
  td[data-mobile="name"] { display: block; grid-column: 2; grid-row: 1; }
  td[data-mobile="email"] { display: block; grid-column: 2; grid-row: 2; }
  td[data-mobile="phone"] { display: block; grid-column: 2; grid-row: 3; padding-right: 88px; }
  td[data-mobile="call"] { display: flex; grid-column: 2; grid-row: 3; align-items: center; justify-self: end; padding: 3px 8px; }
  td[data-mobile="date"] { display: block; grid-column: 2; grid-row: 4; }
  td[data-mobile="action"] { display: block; grid-column: 3; grid-row: 1 / span 4; align-self: center; }
  td[data-mobile="email"] .cell-main,
  td[data-mobile="phone"] .cell-main,
  td[data-mobile="date"] .cell-main { font-size: 12px; font-weight: 500; }
  .table-scroll { max-height: none; }
  .edit-drawer { width: 100vw; height: min(92vh, 820px); margin-top: auto; }
  .edit-drawer[open] { animation: sheet-in .18s ease-out; }
  @keyframes sheet-in { from { transform: translateY(24px); opacity: .5; } }
  .drawer-head, .drawer-fields { padding-right: 20px; padding-left: 20px; }
  .issue-callout { margin-right: 20px; margin-left: 20px; }
  .drawer-actions { align-items: stretch; flex-direction: column-reverse; padding: 14px 20px; }
  .drawer-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .drawer-actions > div .soft-button { display: none; }
  .toast { right: 12px; bottom: 12px; left: 12px; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
