:root {
  color-scheme: dark;
  --clc-bg: #0d1015;
  --clc-surface: #14181f;
  --clc-surface-2: #1a1f27;
  --clc-line: #2a303a;
  --clc-line-strong: #3a424e;
  --clc-text: #f4f1ea;
  --clc-muted: #979faa;
  --clc-soft: #c8cdd3;
  --clc-accent: #e05a5f;
  --clc-gold: #efc56f;
  --clc-good: #68d59a;
  --clc-warning: #efc56f;
  --clc-input: #11151b;
  --clc-table-row: #12161c;
  --clc-table-hover: #181d24;
  --clc-conflict-bg: rgba(224, 90, 95, 0.12);
  --clc-conflict-text: #ff8d91;
  --clc-footer: rgba(13, 16, 21, 0.96);
  --clc-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --clc-bg: #f4f1ea;
  --clc-surface: #fbf9f4;
  --clc-surface-2: #eeeae1;
  --clc-line: #d9d3c8;
  --clc-line-strong: #bcb5a8;
  --clc-text: #171a1f;
  --clc-muted: #6c716f;
  --clc-soft: #42474a;
  --clc-accent: #c63d45;
  --clc-gold: #9a6814;
  --clc-good: #247a50;
  --clc-warning: #93610e;
  --clc-input: #fffdf8;
  --clc-table-row: #fbf9f4;
  --clc-table-hover: #fffdf9;
  --clc-conflict-bg: rgba(198, 61, 69, 0.1);
  --clc-conflict-text: #a8242e;
  --clc-footer: rgba(244, 241, 234, 0.96);
  --clc-shadow: 0 20px 55px rgba(43, 38, 30, 0.12);
}

html,
body.clc-audit-page {
  min-height: 100%;
}

body.clc-audit-page {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--clc-text);
  background: var(--clc-bg);
}

.clc-audit-page *,
.clc-audit-page *::before,
.clc-audit-page *::after {
  box-sizing: border-box;
}

.clc-audit-page [hidden] { display: none !important; }

.clc-audit-page button,
.clc-audit-page input,
.clc-audit-page select {
  font: inherit;
}

.app-shell {
  width: 100%;
  min-width: 0;
  overflow: clip;
  background:
    linear-gradient(var(--clc-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--clc-line) 1px, transparent 1px),
    var(--clc-bg);
  background-size: 44px 44px;
  background-blend-mode: soft-light;
}

.audit-step {
  width: 100%;
  margin: 0;
  padding: clamp(28px, 5vw, 76px) clamp(20px, 4vw, 72px);
  border: 0;
  border-radius: 0;
  color: var(--clc-text);
  background: color-mix(in srgb, var(--clc-bg) 96%, transparent);
  box-shadow: none;
}

.upload-step {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
  gap: clamp(24px, 4vw, 48px);
  min-height: calc(100vh - 74px);
  min-height: calc(100dvh - 74px);
}

.workspace-title,
.workspace-bar {
  display: flex;
  justify-content: space-between;
  gap: clamp(24px, 7vw, 100px);
  align-items: end;
}

.workspace-title > p {
  max-width: 580px;
  margin: 0 0 6px;
  color: var(--clc-muted);
  font-size: clamp(0.96rem, 1.3vw, 1.13rem);
  line-height: 1.65;
}

