/* Contract Desk — Design System Tokens Only (../../public/styles.css) */
/* Strictly uses --good / --warn / --bad / --accent / --bg-* tokens with zero raw hex literals. */

/* Enforce >= 44x44px hit targets on ALL interactive controls */
button,
.model-loader button,
select,
input:not([type="hidden"]):not([type="range"]),
textarea,
summary,
.file-btn,
.studio-actions a,
.studio-back,
.studio-about-head a,
.crumbs a,
footer.byline a,
.byline a,
.model-loader a,
details.show-code .sc-meta a,
.cd-check-label {
  min-block-size: 44px;
  min-inline-size: 44px;
}

input[type="range"] {
  min-block-size: 44px;
  min-inline-size: 120px;
  cursor: pointer;
}

.studio-about-head a,
.crumbs a,
footer.byline a,
.byline a,
.model-loader a,
details.show-code .sc-meta a {
  display: inline-flex;
  align-items: center;
}

.studio-bar .crumbs {
  margin: 0;
}

/* Accessible >= 44x44px checkbox control */
.cd-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.72rem 0.2rem 0.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--color);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}
.cd-check-label:hover {
  border-color: var(--accent);
}
.cd-check-label:focus-within,
.cd-check-label:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.cd-check-input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 44px;
  inline-size: 44px;
  block-size: 44px;
  min-inline-size: 44px;
  min-block-size: 44px;
  margin: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: transparent;
  border: 0;
}
.cd-check-input::before {
  content: "";
  inline-size: 20px;
  block-size: 20px;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  background: var(--bg-raised);
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
.cd-check-input:checked::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--bg-raised);
}

/* Full-hitbox multi-file upload control */
.file-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-raised));
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.file-btn:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-raised));
}
.file-btn:focus-within,
.file-btn:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.file-btn input[type="file"] {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  min-inline-size: 44px;
  min-block-size: 44px;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* Top Control & Pack Deck */
.cd-top-deck {
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
  margin-bottom: 0.72rem;
  min-inline-size: 0;
}

.cd-dataset-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem;
}

.cd-preset-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr));
  gap: 0.45rem;
  flex: 1 1 560px;
  min-inline-size: 0;
}

.cd-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.14rem;
  text-align: start;
  padding: 0.45rem 0.72rem;
  background: var(--bg-raised);
  color: var(--color);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.cd-preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  inline-size: 100%;
}
.cd-preset-head strong {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color);
}
.cd-preset-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg-secondary);
  white-space: nowrap;
}
.cd-preset-sub {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  line-height: 1.3;
  color: var(--muted);
}
.cd-preset-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-raised));
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-sm);
}
.cd-preset-btn[aria-pressed="true"] .cd-preset-head strong,
.cd-preset-btn[aria-pressed="true"] .cd-preset-badge {
  color: var(--accent);
}

/* 3-Stage Model Cards (<= 3 children per slot for Model Pack tucking) */
.cd-stage-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr));
  gap: 0.55rem;
  margin: 0;
}
.cd-stage-cards .loader-slot {
  padding: 0.55rem 0.7rem;
}
.cd-stage-cards .loader-slot-title {
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
}
.cd-stage-sub {
  margin: 0.3rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--muted);
}

/* Action & Interactive Risk Posture Dial Bar */
.cd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.85rem;
  padding: 0.58rem 0.78rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
}
.cd-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-inline-size: 0;
}

.cd-dial-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 380px;
  min-inline-size: 0;
}
.cd-dial-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color);
}
.cd-dial-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-raised));
  color: var(--accent);
}
.cd-posture-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
}
.cd-posture-btn {
  padding: 0.32rem 0.62rem;
  font-size: 0.77rem;
  font-weight: 600;
}
.cd-posture-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Status Bar & Diagnostics */
.cd-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.9rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}
.cd-status-bar .status {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  flex: 1 1 260px;
}
.cd-status-bar .status.ok {
  color: var(--good);
  font-weight: 600;
}
.cd-status-bar .status.err {
  color: var(--bad);
  font-weight: 600;
}
.cd-progress {
  inline-size: 100%;
}

.cd-meta-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
}

.cd-diag-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
  gap: 0.45rem;
}
.cd-diag-tile {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
  min-inline-size: 0;
}
.cd-diag-tile span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cd-diag-tile strong {
  display: block;
  margin-top: 0.12rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--color);
  overflow-wrap: anywhere;
}
.cd-diag-tile strong.good {
  color: var(--good);
}
.cd-diag-tile strong.warn {
  color: var(--warn);
}
.cd-diag-tile strong.bad {
  color: var(--bad);
}

