/*
 * CDW botdefender — operations console.
 *
 * Product-register UI: the tool disappears into the task. Restrained palette
 * (tinted near-black neutrals + CDW red as the single accent), system sans for
 * all chrome, monospace reserved for data values (IPs, ids, scores, times).
 * App-shell layout: the rail and each view header are fixed; only the data
 * region scrolls. No webfonts, no CDN (the lab must not phone out).
 */

:root {
  /* neutrals — warm near-black, tinted toward the brand hue */
  --bg: oklch(0.168 0.004 40);
  --rail: oklch(0.145 0.005 40);
  --surface: oklch(0.205 0.005 40);
  --surface-2: oklch(0.247 0.006 40);
  --line: oklch(0.295 0.006 40);
  --line-2: oklch(0.37 0.008 40);

  --text: oklch(0.945 0.004 70);
  --text-dim: oklch(0.745 0.006 60);
  --text-faint: oklch(0.65 0.008 50);

  /* CDW red — the one accent: primary actions, active nav, selection */
  --red: oklch(0.57 0.2 26);
  --red-bright: oklch(0.66 0.215 27);
  --red-ink: oklch(0.78 0.16 30);
  --red-wash: oklch(0.585 0.2 26 / 0.13);
  --red-line: oklch(0.6 0.2 27 / 0.4);

  /* keyboard focus: one blue family, never the brand or error red */
  --focus: oklch(0.76 0.12 245);
  --focus-wash: oklch(0.76 0.12 245 / 0.22);

  /* verdict / state semantics */
  --bot: oklch(0.7 0.19 30);
  --bot-wash: oklch(0.665 0.198 30 / 0.14);
  --uncertain: oklch(0.79 0.128 78);
  --uncertain-wash: oklch(0.79 0.128 78 / 0.14);
  --human: oklch(0.74 0.105 168);
  --human-wash: oklch(0.74 0.105 168 / 0.14);
  --neutral: oklch(0.66 0.02 240);

  --sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono:
    ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --rail-w: 236px;
  --r: 8px;
  --r-sm: 5px;
  --shadow: 0 16px 50px oklch(0 0 0 / 0.5);

  /* type scale (rem) - ad-hoc sizes snapped to these steps */
  --fs-2xs: 0.6875rem;
  --fs-xs: 0.72rem;
  --fs-sm: 0.78rem;
  --fs-base: 0.84rem;
  --fs-md: 0.92rem;
  --fs-lg: 1.05rem;
  --fs-xl: 1.4rem;
  --fs-2xl: 1.8rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden; /* the page never scrolls; data regions do */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

code,
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--text-faint);
}

::selection {
  background: var(--red-wash);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

:where(a, button) {
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.6rem 0.85rem;
  border-radius: var(--r-sm);
  background: var(--text);
  color: var(--bg);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(calc(-100% - 1rem));
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.skip-link:focus-visible {
  transform: translateY(0);
}

/* Scrollbars — quiet, not a custom flourish */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: oklch(0.45 0.008 40);
  background-clip: padding-box;
}

/* ====================================================================== */
/*  LOGIN                                                                  */
/* ====================================================================== */

.login-screen {
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  overflow: auto;
}
.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(58% 50% at 50% 42%, #000, transparent 78%);
  opacity: 0.32;
}
.login-card {
  position: relative;
  width: min(404px, 100%);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 2rem 2rem 1.5rem;
  box-shadow: var(--shadow);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--red);
  border-radius: 12px 12px 0 0;
}
.login-head {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 1.6rem;
}
.login-logo {
  height: 40px;
  width: auto;
  display: block;
}
.login-sub {
  color: var(--text-faint);
  font-size: var(--fs-xs);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  max-width: 16ch;
  margin: 0; /* an h1: keep the small label look */
  font-weight: inherit;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.field-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.8rem;
  margin-bottom: 0.32rem;
}
.field {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 0.6rem 0.7rem;
  font-family: var(--sans);
  font-size: var(--fs-md);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.field::placeholder {
  color: var(--text-faint);
}
.field:focus-visible {
  border-color: var(--focus);
  outline-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-wash);
}
.login-error {
  min-height: 1.1rem;
  margin-top: 0.7rem;
  font-size: var(--fs-base);
  color: var(--red-ink);
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.login-error.show {
  opacity: 1;
  transform: none;
}
.login-foot {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-faint);
  text-align: center;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  font-family: var(--sans);
  font-size: var(--fs-base);
  font-weight: 550;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
}
.btn:hover {
  background: oklch(0.29 0.006 40);
}
.btn:active {
  transform: translateY(0.5px);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}