.workspace-kicker {
  margin: 0 0 9px;
  color: var(--clc-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.audit-step h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.1rem, 5vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.drop-zone {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  min-height: 100%;
  padding: clamp(28px, 5vw, 68px);
  border: 1px dashed var(--clc-line-strong);
  border-radius: 0;
  color: var(--clc-text);
  background:
    radial-gradient(circle at 20% 50%, color-mix(in srgb, var(--clc-accent) 9%, transparent), transparent 38%),
    color-mix(in srgb, var(--clc-surface) 86%, transparent);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone.is-dragging {
  border-color: var(--clc-accent);
  background-color: color-mix(in srgb, var(--clc-accent) 4%, var(--clc-surface));
  transform: none;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.drop-icon {
  display: grid;
  width: clamp(58px, 7vw, 88px);
  height: clamp(58px, 7vw, 88px);
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--clc-accent) 56%, var(--clc-line));
  border-radius: 50%;
  color: var(--clc-accent);
  background: transparent;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.drop-copy {
  display: grid;
  gap: 6px;
}

.drop-copy strong {
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.7rem);
  letter-spacing: -0.035em;
}

.drop-copy > span {
  color: var(--clc-muted);
}

.drop-action {
  padding: 12px 18px;
  border: 1px solid var(--clc-line-strong);
  color: var(--clc-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.workbook-status,
.setup-warning,
.coverage-banner {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--clc-line);
  border-radius: 0;
  color: var(--clc-muted);
  background: var(--clc-surface);
  font-size: 0.85rem;
  line-height: 1.5;
}

.workbook-status.is-busy,
.coverage-banner {
  color: var(--clc-warning);
  border-color: color-mix(in srgb, var(--clc-warning) 35%, var(--clc-line));
}

.workbook-status.is-ready {
  color: var(--clc-good);
  border-color: color-mix(in srgb, var(--clc-good) 35%, var(--clc-line));
}

.workbook-status.is-error,
.setup-warning.is-error {
  color: var(--clc-accent);
  border-color: color-mix(in srgb, var(--clc-accent) 42%, var(--clc-line));
}

.setup-step,
.results-step {
  min-height: calc(100vh - 74px);
  min-height: calc(100dvh - 74px);
}

.workspace-bar {
  padding-bottom: clamp(26px, 4vw, 48px);
  border-bottom: 1px solid var(--clc-line);
}

.local-chip {
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--clc-good) 38%, var(--clc-line));
  border-radius: 999px;
  color: var(--clc-good);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sheet-grid,
.mapping-grid,
.audit-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sheet-grid {
  margin-top: 32px;
  border-top: 1px solid var(--clc-line);
  border-left: 1px solid var(--clc-line);
}

.field-card,
.audit-options > label {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 3vw, 30px);
  border: 0;
  border-right: 1px solid var(--clc-line);
  border-bottom: 1px solid var(--clc-line);
  border-radius: 0;
  background: color-mix(in srgb, var(--clc-surface) 90%, transparent);
}

.field-card > span,
.audit-options label > span:first-child {
  color: var(--clc-soft);
  font-weight: 700;
}

.field-card small,
.audit-options small,
.mapping-details small {
  color: var(--clc-muted);
  line-height: 1.45;
}

.field-card select,
.audit-options input,
.audit-options select,
.result-toolbar input,
.result-toolbar select,
.mapping-field select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--clc-line-strong);
  border-radius: 0;
  color: var(--clc-text);
  background: var(--clc-input);
}

.sheet-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.sheet-summary span {
  padding: 7px 10px;
  border: 1px solid var(--clc-line);
  color: var(--clc-muted);
  font-size: 0.75rem;
}

.mapping-details {
  margin: 20px 0;
  border-top: 1px solid var(--clc-line);
  border-bottom: 1px solid var(--clc-line);
  background: color-mix(in srgb, var(--clc-surface) 78%, transparent);
}

.mapping-details summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  color: var(--clc-soft);
  cursor: pointer;
  font-weight: 700;
}

.mapping-details summary::marker {
  color: var(--clc-accent);
}

.mapping-grid {
  gap: 20px;
  padding: 0 0 24px;
}

.mapping-grid fieldset {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--clc-line);
}