/* Main Responsive Two-Column Studio Workspace */
.studio-workspace {
  container: studio / inline-size;
  min-inline-size: 0;
  scroll-margin-top: 4.5rem;
  border-radius: var(--radius);
}
.studio-workspace[data-drop-hover="true"] {
  outline: 3px dashed var(--accent);
  outline-offset: 4px;
}

.cd-panes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}
@container studio (inline-size >= 980px) {
  .cd-panes {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.92fr);
  }
}

.cd-pane {
  margin: 0;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.cd-pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
}
.cd-pane-head h2,
.cd-pane-head h3 {
  margin: 0;
  padding: 0;
  border: 0;
}
.cd-pane-head h2 {
  font-size: 1.08rem;
  line-height: 1.25;
}

.cd-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  min-inline-size: 0;
}
.cd-card h3 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.3;
}

.cd-section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

/* Interactive Risk Posture Meter Bar */
.cd-posture-meter {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.cd-posture-meter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
.cd-posture-track {
  inline-size: 100%;
  block-size: 10px;
  border-radius: 999px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  overflow: hidden;
}
.cd-posture-fill {
  block-size: 100%;
  inline-size: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: inline-size 0.2s ease, background-color 0.2s ease;
}
.cd-posture-fill[data-tier="low"] {
  background: var(--good);
}
.cd-posture-fill[data-tier="guarded"] {
  background: var(--accent);
}
.cd-posture-fill[data-tier="elevated"] {
  background: var(--warn);
}
.cd-posture-fill[data-tier="high"] {
  background: var(--bad);
}

/* Interactive Clause x Risk Posture Matrix */
.cd-table-wrap {
  inline-size: 100%;
  max-inline-size: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
}
.cd-matrix-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}
.cd-matrix-table th,
.cd-matrix-table td {
  padding: 0.28rem 0.34rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}
.cd-matrix-table thead th {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--bg-secondary);
  white-space: nowrap;
}
.cd-matrix-table tbody th {
  text-align: start;
  background: var(--bg-raised);
}
.cd-matrix-table tbody tr[data-selected="true"] th,
.cd-matrix-table tbody tr[data-selected="true"] td {
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-raised));
}
.cd-matrix-clause-btn {
  inline-size: 100%;
  justify-content: flex-start;
  text-align: start;
  padding: 0.32rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 6px;
}
.cd-matrix-clause-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-raised));
  border-color: var(--accent);
  color: var(--accent);
}
.cd-matrix-cell {
  min-inline-size: 46px;
  min-block-size: 44px;
  padding: 0.24rem 0.36rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: 6px;
}
.cd-matrix-cell.tone-bad {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 52%, var(--border));
  background: color-mix(in srgb, var(--bad) 14%, var(--bg-raised));
}
.cd-matrix-cell.tone-warn {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 48%, var(--border));
  background: color-mix(in srgb, var(--warn) 12%, var(--bg-raised));
}
.cd-matrix-cell.tone-good {
  color: var(--good);
  border-color: color-mix(in srgb, var(--good) 35%, var(--border));
  background: color-mix(in srgb, var(--good) 8%, var(--bg-raised));
}
.cd-matrix-cell.tone-muted {
  color: var(--muted);
}
.cd-matrix-cell[aria-pressed="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Entity & Jurisdiction Map */
.cd-entity-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.cd-entity-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--color);
}
.cd-entity-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.06rem 0.32rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.cd-entity-chip[data-entity-type="ORG"] {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-raised));
  color: var(--accent);
}
.cd-entity-chip[data-entity-type="PER"] {
  border-color: color-mix(in srgb, var(--good) 42%, var(--border));
  background: color-mix(in srgb, var(--good) 9%, var(--bg-raised));
  color: var(--good);
}
.cd-entity-chip[data-entity-type="LOC"] {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--border));
  background: color-mix(in srgb, var(--warn) 10%, var(--bg-raised));
  color: var(--warn);
}
.cd-entity-chip[data-entity-type="MISC"] {
  border-color: color-mix(in srgb, var(--bad) 40%, var(--border));
  background: color-mix(in srgb, var(--bad) 8%, var(--bg-raised));
  color: var(--bad);
}

/* Live Clause Inspector + CSS Custom Highlight API + <mark> Fallback */
.cd-highlight-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--muted);
}
.cd-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
}
.cd-swatch-org {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-raised));
}
.cd-swatch-per {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 12%, var(--bg-raised));
}
.cd-swatch-loc {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 14%, var(--bg-raised));
}
.cd-swatch-qa {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 14%, var(--bg-raised));
}

.cd-clause-surface {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  font-size: 0.94rem;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-block-size: 7.2rem;
}

