:root {
  --ink: #17211c;
  --muted: #68736d;
  --line: #dce4df;
  --paper: #f3f6f3;
  --white: #ffffff;
  --green: #17664b;
  --green-dark: #104b38;
  --mint: #ddf3e8;
  --mint-strong: #a9dec5;
  --amber: #9a6518;
  --amber-soft: #fff0cf;
  --amber-cell: #fff4d9;
  --red: #9c453f;
  --red-soft: #fbe9e7;
  --blue: #346881;
  --blue-soft: #e7f1f7;
  --purple: #73538e;
  --purple-soft: #f0eafa;
  --shadow: 0 18px 60px rgba(29, 55, 43, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }

.topbar {
  height: 68px;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: -.04em; font-size: 22px; }
.brand span { color: var(--green); margin-left: 4px; }
.topbar-meta { display: flex; align-items: center; gap: 18px; }
.release-badge { padding: 5px 9px; border: 1px solid #bfd4c8; border-radius: 999px; background: #edf7f1; color: var(--green); font-size: 12px; font-weight: 800; white-space: nowrap; }
.privacy-pill { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #3fad77; box-shadow: 0 0 0 5px rgba(63, 173, 119, .12); }

main { max-width: 1380px; margin: 0 auto; padding: 34px 28px 90px; }
.hero { max-width: 900px; margin: 0 0 34px; }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 11px; }
h1 { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: clamp(48px, 6vw, 76px); font-weight: 800; line-height: .97; letter-spacing: -.055em; margin: 0; }
h1 em { color: var(--green); font-weight: 800; }
.lead { max-width: 760px; color: var(--muted); font-size: 19px; margin: 20px 0 0; }

.workspace, .results, .resolution {
  background: var(--white);
  border: 1px solid rgba(39, 79, 59, .11);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.step-heading { display: flex; align-items: flex-start; gap: 16px; }
.step-heading > div { flex: 1; }
.step-heading h2, .results h2, .how-it-works h2 { margin: 0; font-size: 26px; letter-spacing: -.035em; }
.step-heading p { color: var(--muted); margin: 5px 0 0; font-size: 14px; }
.step-heading p strong { color: var(--ink); }
.step-number { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--ink); color: white; font-weight: 700; font-size: 14px; }
.text-button { border: 0; background: transparent; color: var(--green); font-weight: 750; padding: 8px 0; }
.text-button:hover { color: var(--green-dark); }

.upload-grid { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; gap: 18px; margin-top: 24px; }
.dropzone { min-height: 156px; border: 1.5px dashed #aebdb5; border-radius: 14px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; transition: .2s ease; background: #fbfcfb; cursor: pointer; }
.dropzone:hover, .dropzone.dragover { border-color: var(--green); background: #f4fbf7; transform: translateY(-2px); }
.dropzone.loaded { border-style: solid; border-color: #86bfa5; background: #f3fbf6; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-letter { position: absolute; left: 14px; top: 14px; background: var(--ink); color: white; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; font-size: 13px; }
.upload-icon { font-size: 24px; color: var(--green); margin-bottom: 7px; }
.dropzone strong { max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone small { margin-top: 6px; color: var(--muted); font-size: 13px; text-align: center; max-width: 88%; }
.versus { width: 34px; height: 34px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; color: var(--muted); font-size: 13px; }

.hidden { display: none !important; }
.section-rule { height: 1px; background: var(--line); margin: 34px 0; }
.compact { margin-bottom: 20px; }

.sheet-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 10px; }
.file-tabs { display: flex; align-items: center; gap: 6px; min-width: 0; }
.file-tab { border: 1px solid var(--line); background: white; border-radius: 9px; padding: 8px 12px; color: var(--muted); font-weight: 750; font-size: 14px; max-width: 280px; }
.file-tab span { margin-left: 8px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; max-width: 170px; vertical-align: bottom; }
.file-tab.active { background: var(--ink); border-color: var(--ink); color: white; }
.sheet-actions { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.header-control { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.header-control select { width: 210px; max-width: 28vw; padding-block: 7px; }
.header-ambiguity { display: flex; align-items: baseline; gap: 8px; margin: -1px 0 10px; padding: 10px 12px; border: 1px solid #e8c66f; border-radius: 9px; background: var(--amber-soft); color: #634815; font-size: 13px; }
.header-ambiguity strong { white-space: nowrap; }
.normalization-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0 0 10px; padding: 12px; border: 1px solid #b9d8c9; border-radius: 10px; background: #f3faf6; }
.normalization-heading { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; color: var(--green-dark); }
.normalization-heading span { color: var(--muted); font-size: 12px; }
.normalization-summary article { min-width: 0; padding: 9px 10px; border: 1px solid #d9e8e0; border-radius: 8px; background: white; }
.normalization-summary article b, .normalization-summary article span, .normalization-summary article small { display: block; }
.normalization-summary article span { margin-top: 2px; color: var(--ink); font-size: 13px; }
.normalization-summary article small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 8px; font-weight: 800; }
.icon-button:hover:not(:disabled) { background: var(--paper); }
.row-range { min-width: 110px; text-align: center; font-size: 13px; color: var(--muted); }
.zoom-control { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-left: 8px; }
.zoom-control select { min-width: 84px; padding: 7px 28px 7px 9px; }

.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 9px; }
.result-tools { margin: 0; padding: 9px 10px; border: 1px solid #cfd8d2; border-top: 0; background: #fbfcfb; }
.table-search { min-width: 290px; max-width: 470px; flex: 1 1 320px; height: 38px; display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 9px; background: white; padding-left: 10px; }
.table-search:focus-within { border-color: #7fb59d; box-shadow: 0 0 0 3px rgba(23, 102, 75, .08); }
.table-search input { min-width: 80px; flex: 1; border: 0; outline: 0; padding: 8px 4px; background: transparent; color: var(--ink); }
.table-search button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 800; }
.table-search button:hover:not(:disabled) { background: var(--paper); color: var(--ink); }
.search-icon { color: var(--green); font-size: 18px; line-height: 1; }
.search-count { min-width: 50px; color: var(--muted); text-align: right; font-size: 11px; white-space: nowrap; }
.column-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; }
.column-heading-label { min-width: 0; }
.column-filter-button { flex: 0 0 auto; width: 24px; height: 24px; margin: -3px -3px 0 0; border: 1px solid #cbd6d0; border-radius: 5px; background: white; color: #65736c; font-size: 12px; font-weight: 900; line-height: 1; }
.column-filter-button:hover, .column-filter-button[aria-expanded="true"] { border-color: #7eae98; background: #edf7f1; color: var(--green); }
.column-filter-button.active { border-color: var(--green); background: var(--green); color: white; }
.filter-popover { position: fixed; z-index: 1000; width: min(320px, calc(100vw - 24px)); overflow: hidden; border: 1px solid #bfcac4; border-radius: 10px; background: white; box-shadow: 0 18px 55px rgba(20, 49, 36, .22); color: var(--ink); }
.filter-popover-head { padding: 12px 13px 9px; border-bottom: 1px solid var(--line); }
.filter-popover-head strong { display: block; margin-bottom: 8px; font-size: 13px; }
.filter-popover-search { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; outline: 0; font-size: 13px; }
.filter-popover-search:focus { border-color: #7fb59d; box-shadow: 0 0 0 3px rgba(23, 102, 75, .08); }
.filter-option-list { max-height: 260px; overflow-y: auto; padding: 6px 0; }
.filter-option { display: flex; align-items: flex-start; gap: 8px; padding: 6px 13px; cursor: pointer; font-size: 13px; }
.filter-option:hover { background: #f3f7f4; }
.filter-option.select-all { border-bottom: 1px solid #edf1ee; font-weight: 750; }
.filter-option input { margin: 2px 0 0; accent-color: var(--green); }
.filter-option span { min-width: 0; overflow-wrap: anywhere; }
.filter-limit-note, .filter-empty { padding: 9px 13px; color: var(--muted); font-size: 12px; }
.filter-popover-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 9px 10px; border-top: 1px solid var(--line); background: #f8faf8; }
.filter-popover-actions button { border: 1px solid var(--line); border-radius: 7px; background: white; padding: 7px 10px; color: var(--ink); font-size: 12px; font-weight: 750; }
.filter-popover-actions button:hover { background: var(--paper); }
.filter-popover-actions .filter-apply { border-color: var(--green); background: var(--green); color: white; }
.filter-popover-actions .filter-apply:hover { background: var(--green-dark); }
.filter-popover-actions .filter-clear { margin-right: auto; border-color: transparent; background: transparent; color: var(--green); }
mark { background: #ffe28b; color: inherit; border-radius: 2px; padding: 0 1px; }
.excel-table tr.active-search-row > td, .excel-table tr.active-search-row > th { box-shadow: inset 0 2px 0 #d59d22, inset 0 -2px 0 #d59d22; }
.excel-table tr.excluded-source-row > td, .excel-table tr.excluded-source-row > th { background: #f0f3f1 !important; color: #77817c; font-style: italic; }

select { width: 100%; appearance: none; border: 1px solid var(--line); border-radius: 9px; padding: 9px 34px 9px 10px; color: var(--ink); background: #fff 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='%2368736d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.excel-shell { overflow: auto; border: 1px solid #cfd8d2; border-radius: 11px; background: white; }
.preview-shell { max-height: 455px; }
.result-shell { max-height: 640px; border-radius: 0 0 11px 11px; }
.excel-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: max(12px, calc(13px * var(--sheet-scale, 1))); }
.excel-table th, .excel-table td { min-width: 132px; max-width: 280px; padding: 8px 10px; text-align: left; border-right: 1px solid #e2e7e4; border-bottom: 1px solid #e2e7e4; vertical-align: top; background: white; overflow-wrap: anywhere; }
.excel-table td { height: 36px; }
.excel-table thead th { position: sticky; z-index: 5; color: #4d5b54; font-weight: 700; background: #f6f8f6; }
.excel-table .letters-row th { top: 0; height: 28px; min-width: 132px; padding: 5px 9px; text-align: center; background: #e9eeeb; color: #6e7a73; font-size: 12px; }
.excel-table .headers-row th { top: 28px; min-height: 42px; font-size: 12px; }
.excel-table .row-number { min-width: 48px !important; width: 48px; max-width: 48px; text-align: center !important; background: #eef2ef !important; color: #758078; font-weight: 650; }
.sticky-number { position: sticky !important; left: 0; z-index: 7 !important; }
.excel-table thead .sticky-number { z-index: 10 !important; }
.blank-value { color: #9aa69f; }

.mapping-shell { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mapping-head, .mapping-row { display: grid; grid-template-columns: 155px minmax(210px, 1fr) 34px minmax(210px, 1fr) 34px; gap: 9px; align-items: center; }
.mapping-head { padding: 9px 11px; background: #eef2ef; color: var(--muted); font-size: 12px; font-weight: 700; }
.mapping-rows { max-height: 430px; overflow-y: auto; }
.mapping-row { padding: 8px 10px; border-top: 1px solid #edf1ee; background: white; }
.mapping-row:hover { background: #fbfcfb; }
.mapping-arrow { text-align: center; color: #8e9b94; }
.remove-row { border: 0; background: transparent; color: #8f9c95; padding: 4px; font-size: 20px; }
.remove-row:hover { color: var(--red); }
.mapping-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 9px; }
.mapping-stats { color: var(--muted); font-size: 13px; }
.sum-control-config { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, 420px); gap: 5px 18px; align-items: center; margin-top: 14px; padding: 14px 16px; border: 1px solid #b9d8c9; border-radius: 11px; background: #f3faf6; }
.sum-control-config strong { display: block; color: var(--green-dark); }
.sum-control-config span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.sum-control-config small { grid-column: 2; color: var(--muted); font-size: 12px; }
.sum-control-config small.warning { color: var(--red); font-weight: 750; }
.mapping-warning { margin-top: 12px; padding: 11px 13px; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 14px; font-weight: 650; }
.key-diagnostics { margin-top: 12px; padding: 13px 14px; border: 1px solid #e9c777; border-radius: 10px; background: var(--amber-soft); color: #604515; font-size: 13px; }
.key-diagnostics.safe { border-color: #b9decf; background: var(--mint); color: var(--green); }
.key-diagnostics strong { display: block; margin-bottom: 5px; font-size: 14px; }
.key-diagnostics p { margin: 3px 0; }
.blank-key-block + .key-safe-note, .blank-key-block + .repeat-key-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(127, 91, 20, .2); }
.blank-key-block small { display: block; margin-top: 7px; color: #765d2c; line-height: 1.4; }
.blank-key-choice { margin-top: 9px; padding-top: 9px; }
.key-safe-note strong { color: var(--green-dark); }
.repeat-samples { color: #765d2c; font-size: 12px; }
.repeat-risk { margin-top: 10px; padding: 11px 12px; border-left: 4px solid #c98320; border-radius: 7px; background: rgba(255, 255, 255, .58); }
.repeat-risk strong { margin-bottom: 4px; color: #7a4d0d; }
.repeat-risk p { line-height: 1.45; }
.repeat-risk b { color: #604515; }
.repeat-choice { display: flex; gap: 9px; align-items: flex-start; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(127, 91, 20, .18); font-weight: 650; cursor: pointer; }
.repeat-choice input { margin-top: 2px; accent-color: var(--green); }
.primary-button { width: 100%; border: 0; border-radius: 11px; margin-top: 16px; padding: 15px 20px; color: white; background: var(--green); font-weight: 800; transition: .2s; }
.primary-button:hover:not(:disabled) { background: var(--green-dark); }
.primary-button span { margin-left: 8px; }

.results { margin-top: 28px; }
.process-stages { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr); align-items: center; gap: 12px; margin: -4px 0 30px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #f7f9f7; }
.process-stages > i { color: #93a099; text-align: center; font-style: normal; font-weight: 800; }
.process-stage { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; row-gap: 1px; align-items: center; border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; background: transparent; color: var(--muted); text-align: left; }
.process-stage:hover { background: white; border-color: var(--line); }
.process-stage > span { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e4eae6; color: #65736c; font-weight: 850; }
.process-stage strong { color: var(--ink); font-size: 14px; }
.process-stage small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.process-stage.active { border-color: #9ec7b4; background: white; box-shadow: 0 7px 20px rgba(23, 102, 75, .07); }
.process-stage.active > span, .process-stage.complete > span { background: var(--green); color: white; }
.compact-stages { margin-bottom: 26px; }
.results-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.report-actions { display: flex; align-items: center; gap: 9px; }
.inline-primary { width: auto; margin: 0; padding: 11px 15px; white-space: nowrap; }
.result-method { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.secondary-button { border: 1px solid var(--line); background: white; border-radius: 10px; padding: 10px 14px; font-weight: 750; color: var(--ink); white-space: nowrap; }
.secondary-button:hover:not(:disabled) { background: var(--paper); }
.sum-control-panel { margin: 22px 0 4px; border: 1px solid #b9d8c9; border-radius: 13px; overflow: hidden; background: #fbfefc; }
.sum-control-main { display: grid; grid-template-columns: minmax(210px, 1.2fr) repeat(3, minmax(145px, .7fr)); align-items: stretch; }
.sum-control-title, .sum-control-stat { padding: 15px 17px; border-right: 1px solid #dce9e2; }
.sum-control-main > :last-child { border-right: 0; }
.sum-control-title strong, .sum-control-stat strong { display: block; }
.sum-control-title span, .sum-control-stat span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.sum-control-stat strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.sum-control-stat.difference strong { color: var(--amber); }
.sum-control-stat.balanced strong { color: var(--green); }
.sum-breakdown { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 2.5fr); gap: 10px 22px; align-items: center; padding: 11px 17px; border-top: 1px solid #dce9e2; background: #f2f8f4; color: var(--muted); font-size: 12px; }
.sum-breakdown-title strong { display: block; color: var(--ink); font-size: 13px; }
.sum-breakdown-title span { display: block; margin-top: 3px; line-height: 1.35; }
.sum-breakdown-items { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.sum-breakdown-items b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sum-breakdown .sum-check-ok { color: var(--green); font-weight: 800; }
.sum-breakdown .sum-check-warning { color: var(--red); font-weight: 800; }
.sum-column-check { padding: 10px 14px; border-top: 1px solid var(--line); background: #f8fbf9; color: var(--muted); font-size: 12px; line-height: 1.4; }
.sum-column-check strong { display: block; margin-bottom: 2px; color: var(--green-dark); }
.sum-column-check.warning { background: var(--amber-soft); color: #765d2c; }
.sum-column-check.warning strong { color: var(--red); }
.summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 24px 0 15px; }
.summary-card { border: 1px solid transparent; border-radius: 11px; padding: 15px; text-align: left; color: var(--ink); }
.summary-card:hover { border-color: rgba(23, 33, 28, .16); }
.summary-card strong { display: block; font-size: 26px; line-height: 1; margin-bottom: 6px; }
.summary-card span { color: var(--muted); font-size: 13px; }
.summary-card.exact { background: var(--mint); }
.summary-card.changed { background: var(--amber-soft); }
.summary-card.only-a { background: var(--red-soft); }
.summary-card.only-b { background: var(--blue-soft); }
.summary-card.review { background: var(--purple-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-mark { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-mark.exact { background: var(--mint-strong); }
.legend-mark.changed { background: #f0be60; }
.legend-mark.only-a { background: #e7aaa5; }
.legend-mark.only-b { background: #9cc7da; }
.legend-mark.duplicate { background: #bea8d1; }
.source-navigation-hint { display: flex; align-items: center; gap: 10px 16px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid #cfe1d8; border-radius: 9px; background: #f4faf7; color: var(--muted); font-size: 13px; }
.source-navigation-hint strong { flex: 0 0 auto; color: var(--green-dark); }
.tabs { display: flex; gap: 3px; overflow-x: auto; border: 1px solid #cfd8d2; border-bottom: 0; border-radius: 11px 11px 0 0; background: #f6f8f6; padding: 0 8px; }
.tab { border: 0; background: transparent; padding: 12px 11px; color: var(--muted); font-weight: 750; white-space: nowrap; border-bottom: 2px solid transparent; }
.tab.active { color: var(--green); border-bottom-color: var(--green); background: white; }
.tab-count { font-size: 11px; background: #e9eeeb; padding: 3px 6px; border-radius: 99px; margin-left: 5px; }
.result-table .status-column { min-width: 190px; width: 190px; max-width: 190px; }
.sticky-status { position: sticky !important; left: 48px; z-index: 6 !important; }
.result-table thead .sticky-status { z-index: 9 !important; }
.result-table .sticky-key { position: sticky !important; left: 238px; z-index: 4; min-width: 190px; background: white; box-shadow: 1px 0 0 #d8dfdb; }
.result-table thead .sticky-key { z-index: 8; background: #f6f8f6; }
.result-table .letters-row .sticky-key { background: #e9eeeb; }
.headers-row .role-chip { display: inline-block; margin: 0 6px 3px 0; padding: 2px 5px; border-radius: 4px; background: #e6ebe8; color: #607068; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.headers-row .role-chip.key { background: #d7eee3; color: var(--green); }
.status-column small { display: block; color: var(--muted); margin-top: 5px; font-size: 11px; line-height: 1.35; }
.inspect-source-button { display: inline-flex; align-items: center; min-height: 29px; margin-top: 8px; border: 1px solid #aed1c0; border-radius: 7px; padding: 5px 8px; background: #f2faf6; color: var(--green); font-size: 12px; font-weight: 800; line-height: 1.2; text-align: left; }
.inspect-source-button:hover { border-color: #78b094; background: #e7f5ee; color: var(--green-dark); }
.status-tag { display: inline-block; padding: 4px 7px; border-radius: 6px; font-size: 11px; line-height: 1.25; font-weight: 800; background: var(--paper); color: var(--muted); }
.status-tag.exact { background: var(--mint); color: var(--green); }
.status-tag.changed { background: var(--amber-soft); color: var(--amber); }
.status-tag.onlyA { background: var(--red-soft); color: var(--red); }
.status-tag.onlyB { background: var(--blue-soft); color: var(--blue); }
.status-tag.review { background: var(--purple-soft); color: var(--purple); }
.result-row.status-onlyA td:not(.changed-cell) { background: #fffafa; }
.result-row.status-onlyB td:not(.changed-cell) { background: #f9fcfe; }
.result-row.status-review td:not(.changed-cell) { background: #fcfaff; }
.result-row.status-onlyA .sticky-key { background: #fffafa; }
.result-row.status-onlyB .sticky-key { background: #f9fcfe; }
.result-row.status-review .sticky-key { background: #fcfaff; }
.changed-cell { background: var(--amber-cell) !important; box-shadow: inset 0 0 0 1px #f0c56e; }
.cell-change { display: grid; gap: 3px; }
.cell-change span { color: #846b3f; font-size: 11px; text-decoration: line-through; }
.cell-change strong { color: #3f2b0c; font-weight: 800; }
.cell-change b, .duplicate-values b { font-size: 10px; letter-spacing: .04em; }
.duplicate-values { display: grid; gap: 4px; }
.duplicate-values span { color: #655572; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.result-pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; }

.resolution { margin-top: 28px; scroll-margin-top: 16px; }
.resolution-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; }
.resolution-title h2 { margin: 0; font-size: 26px; letter-spacing: -.035em; }
.resolution-title p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.resolution-title p.resolution-navigation-note { color: var(--green-dark); font-size: 13px; }
.resolution-goal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 360px); gap: 18px; align-items: center; margin: 24px 0 14px; padding: 16px 18px; border: 1px solid #b9d8c9; border-radius: 12px; background: #f1f9f5; }
.resolution-goal strong { display: block; margin-bottom: 3px; color: var(--green-dark); }
.resolution-goal span { color: var(--muted); font-size: 13px; }
.resolution-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; }
.progress-copy strong { display: block; font-size: 15px; }
.progress-copy span { color: var(--muted); font-size: 13px; }
.progress-meter { width: min(350px, 34vw); }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e4eae6; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .2s ease; }
.progress-meter small { display: block; margin-top: 5px; color: var(--muted); text-align: right; font-size: 12px; }
.resolution-tabs { border-bottom: 1px solid #cfd8d2; border-radius: 11px 11px 0 0; }
.resolution-toolbar { display: grid; grid-template-columns: auto minmax(330px, 1fr) minmax(250px, 390px); gap: 12px; align-items: center; padding: 10px; border: 1px solid #cfd8d2; border-top: 0; background: #fbfcfb; }
.bulk-check { display: flex; align-items: center; gap: 7px; min-height: 38px; color: var(--muted); font-size: 13px; cursor: pointer; white-space: nowrap; }
.bulk-check input, .resolution-item-check { width: 17px; height: 17px; accent-color: var(--green); }
.bulk-action { display: flex; gap: 7px; min-width: 0; }
.bulk-action select { min-width: 190px; }
.bulk-action button { padding-block: 8px; }
.resolution-search { min-width: 0; width: 100%; }
.resolution-list-head, .resolution-item { display: grid; grid-template-columns: 38px minmax(330px, 1.7fr) minmax(220px, .85fr) minmax(220px, 1fr); gap: 12px; align-items: start; }
.resolution-list-head { padding: 9px 13px; border: 1px solid #cfd8d2; border-top: 0; background: #eef2ef; color: var(--muted); font-size: 12px; font-weight: 750; }
.resolution-list { border: 1px solid #cfd8d2; border-top: 0; border-radius: 0 0 11px 11px; overflow: hidden; }
.resolution-item { padding: 13px; border-top: 1px solid #e5eae7; background: white; }
.resolution-item:first-child { border-top: 0; }
.resolution-item:hover { background: #fbfcfb; }
.resolution-item.resolved { box-shadow: inset 4px 0 0 var(--green); }
.resolution-item-check { margin-top: 7px; }
.resolution-difference { min-width: 0; }
.resolution-difference .status-tag { margin-bottom: 5px; }
.resolution-difference strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.resolution-difference small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.resolution-difference .inspect-source-button { margin-top: 7px; }
.resolution-change-values { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; color: #62543b; font-size: 12px; }
.resolution-change-values span:first-child { text-decoration: line-through; color: #8b7651; }
.resolution-field select { min-width: 0; font-size: 13px; }
.resolution-comment { width: 100%; min-height: 40px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; color: var(--ink); background: white; font: inherit; font-size: 13px; line-height: 1.35; }
.resolution-comment:focus { outline: 0; border-color: #7fb59d; box-shadow: 0 0 0 3px rgba(23, 102, 75, .08); }
.resolution-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.resolution-footer .row-range { text-align: left; }
.resolution-footer > div { display: flex; gap: 7px; }
.output-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 24px; padding: 20px; border: 1px solid #9fcab6; border-radius: 13px; background: linear-gradient(135deg, #eef8f3, #f9fcfa); }
.output-card .eyebrow { margin-bottom: 5px; }
.output-card strong { display: block; font-size: 18px; }
.output-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.output-card .output-amount-control { margin-top: 8px; color: var(--green-dark); font-weight: 750; }
.output-card .primary-button { min-width: 230px; }
.output-card.not-ready { border-color: #e3c16d; background: var(--amber-soft); }
.output-card.not-ready .primary-button { background: #8e7a4d; }

.workflow-infographic { padding: 86px 4px 0; }
.workflow-infographic > h2 { margin: 0; font-family: inherit; font-size: 44px; font-weight: 800; letter-spacing: -.04em; }
.workflow-infographic > p:not(.eyebrow) { max-width: 760px; color: var(--muted); }
.workflow-infographic figure { margin: 28px 0 0; padding: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.workflow-infographic img { display: block; width: 100%; height: auto; border-radius: 10px; }
.how-it-works { padding: 86px 4px 0; }
.how-it-works > h2 { font-family: inherit; font-size: 44px; font-weight: 800; letter-spacing: -.04em; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 32px; }
.feature-grid article { border-top: 1px solid #bcc9c2; padding-top: 20px; }
.feature-grid article > span { color: var(--green); font-size: 12px; font-weight: 800; }
.feature-grid h3 { font-size: 19px; margin: 16px 0 7px; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 15px; }
footer { max-width: 1380px; margin: 0 auto; padding: 28px 28px 36px; border-top: 1px solid #d1dad5; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
footer span:first-child { color: var(--ink); font-weight: 800; }

body.source-modal-open { overflow: hidden; }
.source-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; }
.source-modal-backdrop { position: absolute; inset: 0; background: rgba(16, 35, 27, .62); backdrop-filter: blur(3px); }
.source-modal-card { position: relative; width: min(1500px, 96vw); max-height: 92vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid rgba(255, 255, 255, .45); border-radius: 18px; background: white; box-shadow: 0 28px 90px rgba(10, 31, 21, .34); }
.source-modal-head { display: flex; justify-content: space-between; gap: 20px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.source-modal-head .eyebrow { margin-bottom: 5px; }
.source-modal-head h2 { margin: 0; font-size: 23px; }
.source-modal-head p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.source-modal-close { flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--muted); font-size: 25px; line-height: 1; }
.source-modal-close:hover { background: var(--paper); color: var(--ink); }
.source-modal-body { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; overflow: auto; padding: 16px; background: #f3f6f3; }
.source-panel { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.source-panel-head { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: #f8faf8; }
.source-panel-head strong { font-size: 14px; }
.source-panel-head span { color: var(--muted); font-size: 12px; }
.source-panel .excel-shell { border: 0; border-radius: 0; max-height: 60vh; }
.source-panel .excel-table tr.source-target-row > td, .source-panel .excel-table tr.source-target-row > th { background: var(--amber-soft) !important; box-shadow: inset 0 2px 0 #d59d22, inset 0 -2px 0 #d59d22; }
.source-panel-empty { display: grid; place-items: center; min-height: 240px; padding: 24px; color: var(--muted); text-align: center; }
.source-modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 13px 18px; border-top: 1px solid var(--line); background: white; }
.source-modal-footer span { color: var(--muted); font-size: 13px; }
.source-modal-footer .primary-button { margin: 0; }

@media (max-width: 900px) {
  .summary { grid-template-columns: repeat(3, 1fr); }
  .sheet-toolbar { align-items: flex-start; flex-direction: column; }
  .sheet-actions { width: 100%; flex-wrap: wrap; }
  .header-control { flex: 1 1 270px; }
  .header-control select { max-width: none; }
  .mapping-head { display: none; }
  .mapping-row { grid-template-columns: 1fr 34px 1fr 34px; padding: 12px; }
  .mapping-row .map-role { grid-column: 1 / -1; }
  .resolution-toolbar { grid-template-columns: 1fr 1fr; }
  .resolution-search { grid-column: 1 / -1; }
  .resolution-list-head, .resolution-item { grid-template-columns: 32px minmax(260px, 1.3fr) minmax(210px, .8fr) minmax(210px, 1fr); }
  .sum-control-main { grid-template-columns: 1fr 1fr; }
  .sum-control-title, .sum-control-stat { border-bottom: 1px solid #dce9e2; }
  .sum-control-main > :nth-child(2) { border-right: 0; }
  .sum-control-main > :nth-last-child(-n+2) { border-bottom: 0; }
  .source-modal-body { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { padding: 0 17px; }
  .topbar-meta { gap: 10px; }
  .release-badge { font-size: 11px; }
  .privacy-pill { font-size: 0; }
  main { padding: 26px 14px 65px; }
  h1 { font-size: 48px; }
  .lead { font-size: 17px; }
  .workspace, .results, .resolution { padding: 20px 14px; border-radius: 16px; }
  .step-heading { flex-wrap: wrap; }
  .step-heading .text-button { margin-left: 50px; margin-top: -12px; }
  .upload-grid { grid-template-columns: 1fr; }
  .versus { margin: -10px auto; z-index: 2; }
  .dropzone { min-height: 132px; }
  .file-tabs { width: 100%; overflow-x: auto; }
  .file-tab { flex: 0 0 auto; }
  .zoom-control { width: 100%; margin-left: 0; justify-content: flex-end; }
  .table-search { min-width: 100%; }
  .header-ambiguity { align-items: flex-start; flex-direction: column; gap: 2px; }
  .normalization-summary { grid-template-columns: 1fr; }
  .normalization-heading { grid-column: 1; align-items: flex-start; flex-direction: column; gap: 3px; }
  .mapping-row { grid-template-columns: 1fr 24px 1fr 28px; gap: 5px; }
  .mapping-row select { padding-left: 8px; font-size: 13px; }
  .mapping-footer { align-items: flex-start; flex-direction: column; }
  .sum-control-config { grid-template-columns: 1fr; }
  .sum-control-config small { grid-column: 1; }
  .results-title { align-items: flex-start; flex-direction: column; }
  .report-actions { width: 100%; flex-wrap: wrap; }
  .report-actions > button { flex: 1 1 210px; }
  .process-stages { grid-template-columns: 1fr; gap: 6px; }
  .process-stages > i { transform: rotate(90deg); }
  .resolution-title { align-items: flex-start; flex-direction: column; }
  .resolution-goal { grid-template-columns: 1fr; }
  .resolution-progress { grid-template-columns: 1fr; }
  .progress-meter { width: 100%; }
  .resolution-toolbar { grid-template-columns: 1fr; }
  .bulk-action { flex-direction: column; }
  .resolution-search { grid-column: auto; }
  .resolution-list-head { display: none; }
  .resolution-list { border-top: 1px solid #cfd8d2; border-radius: 11px; }
  .resolution-item { grid-template-columns: 28px minmax(0, 1fr); }
  .resolution-field, .resolution-comment { grid-column: 2; }
  .output-card { align-items: flex-start; flex-direction: column; }
  .output-card .primary-button { width: 100%; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary-card:last-child { grid-column: 1 / -1; }
  .legend { display: grid; grid-template-columns: 1fr 1fr; }
  .result-table .status-column { min-width: 165px; width: 165px; max-width: 165px; }
  .sticky-status { left: 48px; }
  .result-table .sticky-key { position: static !important; }
  .workflow-infographic { padding-top: 58px; }
  .workflow-infographic > h2 { font-size: 36px; }
  .workflow-infographic figure { margin-top: 20px; padding: 8px; border-radius: 14px; }
  .how-it-works { padding-top: 68px; }
  .how-it-works > h2 { font-size: 36px; }
  .feature-grid { grid-template-columns: 1fr; gap: 24px; }
  .sum-control-main { grid-template-columns: 1fr; }
  .sum-control-title, .sum-control-stat { border-right: 0; border-bottom: 1px solid #dce9e2 !important; }
  .sum-control-main > :last-child { border-bottom: 0 !important; }
  .sum-breakdown { grid-template-columns: 1fr; }
  .source-navigation-hint { align-items: flex-start; flex-direction: column; }
  .source-modal { padding: 0; }
  .source-modal-card { width: 100vw; max-height: 100vh; height: 100vh; border: 0; border-radius: 0; }
  .source-modal-body { padding: 10px; }
  .source-modal-footer { align-items: stretch; flex-direction: column; }
  .source-modal-footer .primary-button { width: 100%; }
  footer { padding-inline: 17px; }
}
