/*
 * Bountyoski visual system
 * Charcoal operations desk, ivory typography and restrained gold controls.
 * Loaded after app.css so the functional layout remains owned by the app.
 */

:root {
  --bg: #070707;
  --bg2: #0a0a09;
  --panel: #11100e;
  --raised: #191714;
  --soft: #0d0c0b;
  --hover: #211e18;
  --border: #302b22;
  --border2: #554a34;
  --text: #f4f0e6;
  --secondary: #c7bead;
  --muted: #82796a;
  --mint: #e8ad3d;
  --mint-ink: #160f04;
  --blue: #f5d889;
  --amber: #e8ad3d;
  --red: #e05b55;
  --violet: #c7a667;
  --success: #63b88a;
  --gold: #e8ad3d;
  --gold-soft: #f5d889;
  --gold-dim: #8f6b2d;
  --ivory: #f4f0e6;
  --coal: #070707;
  --radius: 5px;
  --topbar: 70px;
  --sidebar: 260px;
  --sans: Inter, Geist, "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Arial Narrow", "Roboto Condensed", Inter, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

html,
body {
  background: var(--bg);
}

/* Author-level grid/flex rules must never override the semantic hidden state. */
[hidden] {
  display: none !important;
}

body {
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: 0;
}

::selection {
  color: var(--ivory);
  background: rgba(232, 173, 61, 0.3);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

::-webkit-scrollbar-thumb {
  border-color: transparent;
  background: #4b402e;
  background-clip: padding-box;
}

.skip-link {
  color: #171004;
  background: var(--gold-soft);
}

/* Shell and global context */
.topbar {
  border-bottom: 1px solid #3b3224;
  background: rgba(7, 7, 7, 0.97);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.brand {
  gap: 12px;
}

.brand-mark,
.login-mark {
  overflow: hidden;
  border-color: rgba(232, 173, 61, 0.72);
  border-radius: 5px;
  background: #080807;
  box-shadow: inset 0 0 0 1px rgba(245, 216, 137, 0.05), 0 0 24px rgba(232, 173, 61, 0.1);
}

.brand strong {
  color: var(--ivory);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand small {
  color: #8f8067;
  font: 700 7px var(--mono);
  letter-spacing: 0.16em;
}

.command,
.top-program,
.context-switcher select,
.form-panel input,
.form-panel textarea,
.form-panel select,
.login-dialog input,
.terminal-input input,
.search-field,
.search-field input,
.http-toolbar select,
.inbox-toolbar select,
.browser-launcher select,
.objective-dialog input,
.objective-dialog textarea,
.objective-dialog select,
.tool-toolbar select,
.inbox-status-select {
  color: var(--secondary);
  border-color: #332e25;
  border-radius: 4px;
  background: #0b0b0a;
}

.command:hover,
.command:focus-within,
.top-program:hover,
.context-switcher select:hover,
input:hover,
textarea:hover,
select:hover {
  border-color: #69583a;
}

input:focus,
textarea:focus,
select:focus,
.form-panel input:focus,
.form-panel textarea:focus,
.form-panel select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 173, 61, 0.09);
  outline: 0;
}

.command .app-icon,
.top-context > span,
#top-context-label {
  color: var(--gold-dim);
}

.command b {
  color: #ddd5c6;
}

.command small,
.command kbd {
  color: #7f7566;
}

.command kbd {
  border-color: #3e372b;
  background: #12110f;
}

.top-context {
  color: #8e826d;
}

.context-picker-trigger {
  display: grid;
  min-width: 0;
  width: 100%;
  min-height: 36px;
  grid-template-columns: minmax(0, 1fr) 14px;
  gap: 9px;
  align-items: center;
  padding: 6px 9px 6px 10px;
  color: #d5cdbd;
  text-align: left;
  border: 1px solid #3c3428;
  border-radius: 4px;
  background: #0c0b0a;
}

.context-picker-trigger:hover,
.context-picker-trigger:focus-visible,
.context-picker-trigger[aria-expanded="true"] {
  color: #fff2d6;
  border-color: #806538;
  background: #15110b;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(232, 173, 61, 0.08);
}

.context-picker-trigger:focus,
.context-picker-trigger:focus-visible {
  border-color: #f2bd55;
  outline: 2px solid #f2bd55;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(232, 173, 61, 0.16);
}

.context-picker-trigger > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.context-picker-trigger b,
.context-picker-trigger small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-picker-trigger b {
  color: inherit;
  font: 700 9px var(--mono);
}

.context-picker-trigger small {
  color: #746a5b;
  font: 7px var(--mono);
}

.context-picker-trigger .app-icon {
  width: 13px;
  height: 13px;
  color: #8d7448;
  transition: transform 0.16s ease;
}

.context-picker-trigger[aria-expanded="true"] .app-icon {
  transform: rotate(90deg);
}

.global-context .context-picker-trigger {
  color: #e0d6c4;
  border-color: #5a482d;
  background: #100e0b;
}

.health-pill {
  color: #bcb3a3;
  border-color: #343027;
  border-radius: 4px;
  background: #0c0c0b;
}

.health-pill[data-state="ok"] i,
.live-label i,
.terminal-dot.green {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(99, 184, 138, 0.08);
}

.avatar {
  color: var(--gold-soft);
  border-color: #5d4b2d;
  border-radius: 4px;
  background: #17130d;
}

/* Context dossier: searchable, bounded and readable even with huge wildcard scopes. */
.context-dialog {
  width: min(780px, calc(100% - 28px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  color: var(--text);
  border: 1px solid #5c492d;
  border-radius: 5px;
  background: #0b0a09;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.78);
}

.context-dialog::backdrop {
  background: rgba(2, 2, 2, 0.78);
  backdrop-filter: blur(5px);
}

.context-dialog > article {
  display: grid;
  grid-template-rows: auto auto auto minmax(120px, 1fr);
  max-height: min(760px, calc(100dvh - 32px));
}

.context-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 19px 15px;
  border-bottom: 1px solid #30291f;
  background: #100e0b;
}

.context-dialog header > div {
  min-width: 0;
}

.context-dialog h2 {
  margin-top: 3px;
  color: #fbf7ef;
  font: 800 20px var(--display);
  letter-spacing: -0.025em;
}

.context-dialog header p {
  max-width: 600px;
  margin-top: 5px;
  color: #8e8475;
  font-size: 9px;
  line-height: 1.55;
}

.context-search {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin: 13px 14px 8px;
  padding: 0 11px;
  border: 1px solid #57452c;
  border-radius: 4px;
  background: #070706;
}

.context-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 173, 61, 0.08);
}

.context-search .app-icon {
  width: 16px;
  height: 16px;
  color: #a7854d;
}

.context-search input {
  min-width: 0;
  height: 42px;
  padding: 0;
  color: #eee7dc;
  border: 0;
  background: transparent;
  font: 10px var(--mono);
  outline: 0;
  box-shadow: none;
}

.context-dialog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 8px;
  color: #a99e8d;
  font: 10px var(--mono);
}

.context-dialog-meta b {
  color: var(--gold-soft);
}

.context-option-list {
  min-height: 0;
  padding: 4px 8px 10px;
  overflow: auto;
  overscroll-behavior: contain;
}

.context-option {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  color: #bdb3a3;
  cursor: pointer;
  text-align: left;
  border: 1px solid transparent;
  border-bottom-color: #29241d;
  background: transparent;
}

.context-option[hidden] {
  display: none;
}

.context-option:hover,
.context-option:focus-visible {
  color: #fff4df;
  border-color: #59472e;
  background: #15120e;
  outline: 0;
}

.context-option.active {
  color: #fff6e5;
  border-color: #755b31;
  background: linear-gradient(90deg, rgba(232, 173, 61, 0.13), #13100c 58%);
  box-shadow: inset 3px 0 var(--gold);
}

.context-option-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #b38b49;
  border: 1px solid #554329;
  border-radius: 3px;
  background: #0c0a07;
}

.context-option-icon .app-icon {
  width: 15px;
  height: 15px;
}

.context-option-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.context-option-copy strong,
.context-option-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-option-copy strong {
  color: inherit;
  font-size: 10px;
}

.context-option-copy small {
  color: #a89d8c;
  font: 10px var(--mono);
}

.context-option-state {
  padding: 4px 6px;
  color: #b99353;
  border: 1px solid #4e3e28;
  border-radius: 3px;
  font: 700 7px var(--mono);
}

.context-option-empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 22px;
  color: #756b5d;
  text-align: center;
}

.context-option-empty[hidden] {
  display: none;
}

.context-option-empty .app-icon {
  width: 22px;
  height: 22px;
  color: #a27c40;
}

.context-option-empty strong {
  color: #c9beae;
  font-size: 10px;
}

.context-option-empty span {
  font-size: 9px;
}

/* Navigation: the gold rail is the persistent orientation device. */
.sidebar {
  position: relative;
  border-right: 1px solid #332d23;
  background: #090909;
}

.sidebar::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -1px;
  width: 1px;
  height: 108px;
  background: linear-gradient(var(--gold), rgba(232, 173, 61, 0));
  content: "";
  pointer-events: none;
}

.sidebar nav {
  padding: 16px 11px 22px;
}

.nav-section + .nav-section {
  border-top-color: #27231d;
}

.nav-heading {
  color: #75674f;
  font: 750 8px var(--mono);
  letter-spacing: 0.18em;
}

.nav-item {
  min-height: 40px;
  color: #aaa193;
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
}

.nav-item b,
.nav-item em,
.count-badge {
  color: #766d5e;
}

.nav-item em,
.count-badge {
  border-color: #383228;
  border-radius: 3px;
  background: #0d0d0c;
}

.nav-item:hover {
  color: #f0eadf;
  border-color: #383126;
  background: #171510;
}

.nav-item:hover b {
  color: #d3bd8b;
}

.nav-item.active {
  color: #fffaf0;
  border-color: #5a482a;
  background: linear-gradient(90deg, rgba(232, 173, 61, 0.15), rgba(232, 173, 61, 0.025));
  box-shadow: inset 3px 0 var(--gold);
}

.nav-item.active b,
.nav-item.active em {
  color: var(--gold-soft);
}

.nav-highlight em {
  color: #f1b0ab;
  border-color: rgba(224, 91, 85, 0.35);
  background: rgba(224, 91, 85, 0.07);
}

.sidebar-footer {
  border-top-color: #2b261e;
  background: #080808;
}

.safety-card {
  border-color: rgba(232, 173, 61, 0.28);
  border-radius: 4px;
  background: rgba(232, 173, 61, 0.045);
}

.safety-icon {
  color: var(--gold-soft);
  border-color: rgba(232, 173, 61, 0.4);
  background: rgba(232, 173, 61, 0.07);
}

.safety-card strong {
  color: #e7dcc7;
}

.safety-card small,
.collapse-button {
  color: #837866;
}

/* Main workspace */
.main {
  background: var(--bg);
}

.context-switcher {
  position: relative;
  overflow: hidden;
  border-color: #453a29;
  border-radius: 4px;
  background: #100f0d;
}

.context-switcher::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold);
  content: "";
}

.context-switcher .context-icon {
  color: var(--gold-soft);
  border-color: #5e4b2d;
  border-radius: 3px;
  background: #17130d;
}

.context-switcher label b {
  color: #ede6d8;
}

.context-switcher label small {
  color: #8d8373;
}

.context-switcher .context-picker-trigger {
  width: min(360px, 38vw);
}

.page-header {
  align-items: flex-end;
  border-bottom-color: #332d23;
}

