:root {
  color-scheme: light;
  --canvas: #f8fafc;
  --paper: #fff;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --amber: #92400e;
  --amber-soft: #fffbeb;
  --red: #ba1a1a;
  --red-soft: #fef2f2;
  --radius: 8px;
  --shadow: 0 20px 55px rgba(15, 23, 42, .09), 0 3px 10px rgba(15, 23, 42, .04);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  accent-color: var(--primary);
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; overflow-x: clip; background: var(--canvas); color: var(--ink); }
body::selection { color: #172554; background: #dbeafe; }
button, input, select, textarea { font: inherit; }
button, a, label.file-button { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
:focus-visible { outline: 3px solid rgba(37,99,235,.28); outline-offset: 2px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-header { width: 100%; min-height: 72px; margin: 0 auto; padding: 0 max(30px, calc((100% - 1440px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: white; }
.brand-block { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--primary); border-radius: 7px; color: white; background: var(--primary); font-size: 16px; font-weight: 700; }
.brand-block h1 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.015em; font-weight: 700; }
.brand-block p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.header-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.header-status strong { padding-left: 9px; border-left: 1px solid var(--line); color: var(--faint); font-size: 10px; font-weight: 600; }
.workbench-return { margin-right: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--primary-dark); font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.workbench-return:hover { background: var(--primary-soft); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.header-status.connected .status-dot { background: #10b981; }
.workspace { width: min(1120px, calc(100% - 64px)); margin: 0 auto 80px; }
.notice-strip { display: none; }
.query-sheet { position: relative; padding: 83px 0 24px; }
.sheet-main { position: relative; z-index: 1; width: min(100%, 1050px); margin: 0 auto; }
.section-heading { margin-bottom: 36px; text-align: center; }
.hero-eyebrow { display: inline-flex; align-items: center; min-height: 28px; margin-bottom: 21px; padding: 4px 11px; border: 1px solid #bfdbfe; border-radius: 5px; color: var(--primary-dark); background: #eff6ff; font-size: 11px; font-weight: 650; letter-spacing: .025em; }
.section-heading h2 { margin: 0; font-size: clamp(38px, 4vw, 50px); font-weight: 700; line-height: 1.16; letter-spacing: -.045em; }
.section-heading p { max-width: 650px; margin: 15px auto 0; color: var(--muted); font-size: 17px; line-height: 1.75; }
#queryForm { margin: 0; }
.field-grid { display: block; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { color: var(--text); font-size: 12px; font-weight: 650; }
.query-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.search-control { display: flex; align-items: center; min-height: 78px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; box-shadow: 0 2px 8px rgba(15, 23, 42, .045); transition: border-color .16s, box-shadow .16s; }
.search-control:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.search-leading-icon { flex: none; width: 20px; height: 20px; margin: 0 10px 0 16px; fill: none; stroke: #94a3b8; stroke-width: 1.8; stroke-linecap: round; }
.search-control input { flex: 1; width: 100%; min-width: 0; min-height: 50px; padding: 0 7px; border: 0; border-radius: 6px; outline: none; color: var(--ink); background: transparent; font-size: 17px; }
.search-control input::placeholder { color: #94a3b8; }
.search-control .primary-button { flex: 0 0 auto; min-width: 152px; min-height: 56px; font-size: 14px; }
.primary-button, .secondary-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 15px; border: 1px solid transparent; border-radius: 7px; text-decoration: none; font-size: 12px; font-weight: 650; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.primary-button { color: white; background: var(--primary); border-color: var(--primary); }
.primary-button:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.primary-button svg, .secondary-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.primary-button:disabled, .secondary-button:disabled { opacity: .5; cursor: not-allowed; }
.secondary-button { color: #334155; background: #fff; border-color: var(--line-strong); }
.secondary-button:hover { border-color: #94a3b8; background: #f8fafc; }
.form-actions { margin: 10px 0 0; min-height: 0; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.stop-button { color: var(--red); }
.form-error { margin: 12px 0 0; color: var(--red); font-size: 12px; }
.batch-import-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 15px; margin: 10px 4px 0; color: var(--faint); font-size: 12px; }
.batch-import-row span { flex: 1 1 250px; }
.batch-import-row button { padding: 3px 0; border: 0; color: var(--primary-dark); background: transparent; font-size: 12px; font-weight: 650; cursor: pointer; }
.batch-import-row button:hover { text-decoration: underline; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 33px 0 0; }
.quick-actions button { min-width: 0; min-height: 82px; display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; box-shadow: 0 2px 7px rgba(15, 23, 42, .035); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.quick-actions button:hover { border-color: #93c5fd; background: #f8fafc; transform: translateY(-1px); }
.quick-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: var(--primary-dark); background: var(--primary-soft); }
.quick-actions button:nth-child(2) .quick-icon { color: #4f46e5; background: #eef2ff; }
.quick-actions button:nth-child(3) .quick-icon { color: #059669; background: #ecfdf5; }
.quick-actions button:nth-child(4) .quick-icon { color: #d97706; background: #fffbeb; }
.quick-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.quick-actions button > span:nth-child(2) { min-width: 0; display: grid; gap: 5px; }
.quick-actions strong { font-size: 14px; font-weight: 650; white-space: nowrap; }
.quick-actions small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.quick-arrow { margin-left: auto; color: #94a3b8; font-size: 20px; }
.home-history { width: min(100%, 1050px); margin: 34px auto 0; padding-bottom: 38px; }
.home-batch-status { width: min(100%, 1050px); margin: 26px auto 0; padding: 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; box-shadow: 0 2px 7px rgba(15, 23, 42, .035); scroll-margin-top: 18px; }
.home-batch-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.home-batch-heading h2 { margin: 0; font-size: 15px; font-weight: 650; }
.home-batch-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.home-batch-status .batch-summary { padding: 14px 0 11px; border-bottom: 1px solid var(--line); }
.home-batch-list { max-height: 320px; overflow: auto; }
.home-batch-row { min-height: 43px; display: grid; grid-template-columns: 34px minmax(220px, 1fr) 70px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.home-batch-row:last-child { border-bottom: 0; }
.home-batch-row .number { color: var(--faint); font-variant-numeric: tabular-nums; }
.home-batch-row strong { min-width: 0; overflow-wrap: anywhere; font-weight: 650; }
.home-batch-row small { min-width: 0; overflow: hidden; color: var(--amber); text-overflow: ellipsis; white-space: nowrap; }
.home-batch-row button { padding: 4px 0; border: 0; color: var(--primary-dark); background: transparent; font-size: 11px; font-weight: 650; cursor: pointer; }
.home-batch-row button:hover { text-decoration: underline; }
.home-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.home-history-heading > div { display: flex; align-items: baseline; gap: 12px; }
.home-history-heading h2 { margin: 0; font-size: 15px; font-weight: 650; }
.home-history-heading span { color: var(--muted); font-size: 11px; }
.home-history-heading button { display: inline-flex; gap: 6px; align-items: center; padding: 5px 0; border: 0; color: var(--primary-dark); background: transparent; font-size: 12px; cursor: pointer; }
.home-history-list { border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 2px 7px rgba(15, 23, 42, .035); overflow: hidden; }
.home-history-list .empty-state-inline { margin: 0; padding: 22px 18px; }
.home-history-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 71px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.home-history-item:last-child { border-bottom: 0; }
.home-history-item > div { min-width: 0; display: grid; gap: 6px; }
.home-history-item strong { overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.home-history-item small { color: var(--muted); font-size: 12px; }
.home-history-item button { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 7px 0 7px 10px; border: 0; color: var(--primary-dark); background: transparent; font-size: 12px; font-weight: 650; cursor: pointer; }
.home-history-item button:hover { text-decoration: underline; }
.home-history-item button:disabled { color: var(--faint); cursor: default; text-decoration: none; }
.progress-ledger { margin: 18px 0; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff; }
.progress-copy { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.progress-copy > div { display: flex; align-items: baseline; gap: 12px; }
.progress-state { color: var(--primary); font-size: 11px; font-weight: 700; }
.progress-copy strong { font-size: 13px; }
.progress-number { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.progress-track { height: 4px; margin: 12px 0 9px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.progress-track span { width: 0; height: 100%; display: block; background: var(--primary); transition: width .2s ease-out; }
.stage-row { display: flex; justify-content: space-between; gap: 8px; color: var(--faint); font-size: 10px; }
.result-sheet { margin: 30px 0 0; }
.result-back { margin-bottom: 16px; padding: 5px 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; cursor: pointer; }
.result-back:hover { color: var(--primary-dark); }
.quick-batch-panel { margin: 0 0 24px; padding: 15px 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; }
.quick-batch-heading, .quick-batch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quick-batch-heading > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.quick-batch-heading strong { color: var(--ink); font-size: 14px; }
.quick-batch-heading span, .quick-batch-row small { color: var(--muted); font-size: 11px; }
.quick-batch-list { margin-top: 10px; border-top: 1px solid var(--line); }
.quick-batch-row { min-height: 40px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.quick-batch-row:last-child { border-bottom: 0; }
.quick-batch-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.quick-batch-row > span:last-child { flex: none; display: flex; align-items: center; gap: 8px; }
.quick-batch-row button { padding: 3px 0; border: 0; color: var(--primary-dark); background: transparent; cursor: pointer; }
.result-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding: 23px 26px 26px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.result-header > div:first-child { min-width: 0; max-width: 850px; }
.result-header h2 { margin: 0 0 13px; font-size: 29px; font-weight: 650; letter-spacing: -.035em; }
.result-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.result-header #resultNotice { color: var(--text); font-size: 14px; }
.result-header p a { color: var(--primary-dark); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.result-disclosures { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 9px; }
.result-disclosures details[open] { flex: 1 1 100%; }
.result-disclosures details p, .result-disclosures details > div { max-width: 720px; margin: 3px 0 12px; line-height: 1.7; }
.summary-ledger { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 16px; padding: 21px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-ledger > div { display: grid; align-content: start; gap: 9px; min-width: 0; padding: 0 18px; border-right: 1px solid var(--line); }
.summary-ledger > div:first-child { padding-left: 0; }
.summary-ledger > div:last-child { border-right: 0; }
.summary-ledger span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.summary-ledger strong { color: var(--ink); font-size: 25px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1; }
.empty-state { padding: 28px 0; text-align: left; }
.empty-state svg { display: none; }
.empty-state strong { display: block; font-size: 14px; }
.empty-state p { margin: 7px 0 0; max-width: 60ch; color: var(--muted); font-size: 12px; line-height: 1.7; }
.coverage-warning { margin: 24px 0 2px; padding: 4px 0 4px 14px; border-left: 2px solid #f59e0b; color: var(--amber); font-size: 12px; line-height: 1.75; }
.coverage-warning details { margin-top: 5px; }
.coverage-warning ul { margin-bottom: 0; }
.review-tabs { display: flex; align-items: center; gap: 34px; margin: 28px 0 0; border-bottom: 1px solid var(--line); }
.review-tabs button { position: relative; min-height: 51px; padding: 0 1px; border: 0; color: var(--muted); background: transparent; font-size: 14px; cursor: pointer; }
.review-tabs button.selected { color: var(--primary-dark); font-weight: 700; }
.review-tabs button.selected::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--primary); }
.review-tabs span { display: inline-block; margin-left: 5px; color: #64748b; font-size: 11px; font-variant-numeric: tabular-nums; }
.review-progress { padding: 14px 0 2px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.review-toolbar input { width: min(315px, 100%); min-height: 43px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 13px; }
.review-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.review-filters button, .review-pages button { min-height: 34px; padding: 6px 9px; border: 1px solid transparent; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; cursor: pointer; }
.review-filters button.selected, .review-filters button:hover, .review-pages button:hover:not(:disabled) { border-color: #bfdbfe; color: var(--primary-dark); background: var(--primary-soft); }
.company-list { border-bottom: 1px solid var(--line); }
.review-row { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 7px; }
.review-row:first-child { border-top: 1px solid var(--line); }
.review-row:hover { background: #f8fafc; }
.review-row-main { min-width: 0; flex: 1; }
.review-row-main > strong { font-size: 15px; font-weight: 650; }
.review-row-main p { margin: 8px 0 5px; color: #475569; font-size: 12px; line-height: 1.5; }
.review-row-main small { color: var(--muted); font-size: 11px; }
.decision-badge, .manual-badge { display: inline-flex; vertical-align: middle; margin-left: 7px; padding: 3px 6px; border-radius: 4px; color: #64748b; background: #f1f5f9; font-size: 9px; font-weight: 650; }
.decision-badge.qualified, .manual-badge.approved { color: var(--primary-dark); background: var(--primary-soft); }
.decision-badge.pending, .manual-badge.pending { color: var(--amber); background: var(--amber-soft); }
.decision-badge.excluded, .manual-badge.rejected { color: var(--red); background: var(--red-soft); }
.review-row-actions { display: flex; flex: none; align-items: center; gap: 7px; }
.review-row-actions button, .text-button { min-height: 36px; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 6px; color: #334155; background: white; font-size: 12px; cursor: pointer; }
.review-row-actions .text-button { border-color: transparent; color: var(--primary-dark); }
.review-row-actions button:hover, .text-button:hover { border-color: #93c5fd; }
.review-pages { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 0; color: var(--muted); font-size: 11px; }
.review-pages button { border-color: var(--line); }
.review-pages button:disabled { opacity: .45; cursor: not-allowed; }
.approved-table-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px 0 10px; }
.approved-table-heading > div { display: grid; gap: 4px; }
.approved-table-heading strong { font-size: 14px; }
.approved-table-heading span { color: var(--muted); font-size: 11px; }
.approved-scroll-hint { display: none; }
.approved-heading-actions { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px !important; }
#reviewDownloadButton { flex: none; }
.review-list table, .temporary-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.approved-list { max-width: 100%; overflow-x: auto; contain: paint; border: 1px solid var(--line); border-radius: 6px; background: white; }
.approved-table { width: 1480px !important; table-layout: fixed; font-size: 12px !important; }
.approved-table th, .approved-table td { padding: 11px 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
.approved-table thead th { position: sticky; top: 0; z-index: 2; padding: 11px 9px; color: var(--text); background: #f1f5f9; text-align: left; font-weight: 700; }
.approved-table th:first-child { position: sticky; left: 0; z-index: 1; width: 185px; background: white; }
.approved-table thead th:first-child { z-index: 3; background: #f1f5f9; }
.approved-table th:nth-child(2) { width: 100px; }
.approved-table th:nth-child(3) { width: 200px; }
.approved-table th:nth-child(4) { width: 100px; }
.approved-table th:nth-child(5) { width: 120px; }
.approved-table th:nth-child(6) { width: 160px; }
.approved-table th:nth-child(7) { width: 180px; }
.approved-table th:nth-child(8) { width: 170px; }
.approved-table th:nth-child(9) { width: 135px; }
.approved-table th:nth-child(10) { width: 130px; }
.approved-entry:hover td, .approved-entry:hover th:first-child { background: #f8fbff; }
.approved-role { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 400; }
.approved-field { display: block; min-width: 0; }
.approved-table .approved-field input, .approved-table .approved-field textarea { display: block; width: 100%; min-width: 0; min-height: 39px; padding: 8px; border: 1px solid transparent; border-radius: 4px; color: var(--ink); background: transparent; font: inherit; line-height: 1.45; }
.approved-table .approved-field textarea { min-height: 49px; resize: vertical; }
.approved-table .approved-field input:hover, .approved-table .approved-field textarea:hover { border-color: var(--line-strong); background: white; }
.approved-table .approved-field input:focus, .approved-table .approved-field textarea:focus { border-color: var(--primary); outline: 2px solid var(--primary-soft); background: white; }
.approved-row-actions button, .detail-review-actions button { min-height: 32px; margin: 0 0 5px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 5px; color: #334155; background: white; font-size: 10px; cursor: pointer; }
.approved-row-actions button { display: inline-block; min-height: 29px; margin-right: 3px; padding: 4px 5px; white-space: nowrap; }
.approved-row-actions button:last-child { display: block; }
.approved-row-actions button:hover, .detail-review-actions button:hover { border-color: #93c5fd; color: var(--primary-dark); }
.review-list th, .review-list td, .temporary-table th, .temporary-table td { padding: 8px 7px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.review-list th, .temporary-table th { color: #475569; background: #f1f5f9; font-size: 10px; font-weight: 650; }
.review-list textarea, .temporary-table textarea { width: 100%; min-width: 86px; min-height: 40px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; resize: vertical; }
.review-list input, .temporary-table input { width: 100%; min-width: 75px; min-height: 32px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; }
.approved-company-name { padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; font-size: 12px; font-weight: 700; line-height: 1.45; cursor: pointer; }
.approved-detail-warning { display: block; max-width: 220px; margin-top: 4px; color: var(--amber); }
.ai-task-panel { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ai-task-heading { display: flex; justify-content: space-between; gap: 12px; }
.ai-task-heading > div:first-child { display: grid; gap: 4px; }
.ai-task-heading strong { font-size: 13px; }
.ai-task-heading span, #aiTaskCurrent { color: var(--muted); font-size: 12px; }
.ai-task-counts { display: flex; gap: 15px; color: var(--muted); font-size: 10px; }
.temporary-sheet { margin: 36px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.temporary-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.temporary-heading h2 { margin: 0; font-size: 15px; }
.temporary-heading p, .temporary-meta { color: var(--muted); font-size: 11px; }
.temporary-meta { display: flex; gap: 20px; padding: 11px 0; }
.temporary-table-wrap, .batch-list { max-width: 100%; overflow: auto; }
.temporary-table { min-width: 1300px; background: white; }
.temporary-empty { color: var(--muted); font-size: 11px; padding: 12px 0; }
.detail-muted, .cards-empty { color: var(--muted); font-size: 12px; }
.company-detail-dialog, .utility-dialog { position: fixed; inset: 50% auto auto 50%; width: min(760px, calc(100vw - 36px)); max-height: min(88vh, 900px); margin: 0; padding: 24px; transform: translate(-50%, -50%); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: white; box-shadow: var(--shadow); overflow: auto; }
.company-detail-dialog { inset: 0 0 0 auto; display: flex; flex-direction: column; width: min(660px, 100vw); height: 100dvh; max-height: 100dvh; padding: 26px 28px; transform: none; border-radius: 0; overflow: hidden; }
.company-detail-dialog:not([open]) { display: none; }
.company-detail-dialog::backdrop, .utility-dialog::backdrop { background: rgba(15,23,42,.35); }
.utility-dialog { padding: 28px; }
.utility-dialog .dialog-close { position: absolute; top: 12px; right: 13px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: white; font-size: 22px; cursor: pointer; }
.rule-dialog { width: min(820px, calc(100vw - 36px)); }
.batch-dialog { width: min(1050px, calc(100vw - 36px)); }
.history-dialog { width: min(800px, calc(100vw - 36px)); }
.company-detail-header, .ai-assistant-header, .history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.company-detail-header h2, .ai-assistant-header h2, .history-heading h2 { margin: 0; font-size: 19px; }
.company-detail-header p, .ai-assistant-header p, .history-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.company-detail-header { flex: none; }
.company-detail-header h2 { font-size: 21px; line-height: 1.3; }
.company-detail-header p { font-size: 12px; line-height: 1.5; }
.company-detail-body { flex: 1; min-height: 0; max-height: none; overflow: auto; }
.detail-review-actions { flex: none; padding-top: 15px; border-top: 1px solid var(--line); }
.ai-launcher { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--primary-dark); background: white; font-size: 12px; cursor: pointer; }
.ai-launcher span { display: grid; place-items: center; }
.ai-launcher span svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ai-config-card { margin: 0; }
.ai-config-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 30px 17px 0; }
.ai-config-heading h2 { margin: 0; font-size: 20px; }
.ai-config-heading h2 span { margin-left: 7px; color: var(--muted); font-size: 11px; font-weight: 500; }
.ai-config-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.toggle-label { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 12px; }
.ai-config-body { padding-top: 16px; border-top: 1px solid var(--line); }
.ai-config-grid, .ai-advanced-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ai-config-grid input, .ai-config-grid select, .ai-advanced-grid input, .ai-dialog-connection, .ai-composer textarea { min-height: 39px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; font-size: 12px; }
.ai-key-input { display: flex; }
.ai-key-input input { flex: 1; min-width: 0; }
.ai-key-input button { border: 1px solid var(--line); border-radius: 5px; background: #f1f5f9; }
.ai-config-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; }
.ai-capabilities { display: grid; gap: 9px; margin: 17px 0; color: var(--text); font-size: 11px; }
.ai-advanced { margin-top: 14px; color: var(--text); font-size: 11px; }
.ai-provider-note, .ai-connection-status { color: var(--muted); font-size: 11px; line-height: 1.6; }
.ai-key-note { margin: -6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.ai-assistant-panel { margin-top: 46px; padding: 27px 0 38px; border-top: 1px solid var(--line-strong); scroll-margin-top: 24px; }
.ai-section-kicker { display: block; margin-bottom: 7px; color: var(--primary-dark); font-size: 11px; font-weight: 650; letter-spacing: .05em; }
.ai-assistant-body { display: grid; gap: 18px; max-width: 900px; padding-top: 19px; }
.ai-dialog-connection { min-height: 0; color: var(--muted); background: #f8fafc; }
.ai-context-bar, .ai-composer > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ai-quick-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.ai-quick-actions button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: white; font-size: 10px; cursor: pointer; }
.ai-messages { min-height: 170px; display: grid; align-content: start; gap: 22px; font-size: 13px; line-height: 1.75; }
.ai-message { min-width: 0; overflow-wrap: anywhere; }
.ai-message.user { justify-self: end; max-width: min(78%, 640px); padding: 12px 16px; border-radius: 12px 12px 3px 12px; background: #eff6ff; }
.ai-message.assistant { padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.ai-message small { display: block; margin-bottom: 9px; color: var(--primary-dark); font-size: 11px; font-weight: 700; }
.ai-message.user small { color: var(--muted); }
.ai-message-content p { margin: 0 0 10px; }
.ai-message-content p:last-child { margin-bottom: 0; }
.ai-message-content h3 { margin: 18px 0 7px; color: var(--ink); font-size: 15px; line-height: 1.4; }
.ai-message-content h3:first-child { margin-top: 0; }
.ai-message-content ul { margin: 5px 0 12px; padding-left: 20px; }
.ai-message-content li { margin: 4px 0; }
.ai-message-content code { padding: 1px 4px; border-radius: 3px; background: #f1f5f9; }
.ai-search-note { margin: 16px 0 0; color: var(--muted); font-size: 11px; }
.ai-message-sources { margin-top: 10px; font-size: 12px; }
.ai-message-sources summary { width: fit-content; color: var(--primary-dark); cursor: pointer; }
.ai-message-sources > div { display: grid; gap: 7px; margin-top: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; }
.ai-message-sources a { display: flex; gap: 8px; color: var(--primary-dark); text-decoration: none; }
.ai-message-sources a span { flex: none; color: var(--muted); }
.ai-message-sources a:hover { text-decoration: underline; }
.ai-empty { display: grid; justify-items: start; gap: 6px; padding: 24px 0; color: var(--muted); }
.ai-empty-mark { color: var(--primary); font-size: 24px; }
.ai-empty strong { color: var(--ink); font-size: 17px; }
.ai-thinking { color: var(--primary-dark); font-size: 13px; }
.ai-composer { padding: 10px 13px; border: 1px solid #93c5fd; border-radius: 11px; background: white; box-shadow: 0 3px 14px rgba(37,99,235,.07); }
.ai-composer textarea { display: block; width: 100%; min-height: 64px; padding: 6px 3px; border: 0; outline: 0; resize: vertical; font-size: 13px; }
.ai-composer > div { margin-top: 3px; color: var(--muted); font-size: 11px; }
.ai-composer button { min-height: 34px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.history-heading { padding-right: 35px; }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 12px; border-bottom: 1px solid var(--line); }
.history-toolbar input { flex: 1; width: min(320px, 100%); min-width: 0; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 13px; }
.history-toolbar span { flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-list { display: grid; max-height: min(58vh, 590px); overflow: auto; }
.history-list > * { margin: 0; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 2px; border-bottom: 1px solid var(--line); }
.history-item > div { display: grid; gap: 5px; }
.history-item strong { font-size: 14px; }
.history-item small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.history-item button { flex: none; }
.empty-state-inline { padding: 22px 0; color: var(--muted); font-size: 12px; }
.rule-docket { padding: 0 28px 2px 0; }
.docket-heading, .batch-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 0 0 17px; }
.docket-heading h2 { margin: 0; font-size: 20px; }
.docket-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.rule-state { padding: 4px 7px; border-radius: 4px; color: var(--primary-dark); background: var(--primary-soft); font-size: 10px; }
.rule-column { padding: 15px 0; border-top: 1px solid var(--line); }
.rule-column h3 { margin: 0 0 12px; font-size: 13px; }
.rule-column h3 span { display: inline-grid; width: 20px; height: 20px; place-items: center; margin-right: 5px; border-radius: 50%; color: var(--primary-dark); background: var(--primary-soft); font-size: 10px; }
.rule-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rule-fields input, .rule-fields select, .batch-industry-picker select { width: 100%; min-height: 37px; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--ink); background: white; font-size: 11px; }
.rule-guidance, .result-method, .rule-explanation { color: var(--text); font-size: 12px; }
.rule-guidance summary, .result-method summary, .rule-explanation summary, .detail-disclosure summary { padding: 9px 0; color: var(--primary-dark); cursor: pointer; }
.rule-guidance [id="activeRuleList"], #appliedRuleList { color: var(--muted); line-height: 1.7; }
.rule-line { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11px; line-height: 1.6; }
.rule-line:last-child { border-bottom: 0; }
.rule-kind { color: var(--primary-dark); font-weight: 650; }
.batch-panel { padding-right: 28px; }
.batch-heading { align-items: center; padding-bottom: 16px; }
.batch-heading > div:first-child { display: grid; gap: 5px; }
.batch-heading strong { font-size: 17px; }
.batch-heading span, #batchIndustryHint { color: var(--muted); font-size: 11px; }
.batch-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.compact { min-height: 33px; padding: 6px 10px; font-size: 10px; }
.batch-industry-picker { display: flex; align-items: end; gap: 9px; padding: 12px 0; border-top: 1px solid var(--line); }
.batch-industry-picker .field { width: min(310px, 45%); }
.batch-summary { display: flex; gap: 20px; padding: 11px 0; color: var(--muted); font-size: 11px; }
.batch-summary strong { color: var(--ink); }
.batch-list table { width: 100%; border-collapse: collapse; font-size: 11px; }
.batch-list th, .batch-list td { padding: 8px 7px; border-bottom: 1px solid var(--line); text-align: left; }
.batch-list th { color: var(--muted); background: #f1f5f9; font-size: 10px; }
.batch-empty { margin: 0; padding: 14px 0 3px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.batch-error-message { margin: 0 28px 13px 0; color: var(--red); font-size: 12px; line-height: 1.6; }
.batch-list .company-name, .temporary-table .company-name { font-weight: 650; }
.batch-list .number { color: var(--muted); font-variant-numeric: tabular-nums; }
.batch-error, .approved-detail-warning { color: var(--amber); }
.batch-status { color: var(--muted); }
.batch-status.completed { color: var(--primary-dark); }
.company-detail-body { padding: 8px 5px 18px 0; font-size: 12px; line-height: 1.65; scrollbar-gutter: stable; }
.detail-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.detail-section h3, .history-customers h4 { margin: 0 0 12px; font-size: 15px; line-height: 1.4; }
.detail-section > .detail-muted { margin: 0 0 15px; line-height: 1.65; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px 20px; margin: 15px 0; }
.detail-industry-grid { grid-template-columns: 1fr; }
.detail-field { min-width: 0; display: grid; gap: 4px; }
.detail-field dt { color: var(--muted); font-size: 11px; }
.detail-field dd { margin: 0; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.nature-source, .detail-compact-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin: 18px 0; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nature-source > div, .detail-compact-facts > div { min-width: 0; display: grid; gap: 4px; }
.nature-source span, .detail-compact-facts span { color: var(--muted); font-size: 11px; }
.nature-source strong, .detail-compact-facts strong { color: var(--ink); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.nature-source small { color: var(--muted); font-size: 10px; }
.detail-source { margin: 14px 0 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.detail-source a, .customer-table a, .relation-table a { color: var(--primary-dark); }
.detail-warning, .history-raw { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.detail-top-warning { padding: 10px 12px; border-left: 2px solid #f59e0b; color: var(--amber); }
.history-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 14px 0; }
.history-metrics > div { display: grid; gap: 4px; }
.history-metrics span { color: var(--muted); font-size: 11px; }
.history-metrics strong { font-size: 17px; }
.history-customers { margin-top: 18px; }
.customer-group { margin: 18px 0; }
.customer-group h4 { display: flex; gap: 8px; align-items: baseline; margin: 0 0 9px; font-size: 12px; }
.customer-group h4 span { color: var(--muted); font-size: 11px; font-weight: 400; }
.customer-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.customer-table, .relation-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 11px; }
.customer-table th, .customer-table td, .relation-table th, .relation-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: normal; }
.customer-table th, .relation-table th { color: var(--muted); background: #f1f5f9; font-weight: 650; }
.customer-table tr:last-child td, .relation-table tr:last-child td { border-bottom: 0; }
.shareholder-list, .detail-block ul, .ai-unresolved ul { padding-left: 20px; margin: 9px 0; color: var(--text); line-height: 1.7; }
.detail-block { padding: 10px 0; }
.detail-block h4 { margin: 0; font-size: 12px; }
.detail-actions { margin: 14px 0 20px; }
.detail-actions a { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.manual-fields-form { margin: 0; }
.manual-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.editable-field { min-width: 0; display: grid; align-content: start; gap: 7px; }
.editable-field.wide { grid-column: 1 / -1; }
.editable-label { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 12px; font-weight: 650; }
.editable-label em { color: var(--primary-dark); font-size: 10px; font-style: normal; font-weight: 500; }
.editable-field input, .editable-field select, .editable-field textarea { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: white; font-size: 13px; line-height: 1.45; }
.editable-field textarea { min-height: 78px; resize: vertical; }
.editable-field small { color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.manual-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 0 4px; }
.manual-save-status { color: var(--muted); font-size: 11px; line-height: 1.5; }
.manual-form-actions button { flex: none; min-height: 40px; padding: 9px 16px; border: 1px solid var(--primary); border-radius: 6px; color: white; background: var(--primary); font-size: 12px; font-weight: 650; cursor: pointer; }
.manual-form-actions button:hover { background: var(--primary-dark); }
.ai-evidence-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ai-evidence-heading p { margin: 3px 0 14px; color: var(--muted); font-size: 11px; }
.ai-evidence-list { margin-top: 12px; }
.ai-evidence-item { padding: 15px 0; border-top: 1px solid var(--line); }
.ai-evidence-title { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.ai-evidence-title span { color: var(--muted); }
.ai-evidence-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 10px 0; }
.ai-evidence-values > div { min-width: 0; display: grid; gap: 3px; }
.ai-evidence-values small { color: var(--muted); }
.ai-evidence-values b { font-weight: 600; overflow-wrap: anywhere; }
.ai-evidence-item p, .ai-evidence-item ul { margin: 9px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.ai-evidence-item ul { padding-left: 18px; }
.ai-evidence-item li small { display: block; }
.ai-unresolved { padding: 10px 0; color: var(--amber); }
.detail-review-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.detail-review-actions label { flex: 1 1 100%; display: grid; gap: 6px; color: var(--text); font-size: 12px; }
.detail-review-actions textarea { width: 100%; min-height: 64px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 12px; resize: vertical; }
.detail-review-actions button { min-height: 38px; margin: 0; padding: 8px 13px; font-size: 12px; }
.detail-review-actions button[data-detail-decision="approved"] { border-color: var(--primary); color: white; background: var(--primary); }
.detail-review-actions button[data-detail-decision="approved"]:hover { background: var(--primary-dark); color: white; }
.detail-disclosure { margin-top: 14px; padding: 4px 0; border-top: 1px solid var(--line); }
.ai-review-summary { display: grid; gap: 6px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
.ai-review-summary span { color: var(--muted); line-height: 1.6; }
.ai-connection-status.ready { color: var(--primary-dark); }
.ai-connection-status.warning { color: var(--amber); }
.ai-connection-status.error { color: var(--red); }
.toast[hidden] { display: none; }
body.has-results .query-sheet, body.has-results .home-batch-status, body.has-results .home-history { display: none; }
@media (min-width: 900px) { body.has-results .workspace { width: min(1500px, calc(100% - 64px)); } }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid #cbd5e1; border-radius: 7px; color: #1e293b; background: white; box-shadow: var(--shadow); font-size: 12px; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .app-header { padding: 0 20px; }
  .workspace { width: min(100% - 40px, 760px); }
  .summary-ledger { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-ledger > div:nth-child(3) { border-right: 0; }
  .summary-ledger > div:nth-child(4) { padding-left: 0; }
  .query-sheet { padding-top: 58px; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .app-header { padding: 0 16px; }
  .workspace { width: calc(100% - 32px); }
  .app-header { min-height: 64px; }
  .brand-block { gap: 9px; }
  .header-status { gap: 6px; font-size: 10px; }
  .header-status strong { display: none; }
  .query-sheet { padding: 53px 0 16px; }
  .section-heading { margin-bottom: 27px; }
  .section-heading h2 { font-size: 37px; }
  .section-heading p { max-width: 33ch; font-size: 13px; }
  .search-control { min-height: 66px; padding: 5px; }
  .search-leading-icon { width: 17px; height: 17px; margin: 0 4px 0 8px; }
  .search-control input { min-height: 48px; padding: 0 5px; font-size: 13px; }
  .search-control .primary-button { min-width: 100px; min-height: 48px; gap: 4px; padding: 8px; font-size: 11px; }
  .batch-import-row { gap: 8px; font-size: 10px; }
  .batch-import-row button { font-size: 10px; }
  .quick-batch-heading, .quick-batch-row { align-items: flex-start; }
  .quick-batch-row { flex-direction: column; gap: 5px; }
  .quick-actions { gap: 9px; margin-top: 27px; }
  .quick-actions button { min-height: 71px; gap: 8px; padding: 8px; }
  .quick-icon { width: 30px; height: 30px; }
  .quick-actions strong { font-size: 12px; }
  .quick-actions small { font-size: 9px; }
  .quick-arrow { display: none; }
  .home-history { margin-top: 24px; }
  .home-batch-heading { align-items: stretch; flex-direction: column; }
  .home-batch-heading .secondary-button { align-self: flex-start; }
  .home-batch-row { grid-template-columns: 25px minmax(0, 1fr) auto; gap: 7px; }
  .home-batch-row small { grid-column: 2 / -1; white-space: normal; }
  .home-batch-row button { grid-column: 2 / -1; justify-self: start; }
  .home-history-heading > div { display: grid; gap: 4px; }
  .home-history-item { align-items: flex-start; gap: 8px; padding: 13px; }
  .home-history-item button { gap: 4px; padding-right: 0; font-size: 11px; }
  .home-history-item small { font-size: 11px; }
  .stage-row { flex-wrap: wrap; }
  .stage-row span { flex: 1 1 43%; }
  .result-header { flex-direction: column; gap: 15px; padding: 18px; }
  .result-header h2 { font-size: 25px; }
  .result-header #resultNotice { font-size: 13px; }
  .result-disclosures { gap: 0 16px; }
  .summary-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 0; padding: 19px 0; }
  .summary-ledger > div, .summary-ledger > div:nth-child(4) { padding: 0 10px; border-right: 0; }
  .summary-ledger > div:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--line); }
  .summary-ledger strong { font-size: 22px; }
  .review-tabs { gap: 19px; }
  .review-tabs button { font-size: 12px; }
  .review-toolbar { align-items: stretch; flex-direction: column; }
  .review-toolbar input { width: 100%; }
  .review-filters { justify-content: flex-start; }
  .review-row { align-items: flex-start; flex-direction: column; gap: 9px; padding: 14px; }
  .review-row-actions { flex-wrap: wrap; }
  .history-item { align-items: flex-start; flex-direction: column; gap: 10px; }
  .review-progress { line-height: 1.6; }
  .approved-table-heading { align-items: flex-start; flex-direction: column; }
  .approved-scroll-hint { display: block; color: var(--primary-dark) !important; }
  .approved-heading-actions { width: 100%; }
  .approved-heading-actions .secondary-button, .approved-heading-actions .primary-button { flex: 1 1 auto; justify-content: center; }
  .temporary-heading { align-items: flex-start; flex-direction: column; }
  .utility-dialog, .company-detail-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 20px 16px; border-radius: 9px; }
  .rule-dialog .rule-fields, .ai-config-grid, .ai-advanced-grid { grid-template-columns: 1fr; }
  .batch-heading { flex-direction: column; align-items: flex-start; }
  .batch-actions { flex-wrap: wrap; }
  .batch-industry-picker { display: grid; gap: 10px; }
  .batch-summary { flex-wrap: wrap; }
  .review-list { overflow: auto; }
  .ai-config-heading { align-items: flex-start; flex-direction: column; }
  .ai-task-heading { flex-direction: column; }
  .ai-context-bar { align-items: flex-start; flex-direction: column; }
  .company-detail-dialog { inset: auto 0 0; width: 100vw; height: min(92dvh, 900px); max-height: 92dvh; padding: 20px 16px; border-radius: 12px 12px 0 0; }
  .manual-field-grid, .nature-source, .detail-compact-facts, .ai-evidence-values { grid-template-columns: 1fr; }
  .editable-field.wide { grid-column: auto; }
  .manual-form-actions { align-items: stretch; flex-direction: column; }
  .manual-form-actions button { align-self: flex-start; }
  .history-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-evidence-heading { flex-direction: column; gap: 4px; }
  .company-detail-header h2 { font-size: 18px; }
  .ai-assistant-header { flex-direction: column; }
  .ai-message.user { max-width: 90%; }
  .ai-composer > div { align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
