/* Leadovix workspace. Legacy Leadovix identity: Inter, a grey palette and a blue accent (darkened for AA text contrast). */

@font-face {
  font-family: "Inter";
  src: url("/assets/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-2: #f0f3f1;
  --border: #e0e5e2;
  --border-strong: #868a88;
  --text: #141514;
  --text-2: #4a4b4a;
  --muted: #5c605d;
  --accent: #2563d0;
  --accent-hover: #1c4fa9;
  --accent-soft: #e9f0fc;
  --on-accent: #ffffff;
  --focus: #3276e8;
  --shadow: 0 1px 2px rgb(20 21 20 / 6%), 0 4px 16px rgb(20 21 20 / 6%);
  --shadow-lg: 0 8px 40px rgb(20 21 20 / 18%);
  --good-bg: #e2f3e8; --good-fg: #1b6a3d;
  --warn-bg: #fcefd6; --warn-fg: #7f4500;
  --bad-bg: #fbe5e5; --bad-fg: #9f2329;
  --muted-bg: #eceeed; --muted-fg: #474948;
  --neutral-bg: #e9f0fc; --neutral-fg: #1c4fa9;
  --radius: 10px;
  --radius-sm: 6px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1110;
  --surface: #171918;
  --surface-2: #1f2221;
  --border: #2c302e;
  --border-strong: #737875;
  --text: #eef1ef;
  --text-2: #c6cbc8;
  --muted: #a4a9a6;
  --accent: #7aa7f5;
  --accent-hover: #9dbef8;
  --accent-soft: #1b2a44;
  --on-accent: #0f1110;
  --focus: #7aa7f5;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-lg: 0 8px 40px rgb(0 0 0 / 60%);
  --good-bg: #14301f; --good-fg: #8fd8aa;
  --warn-bg: #382810; --warn-fg: #f3c56f;
  --bad-bg: #3b1719; --bad-fg: #f5a6a9;
  --muted-bg: #272a29; --muted-fg: #c6cbc8;
  --neutral-bg: #1b2a44; --neutral-fg: #abc7f9;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

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

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

.mono { font-family: var(--mono); font-size: 0.86em; }
.muted { color: var(--muted); }
.sub { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.wrap { word-break: break-all; }
.hint { color: var(--muted); font-size: 0.85rem; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; gap: 28px; min-height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.wordmark { display: block; height: 22px; width: auto; }
.wordmark-dark { display: none; }
[data-theme="dark"] .wordmark-light { display: none; }
[data-theme="dark"] .wordmark-dark { display: block; }
.brand-tag {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px;
}
.mainnav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.mainnav a {
  display: block; padding: 7px 14px; border-radius: 999px; text-decoration: none;
  color: var(--text-2); font-weight: 500;
}
.mainnav a:hover { background: var(--surface-2); color: var(--text); }
.mainnav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.topbar-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.theme-icon {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  vertical-align: -2px;
}
#theme-toggle { gap: 8px; }
#theme-toggle[aria-pressed="true"] { background: var(--surface-2); }

/* Buttons and form controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 7px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 550; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-quiet:hover { background: var(--surface-2); }

input[type="text"], input[type="search"], input[type="password"], select {
  width: 100%; min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
input::placeholder { color: var(--muted); opacity: 1; }
input[aria-invalid="true"] { border-color: var(--bad-fg); }
input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
label { font-weight: 550; font-size: 0.9rem; }
.form-error { color: var(--bad-fg); font-size: 0.85rem; font-weight: 500; }

/* Page */
main { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px 32px 48px; }
main:focus { outline: none; }
.boot { color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 24px; margin-bottom: 22px; }
.page-head h1 { flex-basis: 100%; }
.page-head .lead { color: var(--text-2); max-width: 70ch; flex: 1 1 420px; }
.lead { color: var(--text-2); }
.toolbar { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.toolbar select { width: auto; }
.count { color: var(--text-2); font-weight: 550; margin-bottom: 10px; }
.footer { border-top: 1px solid var(--border); padding: 18px 32px; color: var(--muted); font-size: 0.82rem; text-align: center; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px; min-width: 0;
}
.panel-title { font-size: 1.05rem; margin-bottom: 12px; }
.sub-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 650; margin: 16px 0 8px; }
.panel > .sub-title:first-of-type, .panel-title + .hint + .sub-title { margin-top: 4px; }

/* States */
.state { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; justify-items: start; background: var(--surface); }
.state-title { font-weight: 650; font-size: 1rem; }
.state-loading { border-style: solid; border-color: var(--border); display: flex; align-items: center; gap: 10px; color: var(--text-2); padding: 14px 18px; }
.state-error { border: 1px solid var(--bad-fg); background: var(--bad-bg); color: var(--text); }
.state-error .state-title { color: var(--bad-fg); }
.state-code { font-family: var(--mono); font-size: 0.82rem; color: var(--text-2); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { display: grid; gap: 8px; margin-top: 10px; }
.skeleton-row { height: 44px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .spinner, .skeleton-row { animation: none; } }

.banner { border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.9rem; margin: 10px 0; }
.banner-bad { background: var(--bad-bg); color: var(--bad-fg); border: 1px solid var(--bad-fg); }
.banner-warn { background: var(--warn-bg); color: var(--warn-fg); }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.badge-good { background: var(--good-bg); color: var(--good-fg); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge-bad { background: var(--bad-bg); color: var(--bad-fg); }
.badge-muted { background: var(--muted-bg); color: var(--muted-fg); }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }

/* Definition lists */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; margin: 0; }
.fact dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.fact dd { margin: 2px 0 0; overflow-wrap: anywhere; }

/* Gate */
.gate { display: grid; place-items: center; min-height: 60vh; }
.gate-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 32px; display: grid; gap: 14px; }
.gate-mark { width: 48px; height: 48px; }
.gate-form { display: grid; gap: 8px; margin-top: 6px; }
.gate-form .btn { margin-top: 6px; justify-self: start; }

/* Today */
.action-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.action-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; }
.action-title { font-size: 1.05rem; }
.action-title a { color: var(--text); text-decoration: none; }
.action-title a:hover { color: var(--accent); text-decoration: underline; }
.action-kind { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-top: 2px; }
.sep { color: var(--muted); }
.action-why { color: var(--text-2); margin-top: 4px; }
.action-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 0.85rem; color: var(--text-2); text-align: right; }

/* Search */
.search-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 16px; position: sticky; top: 80px; }
.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field legend { font-weight: 550; font-size: 0.9rem; padding: 0; margin-bottom: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px 5px 8px; background: var(--surface-2);
}
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.check:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.results { min-width: 0; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.grid-wrap, .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; }
.grid th, .grid td, .data th, .data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.grid thead th, .data thead th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
.grid tbody tr:last-child td, .data tbody tr:last-child > * { border-bottom: 0; }
.grid tbody tr { cursor: pointer; }
.grid tbody tr:hover { background: var(--surface-2); }
.grid tbody tr:focus { outline: none; }
.grid tbody tr:focus-visible, .grid tbody tr:focus { box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 2px var(--focus); background: var(--accent-soft); }
.c-name { min-width: 190px; }
.row-link { color: var(--text); font-weight: 600; text-decoration: none; }
.row-link:hover { color: var(--accent); text-decoration: underline; }
.c-domain { overflow-wrap: anywhere; min-width: 140px; max-width: 200px; }
.c-nowrap { white-space: nowrap; }
.more-filters > summary { display: none; }
.more-body { display: grid; gap: 16px; }
.more-count { color: var(--accent); font-weight: 600; }
#payloads, .propose-out { scroll-margin-top: 84px; }
.load-more { display: flex; justify-content: center; margin-top: 16px; }
.end-note { text-align: center; color: var(--muted); margin-top: 14px; font-size: 0.85rem; }