.page-header h1 {
  color: #fbf7ef;
  font-family: var(--display);
  font-size: clamp(27px, 2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.page-header p {
  color: #aaa192;
}

.eyebrow {
  color: var(--gold);
  font: 750 8px var(--mono);
  letter-spacing: 0.19em;
}

.security-note {
  color: #e5d2a9;
  border-color: rgba(232, 173, 61, 0.3);
  border-radius: 3px;
  background: rgba(232, 173, 61, 0.055);
}

.security-note.danger {
  color: #f1b7b2;
  border-color: rgba(224, 91, 85, 0.34);
  background: rgba(224, 91, 85, 0.06);
}

/* Controls */
.button {
  min-height: 36px;
  color: #d4ccbd;
  border-color: #393229;
  border-radius: 4px;
  background: #171512;
  box-shadow: none;
}

.button:hover:not(:disabled) {
  color: #fffaf0;
  border-color: #6f5933;
  background: #211d16;
}

.button.primary {
  color: #171004;
  border-color: #f0bd58;
  background: var(--gold);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22);
}

.button.primary:hover:not(:disabled) {
  color: #110b02;
  border-color: var(--gold-soft);
  background: #f2bf5b;
}

.button.ghost {
  background: #0d0d0c;
}

.button.danger {
  color: #efb4b0;
  border-color: rgba(224, 91, 85, 0.38);
  background: rgba(224, 91, 85, 0.035);
}

.button:disabled,
.icon-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.icon-button {
  color: #b7ad9d;
  border-color: #373128;
  border-radius: 4px;
  background: #12110f;
}

.icon-button:hover {
  color: var(--gold-soft);
  border-color: #685536;
  background: #1b1813;
}

.text-button {
  color: var(--gold-soft);
}

.text-button:hover {
  color: #fff0c9;
}

.segmented,
.filter-pills {
  border: 1px solid #2f2a22;
  border-radius: 4px;
  background: #0a0a09;
}

.segmented button,
.filter-pills button,
.severity-filters button {
  color: #887f71;
  border-radius: 3px;
}

.segmented button:hover,
.filter-pills button:hover,
.segmented button.active,
.filter-pills button.active {
  color: #fff6e3;
  background: #2a2113;
  box-shadow: inset 0 0 0 1px #72572d;
}

/* Panels and dashboard */
.panel {
  border-color: #302a21;
  border-radius: 5px;
  background: #11100e;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.018);
}

.panel-heading {
  border-bottom-color: #302a21;
  background: #12110f;
}

.panel-heading h2 {
  color: #eee7da;
}

.panel-title-icon > span,
.mini-icon,
.resource-icon,
.coverage-card .resource-icon,
.tool-guide > span,
.inbox-guide > span,
.ai-account-guide > span {
  color: var(--gold-soft);
  border-color: #544329;
  border-radius: 4px;
  background: #17130d;
}

.metric-grid {
  gap: 10px;
}

.operations-route {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 28px minmax(170px, 1fr) 28px minmax(170px, 1fr) 28px minmax(170px, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 9px;
  border: 1px solid #332d23;
  border-radius: 5px;
  background: #0d0c0b;
}

.operations-route button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  color: #c8bead;
  cursor: pointer;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
}

.operations-route button:hover {
  color: #fff2d6;
  border-color: #59482f;
  background: #17140f;
}

.operations-route button > b {
  color: var(--gold);
  font: 800 9px var(--mono);
}

.operations-route button > span {
  display: grid;
  gap: 2px;
}

.operations-route strong {
  font-size: 10px;
}

.operations-route small {
  color: #807667;
  font-size: 8px;
}

.operations-route > i {
  height: 1px;
  background: #514126;
}

.metric {
  overflow: hidden;
  border-color: #332d23;
  border-radius: 5px;
  background: #11100e;
}

.metric::after {
  height: 2px;
  background: var(--gold-dim);
  opacity: 0.8;
}

.metric:nth-child(2)::after {
  background: #c89338;
}

.metric:nth-child(3)::after {
  background: #f0c56e;
}

.metric:nth-child(4)::after {
  background: #846b40;
}

.metric-icon,
.metric-icon.mint,
.metric-icon.blue,
.metric-icon.amber,
.metric-icon.violet {
  color: var(--gold-soft);
  border-color: #4c3d27;
  border-radius: 4px;
  background: #17130d;
}

.metric small {
  color: #afa697;
}

.metric strong {
  color: #fffaf0;
  font-family: var(--mono);
}

.metric em {
  color: #786f61;
}

.health-list > div,
.timeline-item {
  border-bottom-color: #2b271f;
}

.health-list span {
  color: #d1c8b8;
}

.timeline-item::before {
  border-radius: 1px;
  background: var(--gold);
}

.timeline-item time,
.timeline-item code {
  color: #817766;
}

.empty-state > span {
  color: #aa8b50;
  border-color: #463923;
  border-radius: 4px;
  background: #0d0c0a;
}

.empty-state strong {
  color: #d7cebf;
}

.empty-state p,
.empty-row {
  color: #7f7667 !important;
}

/* Forms, scope intake and drop zones */
.form-panel label,
.login-dialog label,
.objective-dialog label,
.field-label {
  color: #beb5a5;
}

.scope-input-intro,
.form-hint,
.selected-file,
.policy-preview,
.mission-scope-lock,
.ai-login-security {
  color: #9e9484;
  border-color: #3a3226;
  border-radius: 4px;
  background: #0d0c0a;
}

.scope-input-intro strong,
.scope-input-block strong,
.mission-scope-lock strong,
.ai-login-security strong {
  color: #e4dccd;
}

.mission-scope-lock .app-icon,
.ai-login-security .app-icon {
  color: var(--gold-soft);
}

.mission-preset-preview {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  color: #9d927f;
  border: 1px solid #3b3226;
  border-left: 2px solid var(--gold-dim);
  border-radius: 3px;
  background: #0d0c0a;
}

.mission-preset-preview strong {
  color: #dfd5c4;
  font: 700 9px var(--mono);
}

.mission-preset-preview span {
  font: 8px/1.55 var(--mono);
}

.scope-input-block {
  border-color: #332d23;
  border-radius: 4px;
  background: #0d0c0a;
}

.scope-input-block > span > b {
  color: #1b1204;
  border-radius: 3px;
  background: var(--gold);
}

.drop-zone {
  color: #9b907e;
  border-color: #5b482a !important;
  border-radius: 4px !important;
  background: #0b0a09 !important;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--gold) !important;
  background: rgba(232, 173, 61, 0.045) !important;
}

.drop-zone > span {
  color: var(--gold-soft);
  border-color: #594628;
  border-radius: 4px;
  background: #17130d;
}

/* Reusable resource and scope cards */
.resource-card,
.scope-card,
.child-card,
.objective-card,
.coverage-card,
.skill-card,
.tool-card,
.ai-account-card,
.poc-video-card,
.global-search-result {
  border-color: #312b22;
  border-radius: 4px;
  background: #11100e;
}

.resource-card:hover,
.scope-card:hover,
.child-card:hover,
.objective-card:hover,
.coverage-card:hover,
.skill-card:hover,
.tool-card:hover,
.ai-account-card:hover,
.global-search-result:hover {
  border-color: #594a31;
  background: #171510;
}

.resource-card strong,
.scope-card strong,
.child-card strong,
.objective-card strong,
.coverage-card strong,
.skill-card strong,
.tool-card strong,
.ai-account-card strong {
  color: #e6ded0;
}

.ai-provider-mark {
  color: var(--gold-soft);
  border-color: #5b482b;
  border-radius: 4px;
  background: #17130d;
}

.ai-account-card header small,
.ai-account-card p {
  color: #8c8272;
}

.ai-account-card footer {
  border-top-color: #3a3023;
}

.ai-account-card.active {
  border-color: #72582f;
  box-shadow: inset 3px 0 var(--gold);
}

.resource-card small,
.scope-card small,
.child-card p,
.objective-card p,
.coverage-card small,
.skill-card p,
.tool-card p,
.ai-account-card p {
  color: #8d8374;
}

.tool-card > small,
.tool-card > small b,
.tool-card code {
  color: #8f8370;
}

.resource-actions button,
.environment-actions button,
.objective-actions button,
.scope-utility-actions button,
.poc-record-actions button {
  color: #b8ae9e;
  border-color: #3b342a;
  border-radius: 3px;
  background: #15130f;
}

.resource-actions button:hover,
.environment-actions button:hover,
.objective-actions button:hover,
.scope-utility-actions button:hover {
  color: #fff5df;
  border-color: #6b5633;
  background: #211c14;
}

.resource-actions .primary-action {
  color: var(--gold-soft);
  border-color: #6b522b;
  background: rgba(232, 173, 61, 0.07);
}

.tags span,
.scope-source-tags span {
  color: #bda874;
  border-color: #4a3d28;
  border-radius: 3px;
  background: #17130d;
}

/* Program ledger: the page is an inventory first, an editor second. */
.program-inventory-panel {
  overflow: visible;
}

.program-inventory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 17px 18px 15px;
  border-bottom: 1px solid #302a21;
  background: #12110f;
}

.program-inventory-heading h2 {
  margin-top: 3px;
  color: #f1eade;
  font-size: 16px;
}

.program-inventory-heading p {
  max-width: 760px;
  margin-top: 4px;
  color: #8e8577;
  font-size: 10px;
}

.program-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #302a21;
  background: #0d0c0b;
}

.program-search {
  min-width: 0;
  width: 100%;
}

.program-status-filters {
  display: flex;
  align-items: center;
  gap: 4px;
}

.program-status-filters button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  color: #8f8576;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  font: 700 8px var(--mono);
  text-transform: uppercase;
}

.program-status-filters button b {
  display: inline-grid;
  min-width: 19px;
  min-height: 18px;
  place-items: center;
  color: #a99d8a;
  border: 1px solid #3b3429;
  border-radius: 3px;
  background: #090908;
  font-size: 8px;
}

.program-status-filters button:hover,
.program-status-filters button.active {
  color: #fff4dc;
  border-color: #654f2d;
  background: #221a0f;
}

.program-status-filters button.active b {
  color: #211604;
  border-color: var(--gold);
  background: var(--gold);
}

.program-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 17px;
  color: #776f63;
  border-bottom: 1px solid #28231d;
  background: #0a0908;
  font: 8px var(--mono);
}

#program-context-note {
  min-width: 0;
  color: #b99555;
}

#program-context-note .app-icon {
  flex: 0 0 auto;
}

.program-list-meta b {
  color: var(--gold-soft);
}

.program-list-meta span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.program-list-meta .app-icon {
  width: 12px;
  color: var(--gold-dim);
}

.program-ledger {
  padding: 0;
}

.program-ledger-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  gap: 14px;
  align-items: center;
  min-height: 126px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #302a21;
  border-radius: 0;
  background: #100f0d;
}

.program-ledger-row:last-child {
  border-bottom: 0;
}

.program-ledger-row[hidden] {
  display: none !important;
}

.program-ledger-row:hover {
  border-color: #4b3d28;
  background: #15120e;
}

.program-ledger-row[data-pinned="true"]::before {
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: 0;
  width: 3px;
  background: var(--gold);
  content: "";
}

.program-ledger-row > .resource-icon {
  width: 38px;
  height: 38px;
  margin: 0;
  color: var(--gold-soft);
  border-color: #5b482b;
  background: #17130d;
}

.program-card-main {
  min-width: 0;
}

.program-card-main > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.program-card-main > header > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.program-card-main > header strong {
  overflow: hidden;
  color: #f1eadf;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-card-main > header code {
  color: #a29684;
  font: 7px var(--mono);
}

.program-warning {
  color: #d9b36a;
  white-space: nowrap;
  font: 7px var(--mono);
}

.program-warning.reviewed {
  color: #7f947f;
}

.program-card-main .scope-source-tags {
  margin-top: 7px;
}

.program-policy-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.55fr) minmax(180px, 1fr) 82px;
  gap: 8px;
  margin-top: 9px;
}

.program-policy-grid > span {
  min-width: 0;
  padding: 7px 9px;
  border-left: 1px solid #403523;
  background: #0b0a09;
}

.program-policy-grid b,
.program-policy-grid em {
  display: block;
}

.program-policy-grid b {
  margin-bottom: 2px;
  color: #9b7b42;
  font: 700 7px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.program-policy-grid em {
  overflow: hidden;
  color: #a79e90;
  font: normal 8px/1.45 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-policy-open {
  display: none;
  min-height: 30px;
  margin-top: 6px;
  padding: 0 8px;
  color: var(--gold-soft);
  border: 1px solid #57462e;
  border-radius: 3px;
  background: #14110c;
  font: 700 8px var(--mono);
}

.scope-card .program-card-actions {
  position: relative;
  display: flex;
  grid-column: auto;
  min-width: 174px;
  max-width: none;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 0;
}

.program-card-actions .program-primary-action {
  min-height: 34px;
  padding: 0 11px;
  color: #171004;
  border-color: #e8ad3d;
  background: var(--gold);
  font-weight: 800;
}

.program-card-actions .program-primary-action:hover {
  color: #0f0901;
  background: var(--gold-soft);
}

.program-card-actions .program-primary-action.muted {
  color: #b7ad9e;
  border-color: #3c352b;
  background: #15130f;
}

.program-card-actions .program-edit-action {
  min-height: 34px;
  padding: 0 10px;
  color: #d6c8b0;
  border-color: #55462f;
  background: #17140f;
  font-weight: 700;
}

.program-card-actions .program-edit-action:hover {
  color: #fff2d2;
  border-color: #8a6937;
  background: #251d12;
}

.program-more {
  position: relative;
}

.program-more > summary {
  display: inline-grid;
  min-width: 48px;
  min-height: 34px;
  place-items: center;
  color: #b8ad9c;
  cursor: pointer;
  list-style: none;
  border: 1px solid #3c352a;
  border-radius: 3px;
  background: #14120f;
  font: 700 8px var(--mono);
  text-transform: uppercase;
}

.program-more > summary::-webkit-details-marker {
  display: none;
}

.program-more[open] > summary {
  color: #fff0cc;
  border-color: #765b31;
  background: #251c10;
}

.program-more > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 230px;
  padding: 6px;
  border: 1px solid #5b482d;
  border-radius: 4px;
  background: #15120e;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65);
}

.program-more > div button {
  min-height: 32px;
  padding: 0 9px;
  color: #c3b9a9;
  text-align: left;
  border: 0;
  border-radius: 2px;
  background: transparent;
  font: 8px var(--mono);
}

.program-more > div button:hover {
  color: #fff3d5;
  background: #2b2113;
}

.program-more > div .danger-action {
  color: #df9a95;
}

.program-filter-empty {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: #8e8373;
  border-top: 1px solid #302a21;
  background: #0d0c0b;
}

.program-filter-empty[hidden] {
  display: none;
}

.program-filter-empty .app-icon {
  width: 24px;
  height: 24px;
  color: var(--gold-dim);
}

.program-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px;
  border-top: 1px solid #302a21;
  background: #0d0c0b;
}

.program-load-more[hidden] {
  display: none;
}

.program-load-more small {
  color: #817665;
  font: 8px var(--mono);
}

