:root {
  --bg: #f5f1ea;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(37, 44, 55, 0.12);
  --ink: #18212d;
  --muted: #637081;
  --blue: #3f78d1;
  --green: #4d8f49;
  --amber: #c97912;
  --plum: #7058a8;
  --danger: #be3d32;
  --success: #2e7d5f;
  --neutral: #6a7687;
  --shadow: 0 24px 60px rgba(24, 33, 45, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(63, 120, 209, 0.1), transparent 26%),
    radial-gradient(circle at bottom right, rgba(201, 121, 18, 0.1), transparent 24%),
    var(--bg);
  color: var(--ink);
  font-family: "SF Pro Display", "Avenir Next", "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 312px minmax(0, 1fr);
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.subject-rail,
.panel,
.kpi-card {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.subject-rail {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100vh - 48px);
  padding: 24px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.rail-head h1,
.workspace-head h2,
.panel-head h3 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1;
}

.rail-head h1 {
  font-size: 2rem;
}

.rail-copy,
.subtle,
.subject-search span,
.subject-dates,
.progress-stat span,
.empty-state {
  color: var(--muted);
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.subject-search {
  display: grid;
  gap: 8px;
}

.subject-search input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.subject-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.subject-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(37, 44, 55, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.subject-item:hover,
.subject-item.is-active {
  transform: translateY(-1px);
  border-color: rgba(63, 120, 209, 0.35);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(24, 33, 45, 0.08);
}

.subject-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(24, 33, 45, 0.06);
  color: var(--ink);
  font-weight: 700;
}

.subject-meta {
  display: grid;
  gap: 6px;
}

.subject-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.subject-name {
  font-size: 1rem;
}

.subject-rank--header {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(37, 44, 55, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.subject-rank--header:hover {
  transform: translateY(-1px);
  border-color: rgba(63, 120, 209, 0.35);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(24, 33, 45, 0.08);
}

.subject-rank--header.is-active {
  background: rgba(63, 120, 209, 0.14);
  border-color: rgba(63, 120, 209, 0.4);
}

.subject-rank--header.is-inactive {
  background: rgba(24, 33, 45, 0.04);
  color: var(--muted);
}

.workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.workspace-head,
.panel,
.kpi-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
}

.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding: 26px 28px;
  border-radius: var(--radius-xl);
}

.workspace-head-copy {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.workspace-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.trust-layer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(63, 120, 209, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(63, 120, 209, 0.1), rgba(46, 125, 95, 0.07)),
    rgba(255, 255, 255, 0.64);
}

.trust-layer-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.trust-layer-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.trust-layer-window {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(37, 44, 55, 0.08);
  font-weight: 700;
}

.head-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
  flex: 0 0 auto;
}

.head-actions-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.status-chip,
.ghost-button,
.panel-badge {
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.status-chip {
  border: 1px solid transparent;
  background: rgba(106, 118, 135, 0.1);
  color: var(--neutral);
  font-weight: 600;
}

.status-chip--neutral {
  color: var(--neutral);
}

.status-chip--success {
  background: rgba(46, 125, 95, 0.14);
  color: var(--success);
}

.status-chip--warning {
  background: rgba(201, 121, 18, 0.14);
  color: var(--amber);
}

.status-chip--danger {
  background: rgba(190, 61, 50, 0.14);
  color: var(--danger);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  background: rgba(255, 255, 255, 0.56);
}

.workspace-signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.signal-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 44, 55, 0.06);
}