.mapping-grid legend {
  padding: 0 8px;
  color: var(--clc-accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mapping-field {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.mapping-field + .mapping-field {
  border-top: 1px solid var(--clc-line);
}

.mapping-field span {
  color: var(--clc-muted);
  font-size: 0.8rem;
}

.mapping-field span b {
  color: var(--clc-accent);
}

.audit-options {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  border-top: 1px solid var(--clc-line);
  border-left: 1px solid var(--clc-line);
}

.setup-warning {
  margin-top: 18px;
}

.setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.clc-audit-page .button,
.toolbar-button {
  min-height: 44px;
  padding: 11px 17px;
  border-radius: 0;
  cursor: pointer;
  font-weight: 700;
}

.clc-audit-page .button-primary {
  border: 1px solid var(--clc-accent);
  color: #fff;
  background: var(--clc-accent);
}

.clc-audit-page .audit-secondary,
.toolbar-button {
  border: 1px solid var(--clc-line-strong);
  color: var(--clc-soft);
  background: transparent;
}

.clc-audit-page .audit-secondary:hover,
.clc-audit-page .audit-secondary:focus-visible,
.toolbar-button:hover,
.toolbar-button:focus-visible {
  color: var(--clc-accent);
  border-color: var(--clc-accent);
}

.results-heading {
  align-items: center;
}

.coverage-banner {
  margin-top: 18px;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-top: 22px;
  border-top: 1px solid var(--clc-line);
  border-left: 1px solid var(--clc-line);
}

.summary-cards article {
  padding: clamp(15px, 2vw, 24px);
  border-right: 1px solid var(--clc-line);
  border-bottom: 1px solid var(--clc-line);
  border-radius: 0;
  background: var(--clc-surface);
}

.summary-cards span {
  display: block;
  color: var(--clc-muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-cards strong {
  display: block;
  margin-top: 8px;
  color: var(--clc-text);
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.summary-good strong { color: var(--clc-good); }
.summary-critical strong { color: var(--clc-accent); }
.summary-warning strong { color: var(--clc-warning); }

.result-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(160px, 0.65fr) auto auto auto;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.toolbar-button {
  white-space: nowrap;
}

.clear-filters { color: var(--clc-accent); }

.result-count {
  margin: 14px 0;
  color: var(--clc-muted);
  font-size: 0.8rem;
}

.result-table-wrap {
  width: calc(100% + clamp(40px, 8vw, 144px));
  margin-left: calc(clamp(20px, 4vw, 72px) * -1);
  overflow: visible;
  border-top: 1px solid var(--clc-line);
  border-bottom: 1px solid var(--clc-line);
}

.result-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.result-table .col-date { width: 7.5%; }
.result-table .col-std { width: 6%; }
.result-table .col-flight { width: 5.5%; }
.result-table .col-leg { width: 6%; }
.result-table .col-state { width: 4.5%; }
.result-table .col-conflict { width: 12%; }
.result-table .col-registration { width: 10%; }
.result-table .col-time { width: 10%; }
.result-table .col-delay { width: 13%; }
.result-table .col-details { width: 18.5%; }
.result-table .col-done { width: 7%; }

.result-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 12px;
  border-bottom: 1px solid var(--clc-line-strong);
  color: var(--clc-soft);
  background: var(--clc-surface-2);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.result-table th button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.result-table th .column-filter-toggle {
  display: flex;
  width: 100%;
  gap: 5px;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.column-filter-toggle.is-filtered,
.column-filter-toggle[aria-expanded="true"] { color: var(--clc-accent); }

.filter-icon {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-left: auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
  opacity: 0.62;
}

.column-filter-toggle:hover .filter-icon,
.column-filter-toggle:focus-visible .filter-icon,
.column-filter-toggle.is-filtered .filter-icon,
.column-filter-toggle[aria-expanded="true"] .filter-icon { opacity: 1; }

.column-filter-count {
  display: inline-grid;
  min-width: 18px;
  min-height: 18px;
  padding: 2px 5px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.58rem;
  line-height: 1;
}

.result-table th:first-child,
.result-table td:first-child { white-space: nowrap; }

.std-cell { white-space: nowrap; }

.result-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--clc-line);
  color: var(--clc-soft);
  background: var(--clc-table-row);
  font-size: 0.78rem;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.result-table tr:hover td { background: var(--clc-table-hover); }
.result-table tr.critical td:first-child { border-left: 4px solid var(--clc-accent); }
.result-table tr.warning td:first-child { border-left: 4px solid var(--clc-warning); }

.result-table tr.is-done td {
  color: color-mix(in srgb, var(--clc-muted) 82%, var(--clc-soft));
  background: color-mix(in srgb, var(--clc-table-row) 88%, var(--clc-good));
}

.result-table tr.is-done:hover td {
  background: color-mix(in srgb, var(--clc-table-hover) 86%, var(--clc-good));
}

.result-table tr.is-done .comparison-cell.conflict-field,
.result-table tr.is-done:hover .comparison-cell.conflict-field {
  background: color-mix(in srgb, var(--clc-conflict-bg) 58%, var(--clc-table-row));
}

.result-table tr.is-done .finding-badge,
.result-table tr.is-done .conflict-value { opacity: 0.68; }

.flight-cell {
  color: var(--clc-text);
  font-family: "Manrope", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
}

.finding-badge {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--clc-accent) 38%, var(--clc-line));
  border-radius: 999px;
  color: var(--clc-accent);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.25;
}

.finding-stack {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.warning .finding-badge {
  color: var(--clc-warning);
  border-color: color-mix(in srgb, var(--clc-warning) 38%, var(--clc-line));
}

.compare-stack {
  display: grid;
  min-width: 0;
}

.compare-stack > div {
  min-width: 0;
  padding: 2px 0 8px;
}

.compare-stack > div + div {
  padding: 8px 0 2px;
  border-top: 1px solid var(--clc-line-strong);
}

.compare-stack small,
.row-source small {
  display: block;
  color: var(--clc-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.comparison-cell.conflict-field {
  background: var(--clc-conflict-bg);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--clc-accent) 75%, transparent);
}

.result-table tr:hover .comparison-cell.conflict-field { background: var(--clc-conflict-bg); }

.conflict-value {
  color: var(--clc-conflict-text);
  font-weight: 800;
}

.delay-pair { display: block; font-variant-numeric: tabular-nums; }
.delay-pair + .delay-pair { margin-top: 4px; }
.finding-details > small { display: block; color: #6aa9dc; font-weight: 700; }
.finding-details ul { margin: 7px 0 0; padding-left: 17px; color: var(--clc-muted); line-height: 1.45; }
.done-cell { text-align: center; }

.finding-done {
  appearance: none;
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin: 0;
  place-content: center;
  border: 1px solid var(--clc-line-strong);
  border-radius: 5px;
  color: #fff;
  background: var(--clc-input);
  cursor: pointer;
}

.finding-done::before {
  width: 10px;
  height: 6px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
}

.finding-done:checked {
  border-color: var(--clc-good);
  background: var(--clc-good);
}

.finding-done:checked::before { transform: rotate(-45deg) scale(1); }
.empty-results { padding: 60px 20px; color: var(--clc-muted); text-align: center; }

.column-filter-panel {
  position: fixed;
  z-index: 50;
  width: min(320px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--clc-line-strong);
  color: var(--clc-text);
  background: var(--clc-surface);
  box-shadow: var(--clc-shadow);
}

.column-filter-head,
.column-filter-tools,
.column-filter-sort,
.column-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.column-filter-head { justify-content: space-between; }
.column-filter-head strong { font-family: "Manrope", sans-serif; font-size: 0.9rem; }
.column-filter-head button { width: 30px; height: 30px; font-size: 1.2rem; }
.column-filter-search { display: block; margin-top: 10px; }
.column-filter-search input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--clc-line-strong); color: var(--clc-text); background: var(--clc-input); }
.flight-range-filter { margin-top: 12px; }
.flight-range-filter > p { margin: 0; color: var(--clc-muted); font-size: 0.72rem; line-height: 1.45; }
.flight-range-fields { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; margin-top: 10px; }
.flight-range-fields label { display: grid; gap: 5px; color: var(--clc-muted); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.flight-range-input { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; border: 1px solid var(--clc-line-strong); background: var(--clc-input); }
.flight-range-input:focus-within { outline: 2px solid var(--clc-gold); outline-offset: 3px; }
.flight-range-input b { padding-left: 9px; color: var(--clc-soft); font-size: 0.76rem; }
.flight-range-input input { width: 100%; min-width: 0; min-height: 40px; padding: 8px; border: 0; color: var(--clc-text); background: transparent; appearance: textfield; }
.flight-range-input input:focus-visible { outline: 0; }
.flight-range-input input::-webkit-inner-spin-button,
.flight-range-input input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.flight-range-separator { padding-bottom: 11px; color: var(--clc-muted); }
.flight-range-filter .flight-range-note { margin-top: 8px; }
.flight-range-filter .flight-range-error { margin-top: 8px; color: var(--clc-accent); font-weight: 700; }
.column-filter-tools { justify-content: flex-end; margin: 8px 0; }
.column-filter-tools button { min-width: 46px; padding: 5px 8px; border: 1px solid var(--clc-line); color: var(--clc-accent); }
.column-filter-options { display: grid; max-height: 280px; overflow-y: auto; border-top: 1px solid var(--clc-line); border-bottom: 1px solid var(--clc-line); }

.column-filter-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 3px;
  color: var(--clc-soft);
  cursor: pointer;
  font-size: 0.78rem;
}

.column-filter-option + .column-filter-option { border-top: 1px solid var(--clc-line); }
.column-filter-option input { width: 16px; height: 16px; accent-color: var(--clc-accent); }
.column-filter-option small { color: var(--clc-muted); }
.column-filter-empty { margin: 12px 0; color: var(--clc-muted); font-size: 0.78rem; text-align: center; }
.column-filter-sort { margin-top: 10px; }
.column-filter-sort button { flex: 1; padding: 8px; border: 1px solid var(--clc-line); }
.column-filter-actions { justify-content: space-between; margin-top: 10px; }
.column-filter-actions button { padding: 9px 11px; border: 1px solid var(--clc-line-strong); }
.column-filter-actions .filter-apply { color: #fff; border-color: var(--clc-accent); background: var(--clc-accent); }
.column-filter-panel button { color: var(--clc-soft); background: transparent; cursor: pointer; font: inherit; }

.app-footer {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  min-height: 74px;
  padding: 10px clamp(16px, 3vw, 44px);
  border-top: 1px solid var(--clc-line);
  color: var(--clc-text);
  background: var(--clc-footer);
  backdrop-filter: blur(14px);
}

.footer-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.footer-identity img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.footer-identity span { display: grid; gap: 2px; }
.footer-identity strong { font-family: "Manrope", sans-serif; font-size: 0.82rem; letter-spacing: -0.01em; }
.footer-identity small { color: var(--clc-muted); font-size: 0.67rem; }
.footer-controls { display: flex; gap: 10px; align-items: center; }

.version-control,
.theme-switch {
  border: 1px solid var(--clc-line-strong);
  color: var(--clc-soft);
  background: var(--clc-surface);
}

.version-control {
  min-height: 38px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.theme-switch { display: flex; padding: 3px; }

.theme-switch button {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  color: var(--clc-muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
}

.theme-switch button[aria-pressed="true"] {
  color: var(--clc-text);
  background: var(--clc-surface-2);
}

.release-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--clc-line-strong);
  border-radius: 0;
  color: var(--clc-text);
  background: var(--clc-bg);
  box-shadow: var(--clc-shadow);
}

.release-dialog::backdrop {
  background: rgba(5, 7, 9, 0.78);
  backdrop-filter: blur(7px);
}

.release-dialog-shell { max-height: inherit; padding: clamp(22px, 4vw, 42px); overflow: auto; }
.release-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.release-dialog-head h2 { margin: 8px 0 0; font-family: "Manrope", sans-serif; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.05em; }
.dialog-close { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; border: 1px solid var(--clc-line-strong); border-radius: 50%; color: var(--clc-text); background: transparent; cursor: pointer; font-size: 1.6rem; line-height: 1; }
.release-dialog .release-list { display: grid; gap: 8px; }
.release-dialog .release-entry { border: 1px solid var(--clc-line); border-radius: 0; background: var(--clc-surface); }
.release-dialog .release-entry summary { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; padding: 18px; cursor: pointer; }
.release-dialog .release-notes { margin: 0; padding: 0 22px 22px 116px; color: var(--clc-muted); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

button:disabled,
select:disabled,
input:disabled { cursor: not-allowed; opacity: 0.55; }

.clc-audit-page :focus-visible {
  outline: 2px solid var(--clc-gold);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .workspace-title { align-items: start; flex-direction: column; }
  .audit-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-cards { grid-template-columns: repeat(3, 1fr); }
  .result-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .audit-step { padding: 26px 16px; }

  .upload-step { grid-template-rows: auto minmax(300px, 1fr) auto; min-height: calc(100dvh - 120px); }
  .drop-zone { grid-template-columns: 1fr; place-items: center; align-content: center; text-align: center; }
  .drop-action { width: 100%; text-align: center; }
  .workspace-bar { align-items: flex-start; flex-direction: column; }
  .results-heading .button { width: 100%; }
  .sheet-grid,
  .mapping-grid,
  .audit-options,
  .summary-cards,
  .result-toolbar { grid-template-columns: 1fr; }
  .mapping-details summary { align-items: flex-start; flex-direction: column; }
  .mapping-field { grid-template-columns: 1fr; }
  .setup-actions { flex-direction: column-reverse; }
  .setup-actions .button { width: 100%; }
  .result-table-wrap { width: calc(100% + 32px); margin-left: -16px; }

  .app-footer { align-items: stretch; flex-direction: column; padding: 12px 16px; }
  .footer-controls { justify-content: space-between; }
  .theme-switch { flex: 1; }
  .theme-switch button { flex: 1; }
  .release-dialog .release-entry summary { grid-template-columns: 58px minmax(0, 1fr); }
  .release-dialog .release-date { grid-column: 2; }
  .release-dialog .release-notes { padding: 0 18px 20px 76px; }
}

@media (prefers-reduced-motion: reduce) {
  .drop-zone { transition: none; }
}