.program-dialog {
  width: min(720px, calc(100% - 30px));
  max-height: calc(100dvh - 34px);
}

.scope-archive-dialog {
  width: min(540px, calc(100vw - 32px));
  max-width: none;
}

.scope-archive-dialog > form {
  display: grid;
  gap: 16px;
}

.scope-archive-dialog .archive-warning {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  color: #e3b2aa;
  border: 1px solid #65403b;
  border-radius: 4px;
  background: #1b100f;
}

.scope-archive-dialog .archive-warning .app-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.scope-archive-dialog .archive-warning span,
.scope-archive-dialog .archive-warning strong,
.scope-archive-dialog .archive-warning small {
  display: block;
}

.scope-archive-dialog .archive-warning small,
.scope-archive-dialog > form > p {
  margin-top: 4px;
  color: #a49584;
  font: 9px/1.55 var(--mono);
}

.program-dialog form {
  display: grid;
  gap: 15px;
}

.program-dialog label {
  display: grid;
  gap: 7px;
}

.program-dialog label > span,
.program-optional-inputs > div > strong {
  color: #d7cebe;
  font-size: 10px;
  font-weight: 700;
}

.program-dialog label > span b {
  margin-left: 5px;
  color: var(--gold);
  font: 7px var(--mono);
}

.program-dialog label > small,
.program-prompt-field > small {
  color: #827868;
  font: 8px/1.5 var(--mono);
}

.program-prompt-field textarea {
  min-height: 190px;
  font: 10px/1.6 var(--mono);
}

.program-optional-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 13px;
  border: 1px solid #382f23;
  border-radius: 4px;
  background: #0d0c0a;
}

.program-optional-inputs > div {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid #332b20;
}

.program-dialog .scope-binary-drop {
  align-content: start;
  cursor: pointer;
}

.program-dialog .scope-binary-drop > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.program-dialog .scope-binary-drop > span > .app-icon {
  width: 18px;
  color: var(--gold-soft);
}

.program-dialog .scope-binary-drop > span > span {
  display: grid;
}

.program-dialog .scope-binary-drop em {
  display: grid;
  min-height: 39px;
  place-items: center;
  color: #b4a894;
  border: 1px dashed #5b482b;
  border-radius: 3px;
  background: #090807;
  font: normal 8px var(--mono);
}

/* Tables and protocol data */
.table-panel,
.inbox-shell {
  border-color: #312b22;
  border-radius: 5px;
  background: #0f0e0d;
}

.table-toolbar,
.inbox-toolbar,
.tool-toolbar {
  border-bottom-color: #312b22;
  background: #11100e;
}

th {
  color: #857861;
  border-bottom-color: #332d23;
  background: #0d0c0b;
}

td {
  color: #bdb4a4;
  border-bottom-color: #29251e;
}

tbody tr:hover td {
  background: rgba(232, 173, 61, 0.025);
}

.method {
  color: var(--gold-soft);
  border-color: #584627;
  background: #17130d;
}

.table-context,
.classification-label,
.finding-facts b {
  color: #8c7e65;
}

/* Resource pages use one consistent intro and keep secondary controls out of the way. */
.resource-guide {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 173, 61, 0.28);
  border-radius: 4px;
  background: #11100e;
}

.resource-guide > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--gold-soft);
  border: 1px solid #544329;
  border-radius: 4px;
  background: #17130d;
}

.resource-guide > span .app-icon {
  width: 18px;
}

.resource-guide strong {
  color: #e3dacb;
  font-size: 10px;
}

.resource-guide p {
  margin-top: 3px;
  color: #918777;
  font-size: 9px;
  line-height: 1.55;
}

.resource-catalog-panel {
  overflow: hidden;
}

.default-skills-panel {
  overflow: hidden;
}

.default-skills-panel > summary {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 17px;
  cursor: pointer;
  list-style: none;
  background: #12110f;
}

.default-skills-panel > summary::-webkit-details-marker {
  display: none;
}

.default-skills-panel > summary h2 {
  margin-top: 3px;
  color: #eee6d9;
  font-size: 14px;
}

.default-skills-panel > summary p {
  margin-top: 3px;
  color: #887e6f;
  font-size: 9px;
}

.default-skills-panel > summary > span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-soft);
  font: 700 8px var(--mono);
  text-transform: uppercase;
}

.default-skills-panel > summary i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #5c492c;
  border-radius: 3px;
  background: #17130d;
  font: normal 16px var(--sans);
}

.default-skills-panel[open] > summary {
  border-bottom: 1px solid #302a21;
}

.default-skills-panel[open] > summary i {
  transform: rotate(45deg);
}

/* Preset library: doctrine first, custom publishing second. */
.preset-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.preset-summary-strip article {
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #332d23;
  border-radius: 4px;
  background: #11100e;
}

.preset-summary-strip strong {
  display: block;
  color: var(--gold-soft);
  font: 700 20px var(--mono);
}

.preset-summary-strip span {
  display: block;
  margin-top: 4px;
  color: #8f8575;
  font: 700 8px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.preset-layout {
  grid-template-columns: minmax(300px, 0.62fr) minmax(0, 1.7fr);
}

.preset-library-panel {
  min-width: 0;
  overflow: hidden;
}

.preset-library-panel .panel-heading select {
  width: min(330px, 46%);
}

.preset-launch-controls {
  display: flex;
  width: min(540px, 62%);
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.preset-launch-controls select {
  flex: 1 1 260px;
  min-width: 0;
  min-height: 36px;
  padding: 0 32px 0 10px;
  color: #d7cebf;
  border: 1px solid #4a3d2b;
  border-radius: 4px;
  background: #0b0a09;
  font: 9px var(--mono);
}

.preset-toolbar select {
  width: 100%;
  min-height: 36px;
  padding: 0 32px 0 10px;
  color: #d7cebf;
  border: 1px solid #4a3d2b;
  border-radius: 4px;
  background: #0b0a09;
  font: 9px var(--mono);
}

.preset-launch-controls .button {
  flex: 0 0 auto;
}

.preset-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 230px) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #302a21;
  background: #0d0c0a;
}

.preset-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 760px;
  padding: 10px;
  overflow: auto;
}

.preset-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #332d23;
  border-radius: 4px;
  background: #11100e;
}

.preset-card[hidden] {
  display: none !important;
}

.preset-card > header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
}

.preset-card > header .resource-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--gold-soft);
  border: 1px solid #524128;
  border-radius: 3px;
  background: #17130d;
}

.preset-card > header small,
.preset-card > header code {
  display: block;
  color: #7e7465;
  font: 7px/1.4 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.preset-card > header strong {
  display: block;
  margin: 2px 0 3px;
  overflow: hidden;
  color: #e8dfd1;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-card > p {
  display: -webkit-box;
  min-height: 42px;
  margin: 11px 0;
  overflow: hidden;
  color: #968c7c;
  font-size: 9px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.preset-stage-tags,
.preset-rule-tags,
.preset-card-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.preset-stage-tags span,
.preset-rule-tags span,
.preset-card-meta span {
  padding: 4px 6px;
  color: #bca475;
  border: 1px solid #3e3426;
  border-radius: 3px;
  background: #0d0c0a;
  font: 7px var(--mono);
}

.preset-card-meta {
  margin-top: 8px;
}

.preset-card-meta span {
  color: #847a6b;
}

.preset-details {
  margin-top: 9px;
  border-top: 1px solid #2f2921;
}

.preset-details > summary {
  padding: 9px 0 2px;
  color: #b99a5c;
  cursor: pointer;
  font: 700 8px var(--mono);
  list-style-position: inside;
}

.preset-details > div {
  padding: 8px 0 3px;
}

.preset-details strong {
  display: block;
  margin: 8px 0 6px;
  color: #b9af9f;
  font: 700 8px var(--mono);
  text-transform: uppercase;
}

.preset-details p {
  color: #817767;
  font: 8px/1.6 var(--mono);
  overflow-wrap: anywhere;
}

.preset-card > footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.preset-card > footer:empty {
  display: none;
}

.preset-card > footer button {
  min-height: 28px;
  padding: 0 8px;
  color: #a79c8b;
  border: 1px solid #3c3429;
  border-radius: 3px;
  background: transparent;
  font: 700 7px var(--mono);
  text-transform: uppercase;
}

/* HTTP ledger: common filters first, investigation filters in a drawer. */
.protocol-ledger {
  overflow: hidden;
}

.http-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  padding: 0;
  border-bottom: 1px solid #312b22;
  background: #11100e;
}

.http-primary-filters {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(180px, 240px) minmax(180px, 240px) auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
}

.http-primary-filters .search-field {
  width: 100%;
  min-width: 0;
}

.http-primary-filters select,
.http-advanced-filters select {
  width: 100%;
  height: 36px;
  padding: 0 9px;
  color: #bdb3a3;
  border: 1px solid #3b3429;
  border-radius: 4px;
  background: #0b0a09;
  font: 8px var(--mono);
}

.http-advanced-filters {
  border-top: 1px solid #2d281f;
  background: #0c0b0a;
}

.http-advanced-filters > summary {
  display: grid;
  grid-template-columns: 18px auto 1fr;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  color: #baaE9d;
  cursor: pointer;
  list-style: none;
  font: 700 8px var(--mono);
  text-transform: uppercase;
}

.http-advanced-filters > summary::-webkit-details-marker {
  display: none;
}

.http-advanced-filters > summary .app-icon {
  width: 14px;
  color: var(--gold);
}

.http-advanced-filters > summary small {
  color: #756c5e;
  font: normal 8px var(--mono);
  text-align: right;
  text-transform: none;
}

.http-advanced-filters[open] > summary {
  color: #f2e7d5;
  background: #14110e;
}

.http-advanced-filters > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 8px;
  padding: 0 12px 12px;
}

/* Empty operational views explain the next useful action. */
.agent-workspace {
  min-height: 360px;
}

.agent-workspace > .operational-empty {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 340px;
}

.operational-empty > div {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* Isolated browser workspace. */
.browser-workspace {
  display: grid;
  grid-template-columns: minmax(440px, 1.15fr) minmax(340px, 0.85fr);
  gap: 12px;
}

.browser-workspace .browser-launcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 20px;
}

.browser-panel-heading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid #312b22;
}

.browser-panel-heading > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--gold-soft);
  border: 1px solid #554329;
  border-radius: 4px;
  background: #17130d;
}

.browser-panel-heading .app-icon {
  width: 20px;
}

.browser-panel-heading h2 {
  margin-top: 3px;
  color: #eee5d7;
  font-size: 15px;
}

.browser-panel-heading p,
.browser-launcher > p {
  margin-top: 4px;
  color: #8d8374;
  font-size: 9px;
}

.browser-workspace .browser-launcher label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #bdb3a3;
  font-size: 9px;
}

.browser-workspace .browser-launcher select {
  width: 100%;
  min-width: 0;
  height: 40px;
}

.browser-workspace .browser-launcher .button {
  min-height: 40px;
}

.browser-safety-panel {
  overflow: hidden;
}

.browser-steps {
  display: grid;
  margin: 0;
  padding: 8px 18px 14px;
  list-style: none;
}

.browser-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #2e2921;
}

.browser-steps li:last-child {
  border-bottom: 0;
}

.browser-steps li > b {
  color: #a98442;
  font: 800 10px var(--mono);
}

.browser-steps li > span {
  display: grid;
  gap: 3px;
}

.browser-steps strong {
  color: #dcd3c4;
  font-size: 10px;
}

.browser-steps small {
  color: #82796b;
  font-size: 9px;
}

/* Credential creation is a focused task, not a permanent sidebar. */
.credential-vault-panel {
  min-height: 360px;
  overflow: hidden;
}