.btn-primary {
  margin-top: 1.2rem;
  background: var(--red);
  border-color: var(--red);
  color: oklch(0.99 0.01 30);
  font-weight: 600;
  padding: 0.62rem 0.85rem;
}
.btn-primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
}

/* Mock banner ------------------------------------------------------------ */
.mock-banner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  padding: 0.55rem 0.75rem;
  background: var(--uncertain-wash);
  border: 1px solid oklch(0.79 0.128 78 / 0.3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--uncertain);
}
.mock-banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--uncertain);
  flex: none;
}

/* ====================================================================== */
/*  APP SHELL                                                              */
/* ====================================================================== */

.console {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
}

.rail {
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  background: var(--rail);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.8rem 0.9rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0.55rem 1.1rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.brand-logo {
  height: 24px;
  width: auto;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-sub {
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.6rem;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: var(--fs-md);
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--sans);
  transition:
    background 0.13s,
    color 0.13s;
}
.rail-link:hover {
  background: var(--surface);
  color: var(--text);
}
.rail-link.is-active {
  background: var(--red-wash);
  color: var(--red-ink);
}
.rail-icon {
  width: 17px;
  height: 17px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}
.rail-label {
  flex: 1;
}
.rail-foot {
  margin-top: auto;
  padding-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mock-tag {
  align-self: flex-start;
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  color: var(--uncertain);
  background: var(--uncertain-wash);
  padding: 2px 7px;
  border-radius: 4px;
}
.logout {
  color: var(--text-faint);
}
.logout:hover {
  color: var(--text);
}

/* Stage: fixed header zone + scrolling data region ----------------------- */
.stage {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.view-head-slot {
  flex: 0 0 auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.view-head-slot .mock-banner {
  margin: 0.9rem 1.75rem 0;
}
.view-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto; /* the only scroller; sticky table headers pin to its top */
  padding: 1.5rem 1.75rem 2.5rem;
}

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 1.75rem 1.15rem;
}
.view-title {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.view-sub {
  margin: 0.15rem 0 0;
  color: var(--text-dim);
  font-size: var(--fs-base);
}
.view-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.refresh-control {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.fetched-at {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* Filters + search ------------------------------------------------------- */
.filter-row {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 2px;
}
.filter-btn {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: capitalize;
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 0.34rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}
.filter-btn:hover {
  color: var(--text);
}
.filter-btn.is-active {
  background: var(--surface-2);
  color: var(--text);
}
.filter-btn.filter-bot.is-active {
  color: var(--bot);
}
.filter-btn.filter-uncertain.is-active {
  color: var(--uncertain);
}
.filter-btn.filter-human.is-active {
  color: var(--human);
}
.filter-btn.filter-out-fail.is-active,
.filter-btn.filter-out-throttled.is-active {
  color: var(--bot);
}
.filter-btn.filter-out-success.is-active {
  color: var(--human);
}
.search {
  width: 280px;
  max-width: 40vw;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-base);
  padding: 0.42rem 0.7rem;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.search::placeholder {
  color: var(--text-faint);
}
.search:focus-visible {
  border-color: var(--focus);
  outline-color: var(--focus);
  box-shadow: 0 0 0 3px var(--focus-wash);
}

/* ====================================================================== */
/*  DASHBOARD                                                              */
/* ====================================================================== */

.posture {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.posture-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.55rem 0.85rem;
}
.posture-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral);
  flex: none;
}
.posture-chip.s-ok .posture-dot {
  background: var(--human);
}
.posture-chip.s-warn .posture-dot {
  background: var(--uncertain);
}
.posture-chip.s-hot .posture-dot {
  background: var(--bot);
  box-shadow: 0 0 0 3px var(--bot-wash);
}
.posture-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  border-radius: var(--r);
}
.counts {
  display: flex;
  flex-wrap: wrap;
}
.count-link {
  flex: 1 1 7rem;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.count-num {
  font-size: var(--fs-xl);
  font-weight: 600;
}
.count-label {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  text-transform: capitalize;
}
.count-note {
  margin: 0;
  padding: 0.7rem 1.1rem;
}
.hours {
  list-style: none;
  margin: 0;
  padding: 0.4rem 1.1rem 0.8rem;
}
.hour-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.2rem 0;
  font-size: var(--fs-sm);
}
.hour-label {
  flex: 0 0 4.5rem;
  color: var(--text-dim);
}
.hour-bar {
  flex: 1;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
}
.hour-fill {
  display: block;
  height: 100%;
  background: var(--bot);
  border-radius: 4px;
}
.hour-num {
  flex: 0 0 2.5rem;
  text-align: right;
}
.posture-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.posture-label {
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.posture-value {
  font-size: var(--fs-base);
  font-weight: 600;
  text-transform: capitalize;
}

.dist {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem 1.2rem;
  margin-bottom: 1.5rem;
}
.dist-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.dist-title {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.dist-total {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}
.dist-total b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.dist-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 1rem;
}
.dist-seg {
  height: 100%;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.dist-seg.seg-bot {
  background: var(--bot);
}
.dist-seg.seg-uncertain {
  background: var(--uncertain);
}
.dist-seg.seg-human {
  background: var(--human);
}
.dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
}
.legend-swatch.seg-bot {
  background: var(--bot);
}
.legend-swatch.seg-uncertain {
  background: var(--uncertain);
}
.legend-swatch.seg-human {
  background: var(--human);
}
.legend-num {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-lg);
}
.legend-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.legend-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: capitalize;
}
.legend-pct {
  font-size: var(--fs-2xs);
  color: var(--text-faint);
}

/* ====================================================================== */
/*  PANELS + TABLE                                                         */
/* ====================================================================== */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
/* Bounded card variant (dashboard): clip rounded corners. Full-page table
   views omit this so their column headers can stick to the scroll viewport. */
.panel.panel-card {
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  margin: 0;
  font-weight: inherit;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.panel-link {
  font-size: var(--fs-sm);
  color: var(--red-ink);
  text-decoration: none;
}
.panel-link:hover {
  text-decoration: underline;
}
.result-count {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  padding: 0.7rem 1.1rem 0;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
}
.pager-count {
  font-size: var(--fs-sm);
  color: var(--text-faint);
}

.table-wrap {
  width: 100%;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
}
/* Sticky column headers pin to the .view-scroll top in full-page table views.
   No overflow ancestor sits between thead and .view-scroll, so this holds. */
.data-table.is-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.data-table thead th {
  background: var(--surface-2);
  color: var(--text-faint);
  font-weight: 600;
  font-size: var(--fs-2xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.sort-button {
  appearance: none;
  width: 100%;
  margin: -0.6rem -0.9rem;
  padding: 0.6rem 0.9rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.data-table thead th.th-sort:hover,
.sort-button:hover {
  color: var(--text-dim);
}
.data-table thead th.is-sorted {
  color: var(--text);
}
.data-table tbody td {
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr.row-click {
  cursor: pointer;
  transition: background 0.12s;
}
.data-table tbody tr.row-click:hover {
  background: oklch(0.235 0.006 40);
}
.data-table tbody tr.row-click:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.td-time {
  white-space: nowrap;
}
.td-time > span:first-child {
  font-variant-numeric: tabular-nums;
}
.td-ago {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin-top: 1px;
}
.td-id code,
.td-ip code,
.td-path code,
.td-user code {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}
.td-id code {
  color: var(--red-ink);
}
.ip-link {
  text-decoration: none;
}
.ip-link code {
  color: var(--text-dim);
  border-bottom: 1px dotted var(--line-2);
}
.ip-link:hover code {
  color: var(--red-ink);
  border-bottom-color: var(--red-line);
}
.td-score {
  text-align: right;
}
.score {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: var(--fs-base);
}
.score-bot {
  color: var(--bot);
}
.score-uncertain {
  color: var(--uncertain);
}
.score-human {
  color: var(--text-dim);
}

/* location cell */
.td-loc {
  white-space: nowrap;
}
.loc {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.loc-place {
  font-size: var(--fs-base);
}
.loc-meta {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
.loc-cc {
  display: inline-block;
  min-width: 1.6rem;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-dim);
}

.src-tag {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

/* verdict — calm tag with a leading dot (no glow) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: capitalize;
  padding: 0.16rem 0.55rem 0.16rem 0.45rem;
  border-radius: 999px;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill-bot {
  color: var(--bot);
  background: var(--bot-wash);
}
.pill-uncertain {
  color: var(--uncertain);
  background: var(--uncertain-wash);
}
.pill-human {
  color: var(--human);
  background: var(--human-wash);
}
.pill-unknown {
  color: var(--text-faint);
  background: var(--surface-2);
}

/* classification pills (IDS taxonomy) - distinct from the verdict pills */
.pill.clf {
  text-transform: none;
}
.clf-human {
  color: var(--human);
  background: var(--human-wash);
}
.clf-verified-good {
  color: #5cc8ff;
  background: rgba(92, 200, 255, 0.12);
}
.clf-unknown-bot {
  color: var(--uncertain);
  background: var(--uncertain-wash);
}
.clf-bad-actor {
  color: var(--bot);
  background: var(--bot-wash);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--neutral);
}
.dot-bot {
  background: var(--bot);
}
.dot-uncertain {
  background: var(--uncertain);
}
.dot-human {
  background: var(--human);
}

.chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.chip {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

/* audit specifics */
.td-ua {
  max-width: 240px;
}
.ua {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}
.row-hot td {
  background: oklch(0.665 0.198 30 / 0.07);
}
.outcome {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: capitalize;
  padding: 0.14rem 0.5rem;
  border-radius: 4px;
}
.outcome-success {
  color: var(--human);
  background: var(--human-wash);
}
.outcome-fail,
.outcome-throttled {
  color: var(--bot);
  background: var(--bot-wash);
}

/* ====================================================================== */
/*  STATES                                                                 */
/* ====================================================================== */

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 1.5rem;
  text-align: center;
}
.state-loading {
  flex-direction: row;
  color: var(--text-dim);
  font-size: var(--fs-base);
}
.scan-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}
.state-glyph {
  font-size: var(--fs-2xl);
  color: var(--text-faint);
}
.state-title {
  font-size: var(--fs-md);
  font-weight: 600;
}
.state-body {
  font-size: var(--fs-base);
  color: var(--text-dim);
  max-width: 44ch;
}
.pending-tag {
  margin-top: 0.4rem;
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  color: var(--uncertain);
  background: var(--uncertain-wash);
  border-radius: 4px;
  padding: 3px 9px;
}
.error-state {
  color: var(--bot);
}

/* ====================================================================== */
/*  DRAWER                                                                 */
/* ====================================================================== */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.5);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 100;
  overscroll-behavior: contain;
}
.drawer-overlay.open {
  opacity: 1;
}
.drawer {
  width: min(560px, 100%);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transform: translateX(24px);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer-overlay.open .drawer {
  transform: none;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer-kicker {
  display: block;
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.2rem;
}
.drawer-id {
  font-size: var(--fs-md);
  color: var(--red-ink);
}
.drawer-close {
  background: none;
  border: 1px solid var(--line-2);
  color: var(--text-dim);
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: var(--fs-md);
  transition:
    color 0.13s,
    border-color 0.13s;
}
.drawer-close:hover {
  color: var(--text);
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem 1.3rem 2rem;
}
.drawer-verdict {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}
.drawer-verdict .score {
  font-size: var(--fs-xl);
}
.drawer-section {
  margin-bottom: 1.5rem;
}
.drawer-section-head {
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-bottom: 0.55rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.kv {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 0.5rem 1rem;
}
.kv dt {
  color: var(--text-faint);
  font-size: var(--fs-sm);
}
.kv dd {
  margin: 0;
  font-size: var(--fs-base);
  word-break: break-word;
}
.kv-mono dd {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--text-dim);
}
.kv dt.kv-flag,
.kv dd.kv-flag span:first-child {
  color: var(--bot);
}
.fp-anomaly {
  margin-left: 0.5rem;
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bot);
  background: var(--bot-wash);
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: middle;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.tl-item {
  display: flex;
  gap: 0.8rem;
}
.tl-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.35rem;
}
.tl-node::after {
  content: "";
  flex: 1;
  width: 1px;
  background: var(--line-2);
  margin: 0.3rem 0;
}
.tl-item:last-child .tl-node::after {
  display: none;
}
.tl-content {
  flex: 1;
  padding-bottom: 1rem;
}
.tl-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}
.tl-event {
  font-size: var(--fs-sm);
  color: var(--text);
}
.tl-time {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

/* ====================================================================== */
/*  CONTROLS                                                               */
/* ====================================================================== */

.view-scroll > .panel + .panel,
.view-scroll > .panel + .save-status {
  margin-top: 1.5rem;
}
.ctl-panel {
  padding: 0 1.2rem 1.3rem;
}
.ctl-panel .panel-head {
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 1.1rem;
}
.saved-by {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.radio-group {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}
.radio-tile {
  position: relative; /* holds the hidden radio, so focusing it does not scroll the page */
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition:
    border-color 0.13s,
    background 0.13s;
}
.radio-tile:hover {
  border-color: var(--line-2);
}
.radio-tile.is-on {
  border-color: var(--red-line);
  background: var(--red-wash);
}
.radio-tile:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.radio-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  flex: none;
  margin-top: 0.15rem;
  position: relative;
  transition:
    border-color 0.13s,
    background 0.13s;
}
.radio-tile.is-on .radio-mark {
  border-color: var(--red);
  background: var(--red);
  box-shadow: inset 0 0 0 3px var(--surface);
}
.radio-label {
  display: block;
  font-size: var(--fs-base);
  font-weight: 600;
}
.radio-desc {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin-top: 0.1rem;
}

.ctl-field {
  padding-top: 1.2rem;
  margin-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.ctl-field.indent {
  padding-left: 1rem;
}
.ctl-field-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.3rem;
}
.ctl-note {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}
.ctl-link {
  color: var(--red-ink);
  text-decoration: underline;
  white-space: nowrap;
}
.inline-form {
  display: flex;
  gap: 0.5rem;
}
.inline-form .field {
  flex: 1;
}
.pw-status {
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-faint);
}
.pw-status.is-set {
  color: var(--human);
}
.pw-field {
  position: relative;
  flex: 1;
}
.pw-field .field {
  width: 100%;
  padding-right: 2.2rem;
}
.pw-reveal {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
}
.pw-reveal:hover,
.pw-reveal.is-on {
  color: var(--text);
}
.pw-reveal svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238a8580' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 2rem;
  cursor: pointer;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.toggle-row:first-of-type {
  border-top: none;
}
.toggle-label {
  display: block;
  font-size: var(--fs-md);
  font-weight: 550;
}
.toggle-danger .toggle-label {
  color: var(--bot);
}
.toggle-desc {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin-top: 0.1rem;
  max-width: 56ch;
}
.toggle {
  position: relative;
  flex: none;
}
.toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-track {
  display: block;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  transition: background 0.16s;
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-dim);
  transition:
    transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.16s;
}
.toggle-input:checked + .toggle-track {
  background: var(--red);
  border-color: var(--red);
}
.toggle-input:checked + .toggle-track .toggle-thumb {
  transform: translateX(16px);
  background: oklch(0.99 0.01 30);
}
.toggle-danger .toggle-input:checked + .toggle-track {
  background: var(--bot);
  border-color: var(--bot);
}
.toggle-input:focus-visible + .toggle-track {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Bot Signatures panel rows (also .sig-controls/.sig-weight* in the velocity panel) */
.sig-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.sig-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.sig-label {
  font-size: var(--fs-md);
  font-weight: 550;
}
.sig-desc {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  max-width: 56ch;
}
.sig-row.is-target {
  outline: 2px solid var(--uncertain); /* amber: not the focus blue, not the error red */
  outline-offset: 4px;
  background: var(--surface-2);
}
a.sig-fired-chip {
  text-decoration: none;
}
.sig-fired-weight {
  margin-left: 0.35rem;
}
a.sig-fired-chip:hover {
  border-color: var(--red-line);
}
.sig-row.is-off .sig-info {
  opacity: 0.75; /* .sig-desc measures 4.97:1 here; 0.7 is 4.49:1, under the 4.5 floor */
}
.sig-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  flex: none;
}
.sig-weight-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.field[aria-invalid="true"] {
  border-color: var(--bot);
}
.ctl-error {
  flex-basis: 100%;
  font-size: var(--fs-sm);
  color: var(--bot);
}
@media (min-width: 601px) {
  .sig-row .sig-weight-wrap {
    justify-content: flex-end; /* a refusal widens the wrap: the input stays where it was */
  }
  .sig-row .ctl-error {
    text-align: right;
  }
}
.sig-weight-label {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
.sig-weight {
  width: 6.5rem;
}
.sig-row .sig-weight {
  width: 4.5rem;
}
.sig-controls .toggle {
  display: block;
  width: 38px;
  height: 22px;
  cursor: pointer;
}
@media (max-width: 600px) {
  .sig-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
}

.save-status {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  max-width: calc(100vw - 2rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  pointer-events: none;
  font-size: var(--fs-sm);
  padding: 0.6rem 0.85rem;
  border-radius: var(--r-sm);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.save-status.show {
  pointer-events: auto;
  opacity: 1;
  transform: none;
}
.save-status.saving {
  background: var(--surface-2);
  color: var(--text-dim);
}
.save-status.ok {
  background: linear-gradient(var(--human-wash), var(--human-wash)), var(--surface-2);
  color: var(--human);
}
.save-status.err {
  background: linear-gradient(var(--bot-wash), var(--bot-wash)), var(--surface-2);
  color: var(--bot);
}

/* Bot interactions ------------------------------------------------------- */
.chat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.chat-card-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: var(--fs-sm);
}
.transcript {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bubble {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 80%;
  padding: 0.5rem 0.7rem;
  border-radius: var(--r);
  font-size: var(--fs-base);
}
.bubble-user {
  align-self: flex-end;
  background: var(--red-wash);
}
.bubble-bot,
.bubble-assistant {
  align-self: flex-start;
  background: var(--surface-2);
}
.bubble-role {
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ====================================================================== */
/*  HONEYBOT                                                               */
/* ====================================================================== */

/* turn counter in the decoy-session table (reuses .td-score right-align) */
.turns-count {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--uncertain);
}

/* transcript turns: a meta row (time + tactics) above the bubble pair */
.hb-transcript {
  gap: 1rem;
}
.hb-turn {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed var(--line);
}
.hb-turn:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.hb-turn-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hb-transcript .bubble {
  max-width: 100%;
}
.hb-transcript .bubble-text {
  word-break: break-word;
}

/* tactic chips — color-coded by counter-intelligence tactic */
.chip.tactic-tarpit {
  color: var(--uncertain);
  border-color: var(--uncertain-wash);
  background: var(--uncertain-wash);
}
.chip.tactic-token_bloat {
  color: var(--text-dim);
  border-color: var(--line-2);
}
.chip.tactic-injection {
  color: var(--red-ink);
  border-color: var(--red-line);
  background: var(--red-wash);
}
.chip.tactic-honeytokens {
  color: var(--bot);
  border-color: var(--bot-wash);
  background: var(--bot-wash);
}
/* Scout contain/decoy engagement marker (WS3-C): a contained bad-actor turn. */
.chip.chip-decoy {
  color: var(--bot);
  border-color: var(--bot-wash);
  background: var(--bot-wash);
  margin-left: 6px;
}

/* ====================================================================== */
/*  RESPONSIVE                                                             */
/* ====================================================================== */

@media (max-width: 860px) {
  .console {
    grid-template-columns: 64px 1fr;
  }
  .brand-text,
  .rail-label,
  .mock-tag {
    display: none;
  }
  .rail-link {
    justify-content: center;
  }
  .view-actions {
    flex-direction: column;
    align-items: flex-end;
  }
  .search {
    width: 180px;
  }
}

/* Phone: the toolbar stacks under the title so no control leaves the viewport. */
@media (max-width: 600px) {
  .view-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }
  .view-actions {
    align-items: flex-start;
  }
}

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

.save-undo {
  font: inherit;
  font-weight: 600;
  color: inherit;
  background: none;
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}
/* In the panel, right under the control that asked; .ask-sticky / .ask-fixed only when no row is found. */
.ask-bar {
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--red-line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  font-size: var(--fs-base);
}
.ask-bar.ask-sticky {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: 1rem 0 0;
}
.ask-bar.ask-fixed {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  width: min(40rem, calc(100vw - 2rem));
}
.ask-text {
  margin: 0;
  flex: 1 1 16rem;
}
.ask-actions {
  display: flex;
  gap: 0.5rem;
}
.ask-actions .btn-primary {
  margin-top: 0;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.related-link {
  color: var(--red-ink);
  padding: 10px 0;
}

/* An Audit restore button wraps rather than widening the CHANGE column. */
.td-change .btn {
  white-space: normal;
}

/* Phone: the Controls section list is one row that scrolls sideways; links, pills and buttons are 44px targets. */
@media (max-width: 600px) {
  nav.ctl-nav {
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .ctl-nav-link {
    flex: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
  .rail-link,
  .filter-btn,
  .ctl-nav-link,
  .btn {
    min-height: 44px;
  }
  .drawer-close {
    width: 44px;
    height: 44px;
  }
}

/* Phone: table rows stack as blocks; the header row stays for assistive tech only. */
@media (max-width: 600px) {
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }
  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .data-table tbody tr {
    border-bottom: 1px solid var(--line-2);
    padding: 0.4rem 0;
  }
  .data-table tbody td {
    border-bottom: none;
    padding: 0.25rem 0.9rem;
    text-align: left;
  }
  .data-table tbody td:empty {
    display: none;
  }
  .data-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--fs-2xs);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-faint);
  }
}

/* Controls section list and signature groups */
.ctl-nav {
  position: sticky;
  top: -1.5rem; /* cancels the scroller's top padding so the list pins to the edge */
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: -1.5rem -1.75rem 1.5rem;
  padding: 0.65rem 1.75rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  max-height: 6.5rem;
  overflow-y: auto;
}
.ctl-nav-link {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  padding: 0.3rem 0.1rem;
  text-decoration: none;
}
.ctl-nav-link:hover {
  color: var(--text);
  text-decoration: underline;
}
.ctl-nav-link[aria-current="location"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--red);
}

/* Controls groups: Protection, then the Advanced tuning disclosure */
.ctl-group + .ctl-group {
  margin-top: 2rem;
}
.ctl-group > .panel + .panel {
  margin-top: 1.5rem;
}
.ctl-group-title {
  margin: 0 0 0.9rem;
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.ctl-advanced[open] {
  padding-bottom: 40vh; /* lets the last, short panel scroll up to the section list when its link is clicked */
}
.ctl-advanced > summary {
  min-height: 44px;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.ctl-group-hint {
  margin-left: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
}
.ctl-warn {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--uncertain);
  border-radius: var(--r-sm);
  background: var(--uncertain-wash);
  color: var(--uncertain);
  font-size: var(--fs-sm);
}
.ctl-hint {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  white-space: nowrap;
}
.ctl-panel [id] {
  scroll-margin-top: 4rem;
}
.sig-group-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding-bottom: 0.4rem;
}
.sig-group-title {
  margin: 0;
  font-size: var(--fs-md);
}
.sig-group-count {
  flex: 1 1 auto;
  white-space: nowrap;
  font-size: var(--fs-sm);
  color: var(--text-dim);
}
.sig-group-btn {
  white-space: nowrap;
}

/* Scout Chats: per-action count chips */
.chip-action {
  margin-right: 4px;
  white-space: nowrap;
}
.chip-action-challenged,
.chip-action-diverted,
.chip-action-denied {
  color: var(--bot);
  border-color: var(--bot-wash);
  background: var(--bot-wash);
}
.filter-row.filter-row-wrap {
  flex-wrap: wrap;
  max-width: 100%;
}

/* A preset row borrows the switch row layout but is not itself clickable. */
.preset-row {
  cursor: default;
}
