:root {
  --navy: #08101c;
  --navy-2: #121b2c;
  --cyan: #2ec8ea;
  --cyan-deep: #0e7f9a;
  --staging: #d8ff4a;
  --workspace: #e8edf3;
  --paper: #ffffff;
  --line: #d5dce6;
  --line-strong: #b7c1d0;
  --ink: #101929;
  --muted: #5a6576;
  --approve: #0b6f3f;
  --approve-bg: #def6ea;
  --refuse: #b42318;
  --refuse-bg: #fdecea;
  --review: #8a5800;
  --review-bg: #fff3d4;
  --process: #155eaa;
  --process-bg: #e6f0fb;
  --failed: #4b5563;
  --failed-bg: #eef0f3;
  --shadow: 0 10px 28px rgba(10, 18, 32, 0.12);
  --radius: 8px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--workspace);
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.skip {
  position: absolute; left: 12px; top: -40px; z-index: 20;
  background: var(--navy); color: #fff; padding: 8px 12px;
}
.skip:focus { top: 10px; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  min-height: 54px; padding: 0 16px;
  background: var(--navy); color: #e8eef7;
  position: relative; z-index: 40; overflow: visible;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; flex: none; }
.health-dot {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 999px;
  border: 1px solid #33405a; background: #1a2436;
  color: #e8eef7; font-size: 11px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
}
.health-dot span {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
}
.health-dot.health-degraded span { background: #f59e0b; }
.health-dot.health-outage span { background: #ef4444; }
.health-dot.health-outage { border-color: #7f1d1d; color: #fecaca; }
.health-banner {
  margin: 0 0 16px; padding: 14px 16px; border-radius: var(--radius);
}
.health-banner h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: 0.02em; }
.health-banner p { margin: 0 0 8px; }
.health-banner-outage { background: #7f1d1d; color: #fff7f7; }
.health-banner-degraded { background: #fff3d4; color: #5c3d00; border: 1px solid #e8c36a; }
.health-overall { margin: 0 0 16px; padding: 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.health-overall-online { box-shadow: inset 6px 0 0 var(--approve); }
.health-overall-degraded { box-shadow: inset 6px 0 0 var(--review); }
.health-overall-outage { box-shadow: inset 6px 0 0 var(--refuse); background: #fdecea; }
.health-scopes { margin: 0; padding-left: 18px; }
.health-incidents { width: 100%; border-collapse: collapse; }
.health-incidents th, .health-incidents td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.health-settings { display: grid; gap: 10px; max-width: 360px; }
.health-settings input[type="number"] { width: 100%; padding: 8px; }
.processing-split {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr);
  gap: 20px;
  align-items: start;
}
.processing-backlog {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fb;
}
.processing-backlog[data-backlog-ok="0"] { border-color: #e8c36a; background: #fff8e8; }
.processing-backlog .status-word { margin-bottom: 10px; }
.backlog-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 12px; }
.backlog-counts div { display: flex; flex-direction: column; gap: 2px; }
.backlog-counts dt { margin: 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.backlog-counts dd { margin: 0; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.backlog-oldest { margin: 0 0 8px; }
.backlog-note { margin: 0 0 8px; color: #5c3d00; font-size: 13px; font-weight: 650; }
@media (max-width: 800px) {
  .processing-split { grid-template-columns: 1fr; }
  .backlog-counts { grid-template-columns: 1fr; }
}
.racf-admin-link {
  display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 7px;
  border: 1px solid #b7c1d0; border-radius: 999px; font-size: 11px; font-weight: 750;
  color: var(--process); white-space: nowrap; vertical-align: middle;
}
.racf-admin-link:hover { background: var(--process-bg); }
.racf-admin-missing { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.col-id { font-variant-numeric: tabular-nums; white-space: nowrap; }
.racf-id-link {
  color: var(--process); font-weight: 650; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.racf-id-link:hover { text-decoration: underline; }
.racf-id-plain { font-variant-numeric: tabular-nums; }
.id-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.racf-history-link {
  color: var(--process); font-size: 12px; font-weight: 650; white-space: nowrap;
}
.racf-history-link:hover { text-decoration: underline; }
.search-history-banner { margin: 0 0 12px; font-size: 13px; }
.user-history-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 0; }
.user-history-summary .summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;
  list-style: none; margin: 0; padding: 0;
}
.user-history-summary .summary-grid li { display: flex; flex-direction: column; gap: 2px; }
.user-history-summary .summary-grid strong { font-size: 22px; }
.related-history-list { margin: 0; padding-left: 18px; }
.related-history-list a { color: inherit; }
@media (max-width: 768px) {
  .id-stack { white-space: normal; }
  .col-id { white-space: normal; }
}
.review-id { margin: 2px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.content-copy strong { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.items-table td.content-cell {
  display: table-cell;
  min-width: 0;
  max-width: none;
}
.items-table .content-cell-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}
.items-table .content-copy,
.mobile-card-head .content-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: none;
  width: 100%;
  flex: 1 1 auto;
}
.items-table .content-head,
.mobile-card-head .content-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: none;
  width: 100%;
}
.items-table .content-head .content-name,
.mobile-card-head .content-name {
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}
.items-table .content-head .origin-chip,
.items-table .content-head .scope-chip,
.items-table .content-head .racf-admin-link,
.items-table .content-head .pill-silver,
.mobile-card-head .content-head .origin-chip,
.mobile-card-head .content-head .scope-chip,
.mobile-card-head .content-head .racf-admin-link {
  margin-left: 0;
}
.items-table .bio-preview,
.items-table .content-snippet,
.mobile-card-head .bio-preview {
  width: 100%;
  max-width: none;
  min-width: 0;
  overflow-wrap: break-word;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 750; letter-spacing: 0.06em; font-size: 14px; }
.brand img { width: 28px; height: 28px; object-fit: contain; display: block; }
.env-btn {
  display: flex; align-items: center; gap: 8px;
  background: #1a2436; border: 1px solid #33405a; color: inherit;
  border-radius: 999px; padding: 3px 9px 3px 3px; cursor: pointer;
}
.env-pill {
  display: inline-flex; align-items: center; padding: 3px 8px;
  border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
}
.env-pill.env-staging, .env-pill.env-test, .env-pill.env-development, .env-pill.env-dev, .env-pill.env-local { background: var(--staging); color: #152000; }
.env-pill.env-production, .env-pill.env-prod { background: #fb7185; color: #3f0b14; }
.chev { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #9aa6b8; }
.env-switch, .ctx-switch { position: relative; }
.ctx-btn {
  display: flex; align-items: center; gap: 8px;
  background: #1a2436; border: 1px solid #33405a; color: inherit;
  border-radius: 999px; padding: 3px 9px 3px 10px; cursor: pointer; max-width: 280px;
}
.ctx-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 700;
}
.kind-pill {
  display: inline-flex; align-items: center; padding: 2px 7px;
  border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em;
}
.kind-pill.kind-live { background: #16a34a; color: #052e16; }
.kind-pill.kind-test { background: #38bdf8; color: #0b2a3a; }
.ctx-menu {
  position: absolute; top: calc(100% + 8px); left: 0; width: 280px;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; z-index: 31;
}
.ctx-search input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 8px 10px; background: #fff; margin-bottom: 8px;
}
.ctx-site { padding: 4px 0 8px; }
.ctx-site strong { display: block; padding: 4px 8px; font-size: 13px; }
.ctx-item {
  display: flex; width: 100%; align-items: center; gap: 8px;
  background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer;
}
.ctx-item:hover, .ctx-item.current { background: #f3f7fb; }
.env-menu {
  position: absolute; top: calc(100% + 8px); left: 0; width: 260px;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 30;
}
.env-item { padding: 10px 12px; border-radius: 6px; }
.env-item span { display: block; color: var(--muted); font-size: 12px; }
.env-item.current { background: #f3f7fb; }
.env-item.disabled { opacity: 0.5; }
.tabs { display: flex; flex-wrap: wrap; gap: 0; flex: 1; min-width: 0; overflow: visible; }
.tabs a {
  color: #a9b6c8; padding: 17px 11px; border-bottom: 2px solid transparent;
  white-space: nowrap; font-weight: 700; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
}
.tabs a.active, .tabs a:hover { color: #fff; border-bottom-color: var(--cyan); }
.account { position: relative; }
.account summary {
  list-style: none; cursor: pointer; color: #d5deea; font-weight: 650; padding: 6px 2px;
}
.account summary::-webkit-details-marker { display: none; }
.account-menu {
  position: absolute; right: 0; top: 36px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); min-width: 160px;
  box-shadow: var(--shadow); padding: 6px; z-index: 30;
}
.account-menu a, .account-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { background: #f3f7fb; }
.env-stripe { height: 4px; background: var(--staging); }
body.env-production .env-stripe { background: #fb7185; }

.workspace { width: min(1480px, calc(100% - 32px)); max-width: 100%; min-width: 0; margin: 0 auto; padding: 24px 0 48px; }
.page-context { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.dash-next { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.page-head h1, .login-card h1, .empty-panel h2, .panel-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.eyebrow { margin: 0 0 3px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.product-name { margin: 0; font-weight: 800; letter-spacing: 0.04em; }
.product-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.product-provider { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.run-methods { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 0 6px; vertical-align: middle; }
h1 + .run-methods, .product-name + .run-methods, .panel-head .run-methods, .rule-card-main .run-methods, .capability-row .run-methods, .status-card .run-methods, td .run-methods {
  display: flex; margin: 6px 0 0; margin-left: 0;
}
.run-method {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px;
  border-radius: 4px; border: 1px solid transparent; font-size: 11px; font-weight: 800;
  letter-spacing: 0.03em; line-height: 1.2; white-space: nowrap;
}
.run-method-external_ai { color: #374151; background: #fff; border-color: #d1d5db; }
.run-method-local_ai { color: #0c4a6e; background: #e0f2fe; border-color: #0369a1; }
.run-method-rules { color: #111827; background: #e5e7eb; border-color: #4b5563; }
.lede, .hint { color: var(--muted); margin: 0 0 14px; }
.count { color: var(--muted); font-weight: 650; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 10px; }
.search, .per-page { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.search input, .per-page select, .stack input, .stack textarea, .play-form input, .play-form textarea, .password-field input {
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; background: #fff;
}
.search input { width: min(280px, 100%); }
.search-wide input { width: min(420px, 100%); }
.filter-group, .window-switch {
  display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff;
}
.filter-group a, .window-switch button {
  border: 0; background: #fff; padding: 8px 14px; cursor: pointer; color: var(--muted); font-weight: 650; font-size: 13px; line-height: 1.2;
}
.filter-group a:hover, .window-switch button:hover { background: #f4f8fc; color: var(--ink); }
.filter-group a:focus-visible, .window-switch button:focus-visible {
  outline: 2px solid var(--cyan-deep); outline-offset: -2px; z-index: 1;
}
.filter-group a.active, .window-switch button.active { background: #e7f7fb; color: var(--cyan-deep); }
.policy-filters { max-width: 100%; }
.back-row { margin: 0 0 12px; }
.back-row a { font-weight: 650; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); max-width: 100%; overflow: auto; -webkit-overflow-scrolling: touch; }
table.dense { width: 100%; min-width: 720px; border-collapse: collapse; }
table.dense.items-table { min-width: 760px; table-layout: fixed; }
table.dense th, table.dense td { padding: 7px 10px; border-bottom: 1px solid #eef1f5; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.col-nowrap, .col-status, .col-source, .col-scope, .col-id, .col-duration { white-space: nowrap; overflow-wrap: normal; }
.col-received { white-space: normal; overflow-wrap: anywhere; }
.items-table .content-cell { width: 30%; }
.items-table .col-engine { width: 16%; white-space: normal; min-width: 0; }
.items-table .col-decision { width: 14%; min-width: 0; white-space: normal; }
.items-table .col-reason { width: 22%; min-width: 0; max-width: none; }
.items-table .col-delivery { width: 9%; min-width: 0; }
.items-table .col-received { width: 9%; }
table.dense th { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: #f6f8fb; position: sticky; top: 0; white-space: nowrap; overflow-wrap: normal; }
.item-row { cursor: pointer; }
.item-row:hover { background: #f4f8fc; }
.item-row.tone-refuse { box-shadow: inset 3px 0 0 var(--refuse); }
.item-row.tone-approve { box-shadow: inset 3px 0 0 var(--approve); }
.item-row.tone-processing { box-shadow: inset 3px 0 0 var(--process); }
.item-row.tone-failed { box-shadow: inset 3px 0 0 var(--failed); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.content-cell { display: flex; gap: 12px; align-items: flex-start; min-width: 0; max-width: none; }
.content-copy { min-width: 0; flex: 1 1 auto; max-width: none; }
.content-cell strong, .content-cell p { margin: 0; }
.content-cell strong { font-size: 13px; }
.content-cell p, .content-snippet {
  color: var(--ink);
  white-space: normal;
  overflow-wrap: break-word;
}
.bio-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  max-height: 4.65em;
  width: 100%;
  min-width: 0;
  max-width: none;
}
.origin-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
  background: #eef2f6;
  color: var(--muted);
}
.origin-chip.origin-app { background: #e7f7fb; color: var(--cyan-deep); }
.origin-chip.origin-website { background: #eef1f5; color: #3f4a5a; }
.scope-chip {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid #d5dde8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #243044;
  background: #fff;
}
.decision-combo { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.decision-secs { font-weight: 650; color: var(--ink); white-space: nowrap; }
.decision-sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.engine-scope { margin-top: 4px; font-size: 12px; color: var(--muted); }
.content-note { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.content-cell p:not(.content-snippet) { color: var(--muted); }
.thumb, .thumb-frame {
  width: 44px; height: 44px; border-radius: 5px; background: #e6ebf2; flex: none;
  object-fit: cover; border: 1px solid #d3dae4;
}
.thumb-link { display: inline-flex; flex: none; }
.item-view-hero { display: flex; gap: 20px; align-items: start; }
.item-view-hero img { width: 160px; height: 160px; object-fit: contain; background: #eef2f6; border-radius: 8px; }
.match-review.compact { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.match-review.compact .btn { padding: 3px 7px; font-size: 11px; }
table.dense.match-table { min-width: 960px; }
table.dense.match-table th, table.dense.match-table td { padding: 4px 8px; }
.match-table .content-cell { min-width: 220px; max-width: 300px; gap: 8px; }
.match-table .thumb { width: 40px; height: 40px; }
.match-table .open-item { margin-left: 8px; font-size: 12px; font-weight: 650; }
.match-table .content-copy strong { display: inline; }
.match-table .hint { margin: 2px 0 0; }
.match-table .tech-details { margin: 2px 0 0; }
.match-table .col-review, .match-table .col-rule-effect { white-space: nowrap; }
.match-review.inline { display: inline-flex; align-items: center; margin: 0; }
.match-review.inline select {
  min-height: 32px; font-size: 12px; font-weight: 650;
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 8px; background: #fff;
}
.inventory-bar {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  margin: 0 0 10px; color: var(--muted); font-size: 13px;
}
.website-scope-nav { display: grid; gap: 8px; margin: 0 0 14px; }
.website-tabs a, .scope-tabs a { display: inline-flex; align-items: center; gap: 8px; }
.tab-count { color: var(--muted); font-size: 12px; font-weight: 700; }
.website-tabs a.active .tab-count, .scope-tabs a.active .tab-count { color: inherit; }
.status-on { color: var(--approve); font-weight: 750; }
.status-monitoring { color: #6b21a8; font-weight: 750; }
.pill-status-enforce { background: var(--approve-bg); color: var(--approve); }
.pill-status-shadow { color: #6b21a8; background: #f3e8ff; border: 1px solid #d8b4fe; }
.pill-status-paused, .pill-status-draft, .pill-status-archived { background: #e8eaee; color: #4b5563; }
.rule-status-section { display: grid; gap: 8px; margin: 0 0 18px; }
.rule-status-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.rule-status-head h2 { margin: 0; font-size: 14px; letter-spacing: 0.04em; }
.capability-row {
  display: grid; grid-template-columns: minmax(180px, 0.8fr) 1fr auto;
  gap: 16px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; margin: 0 0 16px;
}
.capability-row.is-family { border-style: solid; }
.capability-row.is-enforce, .capability-row.is-observation, .capability-row.is-on, .capability-row.is-off { box-shadow: none; }
.capability-kicker {
  margin: 0 0 4px; font-size: 11px; font-weight: 750; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.capability-row p, .capability-row dt { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.capability-row dl { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: 8px; margin: 0; }
.capability-row dd { margin: 0; font-weight: 750; font-size: 12px; }
.capability-links { display: grid; gap: 6px; font-size: 12px; font-weight: 650; }
.capability-links a { color: var(--cyan-deep); }
.rule-name-link { font-weight: 750; }
.rule-off-banner, .rule-shadow-banner {
  margin: 0 0 12px; padding: 8px 10px; border-radius: 6px; font-size: 13px;
}
.rule-off-banner { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.rule-shadow-banner { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }
@media (max-width: 900px) {
  .capability-row { grid-template-columns: 1fr; }
  .capability-row dl { grid-template-columns: 1fr 1fr; }
}
.rule-group { display: grid; gap: 8px; margin: 0 0 16px; }
.rule-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.rule-group-head h2 { margin: 0; font-size: 15px; }
.rule-group-head .hint { margin: 0; }
.rule-card-scope { font-weight: 750; }
.thumb.empty, .thumb-frame.empty {
  display: inline-block;
  background:
    linear-gradient(#d3dae4, #d3dae4) center/14px 1px no-repeat,
    linear-gradient(#d3dae4, #d3dae4) center/1px 14px no-repeat,
    #eef2f6;
}
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.cell-id { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 2px 7px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em;
  white-space: nowrap; overflow-wrap: normal;
}
.pill-silver { background: #eef1f5; color: #3f4a5a; border: 1px solid #b8c0cc; }
.pill-approve, .pill-pass, .pill-healthy { background: var(--approve-bg); color: var(--approve); }
.pill-active, .pill-enforce { background: #e7f7fb; color: var(--cyan-deep); }
.pill-refuse, .pill-fail, .pill-down, .pill-degraded { background: var(--refuse-bg); color: var(--refuse); }
.pill-review { background: var(--review-bg); color: var(--review); }
.pill-hold { background: #f3e8ff; color: #6b21a8; }
.engine-badge {
  display: block;
  box-sizing: border-box;
  font-weight: 800; letter-spacing: 0.02em; font-size: 11px;
  border-radius: 6px; padding: 2px 7px; white-space: normal;
  overflow-wrap: anywhere; word-break: break-word;
  min-width: 0; max-width: 100%;
}
.col-engine .engine-badge + .engine-badge { margin-top: 4px; }
.engine-parthenon, .engine-badge.is-prominent {
  color: #0b3d6e; background: #e7f2fb;
}
.engine-parthenon-error { color: #8a5a00; background: #fff6d9; }
.engine-local, .engine-text, .engine-none { color: var(--muted); background: #eef2f6; }
.qa-marker {
  display: inline-flex; align-items: center;
  margin-left: 4px; padding: 1px 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  color: #6b21a8; background: #f3e8ff; border-radius: 999px;
}
.col-engine { min-width: 0; }
.col-decision { min-width: 0; }
.col-reason { min-width: 0; }
.col-delivery { min-width: 0; font-size: 12px; color: var(--muted); }
.deciding-reason { margin: 0 0 4px; }
.delivery-state.is-applied { color: var(--approve); font-weight: 700; }
.mobile-engine, .mobile-delivery { margin: 6px 0 0; font-size: 12px; }
.decision-primary { margin: 8px 0 12px; }
.decision-primary .explain-line { margin: 0 0 6px; }
.website-secondary { color: var(--muted); }
.user-refusal-card.is-preview { border-left: 3px solid #b8c0cc; background: #fff; }
.user-refusal-card.is-preview .user-refusal-line { color: #9f1239; }
.pill-unable-to-assess, .pill-unable { background: #fff6d9; color: #8a5a00; }
.pill-shadow {
  color: #6b21a8; background: #f3e8ff; border: 1px solid #d8b4fe;
}
.pill-processing, .pill-info { background: var(--process-bg); color: var(--process); }
.pill-failed, .pill-not, .pill-not-run, .pill-error, .pill-unknown, .pill-unclear, .pill-draft, .pill-published { background: var(--failed-bg); color: var(--failed); }
.pill-allowlist, .pill-observe, .pill-context { background: #e7f7fb; color: var(--cyan-deep); }
.pill-accepted { background: var(--approve-bg); color: var(--approve); }
.pill-rejected { background: var(--refuse-bg); color: var(--refuse); }
.pill-auth_failed { background: var(--failed-bg); color: var(--failed); }
.pill-succeeded { background: var(--approve-bg); color: var(--approve); }
.pill-dead { background: var(--refuse-bg); color: var(--refuse); }
.pill-pending, .pill-delivering { background: var(--process-bg); color: var(--process); }
.pill-cancelled { background: var(--failed-bg); color: var(--failed); }
.requests-table { width: 100%; min-width: 0; table-layout: auto; }
.requests-wrap { max-width: 100%; }
.col-details { width: 1%; white-space: nowrap; vertical-align: middle; }
.request-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.request-details-toggle:focus-visible {
  outline: 2px solid var(--cyan-deep);
  outline-offset: 2px;
}
.request-details-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor;
}
.request-details-toggle[aria-expanded="true"] .request-details-arrow {
  transform: rotate(90deg);
}
.request-detail-panel td { background: #f8fafc; padding-top: 8px; padding-bottom: 12px; }
.request-detail-panel[hidden] { display: none; }
.request-json-head { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; }
.request-json-heading { margin: 12px 0 6px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.request-json-head .request-json-heading { margin: 0; }
.request-json-missing { margin: 0 0 12px; color: var(--muted); }
.request-json { max-height: 360px; white-space: pre; overflow: auto; }
.delivery-json {
  margin: 0 0 12px;
  padding: 10px 12px;
  overflow: auto;
  max-height: 280px;
  font-size: 12px;
  line-height: 1.45;
  background: #f1f5f9;
  border-radius: 6px;
}
.delivery-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 12px;
}
.delivery-pair h3 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 900px) {
  .delivery-pair { grid-template-columns: 1fr; }
}
.request-detail td { background: #f8fafc; padding-top: 0; }
.request-detail summary { cursor: pointer; color: var(--muted); font-weight: 650; padding: 4px 0 8px; }
.request-detail .kv-block { margin: 8px 0; }
.pill-refuse-trigger { background: var(--review-bg); color: var(--review); }
.banner-warn {
  background: var(--review-bg); color: var(--review); border-radius: 6px;
  padding: 10px 12px; margin: 12px 0;
}
.list-add, .entry-edit { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin: 10px 0; }
.entry-edit { grid-template-columns: 1fr 180px auto; margin: 0; }
.rule-chip { color: var(--cyan-deep); font-weight: 700; font-size: 11px; }
.plus { display: inline-flex; min-width: 20px; justify-content: center; border-radius: 999px; background: #dcefff; color: #1466a8; font-size: 10px; font-weight: 800; margin-left: 4px; padding: 1px 5px; }
.col-rules { min-width: 168px; }
.rules-cell {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px;
  cursor: pointer; max-width: 240px;
}
.rules-sep { color: var(--muted); font-weight: 800; }
.rule-chip.is-matched {
  color: #b42318; background: #fdecea; border: 1px solid #f5c2c0;
  border-radius: 999px; padding: 1px 6px; letter-spacing: 0.02em;
}
.rule-chip.is-shadow {
  color: #6b21a8; background: #f3e8ff; border: 1px solid #d8b4fe;
  border-radius: 999px; padding: 1px 6px; letter-spacing: 0.02em;
}
.rule-chip.is-passed {
  color: #166534; background: #dcfce7; border: 1px solid #86efac;
  border-radius: 999px; padding: 1px 6px; letter-spacing: 0.02em;
}
.rule-chip.is-skipped,
.rule-chip.is-unable {
  color: #475569; background: #f1f5f9; border: 1px solid #cbd5e1;
  border-radius: 999px; padding: 1px 6px; letter-spacing: 0.02em;
}
.rule-state-btn.static.is-not-attempted {
  color: #475569; background: #f1f5f9; border-color: #cbd5e1;
}
.rule-section { margin: 0 0 16px; }
.rule-section h3 { margin: 0 0 8px; font-size: 11px; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.rule-state-btn.static.is-matched {
  color: #b42318; background: #fdecea; border-color: #f5c2c0;
}
.rule-state-btn.static.is-passed {
  color: #166534; background: #dcfce7; border-color: #86efac;
}
.rule-state-btn.static.is-error,
.rule-state-btn.static.is-unable,
.rule-state-btn.static.is-unable-to-assess {
  color: #9a3412; background: #ffedd5; border-color: #fdba74;
}
.rule-state-btn.static.is-disabled,
.rule-state-btn.static.is-skipped {
  color: #475569; background: #f1f5f9; border-color: #cbd5e1;
}
.rule-group-details { margin-top: 8px; }
.rule-group-details summary {
  cursor: pointer;
  color: var(--cyan-deep);
  font-weight: 700;
}
.rule-group-children {
  margin: 8px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}
.rule-group-children .rule-row { font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 28px !important; }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.pager a { color: var(--cyan-deep); font-weight: 700; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.dash-tools { display: flex; align-items: center; gap: 10px; }
.metric, .status-card, .panel, .empty-panel, .login-card, .play-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.metric { box-shadow: inset 3px 0 0 var(--line-strong); }
.metric.tone-approve { box-shadow: inset 3px 0 0 var(--approve); }
.metric.tone-refuse { box-shadow: inset 3px 0 0 var(--refuse); }
.metric.tone-review { box-shadow: inset 3px 0 0 var(--review); }
.metric.tone-failed { box-shadow: inset 3px 0 0 var(--failed); }
.metric.tone-ok { box-shadow: inset 3px 0 0 var(--approve); }
.metric span, .metric small { color: var(--muted); }
.metric strong { display: block; font-size: 26px; margin: 4px 0; letter-spacing: -0.03em; }
.panel { margin: 14px 0; }
details.panel > summary { cursor: pointer; font-weight: 750; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.panel h3 { margin: 16px 0 8px; font-size: 11px; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.meta { color: var(--muted); font-size: 12px; }
.status-card { min-height: 132px; }
.status-card h2 { font-size: 14px; margin: 0 0 8px; }

.play-card h2 { margin: 0 0 8px; font-size: 18px; }
.play-grid { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 20px; align-items: start; }
.play-form, .stack { display: grid; gap: 12px; }
.play-form label, .stack label { display: grid; gap: 6px; font-weight: 650; font-size: 12px; }
.play-form small { color: var(--muted); font-weight: 500; }
.file-box {
  border: 1px dashed var(--line-strong); border-radius: 6px; padding: 12px; background: #f8fafc;
}
.file-box input[type="file"] { width: 100%; }
.btn {
  border: 0; border-radius: 6px; padding: 8px 13px; font-weight: 750; cursor: pointer;
}
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: #132033; }
.btn.ghost { background: transparent; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-error, .flash.error { color: var(--refuse); font-weight: 650; margin: 0; }
.kv, .kv-block { display: grid; gap: 8px; }
.kv > div, .kv-block > div { display: grid; grid-template-columns: 140px 1fr; gap: 8px; }
.kv dt, .kv-block dt { color: var(--muted); }
.kv dd, .kv-block dd { margin: 0; overflow-wrap: anywhere; }
.owner-credentials { margin: 16px 0; padding: 12px; background: #f6f8fb; border-radius: 6px; }
.owner-credentials dd { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.owner-credentials .secret-mask { letter-spacing: 0.12em; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 16px; }
.guide-nav a { color: var(--cyan-deep); font-weight: 700; }
.guide-section { margin: 22px 0; }
.guide-heading { margin: 0 0 10px !important; font-size: 16px !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--ink) !important; }
.guide-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0; }
.guide-pre {
  background: var(--navy); color: #d7e3f4; padding: 12px; border-radius: 6px;
  overflow: auto; font-size: 12px; line-height: 1.45; max-height: 480px; white-space: pre;
}
.flow-box { background: #f6f8fb; border-radius: 6px; padding: 12px 14px; margin: 12px 0; }
.flow-box p { margin: 6px 0; }
.guide-section ul, .guide-section ol { padding-left: 1.2em; }
.guide-section li { margin: 6px 0; }
.face-evidence { margin: 10px 0 4px; padding: 10px 12px; background: #f6f8fb; border-radius: 6px; }
.status-word { margin: 0 0 8px; font-size: 18px; font-weight: 800; letter-spacing: 0.04em; }
.status-card.tone-ok, .status-card.tone-warn, .status-card.tone-observe, .status-card.tone-down { box-shadow: none; }
.signal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 8px 0 12px;
}
.signal-split .status-word { margin: 0 0 4px; }
.signal-split .status-word.tone-down { color: var(--refuse); }
.signal-split .status-word.tone-muted { color: var(--muted); }
.signal-split-3 { grid-template-columns: 1fr 1fr 1fr; }
.thumb-lg { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.cal-mini, .cal-form { margin: 0; }
.cal-form select { max-width: 240px; }
.cal-form .note-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cal-form .note-wrap[hidden] { display: none; }
.cal-form .note-wrap input { min-width: 140px; }
.pager { display: flex; gap: 16px; align-items: center; margin: 12px 0 0; }
.explain-line { margin: 4px 0; }
.explain-k { display: inline-block; min-width: 110px; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 750; }
.col-condition, .col-message, .evidence-cell {
  max-width: 240px;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.evidence-cell { color: var(--muted); font-size: 12px; }
.pill-would-refuse { background: var(--review-bg); color: var(--review); }
.pill-on { background: #e7f7fb; color: var(--cyan-deep); }
.pill-off { background: var(--failed-bg); color: var(--failed); }
.pill-paused, .pill-draft, .pill-archived { background: #e8eaee; color: #4b5563; }

.rule-state-cell { width: 118px; position: relative; }
.rule-state { position: relative; display: inline-block; }
.rule-state-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 86px; padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
  border: 1px solid transparent; cursor: pointer; list-style: none;
}
.rule-state-btn::-webkit-details-marker { display: none; }
.rule-state-btn.static { cursor: default; }
.rule-state.is-active .rule-state-btn, .rule-state-btn.is-active,
.rule-state-btn.static.is-active {
  background: #dcfce7; color: #166534; border-color: #86efac;
}
.rule-state.is-shadow .rule-state-btn, .rule-state-btn.is-shadow,
.rule-state-btn.static.is-shadow {
  background: #f3e8ff; color: #6b21a8; border-color: #d8b4fe;
}
.rule-state.is-paused .rule-state-btn, .rule-state-btn.is-paused,
.rule-state.is-draft .rule-state-btn, .rule-state-btn.static.is-paused,
.rule-state-btn.static.is-draft, .rule-state-btn.static.is-archived {
  background: #e8eaee; color: #4b5563; border-color: #d1d5db;
}
.rule-state-menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 132px; padding: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  display: grid; gap: 4px;
}
.rule-state-opt {
  width: 100%; border: 0; background: #f8fafc; border-radius: 7px;
  padding: 7px 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
  cursor: pointer; text-align: left;
}
.rule-state-opt.is-active { color: #166534; }
.rule-state-opt.is-shadow { color: #6b21a8; }
.rule-state-opt.is-paused { color: #4b5563; }
.rule-state-opt:hover:not(:disabled) { background: #eef2f7; }
.rule-state-opt:disabled, .rule-state-opt[aria-current="true"] { opacity: 0.55; cursor: default; }
.rule-activate-dialog {
  width: min(520px, calc(100% - 32px)); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px; box-shadow: var(--shadow);
}
.rule-activate-dialog::backdrop { background: rgba(8, 14, 24, 0.46); }
.rule-activate-dialog h2 { margin: 0 0 8px; font-size: 18px; }
@media (max-width: 1366px) {
  .rules-table .col-message { max-width: 180px; }
  .rules-table .col-condition { max-width: 200px; }
}

.login-body { min-height: 100vh; background: var(--navy); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(400px, 100%); box-shadow: var(--shadow); }
.login-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.login-brand strong { display: block; letter-spacing: 0.08em; }
.password-field { display: flex; gap: 8px; align-items: center; }
.password-field input { flex: 1; }
.text-btn { border: 0; background: none; color: var(--cyan-deep); font-weight: 700; cursor: pointer; padding: 0; }

.drawer-root[hidden] { display: none; }
.drawer-root { position: fixed; inset: 0; z-index: 40; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8, 14, 24, 0.46); }
.drawer {
  position: absolute; top: 0; right: 0; height: 100%; width: min(640px, 100%);
  background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.drawer-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px 8px; flex: 0 0 auto; }
.drawer-head h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.icon-btn { border: 0; background: #f3f5f8; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 18px; flex: 0 0 auto; }
.drawer-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: 0 0 auto; }
.drawer-tabs button {
  border: 0; background: none; padding: 10px 9px 11px; color: var(--muted);
  font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; cursor: pointer;
  flex: 0 0 auto; white-space: nowrap;
}
.drawer-tabs button.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--cyan); }
.drawer-body { overflow: auto; padding: 16px 18px 28px; flex: 1 1 auto; min-height: 0; }
.bio-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bio-clamp.is-open { display: block; overflow: visible; }
.overview-reasons { margin: 10px 0 0; padding-left: 18px; }
.overview-reasons li { margin: 0 0 8px; }
.overview-reasons .source { color: var(--muted); font-size: 12px; }
.detail-hero { display: grid; grid-template-columns: 112px 1fr; gap: 14px; margin-bottom: 14px; }
.detail-hero img { width: 112px; height: 112px; object-fit: cover; border-radius: 6px; background: #eef2f6; border: 1px solid var(--line); }
.detail-hero h3 { margin: 8px 0 6px; font-size: 16px; }
.refuse-why { margin: 10px 0 4px; }
.refuse-why ol { margin: 6px 0 0; padding-left: 20px; }
.refuse-why li { margin: 0 0 10px; }
.refuse-why li strong { display: block; }
.refuse-why li p { margin: 3px 0 0; color: var(--muted); }
.face-evidence { margin: 0 0 14px; padding: 12px 14px; background: #f6f8fb; border: 1px solid var(--line); border-radius: 8px; }
.face-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.check-row, .rule-row, .hist-row {
  display: grid; grid-template-columns: 150px 88px 1fr; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid #eef1f5;
}
.check-row.is-clickable, .rule-row.is-clickable { cursor: pointer; }
.check-row.is-evidence-focus, .rule-row.is-evidence-focus {
  background: #e7f7fb;
  outline: 2px solid var(--cyan-deep);
  border-radius: 6px;
  padding-left: 8px;
  padding-right: 8px;
}
.evidence-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--cyan-deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.evidence-model { color: var(--muted); font-size: 12px; }
.text-stack { margin: 0 0 16px; }
.text-stack h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.tech pre { background: var(--navy); color: #d7e3f4; padding: 12px; border-radius: 6px; overflow: auto; font-size: 12px; }
.skeleton { height: 160px; border-radius: 8px; background: linear-gradient(90deg, #eef1f5, #f8fafc, #eef1f5); }

@media (max-width: 1366px) {
  .col-duration, .col-status { display: none; }
  .workspace { width: calc(100% - 24px); }
  table.dense th, table.dense td { padding: 6px 8px; }
  .signal-split, .signal-split-3 { grid-template-columns: 1fr; }
  .signal-split .status-word { font-size: 18px; }
}
@media (max-width: 1200px) {
  .col-client, .col-source { display: none; }
  .topbar { flex-wrap: wrap; height: auto; padding-top: 6px; }
  .tabs { order: 3; width: 100%; }
  .play-grid, .detail-hero, .kv, .kv-block, .kv > div, .kv-block > div, .check-row, .rule-row, .signal-split { grid-template-columns: 1fr; }
}
.subnav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; }
.subnav a {
  padding: 7px 10px; border-radius: 6px; color: var(--muted); font-weight: 750;
  letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px;
}
.subnav a.active, .subnav a:hover { background: #e7f7fb; color: var(--cyan-deep); }
.drawer-tabs a {
  border: 0; background: none; padding: 10px 9px 11px; color: var(--muted);
  font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px;
  flex: 0 0 auto; white-space: nowrap;
}
.drawer-tabs a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--cyan); }
.pill-paused, .pill-draft, .pill-archived, .pill-no-action { background: var(--failed-bg); color: var(--failed); }
.condition-row { display: grid; grid-template-columns: 1.2fr 140px 1fr 1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
a.status-card { color: inherit; display: block; text-decoration: none; }
@media (max-width: 1024px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .condition-row { grid-template-columns: 1fr; }
}
.flash.ok { color: var(--approve); font-weight: 650; margin: 0; }
.dataset-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dataset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.dataset-card { display: grid; gap: 8px; align-content: start; }
.dataset-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #e8eaee; }
.dataset-progress dt { min-width: 150px; }
.stack.tight { gap: 6px; }
.ref-list { margin: 0; padding-left: 18px; }
.ref-list li { margin: 4px 0; }
@media (max-width: 800px) {
  .dataset-forms { grid-template-columns: 1fr; }
}
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
table.dense.corrections { min-width: 1180px; }

.review-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.review-card.is-conflict { box-shadow: inset 4px 0 0 var(--refuse); }
.review-card.is-heldout { box-shadow: inset 4px 0 0 var(--review); }
.review-photo img { width: 100%; max-height: 420px; object-fit: contain; background: #e8eaee; border-radius: 6px; }
.review-meta p { margin: 0 0 4px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.allow { background: var(--approve-bg); color: var(--approve); }
.btn.refuse { background: var(--refuse-bg); color: var(--refuse); }
.btn.is-selected { outline: 2px solid var(--navy); }
.review-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 650; }
.review-form input[type="text"] { padding: 6px 8px; }
.webhooks-table { min-width: 1180px; }
.webhook-secret { display: grid; gap: 4px; }
.webhook-secret .secret-mask { letter-spacing: 0.12em; }
.webhook-secret .hint { margin: 0; }
.webhook-actions, .webhook-edit, .inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.webhook-edit label { display: grid; gap: 4px; font-size: 12px; font-weight: 650; min-width: 220px; flex: 1; }
.webhook-edit input { border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; background: #fff; }
.webhook-create { margin-top: 16px; max-width: 640px; }
.webhook-create h4 { margin: 0; font-size: 13px; }
.webhook-events { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 12px; }
.webhook-events legend { font-size: 12px; font-weight: 650; }
.webhook-edit-row td { background: #f8fafc; }
.review-lightbox { max-width: min(96vw, 1100px); border: 0; padding: 16px; }
.review-lightbox img { max-width: 100%; height: auto; display: block; }
.mode-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.advanced-row td { padding-top: 0; border-top: 0; }
.advanced-row details { color: var(--muted); font-size: 12px; }

.advanced-nav { position: relative; align-self: stretch; display: block; }
.advanced-btn {
  display: flex; align-items: center; height: 100%;
  background: none; border: 0; cursor: pointer; color: #a9b6c8; padding: 17px 11px;
  font-weight: 700; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
}
.advanced-nav.is-current .advanced-btn, .advanced-btn:hover, .advanced-btn[aria-expanded="true"] { color: #fff; }
.advanced-menu {
  position: absolute; right: 0; top: 100%; min-width: 220px; z-index: 90;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px;
}
.advanced-menu a {
  display: block; padding: 8px 10px; border-radius: 6px; color: var(--ink);
  text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 650;
}
.advanced-menu a:hover, .advanced-menu a.active { background: #f3f7fb; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui {
  width: 52px; height: 30px; border-radius: 999px; background: #c5ccd6;
  position: relative; flex: none; transition: background 0.16s ease;
}
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(16, 25, 41, 0.25);
  transition: transform 0.16s ease;
}
.switch input:checked + .switch-ui, .switch.static.is-on .switch-ui { background: #0b6f3f; }
.switch input:checked + .switch-ui::after, .switch.static.is-on .switch-ui::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--cyan); outline-offset: 3px; }
.switch-text { font-weight: 750; min-width: 28px; }
.switch.static { cursor: default; opacity: 0.85; }
.switch-hint { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; max-width: 11rem; }
.state-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: 0.04em; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.state-on { color: #047857; }
.state-off { color: #6b7280; }
.state-attention { color: #b45309; }
.state-error { color: #b91c1c; }
.list1-activity {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin: 0 0 16px;
}
.list1-activity-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.list1-activity-title { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.list1-activity-engine { margin: 0 0 8px; font-size: 16px; font-weight: 650; }
.list1-activity-note, .list1-website, .list1-spend { margin: 8px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.engine-select { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; }
.engine-select legend { font-weight: 750; }
.engine-option { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.engine-option.is-selected strong { font-weight: 800; }
.engine-status { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: #b45309; }
.engine-status.is-ready { color: #047857; }
.list1-website { font-size: 15px; color: var(--ink); }
.list1-activity-controls { display: grid; gap: 10px; justify-items: start; }
.list1-activity-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.list1-switch { display: inline-flex; align-items: center; gap: 12px; }
.list1-switch-ui {
  width: 72px; height: 40px; border-radius: 999px; background: #c5ccd6; position: relative; flex: none;
}
.list1-switch-ui::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 32px; height: 32px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(16, 25, 41, 0.25);
}
.list1-switch.is-on .list1-switch-ui { background: #047857; }
.list1-switch.is-on .list1-switch-ui::after { transform: translateX(32px); }
.list1-edit { font-weight: 750; }
.pill-status-shadow { color: #374151; background: #f3f4f6; border: 1px solid #d1d5db; }

.rule-list { display: grid; gap: 10px; }
.rule-card {
  display: grid; grid-template-columns: 110px minmax(220px, 1.4fr) 120px 200px 140px 150px;
  gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px;
}
.rule-card-name { font-size: 16px; font-weight: 750; display: block; }
.rule-card-name:hover { color: var(--cyan-deep); }
.rule-card-meta, .rule-card-when .hint { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.rule-save-status { margin: 6px 0 0; font-size: 12px; font-weight: 650; }
.rule-save-status.is-busy { color: var(--process); }
.rule-save-status.is-ok { color: var(--approve); }
.rule-save-status.is-err { color: var(--refuse); }
.mode-seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.mode-seg form { margin: 0; }
.mode-opt {
  border: 0; background: #fff; padding: 8px 12px; cursor: pointer;
  font-weight: 700; font-size: 12px; color: var(--muted); min-height: 36px;
}
.mode-opt.is-selected { background: #101929; color: #fff; }
.mode-opt:disabled { opacity: 0.45; cursor: default; }
.match-count { font-weight: 750; display: block; }
.match-previews { display: flex; gap: 4px; margin-top: 6px; }
.thumb-sm { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; background: #e8eaee; }
.rule-card-when time { font-weight: 650; }

.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 20px; }
.match-card {
  display: grid; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; align-content: start;
}
.match-card.is-shadow { box-shadow: inset 4px 0 0 #7c3aed; }
.match-card.is-enforce { box-shadow: inset 4px 0 0 var(--refuse); }
.match-photo { display: grid; gap: 6px; text-decoration: none; color: inherit; }
.match-photo img, .match-text {
  width: 100%; min-height: 280px; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #e8eaee; display: block;
}
.match-text { display: grid; place-items: center; padding: 16px; color: var(--muted); text-align: center; }
.match-body h3 { margin: 0 0 6px; font-size: 18px; }
.match-body p { margin: 0 0 8px; }
.match-meta { display: grid; gap: 6px; margin: 0 0 8px; }
.match-meta > div { display: grid; grid-template-columns: 118px 1fr; gap: 8px; }
.match-meta dt { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.match-meta dd { margin: 0; overflow-wrap: anywhere; }
.match-review { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.tech-details { margin: 8px 0; color: var(--muted); }
.sibling-opt { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); min-height: 44px; }
.empty-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }

@media (max-width: 1200px) {
  .rule-card { grid-template-columns: 100px 1fr; }
  .rule-card-when, .rule-card-matches { grid-column: 2; }
}
@media (max-width: 800px) {
  .rule-card { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: 1fr; }
}

.nav-toggle, .nav-current, .nav-backdrop, .mobile-card-list { display: none; }

@media (max-width: 768px) {
  html, body { overflow-x: clip; }
  body { font-size: 15px; }
  .workspace { width: calc(100% - 20px); padding: 16px 0 40px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-head h1 { font-size: 22px; }
  .page-head .actions, .page-head form { width: 100%; }
  .content-cell { min-width: 0; max-width: none; }
  .search input, .search-wide input { width: 100%; }
  .filters { gap: 10px; }
  .filters .filter-group { flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; }
  .filter-group a, .window-switch button, .subnav a {
    min-height: 44px; display: inline-flex; align-items: center; padding: 10px 14px;
  }
  .subnav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .btn, .text-btn, .icon-btn, .mode-opt, .rule-state-btn {
    min-height: 44px;
  }
  .icon-btn { width: 44px; height: 44px; }
  .text-btn { padding: 10px 8px; }
  .drawer-tabs button, .drawer-tabs a { min-height: 44px; font-size: 12px; padding: 12px 12px; }
  .chip-scroll { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .website-scope-nav .filter-group a { white-space: nowrap; }
  .capability-row, .capability-row dl { grid-template-columns: 1fr; }
  .list-add, .entry-edit, .webhook-edit { grid-template-columns: 1fr; }
  .item-view-hero { flex-direction: column; }
  .item-view-hero img { width: 100%; max-height: 280px; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-hero img { width: 100%; height: auto; max-height: 280px; object-fit: contain; }
  .check-row, .rule-row, .hist-row { grid-template-columns: 1fr; gap: 4px; }
  .drawer { width: 100%; }
  .review-lightbox { width: calc(100vw - 16px); max-width: none; padding: 10px; }
  .pager { flex-wrap: wrap; }
  .pager a { min-height: 44px; display: inline-flex; align-items: center; }

  .topbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 8px 12px;
    flex-wrap: nowrap;
  }
  .topbar-left { gap: 8px; min-width: 0; flex-wrap: wrap; }
  .brand span { display: none; }
  .ctx-btn { max-width: 180px; padding: 3px 8px; }
  .ctx-name { max-width: 88px; }
  .ctx-menu { width: min(280px, calc(100vw - 24px)); }
  .nav-current {
    display: block; margin: 0; color: #d5deea; font-size: 13px; font-weight: 750;
    letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 8px 10px;
    border: 1px solid #33405a; border-radius: 8px;
    background: #1a2436; color: #e8eef7; font-weight: 750; cursor: pointer;
    grid-column: 2;
  }
  .nav-toggle-bars {
    width: 16px; height: 12px; display: inline-block;
    background:
      linear-gradient(#e8eef7, #e8eef7) 0 0 / 16px 2px no-repeat,
      linear-gradient(#e8eef7, #e8eef7) 0 5px / 16px 2px no-repeat,
      linear-gradient(#e8eef7, #e8eef7) 0 10px / 16px 2px no-repeat;
  }
  .topbar-right { grid-column: 3; }
  .health-dot { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
  .health-banner { margin: 0 0 12px; }
  .account summary { min-height: 44px; display: inline-flex; align-items: center; padding: 8px; }
  .tabs {
    display: none; position: fixed; z-index: 50; inset: 60px 0 0 auto;
    width: min(320px, 88vw); height: calc(100vh - 60px);
    flex-direction: column; overflow: auto; padding: 12px;
    background: var(--navy-2); box-shadow: var(--shadow);
  }
  body.nav-open .tabs { display: flex; }
  body.nav-open .nav-backdrop {
    display: block; position: fixed; inset: 56px 0 0; z-index: 45;
    background: rgba(8, 14, 24, 0.46);
  }
  .tabs a, .advanced-btn {
    padding: 14px 12px; min-height: 48px; display: flex; align-items: center;
    border-bottom: 1px solid #243044;
  }
  .advanced-nav { display: block; width: 100%; }
  .advanced-btn { width: 100%; justify-content: flex-start; }
  .advanced-menu { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 8px 8px; }
  .advanced-menu a { color: #d5deea; }

  .desktop-table { display: none; }
  .mobile-card-list {
    display: grid; gap: 10px; list-style: none; margin: 0; padding: 0;
  }
  .mobile-card {
    display: grid; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 14px; box-shadow: 0 1px 0 rgba(16, 25, 41, 0.04);
  }
  .mobile-card.item-row { cursor: pointer; }
  .mobile-card.tone-refuse { box-shadow: inset 4px 0 0 var(--refuse); }
  .mobile-card.tone-approve { box-shadow: inset 4px 0 0 var(--approve); }
  .mobile-card.tone-processing { box-shadow: inset 4px 0 0 var(--process); }
  .mobile-card.is-shadow { box-shadow: inset 4px 0 0 #7c3aed; }
  .mobile-card.is-enforce { box-shadow: inset 4px 0 0 var(--refuse); }
  .mobile-card-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
  .mobile-card-head .thumb { width: 56px; height: 56px; }
  .mobile-card-head .content-copy p, .mobile-card-head .content-snippet {
    white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  }
  .mobile-card-rules { display: flex; flex-wrap: wrap; gap: 6px; }
  .mobile-card-rules .rule-chip { font-size: 12px; padding: 4px 8px; }
  .mobile-card-meta {
    display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
    color: var(--muted); font-size: 13px;
  }
  .mobile-card .cal-form, .mobile-card .match-review { width: 100%; }
  .mobile-card select, .mobile-card input[type="text"] { min-height: 44px; width: 100%; }
  .empty-card { color: var(--muted); text-align: center; }

  .panel > table.dense:not(.match-table) { min-width: 0; }
  .panel > table.dense:not(.match-table) thead { display: none; }
  .panel > table.dense:not(.match-table),
  .panel > table.dense:not(.match-table) tbody { display: block; width: 100%; min-width: 0; }
  .panel > table.dense:not(.match-table) tr.item-row {
    display: grid; gap: 6px; margin: 0 0 10px; padding: 12px;
    border: 1px solid var(--line); border-radius: 12px; background: #fff;
  }
  .panel > table.dense:not(.match-table) td { display: block; border: 0; padding: 2px 0; }
  .panel > table.dense:not(.match-table) tr.advanced-row {
    display: block; margin: -6px 0 12px; padding: 0 12px 8px;
  }
}

.racf-outbound{margin:12px 0 16px}
.racf-outbound-label{color:#9f1239;font-weight:800;letter-spacing:.02em}
.user-refusal-card.is-sent,.user-refusal-card.is-pending{background:#fff5f6;border-color:#e11d48}
.user-refusal-card.is-sent .user-refusal-line,.user-refusal-card.is-pending .user-refusal-line{color:#9f1239;font-weight:700}
.user-refusal-card.is-pending{border-style:dashed}
.webhook-user-msg{margin:0 0 12px;padding:12px 14px;border-radius:12px;background:#fff5f6;border:1px solid #e11d48;color:#9f1239}
.webhook-user-msg pre{margin:6px 0 0;white-space:pre-wrap;font:inherit;color:#9f1239}
.delivery-details{margin:0 0 18px}
.user-refusal-card{max-width:100%;width:100%;padding:12px 14px;border-radius:8px;background:#fff;border:1px solid var(--line);overflow-x:hidden;overflow-wrap:anywhere;word-break:break-word}
.user-refusal-title{margin:0 0 6px;font-size:18px;line-height:1.25}
.user-refusal-subtitle{margin:0 0 12px;color:var(--muted);font-size:14px;line-height:1.4}
.user-refusal-line{margin:0 0 8px;font-size:14px;line-height:1.35}
.user-refusal-cta{margin:12px 0 0;display:inline-block;padding:10px 16px;border-radius:999px;background:#123;color:#fff;font-weight:800;font-size:14px}

@media (max-width: 430px) {
  .workspace { width: calc(100% - 16px); }
  .mobile-card-head { grid-template-columns: 48px 1fr; }
  .mobile-card-head .pill { grid-column: 1 / -1; justify-self: start; }
  .user-refusal-card { max-width: 100%; }
}
@media (max-width: 390px) {
  .user-refusal-title { font-size: 17px; }
  .user-refusal-subtitle, .user-refusal-line { font-size: 13px; }
}
@media (max-width: 360px) {
  .user-refusal-card { padding: 14px; }
  .user-refusal-cta { width: 100%; text-align: center; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .workspace { width: calc(100% - 24px); }
  .rule-card { grid-template-columns: 100px 1fr; }
  .chip-scroll { flex-wrap: nowrap; overflow-x: auto; }
  .drawer { width: min(640px, 100%); }
}

.manual-review { display: grid; gap: 14px; }
.manual-review-card { display: grid; gap: 12px; overflow: hidden; }
.manual-review-hero { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: start; }
.manual-review-photo { display: block; }
.manual-review-photo img {
  width: 180px; height: 180px; object-fit: contain;
  background: #eef2f6; border-radius: 8px; border: 1px solid var(--line);
}
.manual-review-empty-photo {
  width: 180px; min-height: 88px; display: grid; place-items: center;
  background: #eef2f6; border-radius: 8px; color: var(--muted); font-size: 13px; text-align: center; padding: 12px;
}
.manual-review-identity h2 { margin: 0 0 6px; font-size: 22px; }
.manual-review-identity dl { margin: 0; display: grid; gap: 6px; }
.manual-review-identity dt { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.manual-review-identity dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.manual-review-bio { white-space: pre-wrap; margin: 0; }
.manual-review-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 13px; }
.manual-review-section h3 {
  margin: 0 0 6px; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.manual-review-decision { margin: 0 0 8px; font-size: 16px; }
.manual-review-buckets { display: grid; gap: 8px; }
.manual-review-bucket { margin: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.manual-review-bucket h4 { margin: 0 0 4px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.manual-review-bucket ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.manual-review-bucket.is-matched { border-color: #f5c2c0; background: #fdecea; }
.manual-review-bucket.is-matched h4 { color: #b42318; }
.manual-review-bucket.is-shadow { border-color: #d8b4fe; background: #f3e8ff; }
.manual-review-bucket.is-shadow h4 { color: #6b21a8; }
.manual-review-passed { margin: 0; color: #166534; font-size: 13px; font-weight: 650; }
.manual-review-signals { margin: 0; display: grid; gap: 4px; }
.manual-review-signals div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px; }
.manual-review-signals dt { color: var(--muted); font-size: 13px; }
.manual-review-signals dd { margin: 0; overflow-wrap: anywhere; }
.human-review-status { margin: 0; font-size: 16px; font-weight: 700; }
.human-review-status[data-review-outcome="CORRECT"] { color: var(--approve); }
.human-review-status[data-review-outcome="CORRECTED"] { color: var(--review); }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review-correct-form { display: grid; }
.btn-correct, .btn-needs {
  min-height: 48px; width: 100%; border-radius: 8px; font-size: 16px; font-weight: 750;
}
.btn-correct { background: var(--approve); color: #fff; }
.btn-correct:hover { background: #085c34; }
.btn-needs { background: #fff; color: var(--refuse); border: 2px solid var(--refuse); }
.btn-needs:hover { background: var(--refuse-bg); }
.manual-review-form { display: grid; gap: 10px; }
.manual-review-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 650; }
.manual-review-form select, .manual-review-form input, .manual-review-form textarea {
  min-height: 44px; width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; background: #fff;
}
.manual-review-form textarea { min-height: 72px; resize: vertical; }
.manual-review-notes { margin: 0; }
.manual-review-notes summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 650; }
.review-form-actions { display: grid; gap: 8px; }
.manual-review-form .btn { width: 100%; max-width: 320px; }
.manual-review-extra { display: flex; flex-wrap: wrap; gap: 8px; }
.manual-review-extra img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.review-search { width: 100%; }
.review-search .search { flex: 1 1 220px; }
.usage-grid { display: grid; gap: 14px; }
.usage-hero { display: grid; gap: 8px; }
.usage-hero .figure { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.usage-meter { height: 10px; background: #e8eef4; border-radius: 999px; overflow: hidden; }
.usage-meter span { display: block; height: 100%; background: var(--cyan-deep); }
.usage-meter.is-over span { background: #b42318; }
.usage-kvs { margin: 0; display: grid; gap: 6px; }
.usage-kvs div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px; }
.usage-kvs dt { color: var(--muted); font-size: 13px; }
.usage-kvs dd { margin: 0; overflow-wrap: anywhere; }
.usage-form { display: grid; gap: 10px; }
.usage-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 650; }
.usage-form select, .usage-form input {
  min-height: 44px; width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; background: #fff;
}
.usage-form .btn { width: 100%; max-width: 280px; }
.usage-history { display: grid; gap: 10px; }
.usage-invoice { display: grid; gap: 4px; }
.usage-summaries { display: grid; gap: 12px; }
@media (min-width: 769px) {
  .usage-summaries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .manual-review-hero { grid-template-columns: 160px minmax(0, 1fr); }
  .manual-review-photo img, .manual-review-empty-photo { width: 160px; height: 160px; }
}
@media (max-width: 768px) {
  .manual-review-hero { grid-template-columns: 1fr; }
  .manual-review-photo img, .manual-review-empty-photo { width: 100%; height: auto; max-height: 420px; min-height: 220px; }
  .manual-review-signals div { grid-template-columns: 1fr; gap: 2px; }
  .review-actions { grid-template-columns: 1fr; }
  .manual-review-form .btn { width: 100%; max-width: none; }
  .filters.review-search { flex-direction: column; align-items: stretch; }
  .review-search .search input, .review-search .btn { width: 100%; }
  .filters .review-queues { flex-wrap: wrap; overflow-x: visible; }
  .usage-kvs div { grid-template-columns: 1fr; gap: 2px; }
  .usage-form .btn { max-width: none; }
  .dash-next .btn { flex: 1 1 140px; text-align: center; }
}

.team-invite {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}
.team-invite label { display: grid; gap: 4px; font-size: 13px; font-weight: 650; }
.team-invite input, .team-invite select {
  min-height: 44px; width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; background: #fff;
}
.team-invite .btn { min-height: 44px; }
.setup-url { overflow-wrap: anywhere; }
.pill-pending { background: var(--process-bg); color: var(--process); }
.pill-disabled { background: var(--failed-bg); color: var(--failed); }
@media (max-width: 768px) {
  .team-invite { grid-template-columns: 1fr; }
  .team-mobile .mobile-card { display: grid; gap: 8px; }
}

.media-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.media-card .figure { margin: 4px 0; font-size: 28px; letter-spacing: -0.03em; }
.media-breakdown, .media-history { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.media-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.media-form label { display: grid; gap: 4px; font-weight: 650; }
.media-form select, .media-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}
.media-preview { display: grid; gap: 8px; margin-top: 16px; }
.media-confirm { margin-top: 12px; }
.media-removed {
  display: grid;
  gap: 4px;
  min-height: 160px;
  align-content: center;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f6f8fb;
}
.inline-form { display: inline; }
@media (max-width: 768px) {
  .media-cards { grid-template-columns: 1fr; }
  .media-form { grid-template-columns: 1fr; }
  .media-form .btn { width: 100%; }
}

.website-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}
.website-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.website-card h2 { margin: 0 0 10px; font-size: 16px; }
.env-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.env-list a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 40px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); color: inherit; text-decoration: none;
}
.env-list a:hover { background: #f3f7fb; }
.env-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px;
}
.env-tabs a {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  color: inherit; text-decoration: none; font-weight: 650;
}
.env-tabs a.active { background: #122033; color: #fff; border-color: #122033; }
.website-wizard label, .website-wizard fieldset { display: grid; gap: 6px; }
.website-wizard input[type="text"], .website-wizard select, .full-width {
  width: 100%; min-height: 44px; border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 8px 10px; background: #fff;
}
.choice-row, .choice-stack { display: grid; gap: 8px; border: 0; padding: 0; margin: 0 0 12px; }
.choice-row { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
}
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { padding-left: 22px; position: relative; }
.checklist li::before { position: absolute; left: 0; }
.checklist li.done::before { content: "✓"; color: #16a34a; font-weight: 800; }
.checklist li.todo::before { content: "○"; color: var(--muted); }
.secret-once {
  border: 1px solid #86efac; background: #f0fdf4; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px;
}
.secret-value { overflow-wrap: anywhere; }
.plain-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.webhook-cards { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.webhook-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  display: grid; gap: 8px;
}
.lab-tabs { display: flex; gap: 18px; align-items: baseline; margin: 8px 0 4px; font-weight: 750; }
.lab-tabs a { color: var(--muted); text-decoration: none; }
.lab-tabs a.active { color: var(--navy); }
.lab-links { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0 16px; }
.lab-table { width: 100%; border-collapse: collapse; }
.lab-table th, .lab-table td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lab-matrix { margin: 12px 0 0; border-collapse: collapse; }
.lab-matrix th, .lab-matrix td { border: 1px solid var(--line); padding: 6px 10px; text-align: right; }
.lab-matrix caption { text-align: left; font-weight: 700; margin-bottom: 6px; }
.lab-run-list { margin: 0; padding-left: 18px; }
.lab-family .panel-head h2 { font-size: 20px; letter-spacing: -0.02em; }
.lab-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lab-dl { display: grid; gap: 4px; margin: 8px 0 0; }
.lab-dl div { display: grid; grid-template-columns: 11rem 1fr; gap: 8px; }
.lab-dl dt { color: var(--muted); font-size: 12px; }
.lab-dl dd { margin: 0; font-weight: 650; }
.lab-impact { margin: 12px 0 0; font-weight: 800; letter-spacing: 0.02em; }
@media (max-width: 768px) {
  .lab-split { grid-template-columns: 1fr; }
  .lab-dl div { grid-template-columns: 1fr; }
  .website-grid { grid-template-columns: 1fr; }
  .choice-row { grid-template-columns: 1fr; }
  .env-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .env-tabs a, .website-wizard .btn, .webhook-create .btn { width: 100%; justify-content: center; }
  .website-wizard input, .website-wizard select, input.full-width { width: 100%; }
}

.review-search-row {
  display: flex;
  align-items: end;
  gap: 8px;
  max-width: 560px;
  margin-bottom: 10px;
}
.review-search-row .search { flex: 1 1 auto; min-width: 0; }
.review-search-row .search input { width: 100%; }
.review-search-row .btn { flex: 0 0 auto; min-height: 44px; }
.review-count { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 650; }
.review-username { margin: 0 0 8px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.review-verdict { display: grid; gap: 4px; }
.staff-state { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.staff-state[data-staff-state="awaiting"] { color: var(--review); }
.staff-state[data-staff-state="confirmed"] { color: var(--approve); }
.staff-state[data-staff-state="corrected"] { color: var(--review); }
.review-primary-reason { margin: 0; font-size: 16px; font-weight: 750; }
.review-evidence { margin: 0; display: grid; gap: 2px; }
.review-evidence div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 8px; }
.review-evidence dt { color: var(--muted); font-size: 13px; }
.review-evidence dd { margin: 0; overflow-wrap: anywhere; }
.review-user-copy { margin: 0; white-space: pre-wrap; }
.review-observe { margin: 0; color: var(--muted); font-size: 13px; }
.review-card.is-focused { outline: 2px solid var(--cyan-deep); }
.review-card.is-skipped { opacity: 0.45; }
.pill-exception, .pill-hold { background: #fff7ed; color: #9a3412; }
.pill-policy { background: var(--refuse-bg); color: var(--refuse); }
.pill-uncertain { background: #fff6d9; color: #8a5a00; }
.pill-technical { background: #eef2ff; color: #3730a3; }
.review-sheet[hidden] { display: none; }
.review-sheet-panel { display: grid; gap: 10px; }
.review-sheet-warn { margin: 0; font-size: 14px; }
.review-rule { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.review-rule-title { margin: 0; font-weight: 750; }
.review-rule-model { margin: 0; color: var(--muted); font-size: 12px; }
.review-rule-group { display: grid; gap: 8px; }
.review-rule-pair { display: grid; gap: 8px; }
.btn-rule, .review-actions .btn, .review-sheet-panel .btn {
  min-height: 48px;
  width: 100%;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 750;
}
.btn-rule { background: #111827; color: #fff; display: grid; justify-items: start; text-align: left; padding: 10px 12px; }
.btn-rule small { font-weight: 500; color: #d1d5db; }
.review-multi { display: grid; gap: 8px; }
.review-multi-row { display: flex; gap: 10px; align-items: center; min-height: 48px; font-weight: 650; }
.review-details { margin-top: 8px; }
.review-more-rules summary { cursor: pointer; font-weight: 650; }
@media (max-width: 768px) {
  .review-search-row { max-width: none; }
  .review-evidence div { grid-template-columns: 1fr; gap: 2px; }
  body.review-sheet-open { overflow: hidden; }
  .review-sheet:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
  }
  .review-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
  }
  .review-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(80vh, calc(100% - 48px));
    overflow: auto;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 16px 16px 0 0;
  }
  .review-sticky {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 2;
  }
  body.review-sheet-open .review-sticky { display: none; }
  .manual-review-photo img, .manual-review-empty-photo { max-height: 280px; }
}

.openai-usage-filters { align-items: end; gap: 12px; }
.openai-usage-filters label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.openai-usage-table { min-width: 960px; }
.hint-list { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.gemini-guide { display: grid; gap: 16px; }
.gemini-guide h3 { margin: 0; }
.gemini-summary { display: grid; gap: 8px; margin: 0 0 12px; }
.gemini-summary div { display: grid; grid-template-columns: 9rem 1fr; gap: 8px; align-items: center; }
.gemini-summary dt { color: var(--muted); font-size: 13px; }
.gemini-summary dd { margin: 0; font-weight: 650; }
.next-step {
  border: 1px solid #93c5fd;
  background: #eff6ff;
  border-radius: 10px;
  padding: 12px 14px;
}
.next-step p { margin: 0; }
.next-step p + p { margin-top: 6px; }
.setup-step {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}
.setup-step h4 { margin: 0; }
.setup-step.is-current { border-color: #93c5fd; box-shadow: 0 0 0 2px #dbeafe; }
.setup-step.is-done { border-color: #86efac; }
.gemini-advanced { margin-top: 8px; }
.gemini-advanced summary { cursor: pointer; font-weight: 650; }
@media (max-width: 768px) {
  .gemini-summary div { grid-template-columns: 1fr; }
}

.staff-audit-note { margin: 0 0 12px; }
.staff-activity-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 0 0 16px; }
.staff-activity-filters label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.staff-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.staff-metrics p { margin: 0; }
.staff-chart { display: flex; align-items: stretch; gap: 6px; min-height: 160px; }
.staff-chart-col { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 18px; }
.staff-chart-stack { flex: 1; display: flex; flex-direction: column-reverse; border-radius: 6px; overflow: hidden; background: #f1f5f9; min-height: 80px; }
.staff-chart-seg { min-height: 4px; }
.staff-chart-incorrect_result { background: #dc2626; }
.staff-chart-internal_note { background: #2563eb; }
.staff-chart-review_resolved { background: #16a34a; }
.staff-chart-empty { flex: 1; }
.staff-chart-col span { font-size: 11px; color: var(--muted); text-align: center; }
.staff-chart-legend { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 12px 0 0; }
.staff-chart-legend .staff-chart-seg { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: middle; }

.mod-chart {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 14px;
  margin: 16px 0 8px;
  box-shadow: 0 1px 2px rgba(16, 25, 41, 0.04);
}
.mod-chart-head h2 { margin: 0; font-size: 18px; }
.mod-chart-head .meta { margin: 4px 0 0; }
.mod-chart-partial { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.mod-chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}
.mod-chart-card {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  padding: 12px 14px 12px 16px;
  box-shadow: inset 3px 0 0 var(--line-strong);
  min-height: 96px;
}
.mod-chart-card-total { box-shadow: inset 3px 0 0 #2f6fed; }
.mod-chart-card-approved { background: #f3fbf4; box-shadow: inset 3px 0 0 #3aaa4a; }
.mod-chart-card-refused { background: #fdf4f4; box-shadow: inset 3px 0 0 #e24b4b; }
.mod-chart-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mod-chart-card-top span {
  font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.mod-chart-card-top b { font-size: 14px; color: var(--ink); }
.mod-chart-card strong {
  display: block; font-size: 32px; letter-spacing: -0.03em; margin: 6px 0 2px; line-height: 1.1;
}
.mod-chart-card-total strong { color: #2f6fed; }
.mod-chart-card-approved strong { color: #1f8a3b; }
.mod-chart-card-refused strong { color: #d23434; }
.mod-chart-card small { color: var(--muted); font-size: 12px; }
.mod-chart-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 16px;
  align-items: start;
}
.mod-chart-plot { position: relative; min-height: 340px; background: #fff; }
.mod-chart-svg { display: block; width: 100%; height: 340px; }
.mod-chart-loading { color: var(--muted); font-size: 13px; margin: 24px 0; }
.mod-chart-controls { display: flex; flex-direction: column; align-items: flex-start; padding-top: 8px; }
.mod-chart-toggle {
  display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 0 0 8px;
}
.mod-chart-toggle button {
  border: 0; background: #fff; color: #344054; padding: 7px 12px; font-size: 12px; font-weight: 750; cursor: pointer;
}
.mod-chart-toggle button + button { border-left: 1px solid var(--line); }
.mod-chart-toggle button.is-on { color: #fff; }
.mod-chart-toggle [data-mode].is-on { background: #2f6fed; }
.mod-chart-toggle [data-scale].is-on { background: #2f9e44; }
.mod-chart-toggle-label { margin: 2px 0 8px; font-size: 12px; color: var(--muted); }
.mod-chart-series {
  display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; font-weight: 650; cursor: pointer;
}
.mod-chart-series input { accent-color: #3aaa4a; width: 15px; height: 15px; }
.mod-chart-series input[data-series="refused"] { accent-color: #e24b4b; }
.swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.swatch-approved { background: #3aaa4a; }
.swatch-refused { background: #e24b4b; }
.mod-chart-tip {
  position: absolute; z-index: 4; min-width: 196px; max-width: 280px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 25, 41, 0.14); padding: 10px 12px;
  pointer-events: none; font-size: 12px; color: var(--ink);
}
.mod-chart-tip strong { display: block; margin-bottom: 4px; font-size: 13px; }
.mod-chart-tip .tip-partial { margin: 0 0 6px; color: var(--muted); }
.mod-chart-tip .tip-row { display: flex; justify-content: space-between; gap: 14px; margin: 2px 0; }
.mod-chart-tip .tip-total { margin-top: 6px; padding-top: 6px; border-top: 1px solid #e6ebf2; font-weight: 750; }
.mod-chart-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.mod-chart-toggle a {
  display: inline-block; border: 0; background: #fff; color: #344054; padding: 7px 12px;
  font-size: 12px; font-weight: 750; text-decoration: none;
}
.mod-chart-toggle a + a, .mod-chart-toggle a + button, .mod-chart-toggle button + a { border-left: 1px solid var(--line); }
.mod-chart-toggle a.is-on { background: #2f6fed; color: #fff; }
.stats-head, .stats-actions { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.stats-actions { flex: 0 0 auto; }
.stats-range { position: relative; }
.stats-range-btn, #open-export { min-height: 38px; }
.stats-range-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 12px;
  font-weight: 700; cursor: pointer;
}
.stats-range-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 320px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 25, 41, 0.14); padding: 12px;
}
.stats-range-title { margin: 8px 0 4px; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.stats-range-panel a { display: block; padding: 7px 4px; color: var(--ink); font-weight: 650; text-decoration: none; }
.stats-range-panel a:hover { background: #f4f8fc; }
.stats-custom { display: grid; gap: 8px; margin-top: 8px; }
.stats-custom label { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; font-weight: 650; }
.stats-custom input { border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.stats-extra { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.stats-extra p { margin: 0 0 4px; }
.stats-insights h2 { margin-top: 0; font-size: 18px; }
.stats-insights h3 { margin: 16px 0 8px; font-size: 14px; }
.stats-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stats-dialog { border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 18px 48px rgba(16, 25, 41, 0.2); }
.stats-dialog::backdrop { background: rgba(8, 16, 28, 0.45); }
.stats-dialog form { display: grid; gap: 10px; padding: 18px; }
.stats-dialog-head { display: flex; justify-content: space-between; align-items: center; }
.stats-dialog-head h2 { margin: 0; font-size: 20px; }
.stats-dialog label, .stats-dialog fieldset { display: grid; gap: 6px; font-size: 13px; font-weight: 650; }
.stats-dialog select, .stats-dialog fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
.stats-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 900px) {
  .mod-chart-summary, .mod-chart-body, .stats-split, .stats-head { grid-template-columns: 1fr; display: grid; }
  .stats-range-panel { right: auto; left: 0; }
}