.credential-access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.imap-relay-rail {
  display: grid;
  grid-template-columns: auto minmax(18px, 1fr) auto minmax(18px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0 14px 12px;
  padding: 9px 10px;
  border: 1px solid #3a3024;
  background: #0b0907;
  color: #a89982;
  font: 700 7px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.imap-relay-rail i {
  height: 1px;
  background: linear-gradient(90deg, #4a3a24, var(--gold));
  position: relative;
}

.imap-relay-rail i::after {
  position: absolute;
  top: -2px;
  right: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.credential-dialog {
  width: min(720px, calc(100% - 30px));
}

.credential-dialog form {
  display: grid;
  gap: 15px;
}

.credential-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.credential-form-grid label {
  display: grid;
  gap: 7px;
}

.credential-form-grid .credential-origins-field,
.credential-form-grid .credential-secret-field {
  grid-column: 1 / -1;
}

.credential-form-grid label > small {
  color: #83796a;
  font: 8px/1.5 var(--mono);
}

.imap-vault-panel .resource-card small {
  overflow-wrap: anywhere;
}

.captcha-vault-panel {
  grid-column: 1 / -1;
  min-height: 260px;
}

.captcha-boundary {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 14px 12px;
  padding: 10px;
  border-left: 2px solid var(--gold);
  background: #100d09;
}

.captcha-boundary > svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.captcha-boundary span { display: grid; gap: 3px; }
.captcha-boundary strong { color: #d9cdb9; font-size: 9px; }
.captcha-boundary small { color: #837765; font: 8px/1.5 var(--mono); }

.mission-mail-access {
  border-color: #514027;
  background: #0e0b07;
}

.mission-captcha-access select { width: 100%; }

/* Long catalogs stay usable without turning the whole application into one page. */
.tool-inventory-grid {
  max-height: min(760px, calc(100dvh - 300px));
  align-content: start;
  overflow: auto;
  scrollbar-gutter: stable;
}

.tool-inventory-grid::after {
  grid-column: 1 / -1;
  height: 1px;
  content: "";
}

.table-scroll:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.capture-open {
  display: block;
  width: 100%;
  height: 100%;
}

.capture-card img {
  object-position: top center;
}

.catalog-load-more {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  color: #9f927f;
  border-top: 1px solid #342d22;
  font: 9px var(--mono);
}

.catalog-load-more[hidden] {
  display: none;
}

input::placeholder,
textarea::placeholder {
  color: #918777;
  opacity: 1;
}

/* Searchable audit ledger. */
.audit-ledger {
  margin-top: 12px;
  overflow: hidden;
}

.audit-ledger-heading > div:last-child {
  display: flex;
  min-width: min(620px, 60%);
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.audit-ledger-heading .search-field {
  width: min(420px, 100%);
}

.audit-ledger .timeline-item[hidden],
.audit-ledger .scope-folder[hidden] {
  display: none !important;
}

/* Results inbox and Kanban */
.inbox-guide,
.coverage-guide,
.tool-guide,
.ai-account-guide {
  border-color: rgba(232, 173, 61, 0.28);
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(232, 173, 61, 0.07), #11100e 58%);
}

.inbox-guide p,
.coverage-guide p,
.tool-guide p,
.ai-account-guide p {
  color: #9d9383;
}

.inbox-summary article,
.coverage-summary-strip article,
.tool-summary article,
.ai-account-summary article,
.inspector-metrics article,
.ywh-metrics article {
  border-color: #342d22;
  border-radius: 4px;
  background: #11100e;
}

.inbox-summary strong,
.coverage-summary-strip strong,
.tool-summary strong,
.ai-account-summary strong,
.inspector-metrics strong,
.ywh-metrics strong {
  color: var(--gold-soft);
}

.inbox-summary span,
.coverage-summary-strip span,
.tool-summary span,
.ai-account-summary span {
  color: #d3c9b8;
}

.inbox-column {
  border-color: #332d23;
  border-radius: 4px;
  background: #0d0c0b;
}

.inbox-column > header {
  color: #c4baa9;
  border-bottom-color: #342e24;
  background: #15130f;
}

.inbox-item {
  border-color: #373027;
  border-radius: 4px;
  background: #13110f;
}

.inbox-item:hover {
  border-color: #5d4b30;
  background: #181510;
}

.mode-kanban .inbox-item {
  cursor: grab;
  touch-action: manipulation;
  transition: opacity 120ms ease, transform 120ms ease, border-color 120ms ease,
    background 120ms ease;
}

.mode-kanban .inbox-item:active {
  cursor: grabbing;
}

.mode-kanban .inbox-item.inbox-dragging {
  opacity: 0.42;
  transform: scale(0.985);
}

.mode-kanban .inbox-column.inbox-drop-target {
  border-color: var(--gold);
  background: rgba(232, 173, 61, 0.055);
  box-shadow: inset 0 0 0 1px rgba(232, 173, 61, 0.35);
}

.mode-kanban .inbox-column.inbox-drop-target > header {
  color: var(--gold-soft);
  background: #211a0f;
}

.mode-kanban .inbox-column.inbox-drop-target .inbox-column-items {
  min-height: 112px;
}

.inbox-item-content strong {
  color: #f1eadf;
}

.inbox-item-content small,
.context-breadcrumb {
  color: #a88a4d;
}

.inbox-item-content p,
.finding-facts code {
  color: #a99f90;
}

.inbox-filter-empty,
.run-filter-empty {
  color: #8c8273;
  border-color: #463a28;
  border-radius: 4px;
  background: #0d0c0a;
}

/* Orchestrator */
.run-failure-alert {
  border-color: rgba(224, 91, 85, 0.48);
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(224, 91, 85, 0.12), #11100e 65%);
}

.run-filter-bar {
  border-bottom-color: #312b22;
  background: #0d0c0b;
}

.run-filter-bar button {
  color: #847a6b;
  border-radius: 3px;
}

.run-filter-bar button:hover {
  color: #e5ddcf;
  border-color: #433827;
  background: #17140f;
}

.run-filter-bar button.active {
  color: #fff7e7;
  border-color: #70562e;
  background: #261e12;
}

.run-filter-bar button b {
  color: #9c907e;
  border-color: #3d3529;
  background: #0b0a09;
}

.run-filter-bar button.active b {
  color: #fff1cd;
  border-color: #7a5d2f;
  background: #171108;
}

.mission-summary-strip,
.objective-summary-strip,
.binary-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mission-summary-strip article,
.objective-summary-strip article,
.binary-summary-strip article {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border: 1px solid #342d22;
  border-radius: 4px;
  background: #11100e;
}

.mission-summary-strip strong,
.objective-summary-strip strong,
.binary-summary-strip strong {
  color: var(--gold-soft);
  font: 800 19px var(--mono);
}

.mission-summary-strip span,
.objective-summary-strip span,
.binary-summary-strip span {
  color: #a49a8a;
  font-size: 9px;
}

.run-card-failed {
  background: linear-gradient(90deg, rgba(224, 91, 85, 0.09), transparent 70%);
}

.run-program-context {
  display: block;
  margin-bottom: 4px;
  color: #b58b38;
  font: 800 7px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.run-card-failure-reason {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 8px 9px;
  color: #b9a69a;
  border: 1px solid rgba(224, 91, 85, .28);
  background: rgba(224, 91, 85, .045);
  font-size: 8px;
  line-height: 1.5;
}

.run-card-failure-reason b {
  color: #e16a61;
  font: 800 7px var(--mono);
  letter-spacing: .08em;
}

.run-card-recovery-reason {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 8px 9px;
  color: #c8bda9;
  border: 1px solid rgba(227, 173, 66, .32);
  background: rgba(227, 173, 66, .055);
  font-size: 8px;
  line-height: 1.5;
}

.run-card-recovery-reason b {
  color: var(--gold-soft);
  font: 800 7px var(--mono);
  letter-spacing: .08em;
}

.run-resume-action {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  color: #181107;
  border: 1px solid #d9a33e;
  border-radius: 3px;
  background: var(--gold);
  font: 800 7px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.run-resume-action:hover {
  border-color: #f2c76c;
  background: #efbb54;
}

.run-resume-action .app-icon {
  width: 12px;
  height: 12px;
}

.run-card-newly-launched {
  border-color: #b9872d !important;
  box-shadow: inset 3px 0 #e3ad42, 0 0 0 2px rgba(227, 173, 66, .08);
  animation: run-card-arrival 1.1s ease-out;
}

@keyframes run-card-arrival {
  from { transform: translateY(-5px); opacity: .25; }
  to { transform: translateY(0); opacity: 1; }
}

.run-card-archived {
  filter: grayscale(0.65);
}

.run-highlight h3 {
  color: #f0e8da;
}

.global-run-highlight {
  border-left-color: var(--gold);
}

.orchestrator-layout.empty-inventory {
  grid-template-columns: minmax(0, 1fr);
}

.orchestrator-layout.empty-inventory .run-list-panel {
  max-width: none;
}

.run-highlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.agent-tree,
.tree-panel {
  background: #0d0c0b;
}

.agent-node,
.scope-folder {
  border-color: #383126;
  border-radius: 4px;
  background: #12100e;
}

.agent-avatar,
.scope-folder-icon {
  color: var(--gold-soft);
  border-color: #544329;
  background: #17130d;
}

/* Terminals */
.terminal-workbench {
  border-color: #4a3b25;
  border-radius: 5px;
  background: #050505;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.terminal-sidebar,
.terminal-flux {
  background: #0d0c0a;
}

.terminal-sidebar-head,
.terminal-panel > header,
.terminal-flux > header {
  border-bottom-color: #3a3124;
  background: #0b0a09;
}

.terminal-sidebar-head strong,
.terminal-panel > header strong,
.terminal-flux > header strong {
  color: #e0d7c8;
}

.terminal-session {
  border-bottom-color: #2d281f;
}

.terminal-session:hover,
.terminal-session.active {
  background: rgba(232, 173, 61, 0.07);
  box-shadow: inset 3px 0 var(--gold);
}

.terminal-session strong {
  color: #dcd3c4;
}

.terminal-session small,
.terminal-meta,
.flux-item code,
.flux-item small {
  color: #807665;
}

.terminal-meta {
  border-bottom-color: #302a20;
  background: #080807;
}

.terminal-stage,
.terminal-xterm {
  background: #050505;
}

.terminal-xterm .xterm,
.terminal-xterm .xterm-screen,
.terminal-xterm .xterm-viewport {
  background-color: #050505 !important;
}

.terminal-empty-guide > span {
  color: var(--gold-soft);
  border-color: #554329;
  background: #15120d;
}

.terminal-workbench.empty-inventory .terminal-stage {
  min-height: 360px;
}

.terminal-prompt-bar {
  border-top-color: #3a3123;
  background: #0a0908;
}

.terminal-prompt-bar label {
  color: var(--gold-dim);
}

.terminal-prompt-bar input {
  color: #e4dccf;
  border-color: #3f3628;
  background: #070706;
}

.flux-item {
  border-bottom-color: #2d281f;
}

.flux-item strong {
  color: #d8cfbf;
}

/* Dialogs and authentication */
.objective-dialog,
.login-dialog {
  color: var(--text);
  border-color: #5a492e;
  border-radius: 6px;
  background: #11100e;
  box-shadow: 0 38px 120px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(232, 173, 61, 0.04);
}

.objective-dialog::backdrop,
.login-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
}

.objective-dialog header,
.objective-dialog footer {
  border-color: #352f25;
  background: #12110f;
}

.objective-dialog h2,
.login-dialog h1 {
  color: #fbf6ec;
  font-family: var(--display);
}

.objective-suggestions button {
  color: #bbae99;
  border-color: #413729;
  border-radius: 3px;
  background: #15120e;
}

.objective-suggestions button:hover {
  color: #fff0ca;
  border-color: #755a2e;
  background: #241b0f;
}

.global-search-field {
  border-color: #4b3d28;
  background: #0a0908;
}

.global-search-field .app-icon {
  color: var(--gold);
}

.ai-login-link,
.ai-login-code,
.poc-recording-console,
.poc-finding {
  border-color: #493b27;
  border-radius: 4px;
  background: #0d0c0a;
}

.ai-login-link:hover {
  border-color: var(--gold);
  background: #18140d;
}

.ai-login-link .app-icon,
.ai-login-code strong {
  color: var(--gold-soft);
}

.login-dialog .login-mark {
  width: 64px;
  height: 64px;
}

/* Browser, video and external connectors */
.browser-launcher,
.export-panel,
.settings-card,
.ywh-settings-card {
  border-color: #332d23;
  background: #11100e;
}

.browser-launcher p,
.export-result,
.settings-card p,
.ywh-copy > p {
  color: #978d7d;
}

.capture-card {
  overflow: hidden;
  border-color: #332d23;
  border-radius: 5px;
  background: #11100e;
}

.capture-summary-strip {
  display: grid;
  grid-template-columns: 170px 170px minmax(260px, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}

.capture-summary-strip > article {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid #342d22;
  border-radius: 4px;
  background: #11100e;
}

.capture-summary-strip > article strong {
  color: var(--gold-soft);
  font: 800 17px var(--mono);
}

.capture-summary-strip > article span {
  color: #948a7b;
  font-size: 8px;
}

.capture-summary-strip .search-field {
  width: 100%;
  min-width: 0;
}

.capture-summary-strip .filter-pills {
  align-self: stretch;
}

.capture-card[hidden],
.coverage-card[hidden] {
  display: none !important;
}

.coverage-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #342d22;
  border-radius: 4px;
  background: #0d0c0b;
}

.coverage-toolbar .search-field {
  width: 100%;
  min-width: 0;
}

.capture-card footer {
  border-top: 1px solid #302a21;
}

.capture-image {
  background: #080807;
}

.poc-record-indicator {
  color: #d5cab7;
}

.poc-record-indicator i {
  background: var(--red);
}

.webhook-contract,
.webhook-delivery {
  border-color: #342e24;
  background: #0d0c0b;
}

.settings-switch {
  border-color: #4b3d29;
  border-radius: 4px;
  background: #0d0c0a;
}

.settings-switch strong {
  color: #e5ddcf;
}

.settings-switch small,
.webhook-events small,
.ywh-metrics small {
  color: #877d6d;
}

.webhook-events legend {
  color: #a28e65;
}

.webhook-events label {
  border-color: #3d3427;
  border-radius: 4px;
  background: #0d0c0a;
}

.webhook-events label:hover {
  border-color: #655033;
  background: #15120e;
}

.webhook-contract {
  border-top-color: #352e23;
}

.webhook-contract code {
  color: #c9b47e;
  border-color: #4b3b25;
  background: #090806;
}

.ywh-mark {
  color: #1a1104 !important;
  border-color: #f0bd58 !important;
  background: var(--gold) !important;
}

.ywh-copy > aside,
.ywh-browser-notice {
  border-color: rgba(232, 173, 61, 0.25);
  background: rgba(232, 173, 61, 0.04);
}

.ywh-copy > aside .app-icon,
.ywh-browser-notice > .app-icon {
  color: var(--gold-soft);
}

.ywh-progress > span {
  background: #080706;
}

.ywh-progress i {
  background: linear-gradient(90deg, #9a6f27, var(--gold-soft));
}

.ywh-actions {
  border-top-color: #332d23;
  background: #0d0c0b;
}

.ywh-browser-stage {
  background: #050505;
}

.ywh-browser-stage iframe {
  border-color: #4a3c28;
  background: #050505;
}

.settings-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid #342d22;
  border-radius: 4px;
  background: #0d0c0b;
}

.settings-index button {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: #b9af9f;
  cursor: pointer;
  text-align: left;
  border: 1px solid #302a21;
  border-radius: 3px;
  background: #11100e;
  font-size: 9px;
}

.settings-index button:hover {
  color: #fff1d2;
  border-color: #5b492f;
  background: #17140f;
}

.settings-index button.active,
.settings-index button[aria-current="true"] {
  color: #fff4da;
  border-color: #8a672f;
  background: #21190e;
  box-shadow: inset 3px 0 var(--gold);
}

.settings-index button span {
  color: var(--gold);
  font: 800 8px var(--mono);
}

.settings-card,
.settings-status-card {
  scroll-margin-top: 88px;
}

/* State chips preserve meaning while sharing the same geometry. */
.status-chip {
  color: #a99f8f;
  border-color: #3b342a;
  border-radius: 3px;
  background: #0d0c0a;
}

.status-chip.ok {
  color: #8fd6ad;
  border-color: rgba(99, 184, 138, 0.35);
  background: rgba(99, 184, 138, 0.06);
}

.status-chip.warn {
  color: var(--gold-soft);
  border-color: rgba(232, 173, 61, 0.38);
  background: rgba(232, 173, 61, 0.07);
}

.status-chip.danger,
.severity.critical,
.severity.high {
  color: #f0aaa5;
  border-color: rgba(224, 91, 85, 0.38);
  background: rgba(224, 91, 85, 0.07);
}

.severity.medium,
.priority-p2 {
  color: var(--gold-soft);
  border-color: rgba(232, 173, 61, 0.36);
  background: rgba(232, 173, 61, 0.06);
}

.severity.low,
.severity.info {
  color: #b8ae9f;
  border-color: #443a2c;
  background: #15130f;
}

.toast {
  color: #eee6d8;
  border-color: #5a482c;
  border-radius: 4px;
  background: #1b1711;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

/* Responsive refinements */
@media (max-width: 1180px) {
  .credential-access-grid { grid-template-columns: 1fr; }
  .topbar {
    grid-template-columns: var(--sidebar) minmax(240px, 1fr) auto;
  }

  .http-primary-filters {
    grid-template-columns: minmax(260px, 1fr) minmax(160px, 210px) minmax(160px, 210px) auto;
  }

  .http-advanced-filters > div {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .operations-route {
    grid-template-columns: 1fr 1fr;
  }

  .operations-route > i {
    display: none;
  }

  .capture-summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .capture-summary-strip .search-field,
  .capture-summary-strip .filter-pills {
    width: 100%;
  }

  .program-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .program-status-filters {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }

  .program-ledger-row {
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }

  .scope-card .program-card-actions {
    grid-column: 2;
    width: 100%;
    justify-content: flex-start;
    padding-left: 0 !important;
  }

  .http-primary-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .http-primary-filters .search-field {
    grid-column: 1 / -1;
  }

  .inbox-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
    overflow: visible;
  }

  .inbox-toolbar .search-field {
    min-width: 0;
    flex: 1 1 100%;
  }

  .browser-workspace,
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ywh-settings-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .preset-layout {
    grid-template-columns: 1fr;
  }

  .preset-library-panel {
    order: -1;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar: 64px;
  }

  .topbar {
    border-bottom-color: #453820;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .sidebar {
    position: fixed;
    top: var(--topbar);
    bottom: 0;
    left: 0;
    width: min(286px, calc(100vw - 42px));
    box-shadow: 28px 0 80px rgba(0, 0, 0, 0.62);
  }

  .main {
    padding: 18px 13px 38px;
  }

  .button,
  .icon-button,
  .text-button,
  .segmented button,
  .filter-pills button,
  .program-status-filters button,
  .run-filter-bar button,
  .inbox-modes button,
  .severity-filters button {
    min-height: 44px;
    font-size: 11px;
  }

  .page-header p,
  .resource-guide p,
  .coverage-guide p,
  .context-state p,
  .form-hint,
  .empty-state p,
  .inbox-filter-empty p {
    font-size: 13px;
    line-height: 1.55;
  }

  .count-badge,
  .status-chip,
  .program-card-main > header code,
  .eyebrow,
  .context-breadcrumb,
  .scope-source-tags span {
    font-size: 11px;
    line-height: 1.4;
  }

  .page-header {
    align-items: flex-start;
  }

  .page-header h1 {
    font-size: 27px;
  }

  .panel,
  .table-panel,
  .inbox-shell,
  .terminal-workbench {
    border-radius: 4px;
  }

  .context-switcher {
    padding-left: 13px;
  }

  .context-switcher .context-picker-trigger {
    grid-column: 1 / -1;
    width: 100%;
  }

  .context-dialog {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px);
  }

  .context-dialog > article {
    max-height: calc(100dvh - 12px);
  }

  .context-dialog header {
    padding: 15px 14px 13px;
  }

  .context-dialog header p {
    max-width: 290px;
  }

  .context-dialog-meta small {
    display: none;
  }

  .context-option {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 70px;
    padding: 9px 8px;
  }

  .context-option strong,
  .program-card-main > header strong,
  .preset-card strong,
  .tool-card strong,
  .skill-card strong {
    font-size: 12px;
  }

  .context-option small,
  .program-policy-grid em,
  .preset-card p,
  .tool-card p,
  .skill-card p,
  .resource-card small,
  td,
  td code {
    font-size: 11px;
    line-height: 1.55;
  }

  .preset-catalog,
  .tool-inventory-grid,
  .compact-catalog {
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .terminal-workbench.empty-inventory {
    display: block;
    min-height: 0;
    height: auto;
  }

  .terminal-workbench.empty-inventory .terminal-sidebar,
  .terminal-workbench.empty-inventory .terminal-flux,
  .terminal-workbench.empty-inventory .terminal-panel > header,
  .terminal-workbench.empty-inventory .terminal-meta,
  .terminal-workbench.empty-inventory .terminal-prompt-bar {
    display: none;
  }

  .terminal-workbench.empty-inventory .terminal-stage {
    min-height: 300px;
  }

  .terminal-workbench.empty-inventory .terminal-panel {
    min-height: 300px;
    grid-template-rows: minmax(300px, auto);
  }

  .context-option > .status-chip,
  .context-option-state {
    grid-column: 2;
    width: max-content;
  }

  .http-primary-filters,
  .browser-workspace {
    grid-template-columns: 1fr;
  }

  .http-primary-filters .count-badge {
    justify-self: start;
  }

  .http-advanced-filters > div {
    grid-template-columns: 1fr 1fr;
  }

  .browser-workspace .browser-launcher {
    grid-template-columns: 1fr;
  }

  .browser-panel-heading {
    grid-column: auto;
  }

  .audit-ledger-heading,
  .audit-ledger-heading > div:last-child {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-ledger-heading > div:last-child {
    width: 100%;
    min-width: 0;
  }

  .audit-ledger-heading .search-field {
    width: 100%;
  }

  .mission-summary-strip,
  .objective-summary-strip,
  .binary-summary-strip,
  .preset-summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .coverage-toolbar,
  .settings-index,
  .preset-toolbar {
    grid-template-columns: 1fr;
  }

  .preset-catalog {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .preset-library-panel {
    overflow: visible;
  }

  .catalog-load-more {
    align-items: stretch;
    flex-direction: column;
    font-size: 11px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .metric-grid {
    gap: 7px;
  }

  .metric {
    min-height: 80px;
  }

  .button {
    min-height: 44px;
  }

  .program-inventory-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .program-toolbar {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .program-status-filters {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(102px, 1fr));
    gap: 5px;
  }

  .program-status-filters button {
    min-width: 0;
    justify-content: space-between;
  }

  .program-list-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .program-ledger-row {
    grid-template-columns: 36px minmax(0, 1fr) !important;
    gap: 10px;
    padding: 13px 10px;
  }

  .program-ledger-row > .resource-icon {
    width: 34px;
    height: 34px;
  }

  .program-card-main > header,
  .program-card-main > header > div:last-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .program-card-main > header > div:first-child {
    width: 100%;
    min-width: 0;
  }

  .program-card-main > header > div:first-child strong {
    min-width: 0;
    flex: 1 1 auto;
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .program-card-main > header > div:first-child code {
    flex: 0 0 auto;
  }

  .program-card-main > header > div:last-child {
    gap: 5px;
  }

  .program-policy-grid {
    grid-template-columns: 1fr;
  }

  .program-policy-grid em {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .program-policy-open {
    display: inline-flex;
    align-items: center;
  }

  .scope-card .program-card-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: stretch;
    padding-left: 0 !important;
  }

  .program-card-actions .program-primary-action {
    flex: 1;
  }

  .program-card-actions .program-edit-action {
    flex: 0 0 auto;
  }

  .program-more > div {
    right: 0;
    width: min(260px, calc(100vw - 42px));
  }

  .program-optional-inputs {
    grid-template-columns: 1fr;
  }

  .program-load-more {
    align-items: stretch;
    flex-direction: column;
  }

  .http-primary-filters,
  .http-advanced-filters > div {
    grid-template-columns: 1fr;
  }

  .http-advanced-filters > summary {
    grid-template-columns: 18px 1fr;
  }

  .http-advanced-filters > summary small {
    grid-column: 1 / -1;
    padding-bottom: 9px;
    text-align: left;
  }

  .credential-form-grid {
    grid-template-columns: 1fr;
  }

  .credential-form-grid .credential-origins-field,
  .credential-form-grid .credential-secret-field {
    grid-column: auto;
  }

  .operational-empty > div {
    width: 100%;
    flex-direction: column;
  }

  .operations-route,
  .mission-summary-strip,
  .objective-summary-strip,
  .binary-summary-strip,
  .capture-summary-strip,
  .preset-summary-strip {
    grid-template-columns: 1fr;
  }

  .preset-summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .preset-library-panel .panel-heading select {
    width: 100%;
  }

  .preset-library-panel .panel-heading,
  .preset-launch-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .preset-launch-controls {
    width: 100%;
    min-width: 0;
  }

  .preset-launch-controls select {
    flex-basis: auto;
  }

  .preset-card > header {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .preset-card > header .status-chip {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .view[data-view="http"] .table-scroll {
    overflow: visible;
  }

  .view[data-view="http"] table,
  .view[data-view="http"] tbody,
  .view[data-view="http"] tr,
  .view[data-view="http"] td {
    display: block;
    width: 100%;
  }

  .view[data-view="http"] thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .view[data-view="http"] tbody {
    display: grid;
    gap: 9px;
    padding: 9px;
  }

  .view[data-view="http"] tr {
    overflow: hidden;
    padding: 7px 9px;
    border: 1px solid #382f22;
    border-radius: 4px;
    background: #11100e;
  }

  .view[data-view="http"] td {
    display: grid;
    min-width: 0;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    padding: 7px 0;
    border-bottom: 1px solid #2b261e;
    overflow-wrap: anywhere;
  }

  .view[data-view="http"] td:last-child {
    border-bottom: 0;
  }

  .view[data-view="http"] td::before {
    color: #a17b3d;
    content: attr(data-label);
    font: 700 9px var(--mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .view[data-view="http"] td code,
  .view[data-view="http"] .table-context {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .view[data-view="http"] td.empty-row {
    display: block;
  }

  .view[data-view="http"] td.empty-row::before {
    content: none;
  }

  .settings-card label,
  .settings-card input,
  .settings-card select,
  .settings-card textarea,
  .settings-card p {
    font-size: 11px;
  }

  .settings-card small,
  .settings-status-card small,
  .webhook-contract code,
  .webhook-events legend {
    font-size: 10px;
  }

  #recent-audit .timeline-item,
  #recent-audit .timeline-item > *,
  #skill-catalog,
  #skill-catalog .skill-card,
  #skill-catalog .card-identity,
  #skill-catalog .tags {
    min-width: 0;
    max-width: 100%;
  }

  #recent-audit code,
  #recent-audit strong,
  #skill-catalog .skill-card *,
  #skill-catalog .tags span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #recent-audit .timeline-item {
    width: 100%;
    overflow: hidden;
  }

  #recent-audit .timeline-item > * {
    width: 100%;
    white-space: normal !important;
    word-break: break-all;
  }

  #skill-catalog .skill-card {
    overflow: hidden;
  }

  .main button,
  .main select,
  .main input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 40px;
  }
}

.scope-confirm-dialog {
  width: min(780px, calc(100vw - 32px));
  max-width: none;
}

.scope-confirm-dialog > form {
  width: auto;
}

.scope-review-warnings,
.scope-review-policy {
  display: grid;
  gap: 10px;
}

.scope-review-warnings section,
.scope-review-policy section,
.scope-review-ok,
.scope-confirm-ack {
  padding: 13px 14px;
  border: 1px solid #3d3324;
  border-radius: 4px;
  background: #0b0a09;
}

.scope-review-warnings ul,
.scope-review-policy ul {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.scope-review-warnings li {
  position: relative;
  padding-left: 16px;
  color: #c8b58f;
  font-size: 11px;
  line-height: 1.5;
}

.scope-review-warnings li::before {
  position: absolute;
  top: 7px;
  left: 1px;
  width: 5px;
  height: 5px;
  background: var(--gold);
  content: "";
}

.scope-review-policy {
  grid-template-columns: 1fr 1fr;
}

.scope-review-policy code {
  display: block;
  overflow-wrap: anywhere;
  color: #d8d0c1;
  font: 10px/1.5 var(--mono);
}

.scope-review-policy li.empty {
  color: #817869;
  font: 10px/1.5 var(--mono);
}

.scope-review-techniques div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.scope-review-techniques div span {
  padding: 5px 7px;
  color: #d6c49e;
  border: 1px solid #4a3c26;
  font: 8px var(--mono);
}

.scope-review-techniques small {
  display: block;
  margin-top: 9px;
  color: #857a68;
  font: 9px var(--mono);
}

.scope-review-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.scope-review-facts span {
  display: grid;
  gap: 5px;
}

.scope-review-facts b {
  color: #817769;
  font: 700 8px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scope-review-facts strong {
  color: #e9dfce;
  font-size: 12px;
}

.scope-review-ok,
.scope-confirm-ack {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.scope-review-ok .app-icon {
  width: 18px;
  color: var(--success);
}

.scope-review-ok span,
.scope-confirm-ack span {
  display: grid;
  gap: 3px;
}

.scope-review-ok small,
.scope-confirm-ack small {
  color: #857b6c;
  font-size: 10px;
}

.scope-confirm-ack {
  cursor: pointer;
}

.scope-confirm-ack input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--gold);
}

/* Persistent labs and explicit mission access */
.live-execution-button {
  color: #f6c65a;
  border-color: #73591e;
  background: #171105;
}

.live-execution-button:hover {
  color: #ffe19a;
  border-color: var(--gold);
  background: #201707;
}

.live-execution-button[hidden] { display: none; }

.lab-live-pulse {
  position: relative;
  display: inline-grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #76591e;
  background: #100c04;
}

.lab-live-pulse::before {
  content: "";
  position: absolute;
  inset: 3px 0;
  border-top: 1px solid #3d3016;
  border-bottom: 1px solid #3d3016;
}

.lab-live-pulse i {
  z-index: 1;
  width: 4px;
  height: 4px;
  background: #f2b936;
  box-shadow: 0 0 8px rgba(242, 185, 54, .65);
  animation: lab-live-scan 1.35s steps(4, end) infinite;
}

@keyframes lab-live-scan {
  0% { transform: translateX(-5px); opacity: .5; }
  50% { opacity: 1; }
  100% { transform: translateX(5px); opacity: .5; }
}

.lab-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 16px;
  border: 1px solid var(--line);
  background: #0a0907;
}

.lab-summary-strip article {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.lab-summary-strip article:last-child { border-right: 0; }
.lab-summary-strip strong { color: var(--gold); font: 700 22px var(--mono); }
.lab-summary-strip span { color: #8e8372; font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.lab-live-board {
  margin: 0 0 12px;
  overflow: hidden;
  border-color: #493a1d;
  background: #090806;
}

.lab-live-board > header {
  display: flex;
  min-height: 55px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 13px;
  border-bottom: 1px solid #352b18;
  background: linear-gradient(90deg, #151005, #0a0907 48%);
}

.lab-live-board > header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lab-live-board h2 { margin: 2px 0 0; color: #f0e2c7; font-size: 13px; }
.lab-live-board .eyebrow { color: #c8962c; }
.lab-live-board .status-chip.live { color: #ffd370; border-color: #795b1d; background: #171105; }
.lab-live-list { display: grid; max-height: 390px; overflow: auto; }

.lab-live-row {
  display: grid;
  grid-template-columns: 45px minmax(210px, 1.05fr) minmax(240px, 1fr) 105px auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 10px 13px;
  border-bottom: 1px solid #2b2418;
}

.lab-live-row:last-child { border-bottom: 0; }
.lab-live-row.running { background: linear-gradient(90deg, rgba(199, 148, 39, .08), transparent 34%); }
.lab-live-row.failed { border-left: 2px solid var(--danger); }
.lab-live-state { color: #8f826d; font: 700 8px var(--mono); }
.lab-live-command,
.lab-live-context,
.lab-live-time { display: grid; gap: 4px; min-width: 0; }
.lab-live-command strong { color: #f0e2c9; font: 700 10px var(--mono); }
.lab-live-command code { overflow: hidden; color: #8f826f; font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.lab-live-context strong { overflow: hidden; color: #d2c3a9; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.lab-live-context small,
.lab-live-time small { color: #716757; font: 8px var(--mono); }
.lab-live-time { text-align: right; }
.lab-live-time strong { color: #c5b79f; font: 700 8px var(--mono); text-transform: uppercase; }
.lab-live-error { overflow: hidden; color: #d88f7a; font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.lab-live-row > button { min-height: 29px; padding: 0 9px; font-size: 8px; }
.lab-card-live { display: flex; align-items: center; gap: 7px; padding: 7px 8px; color: #e9bb55; border: 1px solid #4d3b17; background: #151005; }
.lab-card-live strong { font: 700 8px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.lab-card-live .lab-live-pulse { width: 13px; height: 13px; flex-basis: 13px; }

.lab-workbench {
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(520px, 1.22fr);
  gap: 12px;
  min-height: 620px;
}

.lab-index,
.lab-detail-panel { min-width: 0; }
.lab-list { display: grid; gap: 10px; padding: 12px; }
.lab-scope-folder { border: 1px solid #352c20; background: #090806; }
.lab-scope-folder > summary { display: flex; align-items: center; gap: 10px; padding: 11px; cursor: pointer; }
.lab-scope-folder > summary > span { display: grid; width: 28px; height: 28px; place-items: center; color: var(--gold); border: 1px solid #4b3b22; }
.lab-scope-folder > summary > span .app-icon { width: 14px; }
.lab-scope-folder > summary div { display: grid; gap: 2px; }
.lab-scope-folder > summary strong { color: #ede2cf; font-size: 11px; }
.lab-scope-folder > summary small { color: #766d60; font: 8px var(--mono); }
.lab-scope-folder .scope-folder-body { display: grid; gap: 10px; padding: 0 10px 10px; }

.lab-run-group { display: grid; gap: 7px; }
.lab-run-group > header { display: flex; justify-content: space-between; padding: 7px 2px; color: #8c806e; border-bottom: 1px solid #29231b; font: 8px var(--mono); text-transform: uppercase; }
.lab-session-card { display: grid; gap: 9px; padding: 12px; border: 1px solid #342c21; border-left: 2px solid #78603a; background: #0d0b08; }
.lab-session-card[data-status="ready"],
.lab-session-card[data-status="running"] { border-left-color: var(--success); }
.lab-session-card[data-status="blocked"],
.lab-session-card[data-status="failed"] { border-left-color: var(--danger); }
.lab-session-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.lab-session-card > header div { display: grid; gap: 3px; min-width: 0; }
.lab-session-card > header strong { color: #eadfcb; font-size: 11px; }
.lab-session-card > header small,
.lab-session-card > footer > span { color: #756c5e; font: 8px var(--mono); }
.lab-session-card > p { margin: 0; color: #a89b88; font-size: 10px; line-height: 1.5; }
.lab-session-card > footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 9px; border-top: 1px solid #27221b; }
.lab-session-card > footer > span { margin-left: auto; }
.lab-session-card button { min-height: 29px; padding: 0 9px; color: #bfb29f; border: 1px solid #433727; background: #12100c; font: 700 8px var(--mono); text-transform: uppercase; cursor: pointer; }
.lab-session-card button:hover { color: #fff3dc; border-color: var(--gold); }
.lab-session-card button.danger-action { color: #d98b78; border-color: #573127; }
.lab-blocked-reason { padding: 8px !important; color: #d89b88 !important; border: 1px solid #532d25; background: #170b08; font: 9px/1.5 var(--mono) !important; }

.lab-detail-panel > #lab-detail { padding: 14px; }
.lab-detail-identity { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.lab-detail-identity div { display: grid; gap: 4px; }
.lab-detail-identity strong { color: #f0e4d0; font-size: 14px; }
.lab-detail-identity small { color: #7f7464; font: 8px var(--mono); }
.lab-detail-identity p { margin: 4px 0 0; color: #b6aa96; font-size: 10px; line-height: 1.55; }
.lab-remediation { margin: 12px 0; padding: 11px; color: #d79b86; border: 1px solid #633429; background: #170b08; }
.lab-remediation strong { font: 700 9px var(--mono); text-transform: uppercase; }
.lab-remediation p { margin: 5px 0 0; font: 9px/1.55 var(--mono); }
.lab-detail-section { display: grid; gap: 9px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lab-detail-section > header,
.lab-detail-columns > div > header { display: flex; justify-content: space-between; color: #887d6c; font: 8px var(--mono); text-transform: uppercase; }
.lab-tool-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.lab-tool { padding: 6px 8px; color: #9b8f7d; border: 1px solid #3b3227; font: 8px var(--mono); }
.lab-tool.ready { color: #9ccbb7; border-color: #285242; }
.lab-tool.missing { color: #b77e70; border-color: #553027; }
.lab-detail-columns { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr); gap: 14px; padding-top: 14px; }
.lab-device-screen { margin: 14px 0; overflow: hidden; border: 1px solid var(--border); background: var(--soft); }
.lab-device-screen > header { display: flex; justify-content: space-between; gap: 16px; padding: 11px 13px; border-bottom: 1px solid var(--border); }
.lab-device-screen > header span { color: var(--muted); font: 8px var(--mono); }
.lab-device-screen > div { display: grid; min-height: 260px; padding: 18px; place-items: center; background: #030303; }
.lab-device-screen img { display: block; max-width: 100%; max-height: 680px; object-fit: contain; border: 1px solid var(--border2); background: #000; }
.lab-member-list,
.lab-event-list { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.lab-member-list li { display: grid; gap: 3px; padding: 8px; border: 1px solid #332b21; }
.lab-member-list strong { color: #ded2be; font-size: 9px; }
.lab-member-list span,
.lab-member-list small { color: #817665; font: 8px/1.4 var(--mono); }
.lab-event-list { max-height: 410px; overflow: auto; }
.lab-event-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 3px 8px; padding: 8px; border-bottom: 1px solid #29231b; }
.lab-event-list li > span { grid-row: 1 / 4; color: var(--gold); font: 8px var(--mono); }
.lab-event-list strong { color: #d9cdb9; font: 9px var(--mono); }
.lab-event-list small { color: #756b5d; font: 8px var(--mono); }
.lab-event-list code { overflow-wrap: anywhere; color: #978a77; font: 7px/1.45 var(--mono); }

.mission-dialog > form,
.lab-dialog > form { max-height: min(92vh, 940px); overflow-y: auto; }
.mission-access { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 11px; border: 1px solid #3b3227; background: #0b0907; }
.mission-access legend { padding: 0 5px; color: #b9aa92; font: 700 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.mission-blackbox,
.mission-credential-option { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 9px !important; padding: 9px; border: 1px solid #3a3024; background: #100d09; cursor: pointer; }
.mission-blackbox input,
.mission-credential-option input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--gold); }
.mission-blackbox span,
.mission-credential-option span { display: grid; gap: 3px; min-width: 0; }
.mission-blackbox strong,
.mission-credential-option strong { color: #e4d7c2; font-size: 10px; }
.mission-blackbox small,
.mission-credential-option small { overflow-wrap: anywhere; color: #837765; font: 8px/1.45 var(--mono); }
.mission-credential-list { display: grid; gap: 6px; max-height: 170px; overflow-y: auto; }

@media (max-width: 1180px) {
  .lab-workbench { grid-template-columns: 1fr; }
  .lab-detail-panel { min-height: 520px; }
  .lab-live-row { grid-template-columns: 38px minmax(190px, 1fr) minmax(220px, 1fr) 90px auto; }
}

@media (max-width: 720px) {
  .lab-summary-strip { grid-template-columns: repeat(2, 1fr); }
  .lab-summary-strip article:nth-child(2) { border-right: 0; }
  .lab-detail-columns { grid-template-columns: 1fr; }
  .lab-session-card > footer > span { width: 100%; margin: 4px 0 0; }
  .lab-live-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; }
  .lab-live-context { grid-column: 2 / 4; }
  .lab-live-time { grid-column: 2; text-align: left; }
  .lab-live-row > button { grid-column: 3; }
}

@media (max-width: 620px) {
  .scope-review-policy,
  .scope-review-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .objective-dialog,
  .mission-dialog,
  .scope-confirm-dialog,
  .scope-archive-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    margin-inline: auto;
    overflow-x: hidden;
  }

  .objective-dialog > form,
  .objective-dialog > article {
    width: 100%;
    min-width: 0;
    padding: 14px 12px;
    overflow-x: hidden;
  }

  .objective-dialog header,
  .objective-dialog header > div,
  .objective-dialog footer,
  .objective-dialog label,
  .objective-dialog select,
  .objective-dialog input,
  .objective-dialog textarea {
    min-width: 0;
    max-width: 100%;
  }

  .objective-dialog select {
    width: 100%;
  }

  .objective-dialog header {
    gap: 9px;
  }

  .objective-dialog h2 {
    overflow-wrap: anywhere;
  }

  .objective-dialog footer {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 7px;
  }

  .objective-dialog footer .button {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
    padding-inline: 9px;
    white-space: normal;
  }

  .scope-confirm-dialog footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .scope-confirm-dialog footer .button.primary {
    grid-row: 1;
  }

  .scope-review-warnings section,
  .scope-review-policy section,
  .scope-review-ok,
  .scope-confirm-ack {
    padding: 11px;
  }
}

/* Vulnerability dossier: report-ready, evidence-first, explicit about missing facts. */
.result-detail-dialog {
  width: min(1260px, calc(100% - 28px));
  height: min(900px, calc(100dvh - 28px));
  color: #eee5d7;
  border: 1px solid #55421f;
  border-radius: 5px;
  background: #090806;
  box-shadow: 0 34px 120px rgba(0, 0, 0, .82);
}
.result-detail-dialog::backdrop { background: rgba(0, 0, 0, .82); backdrop-filter: blur(3px); }
.result-detail-dialog > article { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; background: #090806; }
.result-detail-dialog header,
.result-detail-dialog footer { padding: 15px 18px; border-color: #3b301b; background: #0d0b08; }
.result-detail-dialog header h2 { max-width: 850px; color: #fff8ee; font-size: 19px; line-height: 1.2; }
.result-detail-dialog header p { color: #897b64; }
.result-detail-dialog header .eyebrow { color: #e6ad39; }
.result-detail-dialog header > .result-detail-header-actions { display: flex; align-items: center; gap: 7px; }
.result-detail-header-actions .button { min-height: 32px; padding-inline: 10px; color: #b9a98d; border-color: #49391d; border-radius: 2px; background: #12100c; text-decoration: none; }
.result-detail-dialog footer > span { color: #776b59; }
.result-detail-dialog .icon-button { border-color: #49391d; background: #12100c; }
.result-detail-content { align-content: start; max-height: none; min-height: 0; gap: 12px; padding: 16px; overflow: auto; scrollbar-color: #6e5526 #0a0806; }
.result-dossier-verdict { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 142px; gap: 18px; min-height: 140px; overflow: visible; padding: 17px 18px; border: 1px solid #4b3920; background: linear-gradient(100deg, #15100b, #0d0b08 64%); }
.result-dossier-verdict::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: #d04e46; content: ""; }
.result-dossier-verdict.severity-critical::before { background: #ef4e4e; }
.result-dossier-verdict.severity-high::before { background: #e27038; }
.result-dossier-verdict.severity-medium::before { background: #e0a832; }
.result-dossier-verdict.severity-low::before { background: #65a6bb; }
.result-verdict-copy { display: grid; align-content: center; gap: 6px; min-width: 0; }
.result-verdict-copy > span { color: #d6a032; font: 800 7px var(--mono); letter-spacing: .14em; }
.result-verdict-copy > strong { font-size: 15px; }
.result-verdict-copy > p { max-width: 850px; margin: 0; color: #c9bcaa; font-size: 10px; line-height: 1.6; }
.result-verdict-copy > code { overflow: hidden; color: #82755f; font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.result-quality-score { display: grid; place-content: center; min-height: 104px; text-align: center; border: 1px solid #56401e; background: #0b0907; }
.result-quality-score > strong { color: #f2ba48; font: 800 29px var(--mono); }
.result-quality-score > span { margin-top: 3px; color: #f0e3cf; font: 800 9px var(--mono); text-transform: uppercase; }
.result-quality-score > small { margin-top: 6px; color: #796d5a; font: 7px var(--mono); }
.result-quality-score.incomplete { border-color: #6a3029; }
.result-quality-score.incomplete > strong { color: #e16659; }
.result-quality-score.solid { border-color: #315c45; }
.result-quality-score.solid > strong { color: #5fc891; }
.result-solidity { display: grid; gap: 8px; padding: 11px 13px; border: 1px solid #352b1a; background: #0d0b08; }
.result-solidity > header { display: flex; padding: 0; border: 0; background: none; justify-content: space-between; }
.result-solidity > header span { color: #8f7d5d; font: 800 7px var(--mono); letter-spacing: .1em; }
.result-solidity > header b { color: #8c7e68; font: 700 7px var(--mono); }
.result-solidity-track { height: 4px; overflow: hidden; background: #211b12; }
.result-solidity-track > i { display: block; height: 100%; background: linear-gradient(90deg, #a76e17, #f2b83f); box-shadow: 0 0 14px rgba(238, 175, 54, .25); }
.result-quality-missing { display: flex; flex-wrap: wrap; gap: 5px; }
.result-quality-missing > span { padding: 4px 6px; color: #a68e6b; border: 1px solid #40331e; background: #12100b; font: 7px var(--mono); }
.result-quality-missing > .complete { color: #67c895; border-color: #294c3a; background: #0c1510; }
.dossier-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dossier-summary > span { padding: 10px; border-color: #382e1d; border-radius: 2px; background: #0e0c09; }
.dossier-summary b { color: #897a61; }
.dossier-summary em { color: #eee2d0; }
.result-evidence-ledger { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border: 1px solid #392e1c; background: #0d0b08; }
.result-evidence-ledger > span { display: grid; min-width: 0; gap: 3px; padding: 10px 11px; }
.result-evidence-ledger > span + span { border-left: 1px solid #302617; }
.result-evidence-ledger b { color: #edb84b; font: 800 14px var(--mono); }
.result-evidence-ledger small { overflow: hidden; color: #7e7059; font: 7px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.result-dossier-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; align-items: start; }
.result-dossier-layout > main { display: grid; gap: 12px; min-width: 0; }
.result-detail-section.dossier-section { gap: 12px; padding: 15px; border-color: #3c301d; border-radius: 2px; background: #0e0c09; }
.dossier-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 0 0 11px; border-bottom: 1px solid #2e2618; background: none; }
.dossier-section > header > span { flex: 0 0 auto; color: #dca83b; font: 800 7px var(--mono); letter-spacing: .1em; }
.dossier-section > header > strong { color: #d8cbb8; font-size: 10px; text-align: right; }
.dossier-field-grid,
.result-observed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dossier-copy { display: grid; align-content: start; gap: 7px; min-height: 82px; padding: 11px; border: 1px solid #332a1c; background: #0a0907; }
.dossier-copy.wide { grid-column: 1 / -1; }
.dossier-copy > span { color: #8f7e65; font: 800 7px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.dossier-copy > p { margin: 0; color: #c9bda9; font-size: 9px; line-height: 1.62; white-space: pre-wrap; }
.dossier-copy.is-missing { border-style: dashed; }
.dossier-copy.is-missing > p,
.dossier-copy.is-missing em { color: #705f49; font: italic 8px var(--mono); }
.dossier-list > div { display: flex; flex-wrap: wrap; gap: 5px; }
.dossier-list > div > span,
.dossier-side-tags b { padding: 5px 7px; color: #d8b66c; border: 1px solid #49391e; background: #141008; font: 8px var(--mono); }
.result-observed-grid .dossier-copy:nth-child(1) { border-left: 3px solid #c9584b; }
.result-observed-grid .dossier-copy:nth-child(2) { border-left: 3px solid #4e9b70; }
.result-observed-grid .dossier-copy:nth-child(3) { border-left: 3px solid #d8a33a; }
.result-reproduction { display: grid !important; gap: 0 !important; padding: 0 !important; list-style: none; }
.result-reproduction > li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: start; min-height: 50px; padding: 8px 0; }
.result-reproduction > li:not(:last-child)::after { position: absolute; top: 37px; bottom: -7px; left: 17px; width: 1px; background: #4b3b20; content: ""; }
.result-reproduction b { display: grid; width: 34px; height: 28px; place-items: center; color: #e8b549; border: 1px solid #5a4420; background: #151008; font: 800 8px var(--mono); }
.result-reproduction span { padding-top: 5px; color: #c9bdab; font: 9px/1.6 var(--mono); }
.result-attack-chain { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.result-attack-chain > li { position: relative; display: grid; min-height: 98px; align-content: start; gap: 8px; padding: 11px; border: 1px solid #3c301d; background: #0a0907; }
.result-attack-chain > li:not(:last-child)::after { position: absolute; top: 50%; right: -9px; z-index: 1; color: #c58e27; font: 800 11px var(--mono); content: "→"; transform: translateY(-50%); }
.result-attack-chain b { color: #e6ad39; font: 800 8px var(--mono); }
.result-attack-chain span { color: #c4b7a3; font: 9px/1.55 var(--mono); }
.result-attack-chain > .is-missing { border-style: dashed; }
.result-attack-chain > .is-missing span { color: #705f49; font-style: italic; }
.result-evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; }
.result-http-proof,
.result-artifact-proof,
.result-lab-proof,
.result-lab-event-proof { display: grid; gap: 7px; padding: 11px; border: 1px solid #48391f; border-radius: 2px; background: #0a0907; }
.result-artifact-proof > span,
.result-lab-proof > span,
.result-lab-event-proof > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.result-http-proof b,
.result-artifact-proof b,
.result-lab-proof b,
.result-lab-event-proof b { color: #e3ae40; font: 800 8px var(--mono); }
.result-http-proof em,
.result-artifact-proof em,
.result-lab-proof em,
.result-lab-event-proof em { color: #d37d55; font: normal 8px var(--mono); }
.result-http-proof strong,
.result-artifact-proof strong,
.result-lab-proof strong,
.result-lab-event-proof strong { overflow: hidden; color: #d8cbb9; font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.result-artifact-proof small,
.result-lab-proof small,
.result-lab-event-proof small { color: #7d705c; font: 8px var(--mono); }
.result-lab-event-proof code { max-height: 118px; overflow: auto; color: #ab9a7d; white-space: pre-wrap; }
.result-http-transcript { overflow: hidden; border: 1px solid #352b1c; background: #080706; }
.result-http-transcript > summary { padding: 9px 10px; color: #bda675; cursor: pointer; font: 800 8px var(--mono); list-style-position: inside; }
.result-http-transcript[open] > summary { border-bottom: 1px solid #352b1c; background: #100d09; }
.result-http-transcript > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.result-http-transcript section { display: grid; min-width: 0; gap: 7px; padding: 10px; }
.result-http-transcript section + section { border-left: 1px solid #302719; }
.result-http-transcript section > span { color: #dca83b; font: 800 7px var(--mono); letter-spacing: .1em; }
.result-http-transcript section > code { overflow-wrap: anywhere; color: #d4c4aa; font: 8px/1.5 var(--mono); }
.result-http-transcript pre { min-height: 66px; max-height: 190px; margin: 0; overflow: auto; padding: 9px; color: #a99a80; border: 1px solid #2e2619; background: #050504; font: 7px/1.5 var(--mono); white-space: pre-wrap; }
.result-http-transcript section > a { color: #e3b24e; font: 800 8px var(--mono); }
.result-body-missing { color: #766853; font: italic 7px var(--mono); }
.result-http-transcript > footer { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 10px; border-top: 1px solid #302719; background: #0d0b08; }
.result-http-transcript > footer span { color: #776a55; font: 7px var(--mono); }
.result-http-proof button,
.result-artifact-proof button,
.result-lab-proof button,
.result-proof-reference,
.result-screen-proof button { color: #d8b76d; border-color: #574322; border-radius: 2px; background: #151008; }
.result-http-proof button:hover,
.result-artifact-proof button:hover,
.result-lab-proof button:hover,
.result-proof-reference:hover,
.result-screen-proof button:hover { color: #fff2d4; border-color: #a97827; background: #211708; }
.result-negative-control { color: #77c99a !important; border-color: #28523e !important; background: #0a1510 !important; }
.result-screen-proof,
.result-video-proof { border-color: #49391f; border-radius: 2px; background: #0a0907; }
.result-screen-proof img { border-color: #574523; border-radius: 1px; }
.result-video-proof a { color: #e2b14c; }
.result-dossier-sidebar { position: sticky; top: 0; display: grid; gap: 8px; }
.result-dossier-sidebar > section { display: grid; gap: 8px; padding: 13px; border: 1px solid #3b301e; background: #0e0c09; }
.result-dossier-sidebar > section > span { color: #d7a236; font: 800 7px var(--mono); letter-spacing: .1em; }
.result-dossier-sidebar > section > strong { font-size: 11px; }
.result-dossier-sidebar > section > p { margin: 0; color: #a99c88; font-size: 9px; line-height: 1.55; }
.result-dossier-sidebar > .dossier-triage { border-left: 3px solid #dfa936; background: linear-gradient(110deg, #171108, #0e0c09 78%); }
.result-dossier-sidebar > .dossier-triage > strong { color: #f0c66b; font: 800 9px/1.45 var(--mono); white-space: pre-wrap; }
.dossier-cvss-rationale { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dossier-cvss-rationale > li { padding-left: 9px; color: #afa18b; border-left: 2px solid #574321; font: 8px/1.5 var(--mono); }
.dossier-cvss-rationale.is-missing > li { color: #705f49; border-left-style: dashed; font-style: italic; }
.result-dossier-sidebar code { overflow-wrap: anywhere; color: #81735e; font: 7px/1.55 var(--mono); }
.result-dossier-sidebar dl { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 7px 9px; margin: 0; }
.result-dossier-sidebar dt { color: #776a55; font: 7px var(--mono); }
.result-dossier-sidebar dd { overflow-wrap: anywhere; margin: 0; color: #bdae98; font: 8px var(--mono); }
.dossier-side-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.dossier-side-tags em { color: #6f614c; font: italic 8px var(--mono); }
.dossier-record-poc { justify-content: center; min-height: 38px; border-radius: 2px !important; background: #dfa936 !important; color: #100d08 !important; }
@media (max-width: 980px) {
  .result-detail-dialog { width: calc(100% - 16px); height: calc(100dvh - 16px); }
  .dossier-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .result-evidence-ledger { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .result-evidence-ledger > span:nth-child(5) { border-left: 0; }
  .result-evidence-ledger > span:nth-child(n+5) { border-top: 1px solid #302617; }
  .result-dossier-layout { grid-template-columns: 1fr; }
  .result-dossier-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dossier-record-poc { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .result-detail-dialog { width: 100%; height: 100dvh; max-height: none; border-width: 0; }
  .result-detail-dialog header, .result-detail-dialog footer { padding: 12px; }
  .result-detail-dialog header { align-items: flex-start; }
  .result-detail-header-actions .button { display: none; }
  .result-detail-dialog header h2 { font-size: 15px; }
  .result-detail-content { padding: 10px; }
  .result-dossier-verdict { grid-template-columns: 1fr; min-height: 228px; padding: 14px; }
  .result-quality-score { grid-template-columns: auto 1fr; column-gap: 10px; min-height: 70px; align-items: center; text-align: left; }
  .result-quality-score > strong { grid-row: 1 / 3; }
  .result-quality-score > small { margin-top: 0; }
  .dossier-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-evidence-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-evidence-ledger > span:nth-child(odd) { border-left: 0; }
  .result-evidence-ledger > span:nth-child(n+3) { border-top: 1px solid #302617; }
  .dossier-field-grid, .result-observed-grid, .result-evidence-grid { grid-template-columns: 1fr; }
  .dossier-copy.wide { grid-column: auto; }
  .dossier-section > header { display: grid; }
  .dossier-section > header > strong { text-align: left; }
  .result-dossier-sidebar { grid-template-columns: 1fr; }
  .result-screen-proof, .result-video-proof { grid-template-columns: 1fr; }
  .result-http-transcript > div { grid-template-columns: 1fr; }
  .result-http-transcript section + section { border-top: 1px solid #302719; border-left: 0; }
  .result-attack-chain { grid-template-columns: 1fr; }
  .result-attack-chain > li:not(:last-child)::after { top: auto; right: 50%; bottom: -11px; content: "↓"; transform: translateX(50%); }
}

@media print {
  body > :not(.result-detail-dialog) { display: none !important; }
  .result-detail-dialog { position: static; display: block; width: 100%; height: auto; max-height: none; color: #17120b; border: 0; background: #fff; box-shadow: none; }
  .result-detail-dialog > article, .result-detail-content, .result-detail-section.dossier-section, .result-dossier-sidebar > section, .dossier-copy, .result-http-proof, .result-evidence-ledger { color: #17120b; background: #fff; }
  .result-detail-dialog header { position: static; color: #17120b; background: #fff; }
  .result-detail-dialog header h2, .result-detail-section.dossier-section strong, .dossier-copy > p { color: #17120b; }
  .result-detail-dialog footer, .result-detail-header-actions, .dossier-record-poc, .result-http-proof > button, video { display: none !important; }
  .result-detail-content { display: block; overflow: visible; padding: 0; }
  .result-dossier-layout { display: block; }
  .result-dossier-layout > main, .result-dossier-sidebar { display: block; }
  .result-detail-section, .result-dossier-sidebar > section, .result-dossier-verdict, .result-evidence-ledger { margin: 10px 0; break-inside: avoid; }
}

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

/* Submission sheet: YesWeHack information architecture in Bountyoski's operator UI. */
.submission-sheet { display: grid; gap: 10px; padding: 1px; border: 1px solid #594521; background: #080705; box-shadow: 0 15px 50px rgba(0, 0, 0, .22); }
.submission-toolbar { position: relative; z-index: 1; display: flex !important; align-items: center !important; justify-content: space-between; gap: 18px; padding: 13px 15px !important; border: 0 !important; border-bottom: 1px solid #49381e !important; background: #0e0b08 !important; }
.submission-toolbar > div:first-child { display: grid; gap: 3px; }
.submission-toolbar > div:first-child > span { color: #e7ac35; font: 800 7px var(--mono); letter-spacing: .15em; }
.submission-toolbar > div:first-child > strong { color: #fff8ee; font-size: 15px; }
.submission-toolbar > div:first-child > small { color: #8d806d; font: 8px var(--mono); }
.submission-toolbar > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.submission-toolbar .button { min-height: 33px; border-radius: 2px; }
.submission-toolbar .button .app-icon { width: 13px; height: 13px; }
.submission-sheet .report-edit-only { display: none; }
.submission-sheet.is-editing .report-edit-only { display: inline-flex; }
.submission-sheet.is-editing [data-action="edit-finding-report"] { display: none; }
.submission-block { position: relative; display: grid; gap: 16px; margin: 0 10px 10px; padding: 17px 17px 19px 58px; border: 1px solid #3b301e; background: #0d0b08; }
.submission-block::before { position: absolute; top: 52px; bottom: 16px; left: 27px; width: 1px; background: #4c3a20; content: ""; }
.submission-block > header { display: flex !important; min-height: 28px; align-items: center !important; gap: 9px; padding: 0 !important; border: 0 !important; background: none !important; }
.submission-block > header > b { display: grid; position: absolute; top: 14px; left: 15px; width: 25px; height: 25px; place-items: center; color: #efb33d; border: 1px solid #d99f2c; border-radius: 50%; background: #171108; font: 850 8px var(--mono); }
.submission-block > header > strong { color: #f7eee1; font: 800 11px var(--sans); letter-spacing: .01em; }
.submission-section-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
.submission-section-actions button { display: inline-flex; min-height: 29px; align-items: center; gap: 6px; padding: 0 9px; color: #c9b99f; border: 1px solid #4a3920; border-radius: 2px; background: #151109; font: 750 7px var(--mono); text-transform: uppercase; }
.submission-section-actions button:hover, .submission-section-actions button:focus-visible { color: #171007; border-color: #efb33d; background: #efb33d; outline: 0; }
.submission-section-actions .app-icon { width: 12px; height: 12px; }
.submission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.submission-field { display: grid !important; min-width: 0; gap: 6px !important; color: #d7cbb9 !important; font: 650 9px var(--sans) !important; }
.submission-field.wide { grid-column: 1 / -1; }
.submission-field > span { display: flex; min-height: 21px; align-items: center; justify-content: space-between; gap: 8px; }
.submission-field > span > b { color: #d8cbb8; font: 650 9px var(--sans); }
.submission-field i, .cvss-metric i { color: #ed6b78; font-style: normal; }
.submission-field input, .submission-field textarea { width: 100%; color: #d8cebf !important; border: 1px solid #3b311f !important; border-radius: 2px !important; background: #0a0907 !important; box-shadow: none !important; font: 9px/1.6 var(--mono) !important; outline: 0; }
.submission-field input { height: 38px; padding: 0 11px !important; }
.submission-field textarea { min-height: 124px; padding: 10px 11px !important; resize: vertical; white-space: pre-wrap; }
.submission-field input[readonly], .submission-field textarea[readonly] { cursor: text; }
.submission-field input::placeholder, .submission-field textarea::placeholder { color: #645b4e; }
.submission-sheet.is-editing .submission-field input:not([data-report-static]), .submission-sheet.is-editing .submission-field textarea { color: #fff8ee !important; border-color: #886823 !important; background: #121009 !important; box-shadow: inset 3px 0 #efb33d !important; }
.submission-sheet.is-editing .submission-field input:focus, .submission-sheet.is-editing .submission-field textarea:focus { border-color: #efb33d !important; box-shadow: inset 3px 0 #efb33d, 0 0 0 2px rgba(239, 179, 61, .10) !important; }
.submission-document { display: grid; gap: 8px; min-width: 0; }
.submission-document > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #302719; }
.submission-document > span b { color: #d8cbb8; font: 650 9px var(--sans); }
.submission-document > span i { color: #ed6b78; font-style: normal; }
.submission-document > span small { color: #756956; font: 7px var(--mono); }
.submission-document textarea { display: block; box-sizing: border-box; width: 100%; min-height: 360px; padding: 8px 0 16px; overflow: hidden; color: #e5dac9; border: 0; border-radius: 0; background: transparent; font: 9px/1.75 var(--mono); field-sizing: content; outline: 0; resize: none; white-space: pre-wrap; }
.submission-document textarea[readonly] { cursor: text; }
.submission-sheet.is-editing .submission-document textarea { padding: 14px 15px; color: #fff8ee; border: 1px solid #886823; background: #121009; box-shadow: inset 3px 0 #efb33d; }
.submission-sheet.is-editing .submission-document textarea:focus { border-color: #efb33d; box-shadow: inset 3px 0 #efb33d, 0 0 0 2px rgba(239, 179, 61, .10); }
.report-copy-buffer { position: fixed; top: 0; left: -10000px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.report-field-actions { display: flex; align-items: center; gap: 4px; }
.report-field-actions button { display: grid; width: 25px; height: 24px; padding: 0; place-items: center; color: #8f8069; border: 1px solid #40331f; border-radius: 2px; background: #11100c; }
.report-field-actions button:hover, .report-field-actions button:focus-visible { color: #ffd371; border-color: #8f6926; outline: 0; }
.report-field-actions .app-icon { width: 12px; height: 12px; }
.cvss-score { display: flex; min-width: 84px; align-items: baseline; justify-content: center; gap: 6px; margin-left: auto; padding: 6px 9px; color: #fff2e0; border: 1px solid #69412b; background: #25130f; }
.cvss-score small { color: #d58a68; font: 800 7px var(--mono); }
.cvss-score em { color: #ff806d; font: 850 12px var(--mono); font-style: normal; }
.cvss-classification { display: grid; gap: 13px; }
.cvss-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 22px; }
.cvss-metric { display: grid; min-width: 0; gap: 6px; margin: 0; padding: 0; border: 0; }
.cvss-metric legend { margin-bottom: 6px; color: #d5c9b6; font: 650 8px var(--sans); }
.cvss-metric > div { display: flex; flex-wrap: wrap; gap: 3px; }
.cvss-metric button { min-height: 27px; padding: 0 8px; color: #817665; border: 1px solid #382f20; border-radius: 2px; background: #12100d; font: 750 7px var(--mono); text-transform: uppercase; }
.cvss-metric button:hover, .cvss-metric button:focus-visible { color: #f2ddba; border-color: #755720; outline: 0; }
.cvss-metric button.active { color: #171007; border-color: #efb33d; background: #efb33d; box-shadow: 0 0 0 1px rgba(239, 179, 61, .12); }
.submission-sheet:not(.is-editing) .cvss-metric button { cursor: default; }
.cvss-fields { margin-top: 2px; }
.cvss-help { max-width: 720px; margin: 0; padding: 9px 11px; color: #a79270; border-left: 2px solid #d89e31; background: rgba(239, 179, 61, .045); font: 8px/1.55 var(--mono); }

@media (max-width: 820px) {
  .submission-toolbar { position: static; align-items: flex-start !important; flex-direction: column; }
  .submission-toolbar > div:last-child { width: 100%; justify-content: flex-start; }
  .submission-grid, .cvss-metric-grid { grid-template-columns: 1fr; }
  .submission-field.wide { grid-column: auto; }
}
@media (max-width: 520px) {
  .submission-block { margin: 0 5px 7px; padding: 51px 11px 13px; }
  .submission-block::before { top: 41px; right: 11px; bottom: auto; left: 48px; width: auto; height: 1px; }
  .submission-block > header { position: absolute; top: 12px; right: 11px; left: 48px; min-width: 0; }
  .submission-block > header > b { top: 10px; left: 10px; }
  .submission-block > header > strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .bug-description-block { padding-top: 90px; }
  .bug-description-block::before { top: 41px; }
  .bug-description-block > header { flex-wrap: wrap; overflow: visible; }
  .bug-description-block > header > strong { flex: 1; }
  .submission-section-actions { width: 100%; margin: 4px 0 0; }
  .submission-section-actions button { flex: 1; justify-content: center; }
  .submission-toolbar .button { flex: 1 1 130px; justify-content: center; }
  .submission-field textarea { min-height: 150px; }
  .submission-document > span { align-items: flex-start; flex-direction: column; }
  .submission-document textarea { font-size: 8px; line-height: 1.7; }
  .cvss-score { min-width: 68px; }
}
@media print {
  .submission-sheet, .submission-block, .submission-field input, .submission-field textarea, .submission-document textarea { color: #17120b !important; border-color: #b9ad9b !important; background: #fff !important; box-shadow: none !important; }
  .submission-toolbar { position: static; color: #17120b; background: #fff !important; }
  .submission-toolbar > div:last-child, .report-field-actions, .submission-section-actions { display: none !important; }
  .submission-block { break-inside: avoid; }
  .submission-field textarea { min-height: auto; overflow: visible; resize: none; }
  .submission-document textarea { height: auto !important; min-height: 0; overflow: visible; }
}