/* Company */
.back { margin-bottom: 14px; font-size: 0.9rem; }
.back a::before { content: "\2190\00a0"; }
.company-head { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px; display: grid; gap: 18px; }
.company-sub { color: var(--text-2); margin-top: 4px; }
.company-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.fields-table tbody tr.clickable { cursor: pointer; }
.fields-table tbody tr.clickable:hover { background: var(--surface-2); }
.fields-table th[scope="row"] { font-weight: 500; white-space: nowrap; }
.c-value { overflow-wrap: anywhere; max-width: 360px; }
.fields-table td .sub { white-space: nowrap; }
.row-button { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; }
.row-button:hover { text-decoration-color: currentColor; }
.evidence-chip {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--accent);
  border-radius: 999px; padding: 1px 8px; font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: var(--mono);
}
.evidence-chip:hover { border-color: var(--accent); }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: 116px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.tl-item::after { content: ""; position: absolute; left: 120px; top: 20px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child::after { display: none; }
.tl-negative::before { background: var(--bad-fg); }
.tl-date { color: var(--muted); font-size: 0.85rem; text-align: right; padding-right: 14px; }
.tl-body { padding-left: 22px; display: grid; gap: 6px; justify-items: start; }
.tl-label { font-weight: 600; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--text-2); font-size: 0.85rem; }

.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.unknowns li::marker { content: "?  "; color: var(--warn-fg); font-weight: 700; }

.next-action { border-top: 4px solid var(--accent); }
.na-kind { font-size: 1.2rem; font-weight: 650; }
.na-why { color: var(--text-2); margin: 4px 0 14px; }
.na-reasons { margin-top: 12px; }
.na-reasons summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.na-reasons .reasons { margin-top: 8px; }
.na-actions { margin-top: 16px; display: grid; gap: 8px; justify-items: start; }
.propose-out { margin-top: 12px; display: grid; gap: 10px; }
.propose-out:empty { display: none; }
.propose-summary { font-weight: 550; }
.payloads { display: grid; gap: 10px; }
.payloads-title { font-size: 0.95rem; }
.payloads .banner { margin: 0; }
.payload { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.payload-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.payload-head h4 { font-size: 0.9rem; margin-right: auto; }
.payload-body { margin: 0; padding: 12px; font-family: var(--mono); font-size: 0.78rem; line-height: 1.5; max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); color: var(--text); }

