:root {
  color-scheme: light;
  --canvas: #faf6f0;
  --surface: #ffffff;
  --surface-muted: #fcf9f5;
  --line: #e8ddd2;
  --line-strong: #d9c9ba;
  --ink: #302521;
  --muted: #776c63;
  --brand: #c53d31;
  --brand-dark: #9f2f26;
  --brand-soft: #fbe9e5;
  --gold: #a97727;
  --gold-soft: #fbf3e4;
  --blue: var(--brand);
  --blue-dark: var(--brand-dark);
  --blue-soft: var(--brand-soft);
  --orange: #d99a31;
  --orange-soft: #fff4df;
  --green: #21835b;
  --green-soft: #e7f3ec;
  --red: #a33d50;
  --red-soft: #f9e9ed;
  --shadow: 0 12px 32px rgba(89, 47, 33, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; }
body.compare-modal-open { overflow: hidden; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.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; }

.app-frame { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; width: 182px; height: 100vh; flex: 0 0 182px; flex-direction: column; padding: 24px 0 18px; background: #f7f9fc; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 22px 26px; color: var(--ink); font-size: 23px; font-weight: 800; letter-spacing: -0.06em; text-decoration: none; }
.brand-mark { display: grid; width: 23px; height: 23px; place-items: center; color: var(--blue); font-size: 26px; line-height: 1; }
.side-nav { display: grid; gap: 4px; }
.side-nav-link { display: flex; align-items: center; gap: 13px; min-height: 54px; padding: 0 22px; color: #253451; font-size: 14px; text-decoration: none; border-left: 4px solid transparent; }
.side-nav-link span:first-child { width: 21px; color: #243452; font-size: 23px; line-height: 1; text-align: center; }
.side-nav-link:hover, .side-nav-link.is-active { color: var(--blue); background: var(--blue-soft); border-left-color: var(--blue); }
.side-nav-link.is-active span:first-child { color: var(--blue); }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin: auto 22px 0; color: var(--muted); font-size: 11px; }
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.page-column { min-width: 0; flex: 1; }
.topbar { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; background: rgba(255, 255, 255, 0.88); border-bottom: 1px solid var(--line); }
.topbar-title { display: flex; align-items: baseline; gap: 12px; }
.mobile-brand { display: none; font-size: 20px; font-weight: 800; letter-spacing: -0.06em; }
.topbar-context { color: var(--muted); font-size: 13px; }
.topbar-status { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.freshness-stack { display: grid; gap: 2px; min-width: 210px; }
.freshness { color: #273653; font-size: 13px; white-space: nowrap; }
.freshness.is-stale { color: #8a4a50; }
.data-status { color: var(--muted); font-size: 10px; white-space: nowrap; }
.data-status.is-ready { color: var(--green); }
.data-status.is-stale { color: #8a4a50; }
.data-status.is-hold { color: var(--red); }
.data-status.is-error { color: var(--red); }
.retry-dashboard { white-space: nowrap; }
.session-badge { padding: 6px 8px; color: var(--blue); background: var(--blue-soft); border-radius: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.session-badge.is-viewer { color: #7f5a12; background: var(--orange-soft); }
.session-badge.is-admin { color: var(--green); background: var(--green-soft); }
.account-management-link { color: var(--blue); font-size: 11px; font-weight: 700; white-space: nowrap; }
.notice { display: none; align-items: center; gap: 12px; margin: 12px 28px 0; padding: 11px 14px; color: #31415f; background: #edf3ff; border: 1px solid #d6e2fb; border-radius: 8px; font-size: 12px; }
.notice.hold { display: flex; }
.notice strong { color: var(--blue); font-size: 12px; }
.notice span { color: var(--muted); }
.notice.hold { color: #7c3c3f; background: var(--red-soft); border-color: #f0c8cb; }
.notice.hold strong { color: var(--red); }
.shell { width: 100%; margin: 0; padding: 16px 16px 84px 24px; }

.query-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; }
.query-layout.has-selection { grid-template-columns: minmax(0, 1fr) 430px; }
.query-layout.inspector-wide { grid-template-columns: minmax(0, 1fr) 560px; }
.query-workspace, .evidence-inspector, .panel, .metric-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.query-workspace { min-width: 0; padding: 16px 20px 18px; border-radius: 12px; }
.query-heading { padding: 0 4px 12px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: 0.13em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -0.06em; }
h2 { margin-bottom: 0; font-size: 22px; letter-spacing: -0.035em; }
h3 { font-size: 15px; }
.query-subtitle { max-width: 630px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.search-shell { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 0 13px; border: 2px solid var(--blue); border-radius: 8px; background: #fff; }
.search-icon { color: #607294; font-size: 28px; line-height: 1; }
.search-shell input { width: 100%; min-width: 0; min-height: 42px; padding: 0; color: var(--ink); border: 0; outline: 0; font-size: 16px; }
.search-shell input::placeholder { color: #8390aa; }
.query-scope-tabs { display: flex; gap: 4px; margin: 12px 0 10px; border-bottom: 1px solid var(--line); }
.query-scope-tab { min-height: 34px; padding: 0 12px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.query-scope-tab:hover, .query-scope-tab.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.query-scope-tab span { display: inline-grid; min-width: 18px; height: 18px; margin-left: 3px; place-items: center; padding: 0 4px; color: var(--blue); background: var(--blue-soft); border-radius: 99px; font-size: 10px; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 6px; margin: 8px 0 10px; }
.quick-link { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 7px; min-width: 0; padding: 10px 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; }
.quick-link:hover { border-color: var(--blue); background: var(--blue-soft); }
.quick-link span { min-width: 0; color: #273653; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.quick-link strong { color: var(--blue); font-size: 17px; }
.quick-link small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.daily-selection-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 10px; padding: 7px 9px; color: var(--muted); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 7px; }
.daily-selection-label { color: var(--ink); font-size: 11px; font-weight: 750; }
.daily-selection-link { display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; padding: 3px 5px; color: var(--ink); background: transparent; border: 0; border-radius: 4px; cursor: pointer; font-size: 11px; }
.daily-selection-link:hover:not(:disabled), .daily-selection-link:focus-visible { color: var(--brand); background: var(--brand-soft); }
.daily-selection-link.is-active { color: var(--brand); background: var(--brand-soft); }
.daily-selection-link b { color: var(--brand); font-size: 12px; }
.daily-selection-link.is-active b { color: var(--brand-dark); }
.daily-selection-link:disabled { color: var(--muted); cursor: not-allowed; }
.daily-selection-link:disabled b { color: var(--muted); }
.daily-selection-links small { flex: 1 1 220px; min-width: 170px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.quick-signal-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; }
.quick-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 9px; color: #33415f; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 10px; }
.quick-filter:hover, .quick-filter:focus-visible { color: var(--blue); border-color: #b9cdf5; background: var(--blue-soft); }
.quick-filter.is-active { color: var(--blue); border-color: #8eafea; background: var(--blue-soft); box-shadow: 0 0 0 2px rgba(57, 99, 177, .08); }
.quick-filter b { color: var(--blue); font-size: 11px; }
.secondary-report-shortcuts, .quick-signal-disclosure { margin: 6px 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-muted); }
.secondary-report-shortcuts > summary, .quick-signal-disclosure > summary { padding: 8px 10px; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 700; }
.secondary-report-shortcuts > summary span { display: inline-grid; min-width: 17px; height: 17px; margin-left: 3px; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 99px; font-size: 9px; }
.secondary-report-shortcuts .quick-links, .quick-signal-disclosure .quick-signal-filters { margin: 0; padding: 0 9px 9px; }
.quick-signal-disclosure .quick-signal-filters { gap: 5px; }
.quick-signal-scope-inline { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 400; }
.quick-signal-disclosure:not([open]) .quick-signal-scope-inline { display: none; }
.secondary-report-shortcuts, .quick-signal-disclosure, .selection-views { display: inline-block; width: auto; vertical-align: top; }
.secondary-report-shortcuts[open], .quick-signal-disclosure[open], .selection-views[open] { display: block; width: 100%; margin-right: 0; }
.selection-views { margin-right: 6px; }
.selection-views { margin: 0 0 16px; padding: 13px 14px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 8px; }
.selection-views > summary { color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 750; list-style-position: inside; }
.selection-views > summary::marker { color: var(--blue); }
.selection-views-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr); gap: 8px 20px; align-items: start; padding-top: 9px; }
.selection-views-note { grid-column: 1; grid-row: 1; max-width: 620px; margin: 0 0 9px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.selection-view-backup-actions { display: flex; grid-column: 1; grid-row: 2; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.selection-view-backup-actions small { flex: 1 1 180px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.selection-view-form { display: flex; grid-column: 2; grid-row: 1 / span 2; align-items: flex-end; gap: 8px; min-width: 0; margin: 0; }
.selection-view-form label { display: grid; min-width: 0; flex: 1; gap: 5px; color: var(--muted); font-size: 10px; }
.selection-view-form input { width: 100%; min-height: 36px; padding: 0 9px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; }
.selection-view-form input:focus { border-color: var(--blue); outline: 2px solid rgba(57, 99, 177, .14); }
.selection-view-save, .selection-view-action { min-height: 36px; padding: 0 10px; color: var(--blue); background: #fff; border: 1px solid #c8d7f8; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.selection-view-save:hover, .selection-view-action:hover { background: var(--blue-soft); }
.selection-view-save:disabled, .selection-view-action:disabled { color: #9ba5b7; background: #f5f7fa; border-color: var(--line); cursor: not-allowed; }
.selection-view-status { grid-column: 1 / -1; grid-row: 4; min-height: 15px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.selection-view-status:empty { display: none; }
.selection-view-status.is-warning { color: #8a4a50; }
.selection-view-status-row { display: flex; grid-column: 1 / -1; grid-row: 4; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.selection-view-status-row .selection-view-status { flex: 1 1 auto; }
.selection-view-status-row .selection-view-action { flex: 0 0 auto; }
.selection-view-list { display: grid; grid-column: 1 / -1; grid-row: 3; gap: 6px; min-width: 0; }
.selection-views-body.has-saved-views .selection-view-form { grid-row: 1; }
.selection-views-body.has-saved-views .selection-view-list { grid-column: 1 / -1; grid-row: 3; }
.selection-views-body.has-saved-views .selection-view-status { grid-column: 1 / -1; grid-row: 4; }
.selection-view-list .empty-inline { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.selection-view-item { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 8px 9px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.selection-view-item > div:first-child { display: grid; min-width: 0; gap: 3px; }
.selection-view-item strong { min-width: 0; color: var(--ink); font-size: 11px; overflow-wrap: anywhere; }
.selection-view-item small { color: var(--muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.selection-view-condition-summary { color: var(--ink) !important; }
.selection-view-condition-details { color: var(--muted); font-size: 10px; line-height: 1.45; }
.selection-view-condition-details summary { width: fit-content; color: var(--brand); cursor: pointer; }
.selection-view-condition-details p { margin: 3px 0 0; overflow-wrap: anywhere; }
.selection-view-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.selection-view-action { min-height: 28px; padding: 0 8px; font-size: 10px; }
.selection-view-action.delete { color: #8a4a50; border-color: #efc8cd; }
.selection-view-action.delete:hover { background: var(--red-soft); }
.query-filter-bar { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.5fr; gap: 9px; padding: 11px 0 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.query-filter-bar label:not(.category-picker-option) { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.query-filter-field { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.query-filter-bar select { width: 100%; min-height: 38px; padding: 0 8px; color: var(--ink); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; }
.query-filter-bar select[multiple] { min-height: 38px; }
.category-picker { position: relative; min-width: 0; }
.category-picker-trigger { display: flex; width: 100%; min-height: 38px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; color: var(--ink); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: 11px; text-align: left; }
.category-picker-trigger:hover, .category-picker-trigger:focus-visible { border-color: #9bb6ec; outline: 2px solid rgba(57, 99, 177, .12); }
.category-picker-trigger b { color: var(--blue); font-size: 10px; white-space: nowrap; }
.category-picker-menu { position: absolute; z-index: 12; top: calc(100% + 5px); right: 0; left: 0; display: grid; gap: 7px; max-height: 310px; padding: 9px; overflow: auto; background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; box-shadow: 0 12px 30px rgba(24, 49, 88, .14); }
.category-picker-search input { width: 100%; min-height: 32px; padding: 0 8px; color: var(--ink); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
.category-picker-options { display: grid; gap: 2px; }
.category-picker-option { display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 3px 5px; color: #425372; border-radius: 4px; cursor: pointer; font-size: 11px; }
.category-picker-option:hover, .category-picker-option:focus-within { background: var(--blue-soft); }
.category-picker-option input { width: 15px; height: 15px; accent-color: var(--blue); }
.category-picker-option[aria-selected="true"] span { color: var(--blue); font-weight: 700; }
.query-filter-bar label small, .more-filters label small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.price-filter-fieldset { display: grid; grid-template-columns: 1fr; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; }
.price-filter-fieldset legend { padding: 0; color: var(--muted); font-size: 10px; }
.price-filter-fieldset select { min-height: 30px; }
.price-range-inputs { display: flex; align-items: center; gap: 5px; }
.price-range-inputs label { min-width: 0; flex: 1; }
.price-range-inputs input { width: 100%; min-height: 30px; padding: 0 7px; color: var(--ink); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
.filter-error { min-height: 12px; color: var(--red) !important; }
.query-filter-bar select:disabled { color: #9ba5b7; cursor: not-allowed; }
.more-filters { margin-top: 8px; border-bottom: 1px solid var(--line); }
.more-filters > summary { width: fit-content; padding: 4px 0 9px; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 700; }
.more-filters > summary span { display: inline-grid; min-width: 17px; height: 17px; margin-left: 3px; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 99px; font-size: 9px; }
.more-filters-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 0 10px; }
.more-filters-grid label:not(.category-picker-option) { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.more-filters-grid select { width: 100%; min-height: 38px; padding: 0 8px; color: var(--ink); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; }
.active-filter-chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; padding: 7px 0 2px; }
.active-filter-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 7px; color: #33415f; background: var(--blue-soft); border: 1px solid #c8d7f8; border-radius: 999px; font-size: 10px; }
.active-filter-chip button { display: inline-grid; width: 16px; height: 16px; place-items: center; padding: 0; color: var(--blue); background: transparent; border: 0; cursor: pointer; font-size: 14px; line-height: 1; }
.active-filter-chip button:hover { color: var(--red); }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 3px 6px; }
.results-toolbar p { min-width: 0; flex: 1 1 220px; margin: 0; font-size: 14px; }
.results-toolbar-actions { display: flex; min-width: 0; flex: 1 1 360px; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.page-size-control { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.page-size-control select { min-height: 31px; padding: 0 8px; color: #354464; background: #fff; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; font-size: 11px; }
.text-action { flex: 0 0 auto; padding: 4px 0; color: var(--blue); background: transparent; border: 0; cursor: pointer; font-size: 12px; white-space: nowrap; }
.text-action:hover { text-decoration: underline; }
.ranking-hold-copy { margin: 0 3px 10px; padding: 8px 10px; color: #8a4a50; background: var(--red-soft); border-left: 3px solid var(--red); font-size: 11px; }
.filter-result-note, .scope-action-note { min-height: 14px; margin: 0 3px 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }
#filterResultNote:empty, #scopeActionNote:empty { display: none; }
.table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.query-table-wrap { position: relative; }
.query-table {
  width: 100%;
  /* Keep the full status/evidence actions visible on a normal 1280px desktop. */
  min-width: 960px;
  border-collapse: collapse;
  table-layout: fixed;
}
.query-table th { padding: 10px 8px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600; text-align: left; }
/* Keep the 7-day rail, status and evidence action in separate columns while zoomed. */
.query-table th:nth-child(1) { width: 25%; }
.query-table th:nth-child(2) { width: 16%; }
.query-table th:nth-child(3) { width: 12%; }
.query-table th:nth-child(4) { width: 12%; }
.query-table th:nth-child(5) { width: 20%; }
.query-table th:nth-child(6) { width: 8%; }
.query-table th:nth-child(7) { width: 7%; }
.query-table td { padding: 12px 8px; vertical-align: middle; border-bottom: 1px solid #edf1f6; }
.query-result-row { cursor: pointer; }
.query-result-row:hover { background: #fbfcff; }
.query-result-row.is-selected { background: #f3f7ff; outline: 2px solid var(--blue); outline-offset: -2px; }
.query-floating-header { position: fixed; z-index: 16; overflow: hidden; pointer-events: none; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 5px 12px rgba(89, 47, 33, 0.08); }
.query-floating-header-table { width: 100%; min-width: 960px; border-collapse: collapse; table-layout: fixed; transform-origin: top left; }
.query-floating-header th { padding: 10px 8px; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600; text-align: left; white-space: nowrap; }
.product-select-line { display: flex; align-items: flex-start; gap: 9px; }
.candidate-select { width: 16px; height: 16px; flex: 0 0 16px; margin: 2px 0 0; accent-color: var(--blue); }
.product-cell a { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.4; text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-cell a:hover { color: var(--blue); }
.product-cell small, .query-number-cell small, .rail-caption, .reviewed-mark { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.query-number-cell b { display: block; color: var(--ink); font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.query-number-cell:first-of-type b { color: var(--blue); }
.rail-cell { min-width: 175px; }
.presence-rail { display: grid; grid-template-columns: repeat(7, minmax(26px, 1fr)); gap: 4px; min-width: 190px; }
.presence-cell { display: grid; gap: 3px; min-width: 0; padding: 3px 2px; color: #7c879b; border: 1px solid #d7dee8; background: #f8fafc; font-size: 9px; text-align: center; }
.presence-cell small { overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
.presence-cell b { font-size: 10px; font-weight: 700; }
.presence-cell.is-present { color: #4b300b; border-color: #f1ac42; background: var(--orange); }
.presence-cell.is-absent { color: #748097; }
.presence-rail-compact { min-width: 170px; }
.presence-rail-compact .presence-cell { padding: 2px 1px; }
.status { display: inline-block; padding: 5px 7px; color: var(--blue); background: var(--blue-soft); border-radius: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status.watch { color: #596782; background: #eef1f5; }
.status.blocked { color: var(--red); background: var(--red-soft); }
.reviewed-mark { color: var(--green); }
.inspect-row { padding: 5px 7px; color: var(--blue); background: #fff; border: 1px solid #c8d7f8; border-radius: 5px; cursor: pointer; font-size: 11px; white-space: nowrap; }
.inspect-row:hover { background: var(--blue-soft); }
.favorite-toggle { display: inline-grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; padding: 0; color: #9ba7ba; background: #fff; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; font-size: 18px; line-height: 1; }
.favorite-toggle:hover, .favorite-toggle.is-favorite { color: var(--orange); border-color: #f1c57f; background: var(--orange-soft); }
.favorite-toggle:disabled { cursor: wait; opacity: .55; }
.product-actions-line { display: flex; align-items: flex-start; gap: 6px; }
.product-actions-line > div { min-width: 0; flex: 1; }
.product-date-note { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.metric-change { display: block; margin-top: 4px; color: #425372; font-size: 12px; line-height: 1.35; }
.metric-change.is-up { color: var(--green); }
.metric-change.is-down { display: inline-flex; width: fit-content; padding: 2px 5px; color: var(--red); background: var(--red-soft); border-radius: 4px; }
.metric-change.is-none { color: var(--muted); }
.evidence-action { min-height: 30px; margin-top: 9px; padding: 0 9px; color: var(--blue); background: #fff; border: 1px solid #c8d7f8; border-radius: 5px; cursor: pointer; font-size: 10px; font-weight: 700; }
.evidence-action:hover { background: var(--blue-soft); }
.table-empty { margin: 0; padding: 26px 0; color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 16px; color: var(--muted); font-size: 12px; }
.pagination-pages { display: flex; align-items: center; gap: 5px; }
.page-button { display: grid; min-width: 31px; height: 31px; place-items: center; padding: 0 7px; color: #354464; background: #fff; border: 1px solid transparent; border-radius: 5px; cursor: pointer; }
.page-button:hover:not(:disabled) { color: var(--blue); border-color: #c8d7f8; }
.page-button.is-current { color: #fff; background: var(--blue); border-color: var(--blue); }
.page-button:disabled { color: #bdc6d5; cursor: not-allowed; }
.page-arrow { font-size: 24px; line-height: 1; }
.page-ellipsis { padding: 0 2px; }
.query-footnote { margin: 16px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.query-layout.has-comparison { padding-bottom: 92px; }
.compare-bar { position: fixed; z-index: 17; right: 16px; bottom: 16px; left: 206px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 9px 12px; background: var(--blue-soft); border: 1px solid #c8d7f8; border-radius: 8px; box-shadow: 0 10px 28px rgba(24, 49, 88, .12); }
.compare-bar-selection { display: grid; gap: 3px; min-width: 0; }
.compare-bar strong { color: var(--ink); font-size: 13px; }
.compare-bar-hint, .compare-bar-item { color: var(--muted); font-size: 12px; }
.compare-bar-items { display: flex; min-width: 0; gap: 5px; overflow-x: auto; }
.compare-bar-item { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; min-height: 27px; padding: 0 4px 0 8px; color: #33415f; background: #fff; border: 1px solid #c8d7f8; border-radius: 999px; white-space: nowrap; }
.compare-bar-item span { overflow: hidden; text-overflow: ellipsis; }
.compare-bar-item button { display: inline-grid; width: 20px; height: 20px; place-items: center; padding: 0; color: var(--blue); background: transparent; border: 0; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.compare-bar-item button:hover { color: var(--red); background: var(--red-soft); }
.compare-bar-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.compare-open { min-height: 34px; padding: 0 11px; color: #fff; background: var(--blue); border: 0; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 700; }
.compare-open:hover:not(:disabled) { background: var(--blue-dark); }
.compare-open:disabled { opacity: 0.5; cursor: not-allowed; }
.evidence-action-message { min-height: 16px; margin: 7px 2px 0; color: #8a4a50; font-size: 10px; line-height: 1.45; }
.evidence-action-message.is-success { color: var(--green); }
.evidence-action-message.is-warning { color: #8a4a50; }
.favorite-missing-source { color: #8a4a50 !important; }
.favorite-source-unknown { color: #7f5a12 !important; }
.favorite-analysis-unknown { padding: 8px; color: #7f5a12; background: var(--orange-soft); border: 1px dashed #e5bb72; border-radius: 5px; font-size: 10px; line-height: 1.4; }
.compare-panel { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(17, 26, 47, 0.42); }
.compare-modal-card { display: flex; width: min(100%, 1120px); max-height: min(90vh, 800px); flex-direction: column; padding: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 24px 70px rgba(17, 26, 47, 0.2); }
.compare-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.compare-panel-heading h2 { margin: 0; }
.compare-panel-heading .section-note { text-align: left; }
.compare-diff-toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--blue); font-size: 12px; cursor: pointer; }
.compare-diff-toggle input { width: 16px; height: 16px; accent-color: var(--blue); }
.compare-no-differences { margin: 0 0 10px; padding: 9px 10px; color: var(--muted); background: var(--surface-muted); border-radius: 5px; font-size: 12px; }
.compare-table-wrap { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.compare-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.compare-table th, .compare-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.compare-table thead th { color: var(--muted); background: #fff; font-size: 12px; font-weight: 700; }
.compare-table thead th:first-child { width: 150px; }
.compare-table thead th:not(:first-child) { min-width: 170px; }
.compare-table tbody th { color: #425372; background: #fff; font-size: 12px; font-weight: 700; }
.compare-table tbody td { color: #425372; background: #fff; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.compare-table td strong { display: block; color: var(--ink); font-size: 14px; }
.compare-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.compare-table td a { color: var(--blue); font-size: 11px; font-weight: 700; text-decoration: none; }
.compare-table td .presence-rail { min-width: 155px; }
.compare-table th .compare-remove { display: block; margin-top: 7px; padding: 3px 6px; color: var(--blue); background: var(--blue-soft); border: 1px solid #c8d7f8; border-radius: 4px; cursor: pointer; font-size: 9px; font-weight: 600; }
.compare-table th .compare-remove:hover { color: #fff; background: var(--blue); }

.evidence-inspector { display: none; position: sticky; top: 12px; min-height: 660px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 22px 20px 22px; border-radius: 12px; }
.query-layout.has-selection .evidence-inspector { display: block; }
.inspector-close, .inspector-handle { display: none; }
.query-layout.has-selection > .evidence-inspector > .inspector-close { display: block; position: absolute; top: 10px; right: 14px; width: 30px; height: 30px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 22px; line-height: 1; }
.query-layout.has-selection > .evidence-inspector > .inspector-close:hover { color: var(--blue); }
.compare-close { display: block; position: static; width: 31px; height: 31px; flex: 0 0 31px; }
.inspector-empty { padding: 54px 4px; color: var(--muted); }
.inspector-empty h2 { margin-bottom: 12px; color: var(--ink); }
.inspector-empty p:last-child { line-height: 1.7; }
.inspector-content { min-width: 0; }
.inspector-product-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.inspector-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.inspector-title-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 6px; }
.inspector-width-toggle { min-height: 28px; padding: 0 8px; color: var(--blue); background: var(--blue-soft); border: 1px solid #c8d7f8; border-radius: 5px; cursor: pointer; font-size: 10px; font-weight: 700; }
.inspector-width-toggle:hover { color: #fff; background: var(--blue); }
.inspector-title-line h2 { min-width: 0; font-size: 21px; line-height: 1.35; }
.inspector-product-head p { margin: 7px 0; color: #465674; font-size: 12px; line-height: 1.5; }
.inspector-product-head a { color: var(--blue); font-size: 11px; text-decoration: none; }
.inspector-navigation { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.inspector-navigation > span { color: var(--muted); font-size: 10px; }
.inspector-navigation > div { display: flex; flex-wrap: wrap; gap: 6px; }
.inspector-panel-tabs { display: flex; gap: 4px; margin: 14px 0 0; border-bottom: 1px solid var(--line); }
.inspector-panel-tab { min-height: 32px; padding: 0 9px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.inspector-panel-tab.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.inspector-summary { margin: 12px 0 0; padding: 11px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 7px; }
.inspector-summary.is-historical { background: var(--orange-soft); border-color: #f1d197; }
.inspector-summary-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.inspector-summary-heading strong { font-size: 13px; }
.inspector-summary-heading span { color: var(--muted); font-size: 10px; text-align: right; }
.inspector-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
.inspector-summary-grid article { min-width: 0; padding: 8px; background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: 5px; }
.inspector-summary-grid span, .inspector-summary-grid small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }
.inspector-summary-grid b { display: block; margin: 3px 0; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.history-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.history-controls > div:first-child { min-width: 0; }
.history-day-tabs { display: flex; flex: 0 0 auto; gap: 4px; }
.history-day-button { min-height: 28px; padding: 0 8px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-size: 10px; }
.history-day-button.is-active { color: var(--blue); border-color: #9bb6ec; background: var(--blue-soft); }
.history-state { padding: 12px; color: var(--muted); background: var(--surface-muted); border-radius: 5px; font-size: 11px; line-height: 1.5; }
.history-chart-axis { display: flex; justify-content: space-between; gap: 8px; min-width: 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.history-chart-axis-y { margin-bottom: 4px; }
.history-chart-axis-x { margin-top: 4px; }
.history-chart-axis .history-axis-label { min-width: 0; overflow-wrap: anywhere; }
.history-chart-axis .history-axis-label:last-child { text-align: right; }
.history-chart-wrap { min-width: 0; overflow-x: auto; padding-bottom: 4px; }
.history-chart { display: block; width: 100%; max-width: 100%; min-width: 0; height: 140px; border: 1px solid var(--line); background: linear-gradient(to bottom, transparent 49%, #edf1f6 50%, transparent 51%), linear-gradient(to right, transparent 49%, #edf1f6 50%, transparent 51%); }
.history-chart polyline { fill: none; stroke: var(--blue); stroke-width: 2; }
.history-chart .history-point { fill: var(--blue); }
.history-table-wrap { min-width: 0; overflow-x: auto; }
.history-detail-disclosure { margin-top: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.history-detail-disclosure > summary { padding: 8px 0; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 700; }
.history-detail-disclosure .history-table-wrap { padding-bottom: 7px; }
.history-accessible-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 10px; }
.history-accessible-table th, .history-accessible-table td { padding: 7px 5px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.history-accessible-table th { color: var(--muted); font-weight: 700; }
.history-accessible-table td { color: #425372; }
.history-presence-observed { color: var(--green); font-weight: 700; }
.history-presence-missing { color: var(--muted); }
.inspector-nav-button { min-height: 30px; padding: 0 8px; color: var(--blue); background: #fff; border: 1px solid #c8d7f8; border-radius: 5px; cursor: pointer; font-size: 10px; }
.inspector-nav-button:hover:not(:disabled) { background: var(--blue-soft); }
.inspector-nav-button:disabled { color: #a8b2c3; background: var(--surface-muted); border-color: var(--line); cursor: not-allowed; }
.inspector-pending-button { font-weight: 700; }
.inspector-section { padding: 17px 0; border-bottom: 1px solid var(--line); }
.inspector-section h3 { margin-bottom: 11px; font-size: 16px; }
.evidence-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: #425372; font-size: 12px; line-height: 1.55; }
.evidence-list li { position: relative; padding-left: 18px; }
.evidence-list li::before { position: absolute; left: 0; top: 1px; content: "✓"; color: var(--blue); font-weight: 800; }
.risk-list li::before { content: "○"; color: #9ba7ba; }
.inspector-evidence-block { padding: 11px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; }
.evidence-label-row { display: flex; justify-content: space-between; gap: 8px; color: #425372; font-size: 11px; }
.evidence-label-row b { color: var(--blue); }
.inspector-evidence-block .presence-rail { min-width: 0; margin-top: 10px; }
.evidence-note { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.inspector-raw-evidence { margin-top: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.inspector-raw-evidence > summary { color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 700; }
.inspector-raw-evidence h4 { margin: 11px 0 6px; font-size: 11px; }
.raw-reason-list { display: grid; gap: 5px; margin: 0; padding-left: 18px; color: #425372; font-size: 11px; line-height: 1.45; }
.evidence-value-list { display: grid; gap: 4px; margin: 3px 0 0; padding-left: 17px; }
.evidence-value-map { display: grid; gap: 5px; margin: 3px 0 0; }
.evidence-value-map > div { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 6px; padding: 5px 6px; background: var(--surface-muted); border-radius: 4px; }
.evidence-value-map dt { color: var(--muted); font-size: 10px; }
.evidence-value-map dd { min-width: 0; margin: 0; color: #425372; font-size: 11px; overflow-wrap: anywhere; }
.evidence-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.evidence-facts > div { min-width: 0; padding: 9px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.evidence-facts dt, .evidence-facts small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.evidence-facts dd { margin: 4px 0; color: var(--ink); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.evidence-facts small { display: block; }
.signal-identity-list, .three-day-evidence-list { display: grid; gap: 6px; padding: 0; margin: 8px 0 10px; list-style: none; }
.signal-identity-list li { display: flex; align-items: center; gap: 7px; padding: 7px 8px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
.signal-identity-list li b { flex: 1; }
.signal-identity-list li span { color: var(--muted); font-size: 10px; }
.signal-identity-list li small { color: var(--muted); font-size: 9px; }
.signal-identity-list li.is-active { border-color: #b4e0c5; background: var(--green-soft); }
.signal-identity-list li.is-active span { color: var(--green); font-weight: 700; }
.three-day-evidence-list li { display: grid; grid-template-columns: 56px 1fr 1fr 1fr; gap: 5px; padding: 7px 8px; color: var(--muted); background: var(--surface-muted); border-radius: 5px; font-size: 10px; }
.three-day-evidence-list li b { color: var(--ink); }
.query-signal-summary { max-width: 100%; overflow: hidden; overflow-wrap: anywhere; text-overflow: ellipsis; white-space: nowrap; }
.next-step-section p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.review-box { display: grid; gap: 9px; }
.review-box label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.review-box select, .review-box input { width: 100%; min-height: 38px; padding: 0 9px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; }
.review-box button { min-height: 40px; color: #fff; background: var(--blue); border: 0; border-radius: 5px; cursor: pointer; font-size: 13px; font-weight: 700; }
.review-box button:hover:not(:disabled) { background: var(--blue-dark); }
.review-box button:disabled { opacity: 0.55; cursor: not-allowed; }
.review-status { min-height: 16px; margin: 0; color: var(--green); font-size: 10px; }
.review-disabled-note { margin: 0 !important; color: var(--red) !important; font-size: 10px !important; }
.viewer-review-note { color: #7f5a12 !important; background: var(--orange-soft); padding: 9px; border-radius: 5px; }
.boundary-note { margin: 17px 0 0; padding: 10px; color: #425372; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 5px; font-size: 11px; line-height: 1.5; }

.report-stack { display: grid; gap: 14px; margin-top: 14px; }
.panel { min-width: 0; padding: 24px; border-radius: 10px; }
.account-panel { border-color: #b9d6c5; }
.account-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.account-create-form { display: flex; align-items: end; gap: 9px; }
.account-create-form label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.account-create-form input { min-height: 40px; min-width: 190px; padding: 0 10px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; }
.account-button { min-height: 40px; padding: 0 13px; color: #fff; background: var(--blue); border: 0; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 700; }
.account-button:hover { background: var(--blue-dark); }
.account-secondary-button { color: var(--blue); background: var(--blue-soft); }
.account-secondary-button:hover { color: #fff; background: var(--blue); }
.account-status { min-height: 16px; margin: 11px 0 0; color: var(--green); font-size: 11px; }
.account-users { display: grid; gap: 7px; margin-top: 7px; }
.account-user-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; }
.account-user-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.account-user-row strong { color: var(--ink); font-size: 12px; }
.account-user-row span { color: var(--muted); font-size: 10px; }
.account-user-actions { display: flex; align-items: center; gap: 6px; }
.account-user-action { min-height: 30px; padding: 0 9px; color: var(--blue); background: #fff; border: 1px solid #c8d7f8; border-radius: 5px; cursor: pointer; font-size: 10px; }
.account-user-action:hover { background: var(--blue-soft); }
.account-user-action:disabled { opacity: 0.55; cursor: wait; }
.account-admin-label { white-space: nowrap; }
.account-error { margin: 0; color: var(--red); font-size: 11px; }
.one-time-password { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(17, 26, 47, 0.35); }
.one-time-password-card { width: min(100%, 460px); padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 20px 55px rgba(17, 26, 47, 0.22); }
.one-time-password-card > p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.one-time-password-value { display: flex; align-items: center; gap: 8px; margin: 15px 0; }
.one-time-password-value code { min-width: 0; flex: 1; padding: 11px; color: var(--ink); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 5px; font-size: 14px; overflow-wrap: anywhere; }
.one-time-password-value button { min-height: 38px; padding: 0 11px; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 700; }
.one-time-password-card > .account-button { width: 100%; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.section-note { max-width: 440px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: right; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.metric-card { display: grid; gap: 5px; min-width: 0; padding: 14px; border-radius: 7px; box-shadow: none; }
.metric-card span, .metric-card small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.metric-card strong { color: var(--ink); font-size: 23px; letter-spacing: -0.05em; }
.plain-language-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.plain-language-grid article { padding: 14px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; }
.plain-language-grid strong { display: block; margin-bottom: 7px; font-size: 13px; }
.plain-language-grid p, .ability-note { margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.ability-note { margin: 16px 0 0; padding-top: 13px; border-top: 1px solid var(--line); }
.momentum-panel { overflow: hidden; }
.momentum-explain { margin: 7px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.momentum-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.momentum-metrics article { display: grid; gap: 4px; min-width: 0; padding: 12px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; }
.momentum-metrics span, .momentum-metrics small { color: var(--muted); font-size: 10px; }
.momentum-metrics strong { font-size: 20px; }
.momentum-columns, .momentum-category-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.momentum-columns h3, .momentum-category-columns h3 { margin: 0 0 10px; }
.momentum-category-columns { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.product-list, .category-list, .daily-list { display: grid; gap: 7px; }
.momentum-product { padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.momentum-product > div, .low-follower-card > div { display: flex; justify-content: space-between; gap: 9px; color: var(--blue); font-size: 10px; }
.momentum-product a, .deep-card a { display: block; margin-top: 6px; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.45; text-decoration: none; }
.momentum-product p, .deep-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.category-row { display: grid; grid-template-columns: 95px 1fr 46px; align-items: center; gap: 9px; color: #425372; font-size: 11px; }
.category-row b { color: var(--ink); text-align: right; }
.category-row small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; line-height: 1.4; }
.bar { height: 7px; overflow: hidden; background: #edf1f6; border-radius: 3px; }
.bar i { display: block; height: 100%; background: var(--blue); }
.bar.warm i { background: #91a8cf; }
.historical-continuity-panel .category-row { grid-template-columns: 90px 1fr 58px; }
.portfolio-focus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.portfolio-focus-card, .low-follower-card, .deep-card { padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.portfolio-focus-card header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.portfolio-focus-card h3 { margin: 0; }
.portfolio-focus-card header span, .portfolio-focus-card > p { color: var(--muted); font-size: 10px; line-height: 1.5; }
.portfolio-focus-card > p { margin: 6px 0 9px; }
.portfolio-focus-card .momentum-product + .momentum-product { margin-top: 6px; }
.portfolio-relation-index { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.portfolio-relation-index summary { color: var(--blue); cursor: pointer; font-size: 10px; font-weight: 700; }
.portfolio-relation-index ul { display: grid; gap: 4px; max-height: 230px; overflow: auto; margin: 7px 0 0; padding: 0; list-style: none; }
.portfolio-relation-index li { display: grid; grid-template-columns: auto 1fr; gap: 2px 7px; padding: 5px 6px; background: var(--surface-muted); border-radius: 4px; font-size: 10px; }
.portfolio-relation-index li b { color: var(--blue); }
.portfolio-relation-index li span { color: var(--ink); overflow-wrap: anywhere; }
.portfolio-relation-index li small { grid-column: 1 / -1; color: var(--muted); overflow-wrap: anywhere; }
.long-cycle-section, .low-follower-section { margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); }
.long-cycle-section > .momentum-explain { min-height: 0; }
.low-follower-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.low-follower-card > a { display: block; min-height: 35px; margin-top: 6px; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.45; text-decoration: none; }
.low-follower-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 10px 0 0; }
.low-follower-card dl > div { display: grid; gap: 2px; padding: 7px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 5px; }
.low-follower-card dt, .low-follower-card small { color: var(--muted); font-size: 9px; }
.low-follower-card dd { margin: 0; font-size: 12px; font-weight: 700; }
.decision-workbench { overflow: hidden; }
.funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.funnel-stage { display: grid; gap: 4px; min-height: 70px; padding: 11px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; }
.funnel-stage span { color: var(--muted); font-size: 10px; }
.funnel-stage strong { font-size: 20px; }
.funnel-stage i { display: none; }
.decision-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.8fr); gap: 18px; }
.decision-grid h3 { margin-bottom: 11px; }
.decision-grid aside { padding: 14px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; }
.decision-grid aside > p { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.deep-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.deep-card > div { display: flex; justify-content: space-between; gap: 8px; color: var(--blue); font-size: 10px; }
.deep-card small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.deep-check-order { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.deep-check-order li { display: grid; grid-template-columns: 23px 1fr; align-items: center; gap: 7px; color: #425372; font-size: 11px; }
.deep-check-order b { display: grid; width: 23px; height: 23px; place-items: center; color: #fff; background: var(--blue); border-radius: 4px; font-size: 10px; }
.split-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.daily-row { display: grid; grid-template-columns: 64px 1fr 60px; align-items: center; gap: 9px; color: #425372; font-size: 11px; }
.daily-row b { text-align: right; }
.definition-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.definition-grid article { padding: 12px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; }
.definition-grid strong { font-size: 11px; }
.definition-grid p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.sourcing-details { margin: 9px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sourcing-details summary { padding: 8px 0; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 700; }
.sourcing-details h4 { margin: 8px 0 5px; font-size: 10px; }
.sourcing-details ol, .sourcing-details ul { display: grid; gap: 6px; margin: 0 0 9px; padding-left: 18px; }
.sourcing-details li { color: var(--muted); font-size: 10px; line-height: 1.45; }
.sourcing-details li a { display: inline; margin: 0 5px 0 0; color: var(--ink); font-size: 11px; }
.sourcing-details li b { color: var(--blue); font-size: 9px; }
.sourcing-details li span, .sourcing-details li em { display: block; margin-top: 2px; font-style: normal; }
.sourcing-details li em { color: var(--muted); }
.pilot-mark, .first-mark { color: var(--blue) !important; }
.deep-mark { color: var(--red) !important; }
.bottom-nav { display: none; }
.source-summary-panel { margin-top: 12px; }
.source-summary-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.source-summary-metric { display: grid; gap: 3px; min-width: 0; padding: 9px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 5px; }
.source-summary-metric span { color: var(--muted); font-size: 9px; line-height: 1.35; }
.source-summary-metric strong { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }

@media (min-width: 881px) {
  .query-table th:first-child,
  .query-table td:first-child { position: sticky; z-index: 2; left: 0; background: var(--surface); box-shadow: 7px 0 10px -11px rgba(48, 37, 33, 0.6); }
  .query-table th:first-child { z-index: 4; }
  .query-table .query-result-row:hover td:first-child { background: #fffaf7; }
  .query-table .query-result-row.is-selected td:first-child {
    background: #fff1ed;
    box-shadow: inset 2px 0 0 var(--brand), inset 0 2px 0 var(--brand), inset 0 -2px 0 var(--brand), 7px 0 10px -11px rgba(48, 37, 33, 0.6);
  }
  .query-layout.has-selection .query-table,
  .query-layout.inspector-wide .query-table { min-width: 1240px; }
  .query-layout.has-selection .query-table th:nth-child(1),
  .query-layout.inspector-wide .query-table th:nth-child(1) { width: auto; }
  .query-layout.has-selection .query-table th:nth-child(2),
  .query-layout.inspector-wide .query-table th:nth-child(2) { width: 180px; }
  .query-layout.has-selection .query-table th:nth-child(3),
  .query-layout.inspector-wide .query-table th:nth-child(3),
  .query-layout.has-selection .query-table th:nth-child(4),
  .query-layout.inspector-wide .query-table th:nth-child(4) { width: 170px; }
  .query-layout.has-selection .query-table th:nth-child(5),
  .query-layout.inspector-wide .query-table th:nth-child(5) { width: 222px; }
  .query-layout.has-selection .query-table th:nth-child(6),
  .query-layout.inspector-wide .query-table th:nth-child(6) { width: 132px; }
  .query-layout.has-selection .query-table th:nth-child(7),
  .query-layout.inspector-wide .query-table th:nth-child(7) { width: 90px; }
  .query-layout.has-selection .query-table .rail-cell,
  .query-layout.inspector-wide .query-table .rail-cell { min-width: 222px; }
  .query-layout.has-selection .query-table .presence-rail,
  .query-layout.inspector-wide .query-table .presence-rail { min-width: 0; }
  .query-heading { display: inline-block; width: 31%; vertical-align: middle; padding: 0 12px 8px 4px; }
  .query-heading .eyebrow { margin-bottom: 3px; }
  .query-heading h1 { margin-bottom: 3px; font-size: 28px; }
  .query-subtitle { font-size: 12px; line-height: 1.4; }
  .search-shell { display: inline-flex; width: calc(69% - 6px); min-height: 44px; margin-bottom: 8px; vertical-align: middle; }
  .query-scope-tabs { display: inline-flex; width: auto; margin: 0 8px 8px 0; vertical-align: middle; }
  #quickLinks { display: inline-grid; width: calc(100% - 220px); grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 8px; vertical-align: middle; }
  #quickLinks .quick-link { display: flex; align-items: baseline; gap: 7px; padding: 7px 8px; }
  #quickLinks .quick-link strong { font-size: 15px; }
  #quickLinks .quick-link small { display: none; }
  .secondary-report-shortcuts, .quick-signal-disclosure, .selection-views { margin-top: 0; margin-bottom: 5px; }
  .secondary-report-shortcuts > summary, .quick-signal-disclosure > summary { padding: 4px 8px; }
  .selection-views { padding: 0 8px; }
  .selection-views > summary { padding: 3px 0; }
  .query-filter-bar { grid-template-columns: 1.45fr .9fr .9fr 1.25fr; gap: 7px; padding: 8px 0 7px; }
  .query-filter-bar label:not(.category-picker-option), .query-filter-field { gap: 3px; font-size: 12px; }
  .query-filter-bar select { min-height: 34px; font-size: 12px; }
  .category-picker-trigger { min-height: 34px; font-size: 12px; }
  #categoryFilterHint { display: none; }
  .price-filter-fieldset { gap: 3px; }
  .price-filter-fieldset legend { font-size: 12px; }
  .price-range-inputs input, .price-filter-fieldset select { min-height: 28px; font-size: 12px; }
  .filter-error:empty { display: none; }
  .more-filters { display: inline-block; width: auto; margin: 4px 8px 0 0; vertical-align: middle; }
  .more-filters > summary { padding: 4px 0 6px; }
  .more-filters[open] { display: block; width: 100%; margin-right: 0; }
  .more-filters[open] .more-filters-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .active-filter-chips { display: inline-flex; width: calc(100% - 130px); min-height: 22px; padding: 1px 0; vertical-align: middle; }
  .active-filter-chip { min-height: 22px; }
  .results-toolbar { padding: 6px 3px 2px; }
  .filter-result-note { margin-bottom: 3px; }
  #scopeActionNote:empty { display: none; }
  .query-footnote { margin-top: 10px; }
}

@media (max-width: 1180px) {
  .query-layout.has-selection { grid-template-columns: minmax(0, 1fr) 320px; }
  .query-layout.inspector-wide { grid-template-columns: minmax(0, 1fr) 470px; }
  .quick-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-grid, .momentum-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .definition-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .query-floating-header { display: none !important; }
  .sidebar { display: none; }
  .topbar { padding: 0 20px; }
  .mobile-brand { display: inline; }
  .topbar-context { display: none; }
  .notice { margin: 12px 20px 0; }
  .shell { width: min(100% - 32px, 760px); margin: 0 auto; padding-top: 16px; padding-right: 0; padding-left: 0; }
  .query-layout, .query-layout.has-selection { display: block; }
  .query-layout.has-comparison { padding-bottom: 120px; }
  .compare-bar { right: 12px; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); left: 12px; }
  .query-workspace { padding: 22px 20px; }
  .evidence-inspector, .query-layout.has-selection .evidence-inspector { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: block; width: 100%; max-height: min(82vh, 720px); min-height: 0; padding: 12px 20px 82px; border-radius: 16px 16px 0 0; box-shadow: 0 -16px 40px rgba(24, 49, 88, 0.14); transform: translateY(105%); visibility: hidden; pointer-events: none; transition: transform 180ms ease, visibility 0s linear 180ms; }
  .compare-panel { padding: 12px 16px calc(70px + env(safe-area-inset-bottom, 0px)); }
  .compare-modal-card { max-height: calc(100vh - 70px - env(safe-area-inset-bottom, 0px)); }
  .evidence-inspector.is-open, .query-layout.has-selection .evidence-inspector.is-open { transform: translateY(0); visibility: visible; pointer-events: auto; transition: transform 180ms ease, visibility 0s linear 0s; }
  .inspector-close { position: absolute; z-index: 1; top: 8px; right: 15px; display: block; width: 31px; height: 31px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 24px; }
  .compare-close { position: static; top: auto; right: auto; }
  .inspector-handle { display: block; width: 44px; height: 4px; margin: 0 auto 12px; background: #aeb8c8; border-radius: 4px; }
  .inspector-empty { display: none; }
  .report-stack { margin-top: 12px; }
  .selection-views-body { display: block; }
  .selection-view-form { grid-column: auto; grid-row: auto; margin-top: 8px; }
  .selection-view-status-row { grid-column: auto; grid-row: auto; margin-top: 7px; }
  .selection-view-list { grid-column: auto; grid-row: auto; margin-top: 7px; }
  .bottom-nav { position: fixed; z-index: 18; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 58px; background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line); }
  .bottom-nav a { display: grid; align-content: center; justify-items: center; gap: 2px; color: #354464; font-size: 10px; text-decoration: none; }
  .bottom-nav a span:first-child { font-size: 22px; line-height: 1; }
  .bottom-nav a.is-active { color: var(--blue); }
  .momentum-columns, .momentum-category-columns, .split-panel, .decision-grid, .portfolio-focus-grid { grid-template-columns: 1fr; }
  .low-follower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  html { scroll-behavior: auto; }
  .topbar { min-height: 58px; padding: 0 16px; }
  .topbar-status { align-items: flex-end; flex-direction: column; gap: 3px; }
  .freshness-stack { min-width: 0; text-align: right; }
  .session-badge { font-size: 10px; }
  .freshness { font-size: 11px; }
  .notice { align-items: flex-start; margin: 10px 12px 0; padding: 10px; flex-direction: column; gap: 4px; }
  .shell { width: calc(100% - 24px); margin: 0 auto; padding: 12px 0 74px; }
  .query-workspace { padding: 20px 12px 17px; border-radius: 9px; }
  .query-heading { padding: 0 3px 16px; }
  h1 { font-size: 31px; }
  .query-subtitle { font-size: 11px; }
  .search-shell { min-height: 52px; padding: 0 11px; }
  .search-shell input { min-height: 45px; font-size: 16px; }
  .quick-links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
  .secondary-report-shortcuts, .quick-signal-disclosure, .selection-views { display: block; width: 100%; margin-right: 0; }
  .quick-link { grid-template-columns: 1fr; gap: 1px; padding: 8px 6px; text-align: center; }
  .quick-link strong { font-size: 16px; }
  .quick-link small { display: none; }
  .selection-views-note { max-width: none; }
  .selection-view-form { align-items: stretch; flex-direction: column; }
  .selection-view-save { width: 100%; }
  .selection-view-item { align-items: stretch; flex-direction: column; }
  .selection-view-actions { justify-content: flex-end; }
  .query-filter-bar { grid-template-columns: 1fr 1fr; gap: 6px; }
  .query-filter-bar .filter-wide, .query-filter-bar .price-filter-fieldset { grid-column: 1 / -1; }
  .more-filters-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .results-toolbar { padding-top: 12px; }
  .results-toolbar p { font-size: 12px; }
  .results-toolbar-actions { width: 100%; justify-content: space-between; }
  .query-table { min-width: 0; }
  .query-table thead { display: none; }
  .query-table, .query-table tbody, .query-table tr, .query-table td { display: block; width: 100%; }
  .query-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 9px; padding: 13px 0 0; }
  .query-table td { min-width: 0; padding: 0 0 10px; border: 0; }
  .query-table td:nth-child(1), .query-table td:nth-child(2) { grid-column: 1 / -1; }
  .query-table td:nth-child(1) { padding-bottom: 9px; }
  .query-table td:nth-child(2) { padding: 0 0 9px; border-bottom: 1px solid var(--line); }
  .query-table td:nth-child(3), .query-table td:nth-child(4), .query-table td:nth-child(5) { padding-top: 9px; }
  .query-table td:nth-child(6) { align-self: end; padding-top: 9px; }
  .query-table td:nth-child(7) { align-self: end; padding-top: 9px; text-align: right; }
  .product-cell a { font-size: 13px; }
  .product-cell small { font-size: 10px; }
  .query-signal-summary { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .rail-cell { min-width: 0; }
  .presence-rail, .presence-rail-compact { min-width: 0; }
  .presence-cell { padding: 3px 1px; }
  .presence-cell small { font-size: 8px; }
  .presence-cell b { font-size: 9px; }
  .query-number-cell b { font-size: 15px; }
  .query-number-cell small { font-size: 9px; }
  .pagination { flex-wrap: wrap; justify-content: center; }
  .pagination-total { width: 100%; text-align: left; }
  .pagination-pages { order: 2; }
  .compare-bar { right: 12px; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); left: 12px; align-items: stretch; flex-direction: column; }
  .compare-bar-actions { justify-content: space-between; }
  .compare-open { flex: 1; }
  .compare-panel { align-items: center; padding-right: 12px; padding-left: 12px; }
  .compare-modal-card { width: 100%; max-height: calc(100vh - 70px - env(safe-area-inset-bottom, 0px)); padding: 14px 10px; border-radius: 8px; }
  .panel { padding: 18px 14px; border-radius: 8px; }
  .account-toolbar, .account-create-form { align-items: stretch; flex-direction: column; }
  .account-create-form input { min-width: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-note { text-align: left; }
  .metric-grid, .momentum-metrics, .plain-language-grid, .definition-grid, .low-follower-grid, .deep-grid, .funnel { grid-template-columns: 1fr; }
  .funnel-stage { min-height: 0; }
  .evidence-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-inspector { padding-right: 16px; padding-left: 16px; }
  .source-summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Vermilion skin: local Tabler outline icons keep controls legible without adding a runtime dependency. */
.icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: var(--icon-mask) center / contain no-repeat;
  mask: var(--icon-mask) center / contain no-repeat;
}
.icon-search { --icon-mask: url("/assets/icons/tabler/search.svg"); }
.icon-clock { --icon-mask: url("/assets/icons/tabler/clock.svg"); }
.icon-chart-bar { --icon-mask: url("/assets/icons/tabler/chart-bar.svg"); }
.icon-star { --icon-mask: url("/assets/icons/tabler/star.svg"); }
.icon-star-filled { --icon-mask: url("/assets/icons/tabler/star-filled.svg"); }
.icon-clipboard-check { --icon-mask: url("/assets/icons/tabler/clipboard-check.svg"); }
.icon-database { --icon-mask: url("/assets/icons/tabler/database.svg"); }
.icon-x { --icon-mask: url("/assets/icons/tabler/x.svg"); }
.icon-chevron-left { --icon-mask: url("/assets/icons/tabler/chevron-left.svg"); }
.icon-chevron-right { --icon-mask: url("/assets/icons/tabler/chevron-right.svg"); }
.icon-external-link { --icon-mask: url("/assets/icons/tabler/external-link.svg"); }
.icon-check { --icon-mask: url("/assets/icons/tabler/check.svg"); }
.icon-circle { --icon-mask: url("/assets/icons/tabler/circle.svg"); }

.brand { align-items: center; gap: 9px; padding: 10px 22px 24px; }
.brand-mark { display: block; width: 44px; height: 44px; flex: 0 0 44px; object-fit: contain; }
.brand-copy { display: grid; gap: 1px; min-width: 0; }
.brand-copy strong { color: var(--ink); font-size: 21px; letter-spacing: -0.06em; white-space: nowrap; }
.brand-copy small { color: var(--brand); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; }
.side-nav-link { color: var(--ink); border-left-width: 3px; }
.side-nav-link span:first-child { width: 24px; color: var(--muted); font-size: inherit; }
.side-nav-link .icon { width: 21px; height: 21px; }
.side-nav-link:hover, .side-nav-link.is-active { color: var(--brand); background: var(--brand-soft); border-left-color: var(--brand); }
.side-nav-link.is-active span:first-child, .side-nav-link:hover span:first-child { color: var(--brand); }
.sidebar { background: #fcf9f5; border-right-color: var(--line); }
.sidebar-foot { color: var(--muted); }
.health-dot { background: var(--green); }
.topbar { background: rgba(255, 255, 255, 0.9); border-bottom-color: var(--line); }
.freshness { color: var(--ink); }
.session-badge { color: var(--brand); background: var(--brand-soft); }
.session-badge.is-viewer { color: #80581d; background: var(--gold-soft); }
.session-badge.is-admin { color: var(--green); background: var(--green-soft); }
.account-management-link, .text-action, .eyebrow { color: var(--brand); }
.notice { color: var(--ink); background: var(--brand-soft); border-color: #efc8c0; }
.notice strong { color: var(--brand); }
.query-workspace, .evidence-inspector, .panel, .metric-card { border-color: var(--line); box-shadow: 0 12px 32px rgba(89, 47, 33, 0.06); }
.search-shell { border-color: var(--brand); }
.search-icon { width: 22px; height: 22px; color: var(--brand); font-size: inherit; }
.search-shell input::placeholder { color: #94877e; }
.query-scope-tab:hover, .query-scope-tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.query-scope-tab span, .secondary-report-shortcuts > summary span, .more-filters > summary span { color: var(--brand); background: var(--brand-soft); }
.quick-link:hover, .quick-filter:hover, .quick-filter:focus-visible { color: var(--brand); border-color: #e6a59b; background: var(--brand-soft); }
.quick-link strong, .quick-filter b { color: var(--brand); }
.quick-link span { color: var(--ink); }
.quick-filter.is-active { color: var(--brand); border-color: #df8e84; background: var(--brand-soft); box-shadow: 0 0 0 2px rgba(197, 61, 49, .08); }
.secondary-report-shortcuts > summary, .quick-signal-disclosure > summary, .selection-views > summary { color: var(--brand); }
.selection-views > summary::marker { color: var(--brand); }
.selection-view-form input:focus { border-color: var(--brand); outline: 2px solid var(--brand); }
.selection-view-save, .selection-view-action { color: var(--brand); border-color: #e6b1a8; }
.selection-view-save:hover, .selection-view-action:hover { background: var(--brand-soft); }
.selection-view-action.delete { color: var(--red); border-color: #e6b8c2; }
.selection-view-action.delete:hover { background: var(--red-soft); }
.query-filter-bar select, .category-picker-trigger, .more-filters-grid select, .price-range-inputs input { border-color: var(--line); background: var(--surface-muted); }
.category-picker-trigger:hover, .category-picker-trigger:focus-visible { border-color: #df8e84; outline-color: rgba(197, 61, 49, .14); }
.category-picker-trigger b { color: var(--brand); }
.category-picker-option:hover, .category-picker-option:focus-within { background: var(--brand-soft); }
.category-picker-option input { accent-color: var(--brand); }
.category-picker-option[aria-selected="true"] span { color: var(--brand); }
.more-filters > summary { color: var(--brand); }
.active-filter-chip { color: var(--ink); background: var(--brand-soft); border-color: #e6b1a8; }
.active-filter-chip button { color: var(--brand); }
.query-result-row:hover { background: #fffaf7; }
.query-result-row.is-selected { background: #fff1ed; outline-color: var(--brand); }
.candidate-select { accent-color: var(--brand); }
.product-cell a:hover { color: var(--brand); }
.query-number-cell:first-of-type b { color: var(--ink); }
.status { color: #80581d; background: var(--gold-soft); border: 1px solid #e6c894; }
.status.watch { color: var(--muted); background: #f4f0eb; border-color: var(--line); }
.status.reviewed { color: var(--green); background: var(--green-soft); border-color: #b7d9c4; }
.status.blocked { color: var(--red); background: var(--red-soft); border-color: #e1b3be; }
.inspect-row, .evidence-action, .inspector-nav-button { color: var(--brand); border-color: #e6b1a8; }
.inspect-row:hover, .evidence-action:hover, .inspector-nav-button:hover:not(:disabled) { background: var(--brand-soft); }
.account-user-action { color: var(--brand); border-color: #e6b1a8; }
.account-user-action:hover { background: var(--brand-soft); }
.favorite-toggle:hover, .favorite-toggle.is-favorite { color: var(--brand); border-color: #e2a59c; background: var(--brand-soft); }
.favorite-toggle .icon { width: 17px; height: 17px; }
.metric-change.is-down { color: var(--red); }
.metric-change.is-none { color: var(--muted); }
.page-button:hover:not(:disabled) { color: var(--brand); border-color: #e6b1a8; }
.page-button.is-current { color: #fff; background: var(--brand); border-color: var(--brand); }
.compare-bar { background: var(--brand-soft); border-color: #e6b1a8; box-shadow: 0 10px 28px rgba(89, 47, 33, .14); }
.compare-bar-item { color: var(--ink); border-color: #e6b1a8; }
.compare-bar-item button { color: var(--brand); }
.compare-open, .review-box button, .account-button { background: var(--brand); }
.compare-open:hover:not(:disabled), .review-box button:hover:not(:disabled), .account-button:hover { background: var(--brand-dark); }
.compare-diff-toggle, .compare-table td a, .compare-table th .compare-remove, .inspector-width-toggle, .inspector-product-head a, .portfolio-relation-index summary { color: var(--brand); }
.compare-table th .compare-remove { background: var(--brand-soft); border-color: #e6b1a8; }
.compare-table th .compare-remove:hover, .inspector-width-toggle:hover { color: #fff; background: var(--brand); }
.inspector-panel-tab.is-active, .history-day-button.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.history-day-button.is-active { border-color: #df8e84; background: var(--brand-soft); }
.history-chart polyline { fill: none; stroke: var(--brand); }
.history-chart .history-point { fill: var(--brand); }
.evidence-list li::before { content: ""; top: 2px; width: 15px; height: 15px; color: var(--brand); background: currentColor; -webkit-mask: var(--icon-mask) center / contain no-repeat; mask: var(--icon-mask) center / contain no-repeat; --icon-mask: url("/assets/icons/tabler/check.svg"); }
.risk-list li::before { content: ""; color: var(--muted); --icon-mask: url("/assets/icons/tabler/circle.svg"); }
.evidence-label-row b, .sourcing-details summary, .sourcing-details li b, .pilot-mark, .first-mark { color: var(--brand) !important; }
.review-box button { color: #fff; }
.deep-check-order b { background: var(--brand); }
.bar i { background: var(--brand); }
.bar.warm i { background: #d3b18b; }
.bottom-nav a.is-active { color: var(--brand); }
.bottom-nav a { color: var(--ink); }
.icon-external-link { width: 0.95em; height: 0.95em; vertical-align: -0.12em; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
.selection-view-form input:focus, .category-picker-trigger:focus-visible { outline-color: var(--brand); }
.selection-view-form input:focus { outline: 2px solid var(--brand); }

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

/* Access control surfaces share the radar's vermilion/gold paper language while keeping dense admin work readable at desktop width. */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 18% 10%, #fffaf2 0, transparent 35%), var(--canvas); }
.auth-shell { width: min(100%, 470px); }
.auth-card { padding: 38px 42px 32px; background: rgba(255, 255, 255, .96); border: 1px solid var(--line-strong); border-top: 4px solid var(--brand); border-radius: 16px; box-shadow: 0 24px 70px rgba(89, 47, 33, .12); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.auth-brand img { width: 48px; height: 48px; object-fit: contain; }
.auth-brand div { display: grid; gap: 2px; }
.auth-brand strong { color: var(--ink); font-size: 23px; letter-spacing: -.07em; }
.auth-brand span { color: var(--brand); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.auth-card h1 { margin-bottom: 9px; font-size: 31px; }
.auth-intro, .auth-footnote { color: var(--muted); font-size: 12px; line-height: 1.65; }
.auth-intro { margin-bottom: 24px; }
.auth-footnote { margin: 19px 0 0; padding-top: 15px; border-top: 1px solid var(--line); font-size: 11px; }
.auth-form { display: grid; gap: 15px; }
.auth-form label, .admin-create-form label, .admin-filter-form label, .admin-policy-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.auth-form input, .admin-create-form input, .admin-filter-form input, .admin-policy-form input, .admin-policy-form textarea { width: 100%; min-height: 42px; padding: 0 11px; color: var(--ink); background: #fffdfa; border: 1px solid var(--line-strong); border-radius: 6px; }
.auth-password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.auth-password-toggle { min-height: 42px; padding: 0 10px; color: var(--brand); background: var(--brand-soft); border: 1px solid #e6b1a8; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.auth-password-toggle:hover:not(:disabled) { color: #fff; background: var(--brand); }
.auth-password-toggle:disabled { opacity: .6; cursor: wait; }
.admin-policy-form textarea { min-height: 58px; padding: 9px 11px; resize: vertical; }
.auth-form input:focus, .admin-create-form input:focus, .admin-filter-form input:focus, .admin-policy-form input:focus, .admin-policy-form textarea:focus { border-color: var(--brand); outline: 3px solid rgba(197, 61, 49, .13); }
.auth-primary-button { min-height: 44px; margin-top: 5px; color: #fff; background: var(--brand); border: 0; border-radius: 6px; cursor: pointer; font-weight: 750; }
.auth-primary-button:hover { background: var(--brand-dark); }
.auth-primary-button:disabled, .admin-button:disabled, .admin-row-button:disabled { opacity: .6; cursor: wait; }
.auth-status { min-height: 18px; margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-status.is-error, .auth-footnote.is-error { color: var(--red); }
.auth-status.is-success { color: var(--green); }

.admin-page { min-height: 100vh; background: var(--canvas); }
.admin-frame { min-height: 100vh; }
.admin-topbar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; padding: 0 48px; background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); }
.admin-brand { padding: 8px 0; }
.admin-brand .brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
.admin-topbar-actions { display: flex; align-items: center; gap: 18px; }
.admin-back-link { color: var(--brand); font-size: 12px; font-weight: 700; text-decoration: none; }
.admin-back-link:hover { text-decoration: underline; }
.admin-main { width: min(1480px, calc(100% - 72px)); margin: 0 auto; padding: 38px 0 72px; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.admin-heading h1 { margin-bottom: 0; }
.admin-heading-note { max-width: 560px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; text-align: right; }
.admin-protection-note { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; padding: 12px 15px; color: #765017; background: var(--gold-soft); border: 1px solid #e6c894; border-left: 4px solid var(--gold); border-radius: 8px; font-size: 12px; line-height: 1.55; }
.admin-protection-note strong { color: #80581d; white-space: nowrap; }
.admin-summary { margin-bottom: 18px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.admin-section-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.admin-section-heading h2 { margin: 0; }
.admin-summary-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.admin-summary-note.is-error { color: var(--red); font-weight: 700; }
.admin-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.admin-summary-card { display: grid; gap: 6px; min-height: 78px; padding: 13px 14px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 8px; }
.admin-summary-card span { color: var(--muted); font-size: 11px; }
.admin-summary-card strong { color: var(--ink); font-size: 21px; letter-spacing: -.035em; }
.admin-summary-card.is-error strong { color: var(--red); font-size: 15px; }
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-strong); }
.admin-tab { min-height: 43px; padding: 0 18px; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; cursor: pointer; font-size: 13px; font-weight: 750; }
.admin-tab:hover, .admin-tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.admin-panel { margin-top: 18px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.admin-create-strip { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-create-form { display: flex; align-items: end; gap: 10px; }
.admin-create-form label { min-width: 260px; }
.admin-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 14px; color: #fff; background: var(--brand); border: 0; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 750; white-space: nowrap; }
.admin-button:hover { background: var(--brand-dark); }
.admin-button.secondary { color: var(--brand); background: var(--brand-soft); border: 1px solid #e6b1a8; }
.admin-button.secondary:hover { color: #fff; background: var(--brand); }
.admin-status { min-height: 17px; margin: 11px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.admin-status.is-success { color: var(--green); }
.admin-status.is-error { color: var(--red); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 13px 10px; vertical-align: top; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
.admin-table thead th { color: var(--muted); background: var(--surface-muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.admin-table tbody th { font-weight: 700; }
.admin-table tbody th strong, .admin-table tbody th small, .admin-table td small { display: block; }
.admin-table tbody th small, .admin-table td small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.4; }
.admin-table code { color: #5d443d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; overflow-wrap: anywhere; }
.admin-table code.admin-ip { white-space: nowrap; overflow-wrap: normal; }
.admin-table-state { padding: 30px 12px !important; color: var(--muted); text-align: center !important; }
.admin-table-state.is-error { color: var(--red); }
.admin-role-badge, .admin-enabled-badge, .admin-log-result { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 99px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.admin-role-badge.is-admin { color: #80581d; background: var(--gold-soft); }
.admin-role-badge.is-viewer { color: var(--brand); background: var(--brand-soft); }
.admin-enabled-badge.is-enabled { color: var(--green); background: var(--green-soft); }
.admin-enabled-badge.is-disabled { color: var(--red); background: var(--red-soft); }
.admin-session-status { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 99px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.admin-session-status.is-enabled { color: var(--green); background: var(--green-soft); }
.admin-session-status.is-disabled { color: var(--red); background: var(--red-soft); }
.admin-session-status.is-unknown { color: #80581d; background: var(--gold-soft); }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-row-button { min-height: 29px; padding: 0 8px; color: var(--brand); background: #fff; border: 1px solid #e6b1a8; border-radius: 5px; cursor: pointer; font-size: 10px; font-weight: 700; white-space: nowrap; }
.admin-row-button:hover { background: var(--brand-soft); }
.admin-protected-label, .admin-current-label { display: inline-flex; margin-top: 3px; color: #80581d; font-size: 10px; font-weight: 700; }
.admin-policy-editor { min-width: 420px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.admin-policy-editor summary { color: var(--brand); cursor: pointer; font-size: 11px; font-weight: 750; }
.admin-policy-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding-top: 11px; }
.admin-policy-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.admin-policy-form legend { margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.admin-permissions { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.admin-permission { display: inline-flex !important; grid-template-columns: none !important; align-items: center; gap: 6px !important; }
.admin-permission input { width: 15px; min-height: 15px; height: 15px; accent-color: var(--brand); }
.admin-policy-form > button, .admin-policy-form > .admin-inline-note { grid-column: 1 / -1; }
.admin-inline-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.admin-panel-note { max-width: 900px; margin: -4px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.admin-filter-form { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.admin-filter-form label { min-width: 220px; }
.admin-filter-form .admin-checkbox-label { display: inline-flex; min-height: 40px; align-items: center; gap: 7px; min-width: auto; color: var(--ink); }
.admin-checkbox-label input { width: 16px; height: 16px; accent-color: var(--brand); }
.admin-log-filter-form label { min-width: 190px; }
.admin-log-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 0; color: var(--muted); font-size: 11px; }
.admin-log-meta label { display: inline-flex; align-items: center; gap: 6px; }
.admin-log-meta select { min-height: 30px; padding: 0 7px; color: var(--ink); background: #fffdfa; border: 1px solid var(--line); border-radius: 5px; }
.admin-ua { max-width: 260px; overflow-wrap: anywhere; }
.admin-log-action { color: var(--ink); font-weight: 700; }
.admin-log-result.is-success { color: var(--green); background: var(--green-soft); }
.admin-log-result.is-warning { color: #80581d; background: var(--gold-soft); }
.admin-log-metadata { display: block; max-width: 340px; line-height: 1.45; }
.admin-pagination { display: flex; align-items: center; justify-content: center; gap: 5px; padding-top: 17px; }
.admin-page-button { min-width: 32px; min-height: 30px; padding: 0 8px; color: var(--brand); background: #fff; border: 1px solid #e6b1a8; border-radius: 5px; cursor: pointer; font-size: 10px; }
.admin-page-button:hover:not(:disabled), .admin-page-button.is-active { color: #fff; background: var(--brand); }
.admin-page-button:disabled { color: #b9aaa3; border-color: var(--line); cursor: not-allowed; }
.admin-pagination-gap { color: var(--muted); }
.admin-denied { width: min(100%, 620px); margin: 80px auto; padding: 30px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 12px; box-shadow: var(--shadow); }
.admin-denied h2 { margin-bottom: 10px; }
.admin-denied p { margin-bottom: 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }

@media (max-width: 900px) {
  .admin-topbar { padding: 0 20px; }
  .admin-main { width: min(100% - 28px, 720px); padding-top: 26px; }
  .admin-heading { align-items: start; flex-direction: column; gap: 8px; }
  .admin-heading-note { text-align: left; }
  .admin-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-create-strip { align-items: stretch; flex-direction: column; }
  .admin-create-form { align-items: stretch; flex-direction: column; }
  .admin-create-form label, .admin-filter-form label, .admin-log-filter-form label { min-width: 0; width: 100%; }
  .admin-filter-form { align-items: stretch; flex-direction: column; }
  .admin-filter-form .admin-checkbox-label { min-height: 34px; }
  .admin-policy-editor { min-width: 320px; }
  .admin-policy-form { grid-template-columns: 1fr; }
  .admin-policy-form > button, .admin-policy-form > .admin-inline-note { grid-column: auto; }
  .admin-log-meta { align-items: start; flex-direction: column; }
  .auth-page { padding: 16px; }
  .auth-card { padding: 30px 24px 25px; }
}
