/* Shared Quark Engine dashboard palette and typography. */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Share+Tech+Mono&display=swap');

:root {
  --primary-color: #0ff;
  --secondary-color: #f0f;
  --background: #000;
  --surface: rgba(0, 20, 40, .8);
  --surface-raised: rgba(0, 30, 60, .7);
  --border: rgba(0, 255, 255, .3);
  --border-soft: rgba(0, 255, 255, .15);
  --text: #dff;
  --muted: #8cf;
  --cyan: var(--primary-color);
  --amber: #ffc107;
  --red: #ff8a80;
  --font-primary: 'Orbitron', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --glow-effect: 0 0 10px rgba(0, 255, 255, .45);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
#main-content, #campaign-history, #scenario-catalog { scroll-margin-top: 80px; }
body {
  margin: 0;
  background-color: #000;
  background-image:
    radial-gradient(white, rgba(255, 255, 255, .2) 2px, transparent 40px),
    radial-gradient(white, rgba(255, 255, 255, .15) 1px, transparent 30px),
    radial-gradient(white, rgba(255, 255, 255, .1) 2px, transparent 40px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
}
.app-header { position: sticky; top: 0; z-index: 50; min-height: 64px; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); background: rgba(0, 0, 0, .95); }
.suite-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.suite-logo { width: 40px; height: 40px; }
.suite-version { padding: 4px 10px; border-radius: 999px; color: var(--cyan); background: rgba(0, 50, 100, .7); font-size: 14px; white-space: nowrap; }
.suite-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--cyan); }
.suite-nav a { white-space: nowrap; }
.suite-nav a:hover { color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, .3); }
::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .4; }
button, a, input, select { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--cyan); }
h1, h2, h3, p { margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; height: 1px; width: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: absolute; top: -100px; left: 16px; background: var(--cyan); color: var(--background); padding: 12px; z-index: 100; }
.skip-link:focus { top: 16px; }
.app-shell { min-height: calc(100vh - 64px); }
.sidebar { position: fixed; inset: 64px auto 0 0; width: 250px; background: var(--surface); border-right: 1px solid var(--cyan); padding: 24px 15px; display: flex; flex-direction: column; }
.sidebar-section-label { color: var(--secondary-color); font-family: var(--font-primary); font-size: 10px; font-weight: 500; letter-spacing: 1px; padding: 0 14px; margin-bottom: 14px; }
.nav-item { display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 6px; padding: 13px 13px; margin-bottom: 6px; font-size: 14px; color: var(--muted); transition: color .15s, background .15s; }
.nav-item:hover { color: var(--text); background: rgba(0, 255, 255, .1); }
.nav-item.active { color: var(--cyan); background: rgba(0, 255, 255, .12); border-color: var(--cyan); box-shadow: var(--glow-effect); }
.nav-symbol { font-size: 20px; line-height: 1; min-width: 22px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 20px 12px 0; }
.sidebar-footer .eyebrow { font-size: 8px; }
.sidebar-footer p { font-size: 11px; color: var(--muted); line-height: 1.8; margin: 7px 0 13px; }
.version-label { font-family: var(--font-mono); color: var(--muted); font-size: 9px; }
.main-content { min-width: 0; margin-left: 250px; padding: 28px 30px 22px; max-width: 1840px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 34px; }
.eyebrow { font-size: 9px; letter-spacing: .14em; color: var(--muted); font-weight: 650; line-height: 1.5; }
h1 { font-family: var(--font-primary); font-size: clamp(21px, 2.1vw, 28px); letter-spacing: 2px; font-weight: 500; text-transform: uppercase; color: var(--cyan); text-shadow: var(--glow-effect); margin-top: 10px; line-height: 1.15; }
.heading-dot { display: none; }
.page-description { font-size: 15px; color: var(--muted); margin-top: 12px; }
.environment-tag { display: inline-flex; align-items: center; gap: 9px; border: 1px solid #d97706; border-radius: 3px; color: #fde68a; background: #78350f; font-size: 9px; letter-spacing: .12em; font-weight: 650; padding: 10px 13px; white-space: nowrap; }
.environment-control { flex-shrink: 0; }
.environment-switch { display: flex; gap: 6px; }
.environment-option { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 37px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); color: var(--muted); font-family: var(--font-primary); font-size: 9px; letter-spacing: .4px; }
.environment-option:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.environment-option[aria-pressed="true"] { opacity: 1; cursor: default; }
.environment-option.environment-staging[aria-pressed="true"], .environment-badge.environment-staging { border-color: #d97706; color: #fde68a; background: #78350f; }
.environment-option.environment-production[aria-pressed="true"], .environment-badge.environment-production { border-color: #f87171; color: #fecaca; background: #601a25; }
.production-warning { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 14px 18px; border: 1px solid #f87171; border-left-width: 4px; border-radius: 4px; background: #38131d; color: #ffe4e6; font-size: 14px; line-height: 1.6; }
.production-warning svg { flex-shrink: 0; color: #f87171; }
.production-warning strong { color: #fff; font-weight: 700; }
.environment-note { margin-top: 7px; text-align: right; color: var(--muted); font-size: 11px; }
.environment-badge { display: inline-flex; border: 1px solid; border-radius: 3px; margin-top: 7px; padding: 3px 5px; font-size: 9px; line-height: 1.2; }
.active-run-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.active-run-heading h2, .active-run-heading .environment-badge { margin-top: 0; }
.scenario-environment { margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.status-dot { display: inline-block; background: currentColor; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.target-strip { background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 17px 20px; display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 22px; }
.target-label { display: flex; align-items: center; gap: 19px; min-width: 0; }
.target-label .eyebrow { white-space: nowrap; }
.target-label strong { font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--text); overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; font-size: 9px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 4px; color: #a5b5c5; white-space: nowrap; }
.tag-cyan { color: var(--cyan); border-color: var(--border); background: rgba(0, 255, 255, .08); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.metric-card { background: var(--surface); border: 1px solid var(--cyan); box-shadow: var(--glow-effect); border-radius: 5px; padding: 20px; }
.metric-value { font-size: clamp(19px, 1.6vw, 26px); font-weight: 500; letter-spacing: -.5px; margin-top: 17px; display: flex; align-items: center; gap: 10px; }
.metric-value.state-running, .metric-value.state-continuous { color: var(--cyan); }
.metric-value.state-reserved { color: var(--amber); }
.metric-value.state-unconfigured { font-size: 19px; }
.metric-card p { color: var(--muted); margin-top: 10px; font-size: 10px; line-height: 1.5; }
.controls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.panel { background: var(--surface); border: 1px solid var(--cyan); border-radius: 5px; padding: 24px; box-shadow: var(--glow-effect); }
.panel-heading { margin: -24px -24px 20px; padding: 16px 24px; border-bottom: 1px solid var(--cyan); background: var(--surface-raised); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-heading h2 { margin-top: 8px; font-family: var(--font-primary); font-size: 15px; font-weight: 500; letter-spacing: 1px; color: var(--secondary-color); line-height: 1.3; }
.panel-description { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 22px; max-width: 78ch; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 39px; padding: 10px 15px; border: 1px solid transparent; border-radius: 3px; font-family: var(--font-primary); text-transform: uppercase; font-size: 10px; line-height: 1.5; letter-spacing: .5px; font-weight: 500; transition: background .15s, border-color .15s; }
.button-primary { background: var(--surface); color: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-effect); }
.button-primary:hover:not(:disabled) { background: rgba(0, 255, 255, .2); }
.button-secondary { color: var(--cyan); background: rgba(0, 50, 100, .7); border-color: var(--border); }
.button-secondary:hover:not(:disabled) { background: rgba(0, 80, 140, .7); border-color: var(--cyan); }
.button-danger { color: var(--red); background: #271d22; border-color: #4d3034; }
.button-danger:hover:not(:disabled) { background: #3c252b; }
.reservation-area { border-top: 1px solid var(--border-soft); margin-top: 26px; padding-top: 22px; }
.reservation-copy h3 { font-size: 12px; font-weight: 550; }
.reservation-copy p { font-size: 10px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.reservation-form { display: flex; align-items: center; gap: 10px; margin-top: 13px; }
input, select { background: rgba(0, 10, 25, .95); border: 1px solid var(--border); border-radius: 3px; color: var(--cyan); min-height: 40px; padding: 10px 12px; font-size: 14px; width: 100%; min-width: 0; }
.reservation-form select { max-width: 180px; }
.reservation-active { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 14px; }
.reservation-active > span { color: var(--amber); font-size: 11px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.field label { display: block; font-size: 11px; color: var(--text); margin-bottom: 9px; }
.field input { font-family: var(--font-mono); }
.field-hint { display: block; font-size: 9px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.form-note { margin-top: 12px; color: var(--amber); font-size: 11px; line-height: 1.7; }
.active-campaign { margin-bottom: 22px; border-color: var(--cyan); background: var(--surface); }
.progress-caption { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); margin-top: 22px; margin-bottom: 12px; }
.progress-caption strong { font-family: var(--font-mono); color: var(--cyan); font-weight: 400; }
progress { display: block; height: 5px; width: 100%; border: 0; background: #1b3038; border-radius: 5px; overflow: hidden; }
progress::-webkit-progress-bar { background: #1b3038; }
progress::-webkit-progress-value { background: var(--cyan); border-radius: 5px; }
progress::-moz-progress-bar { background: var(--cyan); border-radius: 5px; }
.active-stats { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 15px; color: var(--muted); font-size: 10px; }
.history-panel { padding-bottom: 0; margin-bottom: 22px; }
.history-panel .panel-heading { margin-bottom: 24px; }
.empty-state { text-align: center; padding: 20px 20px 40px; }
.empty-symbol { font-size: 45px; color: var(--border); margin-bottom: 14px; line-height: 1; }
.empty-state h3 { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 10px; }
.empty-state p { font-size: 11px; line-height: 1.85; color: var(--muted); }
.table-scroll { position: relative; overflow-x: auto; margin: 0 -24px; }
table { border-collapse: collapse; width: 100%; white-space: nowrap; }
th { text-align: left; padding: 12px 20px; background: var(--surface-raised); color: var(--cyan); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; font-weight: 550; border-block: 1px solid var(--border-soft); }
td { padding: 17px 20px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border-soft); }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover, .selected-row { background: rgba(0, 255, 255, .08); }
td strong { font-weight: 500; color: var(--text); }
.table-subtitle { display: block; margin-top: 6px; font-size: 9px; color: var(--muted); }
.status-tag { display: inline-flex; border-radius: 4px; padding: 5px 8px; background: #192532; color: #a5bacb; font-size: 9px; }
.status-running { color: var(--cyan); background: #153438; }
.status-completed { color: #a0d9b8; background: #172e26; }
.status-failed, .status-interrupted { color: var(--amber); background: #30291f; }
.text-button { background: transparent; border: 0; color: var(--cyan); font-size: 11px; padding: 6px 0 6px 8px; display: inline-flex; gap: 8px; align-items: center; }
.text-button:hover { color: #c6fff8; }
.text-muted { color: var(--muted); }
.text-cyan { color: var(--cyan); }
.text-amber { color: var(--amber); }
.details-panel { margin-bottom: 22px; }
.detail-target { font-size: 11px; color: var(--muted); margin-bottom: 18px; overflow-wrap: anywhere; }
.observations-list { list-style: none; padding: 0; margin: 0; max-height: 420px; overflow-y: auto; }
.observations-list li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border-soft); }
.observation-index { color: var(--muted); font-size: 10px; }
.observations-list strong { font-size: 11px; font-weight: 500; }
.observations-list p { font-size: 10px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; line-height: 1.6; }
.observations-list li > .mono:last-child { font-size: 11px; }
.catalog-panel { background: var(--surface); }
.catalog-panel .panel-description { margin-bottom: 20px; }
.catalog-footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border-soft); padding-top: 17px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.page-footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px 0 5px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.page-footer span:first-child { letter-spacing: .12em; }
.notification { margin-bottom: 18px; border: 1px solid; border-radius: 6px; padding: 13px 17px; font-size: 12px; line-height: 1.7; }
.notification.success { color: #b5e2cb; background: #142821; border-color: #2c4a3d; }
.notification.error { color: #f0c7a5; background: #2b211b; border-color: #62432f; }
.connection-warning { display: none; margin-bottom: 20px; padding: 14px 18px; background: #30281d; border: 1px solid #5e4b2a; color: #f1cc8e; border-radius: 5px; font-size: 12px; }
.phx-disconnected .connection-warning { display: block; }
.phx-disconnected button { pointer-events: none; opacity: .4; }

/* Compact controls and expandable evidence retain the dashboard shell. */
.controls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { min-width: 0; }
.panel-heading > h2 { margin-top: 0; }
.button { background: var(--surface-raised); color: var(--cyan); border-color: var(--border); white-space: nowrap; }
.button:hover:not(:disabled) { background: rgba(0, 255, 255, .15); border-color: var(--cyan); }
.button-primary { background: var(--surface); border-color: var(--cyan); }
.button-danger { color: var(--red); background: #271d22; border-color: #4d3034; }
.button-danger:hover:not(:disabled) { background: #3c252b; border-color: #98483e; }
.auto-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.reservation-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin-top: 0; }
.reservation-form label { grid-column: 1 / -1; font-size: 12px; }
.reservation-form select { max-width: none; }
.reservation-active { justify-content: space-between; margin-top: 0; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field label { font-size: 13px; }
.field select { font-family: var(--font-mono); }
.state-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); white-space: nowrap; }
.state-running, .state-continuous { color: var(--cyan); }
.state-reserved, .state-unconfigured { color: var(--amber); }
.target-details { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.target-details summary { cursor: pointer; width: fit-content; padding: 4px 0; }
.target-details > div { margin-top: 8px; padding: 12px; background: var(--surface); border-left: 1px solid var(--border); line-height: 1.7; overflow-wrap: anywhere; }
.detail-row { background: rgba(0, 10, 25, .95); white-space: normal; }
.detail-row > td { padding: 16px 24px; text-align: left; }
.detail-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.run-target { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.run-target summary { cursor: pointer; width: fit-content; }
.run-target p { margin-top: 6px; overflow-wrap: anywhere; }
.detail-row .observations-list { max-height: 280px; }
.detail-row .observations-list li { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 10px 0; }
.detail-row .observations-list li > div { min-width: 0; }
.detail-row .observations-list li > span { white-space: nowrap; }
.detail-row .observations-list strong { font-size: 13px; }
.detail-row .observations-list p { font-size: 12px; }
.detail-row .observations-list li > .mono:last-child { font-size: 12px; }
.history-panel .text-button { font-size: 13px; padding: 4px 0; }
.auto-frequency { display: block; margin-top: 5px; font-size: 11px; }
.scenario-field { margin-bottom: 20px; }
.reconnect-summary { margin: 0 0 22px; color: var(--muted); line-height: 1.6; }
.active-scenario { color: var(--muted); font-size: 13px; }
.run-scenario { max-width: 175px; white-space: normal; line-height: 1.5; }
.detail-scenario { margin-bottom: 12px; color: var(--text); font-size: 13px; }
.scenario-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.scenario-availability { margin-bottom: 18px; color: var(--amber); font-size: 12px; line-height: 1.7; }
.recovery-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 12px; }
.check-passed, .step-passed { color: #a0d9b8; }
.check-failed, .step-failed { color: var(--amber); }
.run-steps { margin-top: 18px; font-size: 12px; }
.run-steps summary { cursor: pointer; color: var(--cyan); width: fit-content; padding: 4px 0; }
.steps-list { margin: 10px 0 0; padding: 0; list-style: none; }
.steps-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.steps-list li > div { display: flex; flex-wrap: wrap; gap: 8px; }
.steps-list time { grid-column: 1; color: var(--muted); font-size: 11px; }
.steps-list .mono { grid-column: 2; grid-row: 1 / 3; align-self: center; white-space: nowrap; }

@media (min-width: 1700px) {
  .main-content { padding-inline: 64px; }
  .metric-card { padding: 24px; }
  .panel { padding: 28px; }
  .panel-heading { margin: -28px -28px 20px; padding: 16px 28px; }
  .history-panel { padding-bottom: 0; }
  .table-scroll { margin-inline: -28px; }
}

@media (max-width: 1180px) {
  .sidebar { width: 210px; padding-inline: 12px; }
  .main-content { margin-left: 210px; padding: 32px 24px 20px; }
  .nav-item { font-size: 11px; padding-inline: 10px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 20px; }
  .panel-heading { align-items: flex-start; margin: -20px -20px 20px; padding: 16px 20px; }
  .panel-heading h2 { font-size: 15px; }
  .panel-heading > .tag { font-size: 8px; }
  .history-panel { padding-bottom: 0; }
  .table-scroll { margin-inline: -20px; }
  .target-label { flex-direction: column; align-items: flex-start; gap: 6px; }
  .controls-grid { gap: 14px; }
}

@media (max-width: 900px) {
  .app-header { flex-wrap: wrap; gap: 10px; }
  .suite-nav { width: 100%; justify-content: flex-end; }
  .sidebar { position: static; width: 100%; padding: 17px 24px; border-right: 0; border-bottom: 1px solid var(--border-soft); flex-direction: row; justify-content: space-between; align-items: center; }
  .sidebar-section-label, .sidebar-footer { display: none; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 8px; }
  .nav-item { margin: 0; padding: 8px 10px; }
  .main-content { margin-left: 0; padding-top: 28px; }
  .page-header { margin-bottom: 26px; }
}

@media (max-width: 620px) {
  .main-content { padding: 25px 16px 16px; }
  #main-content, #campaign-history, #scenario-catalog { scroll-margin-top: 160px; }
  .app-header { padding: 10px 16px; }
  .suite-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 12px; }
  .suite-nav a { padding-block: 8px; }
  .suite-version { font-size: 12px; }
  .suite-logo { width: 32px; height: 32px; }
  .sidebar { padding: 10px 16px; }
  .nav-item { font-size: 12px; }
  .nav-symbol { display: none; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 18px; }
  h1 { font-size: 22px; line-height: 1.4; letter-spacing: 1px; }
  .page-description { font-size: 12px; }
  .environment-tag { padding: 8px 10px; font-size: 8px; }
  .target-strip { padding: 15px; align-items: flex-start; }
  .target-strip > .tag { display: none; }
  .metrics-grid { gap: 10px; margin-bottom: 18px; }
  .metric-card { padding: 16px 14px; }
  .metric-card .eyebrow { font-size: 8px; }
  .metric-value, .metric-value.state-unconfigured { font-size: 18px; margin-top: 13px; }
  .metric-card p { font-size: 11px; }
  .controls-grid { grid-template-columns: 1fr; gap: 16px; }
  .scenario-grid { grid-template-columns: 1fr; gap: 16px; }
  .panel { padding: 20px; }
  .panel-heading h2 { font-size: 14px; }
  .history-panel { padding-bottom: 0; }
  .history-panel .panel-heading { flex-wrap: wrap; gap: 10px; }
  .table-scroll { margin-inline: -20px; }
  .catalog-footer, .page-footer { flex-direction: column; gap: 8px; }
  .active-stats { gap: 14px; }
  .active-campaign .panel-heading { align-items: center; }
  .active-campaign .button { padding-inline: 10px; font-size: 10px; }
  .state-pill { font-size: 12px; }
  .started-column { display: none; }
  .detail-row > td { padding: 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Operator access and account security. */
.auth-main { max-width: 620px; margin: 64px auto; padding: 0 20px; }
.auth-panel .panel-heading h1 { font-size: 20px; line-height: 1.5; margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-form .form-grid { margin-bottom: 0; }
.auth-form > .button { align-self: flex-start; }
.auth-back { display: inline-block; margin-top: 20px; }
.enrollment-key { margin: 0 0 24px; }
.enrollment-key dt { color: var(--muted); margin-bottom: 8px; }
.enrollment-key dd { margin: 0; padding: 14px; border: 1px solid var(--border); font-size: 17px; overflow-wrap: anywhere; user-select: all; }
.recovery-codes { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.recovery-codes li { padding: 10px; border: 1px solid var(--border); overflow-wrap: anywhere; }
.recovery-codes code { font-family: var(--font-mono); }
.account-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 0; }
.account-facts dt { color: var(--muted); }
.account-facts dd { margin: 0; overflow-wrap: anywhere; }
.account-action { margin-top: 24px; }
.account-create { margin-bottom: 24px; }
.operator-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.operator-card { min-width: 0; }
.operator-card .panel-heading h2 { overflow-wrap: anywhere; }
.account-options { display: flex; flex-wrap: wrap; gap: 16px; }
.checkbox-field { display: inline-flex; align-items: center; gap: 10px; }
.checkbox-field input[type=checkbox] { width: 18px; min-height: 18px; margin: 0; accent-color: var(--cyan); }
.account-danger-zone { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.account-danger-zone .panel-description { font-size: 12px; margin-bottom: 14px; }
@media (max-width: 1100px) { .operator-list { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .auth-main { margin-block: 32px; padding-inline: 16px; } .auth-panel .panel-heading h1 { font-size: 17px; } .auth-form .form-grid { grid-template-columns: 1fr; } }
.enrollment-qr { display: block; width: min(100%, 280px); height: auto; margin: 0 auto 24px; background: white; }

#activity-filters .auto-controls { flex-wrap: wrap; justify-content: flex-start; }
@media (max-width: 620px) {
  #activity-filters .form-grid { grid-template-columns: 1fr; }
  .activity-panel .progress-caption { flex-direction: column; align-items: flex-start; gap: 8px; }
}