.motion { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.motion:first-of-type { border-top: 0; padding-top: 0; margin-top: 6px; }
.motion-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.motion-head h3 { font-size: 1rem; }
.score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.score { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.score-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; }
.score-value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.reasons li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 8px; align-items: baseline; font-size: 0.9rem; }
.points { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--good-fg); text-align: right; }
.points.neg { color: var(--bad-fg); }
.chips { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }

/* Evidence inspector */
.inspector {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: 440px; max-width: 100%;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  overflow-y: auto; padding: 0 0 24px;
}
.inspector[hidden] { display: none; }
.inspector-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; background: var(--surface); border-bottom: 1px solid var(--border); }
.inspector-head h2 { font-size: 1.05rem; }
.inspector-body { padding: 18px 22px; display: grid; gap: 12px; }
.inspector .facts { grid-template-columns: 1fr; gap: 10px; }
.ins-field { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; }
.ins-value { font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }
.ins-badges { display: flex; gap: 6px; }

/* Markets */
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.market { margin: 0; display: grid; gap: 14px; align-content: start; }
.market-head .panel-title { margin-bottom: 2px; }
.weights th[scope="row"] { font-weight: 500; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }

/* Tablet and below */
@media (max-width: 1180px) {
  .company-layout { grid-template-columns: minmax(0, 1fr); }
  .company-side { order: -1; }
}
@media (max-width: 960px) {
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .field-q, .filters .more-filters, .filter-actions { grid-column: 1 / -1; }
  .more-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-body .field-checks { grid-column: 1 / -1; }
}

/* Phone */
@media (max-width: 720px) {
  body { font-size: 15px; }
  h1 { font-size: 1.45rem; }
  .topbar { position: static; }
  .topbar-inner { padding: 10px 16px 0; flex-wrap: wrap; gap: 4px 8px; min-height: 0; }
  .wordmark { height: 20px; }
  .brand-tag { display: none; }
  .mainnav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .mainnav ul { padding-bottom: 8px; }
  .mainnav a { padding: 6px 12px; }
  .topbar-tools { gap: 2px; }
  .theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #theme-toggle, #signout { min-height: 40px; min-width: 40px; padding: 6px 10px; font-size: 0.88rem; }
  #payloads, .propose-out { scroll-margin-top: 12px; }
  .more-filters > summary { display: list-item; cursor: pointer; font-weight: 600; padding: 4px 0; }
  .more-filters[open] > summary { margin-bottom: 12px; }
  .more-body { grid-template-columns: minmax(0, 1fr); }
  main { padding: 20px 16px 40px; }
  .footer { padding: 16px; }
  .panel, .company-head { padding: 16px; }
  .toolbar { margin-left: 0; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .kbd-hint { display: none; }

  .action-card { grid-template-columns: minmax(0, 1fr); }
  .action-meta { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }

  /* Tables become stacked cards */
  .grid-wrap, .table-wrap { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .grid thead, .data.fields-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .grid, .grid tbody, .grid tr, .grid td,
  .fields-table, .fields-table tbody, .fields-table tr, .fields-table th, .fields-table td { display: block; width: 100%; }
  .grid tbody { display: grid; gap: 10px; }
  .grid tbody tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .grid td { border: 0; padding: 0; min-width: 0; }
  .grid td.c-name { grid-column: 1 / -1; min-width: 0; }
  .grid td.c-domain { grid-column: 1 / -1; max-width: none; }
  .grid td:not(.c-name)::before { content: attr(data-label); display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; }
  .fields-table tbody { display: grid; gap: 0; }
  .fields-table tr { border-bottom: 1px solid var(--border); padding: 10px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .fields-table tr:last-child { border-bottom: 0; }
  .fields-table th, .fields-table td { border: 0 !important; padding: 0 !important; }
  .fields-table th[scope="row"], .fields-table td.c-value { grid-column: 1 / -1; max-width: none; }
  .fields-table td:not(.c-value)::before { content: attr(data-label); display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; }

  .tl-item { grid-template-columns: minmax(0, 1fr); gap: 2px; padding-left: 22px; }
  .tl-item::before { left: 0; top: 6px; }
  .tl-item::after { left: 4px; }
  .tl-date { text-align: left; padding: 0; }
  .tl-body { padding-left: 0; }

  .market-grid { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .inspector { top: auto; left: 0; width: 100%; max-height: 78vh; border-left: 0; border-top: 1px solid var(--border); border-radius: 14px 14px 0 0; }
}

/* Review queue */
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.review-item { display: grid; gap: 8px; }
.review-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.review-side { min-width: 0; overflow-wrap: anywhere; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.review-item input { max-width: 100%; }
@media (max-width: 600px) { .review-pair { grid-template-columns: 1fr; } }