.signal-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-caption {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.signal-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.signal-card small {
  color: var(--muted);
  font-size: 0.85rem;
}

.signal-card--neutral {
  box-shadow: inset 0 0 0 1px rgba(37, 44, 55, 0.04);
}

.signal-card--success {
  background: linear-gradient(180deg, rgba(46, 125, 95, 0.12), rgba(255, 255, 255, 0.82));
  border-color: rgba(46, 125, 95, 0.2);
}

.signal-card--warning {
  background: linear-gradient(180deg, rgba(201, 121, 18, 0.12), rgba(255, 255, 255, 0.82));
  border-color: rgba(201, 121, 18, 0.2);
}

.signal-card--danger {
  background: linear-gradient(180deg, rgba(190, 61, 50, 0.12), rgba(255, 255, 255, 0.82));
  border-color: rgba(190, 61, 50, 0.2);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  padding: 18px 20px 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -12% -55% 35%;
  height: 140px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(16px);
}

.kpi-card strong,
.progress-stat strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.kpi-card small {
  display: block;
  margin-top: 10px;
  opacity: 0.84;
}

.kpi-card--blue {
  background: linear-gradient(135deg, #2e5fb8, #4a8de4);
  color: #f6fbff;
}

.kpi-card--green {
  background: linear-gradient(135deg, #477f40, #68ab5b);
  color: #f6fff5;
}

.kpi-card--amber {
  background: linear-gradient(135deg, #bc6705, #f7a322);
  color: #fff8ef;
}

.kpi-card--plum {
  background: linear-gradient(135deg, #5c4b8e, #7c69b2);
  color: #faf7ff;
}

.kpi-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.dashboard-column,
.inspector-column {
  display: grid;
  gap: 12px;
  min-height: 0;
  align-content: start;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 18px;
}

.panel--sticky {
  position: sticky;
  top: 24px;
}

.panel-head--compact {
  margin-bottom: 12px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.panel-head h3 {
  font-size: 1.35rem;
}

.panel-badge {
  border: 1px solid var(--line);
  background: rgba(24, 33, 45, 0.04);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.panel-badge.status-chip--success {
  border-color: rgba(46, 125, 95, 0.18);
  background: rgba(46, 125, 95, 0.14);
  color: var(--success);
}

.panel-badge.status-chip--warning {
  border-color: rgba(201, 121, 18, 0.2);
  background: rgba(201, 121, 18, 0.14);
  color: var(--amber);
}

.chart-frame {
  position: relative;
  min-height: 264px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 44, 55, 0.06);
  overflow: visible;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 264px;
  color: var(--muted);
  font-size: 0.95rem;
}

.progress-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.progress-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(37, 44, 55, 0.06);
}

.progress-stat--wait {
  background:
    linear-gradient(135deg, rgba(201, 121, 18, 0.11), rgba(255, 255, 255, 0.76)),
    rgba(255, 255, 255, 0.68);
  border-color: rgba(201, 121, 18, 0.16);
}

.progress-stat strong {
  font-size: 1.2rem;
}

.queue-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.queue-key,
.queue-actions {
  display: grid;
  gap: 8px;
}

.queue-key input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.queue-actions .ghost-button {
  width: 100%;
}

.queue-eta {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.queue-status {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(37, 44, 55, 0.06);
  min-height: 20px;
}

.queue-status--success {
  background: rgba(46, 125, 95, 0.1);
  border-color: rgba(46, 125, 95, 0.16);
  color: var(--success);
}

.queue-status--warning {
  background: rgba(201, 121, 18, 0.1);
  border-color: rgba(201, 121, 18, 0.18);
  color: var(--amber);
}

.queue-status--danger {
  background: rgba(190, 61, 50, 0.1);
  border-color: rgba(190, 61, 50, 0.16);
  color: var(--danger);
}

.progress-next-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.progress-next-step {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(37, 44, 55, 0.07);
}

.progress-next-step--warning {
  background:
    linear-gradient(135deg, rgba(201, 121, 18, 0.12), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.68);
  border-color: rgba(201, 121, 18, 0.18);
}

.progress-next-step--guard {
  background:
    linear-gradient(135deg, rgba(112, 88, 168, 0.1), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.68);
  border-color: rgba(112, 88, 168, 0.16);
}

.progress-next-step--success {
  background:
    linear-gradient(135deg, rgba(46, 125, 95, 0.1), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.68);
  border-color: rgba(46, 125, 95, 0.16);
}

.progress-next-step--danger {
  background:
    linear-gradient(135deg, rgba(190, 61, 50, 0.1), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.68);
  border-color: rgba(190, 61, 50, 0.16);
}

.progress-next-step-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.progress-next-step-title {
  font-size: 0.95rem;
}

.progress-next-step-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-next-step-detail {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
}

.progress-next-step-meta {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.progress-bar-shell {
  margin-top: 16px;
  height: 12px;
  border-radius: 999px;
  background: rgba(24, 33, 45, 0.08);
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3f78d1, #64ab89);
  transition: width 320ms ease;
}

.progress-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.progress-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(37, 44, 55, 0.06);
}

.progress-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.progress-item-meta {
  display: grid;
  gap: 4px;
}

.progress-item-title {
  font-weight: 700;
}

.progress-item-stage,
.progress-item-foot {
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-progress-shell {
  height: 8px;
  border-radius: 999px;
  background: rgba(24, 33, 45, 0.08);
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3f78d1, #f7a322);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill--running,
.status-pill--success {
  background: rgba(46, 125, 95, 0.14);
  color: var(--success);
}

.status-pill--waiting,
.status-pill--skipped {
  background: rgba(201, 121, 18, 0.14);
  border: 1px solid rgba(201, 121, 18, 0.12);
  color: var(--amber);
}

.status-pill--failed,
.status-pill--stalled {
  background: rgba(190, 61, 50, 0.14);
  color: var(--danger);
}

.status-pill--idle {
  background: rgba(106, 118, 135, 0.12);
  color: var(--neutral);
}

.table-shell {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(37, 44, 55, 0.06);
  background: rgba(255, 255, 255, 0.74);
}

.progress-strip {
  position: relative;
  padding-top: 16px;
  padding-bottom: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgba(63, 120, 209, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 248, 239, 0.7));
  border-color: rgba(63, 120, 209, 0.14);
}

.progress-intro {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.progress-wait-note {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(201, 121, 18, 0.16);
  border-radius: 16px;
  background: rgba(255, 248, 239, 0.78);
  color: var(--muted);
}

.progress-wait-note strong {
  flex: 0 0 auto;
  color: var(--amber);
  font-size: 0.9rem;
}

.progress-wait-note span {
  line-height: 1.4;
}

.query-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.inspector-column {
  height: 100%;
}

.query-panel table {
  height: max-content;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  z-index: 2;
}

tbody td {
  padding: 13px 16px;
  border-top: 1px solid rgba(37, 44, 55, 0.06);
  vertical-align: top;
}

tbody tr:hover {
  background: rgba(63, 120, 209, 0.04);
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  min-width: 132px;
  max-width: min(220px, calc(100% - 16px));
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(24, 33, 45, 0.88);
  color: #fff;
  font-size: 0.84rem;
  box-shadow: 0 18px 36px rgba(24, 33, 45, 0.18);
  z-index: 5;
}

.chart-tooltip strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.chart-tooltip small {
  display: block;
  margin-top: 5px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.76);
}

.chart-tooltip-status {
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chart-tooltip-status--missing {
  background: rgba(190, 61, 50, 0.22);
  color: #ffd7d2;
}

.chart-tooltip-status--zero {
  background: rgba(255, 255, 255, 0.14);
  color: #f7f7f3;
}

.chart-tooltip-status--interpolated {
  background: rgba(63, 120, 209, 0.24);
  color: #dceaff;
}

.chart-tooltip-status--suspicious {
  background: rgba(201, 121, 18, 0.24);
  color: #ffe6bf;
}

.chart-gap-marker,
.chart-trust-marker {
  filter: drop-shadow(0 3px 5px rgba(24, 33, 45, 0.16));
}

.chart-svg {
  width: 100%;
  height: 264px;
  display: block;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.ops-shell {
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(63, 120, 209, 0.16), transparent 32rem),
    linear-gradient(135deg, #f7f3ed 0%, #edf2ee 100%);
}

.ops-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.ops-hero h1 {
  margin: 0 0 10px;
  max-width: 900px;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.ops-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.ops-card-list {
  display: grid;
  gap: 10px;
}

.ops-card {
  padding: 14px 16px;
  border: 1px solid rgba(37, 44, 55, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.ops-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.ops-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.ops-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  word-break: break-word;
}

.ops-log-panel {
  overflow: hidden;
}

.ops-health-panel {
  margin-bottom: 16px;
}

.ops-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ops-health-card strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.05em;
}

.ops-health-card--warning {
  border-color: rgba(201, 121, 18, 0.24);
  background: rgba(201, 121, 18, 0.08);
}

.ops-health-card--danger {
  border-color: rgba(190, 61, 50, 0.24);
  background: rgba(190, 61, 50, 0.08);
}

.ops-health-wide {
  grid-column: span 2;
}

.ops-table-shell {
  max-height: 62vh;
  overflow: auto;
}

.ops-table-shell table {
  min-width: 1040px;
}

.ops-table-shell td:last-child {
  min-width: 280px;
}

.pilot-shell {
  min-height: 100vh;
  padding: 28px;
}

.pilot-hero h1 {
  font-size: clamp(3rem, 8vw, 8rem);
}

.pilot-signals {
  margin-bottom: 16px;
}

.pilot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.pilot-side {
  display: grid;
  gap: 16px;
}

.pilot-control-panel {
  position: sticky;
  top: 18px;
  z-index: 2;
}

.pilot-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  margin-top: 10px;
}

.pilot-control-row:last-of-type {
  grid-template-columns: 1fr 1fr;
}

.pilot-select,
.pilot-limit {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
}

.pilot-scroll-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.pilot-coverage-card,
.pilot-event-card {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid rgba(37, 44, 55, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.pilot-coverage-card small,
.pilot-event-card small {
  color: var(--muted);
}

.pilot-status {
  padding: 8px 10px;
  border-radius: 12px;
}

.pilot-status--missing {
  background: rgba(190, 61, 50, 0.08);
  color: var(--danger);
}

.pilot-status--zero {
  background: rgba(106, 118, 135, 0.1);
  color: var(--neutral);
}

.pilot-status--interpolated {
  background: rgba(63, 120, 209, 0.1);
  color: #2e5fb8;
}

.pilot-status--suspicious {
  background: rgba(201, 121, 18, 0.1);
  color: var(--amber);
}

.pilot-status--loaded {
  background: rgba(46, 125, 95, 0.1);
  color: var(--success);
}

@media (max-width: 1220px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .subject-rail,
  .panel--sticky {
    position: static;
    min-height: auto;
  }

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

  .ops-grid {
    grid-template-columns: 1fr;
  }

  .pilot-grid {
    grid-template-columns: 1fr;
  }

  .ops-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspector-column {
    height: auto;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 14px;
    gap: 14px;
  }

  .workspace-head {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-hero {
    flex-direction: column;
  }

  .ops-actions {
    justify-content: flex-start;
  }

  .head-actions {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .head-actions-meta {
    justify-items: start;
  }

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

  .trust-layer-head,
  .progress-wait-note {
    align-items: start;
    flex-direction: column;
  }

  .trust-layer-window,
  .progress-wait-note strong {
    flex: none;
  }

  .kpi-strip,
  .progress-overview {
    grid-template-columns: 1fr;
  }

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

  .progress-next-steps {
    grid-template-columns: 1fr;
  }

  .progress-subjects {
    grid-template-columns: 1fr;
  }

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

  .ops-health-grid {
    grid-template-columns: 1fr;
  }

  .ops-health-wide {
    grid-column: auto;
  }
}