/* CSS Custom Highlight API pseudo-elements */
::highlight(cd-ner-org) {
  background-color: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--color);
  text-decoration: underline solid var(--accent) 2px;
}
::highlight(cd-ner-per) {
  background-color: color-mix(in srgb, var(--good) 20%, transparent);
  color: var(--color);
  text-decoration: underline solid var(--good) 2px;
}
::highlight(cd-ner-loc) {
  background-color: color-mix(in srgb, var(--warn) 24%, transparent);
  color: var(--color);
  text-decoration: underline dotted var(--warn) 2px;
}
::highlight(cd-ner-misc) {
  background-color: color-mix(in srgb, var(--muted) 20%, transparent);
  color: var(--color);
  text-decoration: underline dashed var(--muted) 2px;
}
::highlight(cd-qa-answer) {
  background-color: color-mix(in srgb, var(--bad) 24%, transparent);
  color: var(--color);
  text-decoration: underline wavy var(--bad) 2px;
}

/* Accessible <mark> DOM fallback */
.cd-mark {
  padding: 0.06rem 0.22rem;
  border-radius: 4px;
  color: var(--color);
}
.cd-mark-ner-org {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-bottom: 2px solid var(--accent);
}
.cd-mark-ner-per {
  background: color-mix(in srgb, var(--good) 18%, transparent);
  border-bottom: 2px solid var(--good);
}
.cd-mark-ner-loc {
  background: color-mix(in srgb, var(--warn) 20%, transparent);
  border-bottom: 2px dotted var(--warn);
}
.cd-mark-ner-misc {
  background: color-mix(in srgb, var(--muted) 18%, transparent);
  border-bottom: 2px dashed var(--muted);
}
.cd-mark-qa-answer {
  background: color-mix(in srgb, var(--bad) 22%, transparent);
  border-bottom: 2px wavy var(--bad);
  font-weight: 600;
}

/* Stage 2 NLI Clause Breakdown */
.cd-nli-bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cd-nli-row {
  display: grid;
  grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr) 3.4rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}
.cd-nli-row-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.cd-nli-bar-track {
  inline-size: 100%;
  block-size: 8px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  overflow: hidden;
}
.cd-nli-bar-fill {
  block-size: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.cd-nli-bar-fill.is-flagged {
  background: var(--bad);
}
.cd-nli-bar-fill.is-low {
  background: var(--good);
}
.cd-nli-row-score {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.cd-redline-list {
  margin: 0;
  padding-inline-start: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.81rem;
  color: var(--color);
}
.cd-redline-list li strong {
  color: var(--bad);
}

/* Source Contract Drawer */
.cd-source-drawer {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  background: var(--bg-raised);
}
.cd-source-drawer summary {
  display: flex;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.cd-source-editor {
  inline-size: 100%;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.5;
}
.cd-source-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

/* Right Pane: Due-Diligence Q&A Bar, Verdict Card, Findings Table & Exports */
.cd-quick-q-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.cd-quick-q-btn {
  font-size: 0.78rem;
  padding: 0.36rem 0.65rem;
  text-align: start;
}
.cd-quick-q-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-raised));
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.cd-qa-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.4rem;
}
.cd-qa-input {
  flex: 1 1 220px;
  min-inline-size: 0;
  font-size: 0.86rem;
}
.cd-qa-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.cd-verdict-card {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.cd-verdict-card[data-state="answered"] {
  border-color: color-mix(in srgb, var(--good) 45%, var(--border));
  background: color-mix(in srgb, var(--good) 8%, var(--bg-raised));
}
.cd-verdict-card[data-state="low-margin"] {
  border-color: color-mix(in srgb, var(--warn) 48%, var(--border));
  background: color-mix(in srgb, var(--warn) 10%, var(--bg-raised));
}
.cd-qa-answer {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--color);
}
.cd-qa-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--muted);
}

.cd-qa-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.77rem;
}
.cd-qa-table th,
.cd-qa-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}
.cd-qa-table thead th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--bg-secondary);
}
.cd-qa-jump-btn {
  padding: 0.25rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.cd-export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
  gap: 0.42rem;
}
.cd-disclaimer {
  margin: 0.35rem 0 0;
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--muted);
}

.cd-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.cd-empty-msg {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
}
.cd-empty-msg.bad {
  color: var(--bad);
  font-weight: 600;
}

@media (max-width: 560px) {
  .cd-nli-row {
    grid-template-columns: minmax(0, 1fr) 3.4rem;
  }
  .cd-nli-bar-track {
    grid-column: 1 / -1;
    order: 3;
  }
}
