:root {
  --bg: #0f131a;
  --panel: #161c25;
  --card: #1c2430;
  --border: #273142;
  --text: #e6eefc;
  --muted: #9fb1c9;
  --accent: #4da3ff;
  --accent-strong: #6ec1ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --card: #f1f4f8;
  --border: #d9e2ec;
  --text: #0f1722;
  --muted: #4a5568;
  --accent: #2b6cb0;
  --accent-strong: #3182ce;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent-strong);
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(15, 19, 26, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 12px rgba(77, 163, 255, 0.6);
}

.nav-links {
  display: flex;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  background: var(--panel);
  color: var(--accent);
  border: 1px solid var(--border);
}

.toggle {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.toggle:hover,
.toggle:focus-visible {
  border-color: var(--accent);
}

.version-strip {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-weight: 700;
}

.pill.subtle {
  color: var(--muted);
}

.pill.success {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.4);
  color: #9be7c4;
}

/* Workflow Progress Bar */
.workflow-progress-container {
  max-width: 1180px;
  margin: 16px auto;
  padding: 0 20px;
}

.workflow-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 24px;
  gap: 8px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1;
  min-width: 100px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.progress-step:hover {
  background: rgba(77, 163, 255, 0.1);
}

.progress-step:active {
  transform: scale(0.98);
}

.progress-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--border);
  transition: all 0.3s ease;
  z-index: 2;
}

.progress-step.completed .progress-dot {
  background: #2ecc71;
  border-color: #2ecc71;
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.5);
}

.progress-step.draft .progress-dot {
  background: #f39c12;
  border-color: #f39c12;
  box-shadow: 0 0 12px rgba(243, 156, 18, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

.progress-step.empty .progress-dot {
  background: var(--card);
  border-color: var(--border);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.progress-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.progress-step.completed .progress-label,
.progress-step.draft .progress-label {
  color: var(--text);
}

.progress-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-step.completed .progress-status {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.progress-step.completed .progress-status::before {
  content: "Saved";
}

.progress-step.draft .progress-status {
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
}

.progress-step.draft .progress-status::before {
  content: "Draft";
}

.progress-step.empty .progress-status {
  background: rgba(150, 150, 150, 0.1);
  color: var(--muted);
}

.progress-step.empty .progress-status::before {
  content: "Empty";
}

.progress-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 -8px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.progress-step.completed + .progress-connector {
  background: #2ecc71;
}

/* Responsive design for progress bar */
@media (max-width: 900px) {
  .workflow-progress {
    flex-wrap: wrap;
    justify-content: center;
  }

  .progress-connector {
    display: none;
  }

  .progress-step {
    min-width: 80px;
  }
}

.context-bar {
  max-width: 1180px;
  margin: 0 auto 12px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(76, 97, 122, 0.08);
}

.context-bar p {
  margin: 0;
}

.view-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.section-header {
  display: flex;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 8px;
}

h1, h2, h3, h4 {
  color: var(--text);
  margin: 8px 0;
}

.lead {
  color: var(--muted);
  max-width: 760px;
}

.small.subtle {
  color: var(--muted);
  opacity: 0.85;
}

.hero { 
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.missionproject-status {
  margin: 24px 0 12px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.status-widgets {
  margin: 16px 0;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.widget-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.widget-tile {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
}

.widget-tile strong {
  display: block;
}

.widget-tile.good {
  border-color: rgba(46, 204, 113, 0.4);
  background: rgba(46, 204, 113, 0.08);
}

.widget-tile.warning {
  border-color: rgba(255, 199, 99, 0.6);
  background: rgba(255, 199, 99, 0.08);
}

.widget-tile.alert {
  border-color: rgba(255, 99, 99, 0.6);
  background: rgba(255, 99, 99, 0.1);
}

.status-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.modules-workflows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 24px 0 12px;
}

.mw-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.mw-card .modules-list li {
  display: grid;
  gap: 4px;
}

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

.muted {
  color: var(--muted);
}

.toolchain {
  margin: 32px 0;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.strip-title {
  margin: 0 0 6px;
}

.toolchain-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.step-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry-modes {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 12px;
}

.entry-diagram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.entry-node {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--card);
  font-weight: 700;
}

.entry-sub {
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}

.missionproject-callout {
  margin: 20px 0 8px;
  padding: 18px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.code-snippet {
  background: #0c121c;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
}

.hero-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.stack-list li {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.demo-request {
  margin: 26px 0 32px;
  padding: 28px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.demo-request-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.demo-note {
  margin-top: 6px;
}

.demo-request-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-request-btn {
  min-width: 220px;
  text-align: center;
}

.demo-request-email {
  margin: 0;
  color: var(--muted);
}

.demo-request-email a {
  color: var(--accent);
  font-weight: 700;
}

@media (min-width: 640px) {
  .demo-request-actions {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .demo-request-email {
    margin: 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--panel);
  text-decoration: none;
}

.btn.full {
  width: 100%;
  justify-content: flex-start;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0c111a;
  border: none;
}

.btn.ghost {
  background: transparent;
  border-color: var(--border);
}

.btn.subtle {
  background: var(--card);
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.2);
}

.card-grid,
.tool-grid,
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card,
.tool-card,
.embed-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card:hover,
.tool-card:hover,
.embed-card:hover {
  border-color: var(--accent);
}

.tool-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.25);
}

.tool-card .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
}

.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  align-self: flex-start;
}

.status.live { color: #2dd4bf; border-color: #2dd4bf33; }
.status.prototype { color: #fbbf24; border-color: #fbbf2433; }
.status.planned { color: #f87171; border-color: #f8717133; }

.workflow-dashboard {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 960px) {
  .workflow-dashboard {
    grid-template-columns: 1fr;
  }
}

.module-sidebar {
  display: grid;
  gap: 10px;
}

.module-nav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease;
}

.module-nav-item:hover,
.module-nav-item:focus-visible {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.module-nav-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.2);
}

.module-nav-text {
  display: grid;
  gap: 4px;
}

.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
}

.status-pill.not-started { color: var(--muted); }
.status-pill.in-progress { color: #fbbf24; border-color: #fbbf2433; }
.status-pill.complete { color: #2dd4bf; border-color: #2dd4bf33; }

.module-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.module-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.status-control {
  display: grid;
  gap: 6px;
}

.status-control select {
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.module-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.module-panel .embed-container {
  padding-top: 65%;
  min-height: 320px;
  border-radius: 12px;
}

.project-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.project-card,
.feasibility-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.project-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.project-form input,
.project-form select {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.project-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.project-alert {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(77, 163, 255, 0.12);
  color: var(--text);
  font-weight: 600;
}

.project-alert.success { border-color: #2dd4bf; background: rgba(45, 212, 191, 0.12); }
.project-alert.alert { border-color: #f87171; background: rgba(248, 113, 113, 0.12); }

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.feasibility-header {
  display: grid;
  gap: 6px;
}

.feasibility-items {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.feasibility-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--card);
  border-left: 4px solid var(--border);
}

.feasibility-item.good { border-left-color: #2dd4bf; }
.feasibility-item.warning { border-left-color: #fbbf24; }
.feasibility-item.alert { border-left-color: #f87171; }

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.workflow-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.workflow-card button,
.workflow-card a {
  justify-self: flex-start;
}

.loop-diagram {
  position: relative;
  width: 280px;
  height: 280px;
  display: grid;
  place-items: center;
}

.loop-node {
  position: absolute;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
  width: 110px;
}

.loop-node:nth-child(1) { top: 10px; left: 50%; transform: translateX(-50%); }
.loop-node:nth-child(2) { left: 10px; top: 90px; }
.loop-node:nth-child(3) { right: 10px; top: 90px; }
.loop-node:nth-child(4) { left: 30px; bottom: 40px; }
.loop-node:nth-child(5) { right: 30px; bottom: 40px; }

.loop-lines {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
}

.mission-layout,
.docs-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.bullet-list {
  padding-left: 18px;
  color: var(--muted);
}

.sample-flow ol {
  margin: 8px 0 12px 18px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.embed-container {
  position: relative;
  width: 100%;
  padding-top: 60%;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.embed-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.demo-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.demo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tool-card h3,
.workflow-card h3,
.demo-card h3,
.embed-card h3,
.card h3 {
  margin-bottom: 0;
}

.workflow-examples {
  margin: 20px 0;
  display: grid;
  gap: 12px;
}

.workflow-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.schema-info {
  margin: 16px 0;
}

.compliance-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
  margin: 12px 0 4px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.compliance-item {
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(77, 163, 255, 0.05);
}

.schema-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.schema-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.schema-badge {
  background: var(--accent);
  color: #0b0e17;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  min-width: 80px;
  text-align: center;
}

.schema-roles {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.schema-warning {
  border: 1px solid #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  color: var(--text);
  padding: 10px;
  border-radius: 12px;
  font-weight: 600;
}

.demo-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(77, 163, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
}

.workflow-guard {
  position: relative;
}

.workflow-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: rgba(15, 19, 26, 0.78);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  border: 1px solid var(--border);
  z-index: 2;
}

.workflow-guard.locked .workflow-overlay {
  display: flex;
}

.workflow-guard.locked .workflow-dashboard {
  filter: blur(3px);
  opacity: 0.4;
  pointer-events: none;
}

.workflow-dashboard.blurred {
  filter: blur(3px);
  opacity: 0.4;
  pointer-events: none;
}

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

.summary-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--card);
}

.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  background: var(--panel);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.json-editor {
  width: 100%;
  min-height: 220px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 10px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  resize: vertical;
}

.editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.editor-status {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
  color: var(--muted);
}

.editor-status.success {
  list-style: none;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #2dd4bf;
  background: rgba(45, 212, 191, 0.12);
}

.editor-status.alert {
  border-left: 4px solid #f87171;
  padding: 8px 12px;
  background: rgba(248, 113, 113, 0.08);
  border-radius: 10px;
}

.validation-callout {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.validation-callout.success {
  border-color: #2dd4bf;
  background: rgba(45, 212, 191, 0.1);
  color: #befae0;
}

.validation-callout.alert {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  color: #fecdd3;
}

.archetype-list {
  display: grid;
  gap: 12px;
}

.archetype-row {
  display: grid;
  gap: 6px;
}

.small {
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px;
  background: var(--panel);
  text-align: center;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 8px;
}

.change-log-section {
  max-width: 1180px;
  margin: 0 auto 32px;
  padding: 0 20px;
}

.change-log-section details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.change-log-section summary {
  cursor: pointer;
  font-weight: 700;
}

.change-log {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.change-log-entry {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--card);
}

.change-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.change-log-list {
  margin: 8px 0 0 18px;
  color: var(--muted);
}

.footer-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.divider {
  color: var(--border);
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

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

  .loop-diagram {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 720px) {
  .section-header { flex-direction: column; }
  .modules-workflows { grid-template-columns: 1fr; }
  .status-actions { width: 100%; justify-content: flex-start; }
  .project-actions .action-row { flex-direction: column; align-items: stretch; }
  .workflow-dashboard { grid-template-columns: 1fr; }
}

/* ============================================================================
   PLAYGROUND ADDITIONS
   ============================================================================ */

/* Quick Start Steps */
.quick-start-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.qs-step {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.qs-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: var(--accent);
}

.qs-step strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 1.1em;
}

.qs-step .btn {
  margin-top: 12px;
  width: 100%;
  justify-content: center;
}

/* Tool Panel */
.tool-panel {
  display: grid;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Parts Grid */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
  min-height: 200px;
}

.part-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: transform 120ms ease, border-color 120ms ease;
  cursor: pointer;
}

.part-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.part-card strong {
  display: block;
  font-size: 1.05em;
  margin-bottom: 4px;
  color: var(--text);
}

.part-card .small {
  display: block;
  margin-bottom: 8px;
}

.part-specs {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.part-specs span {
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.85em;
  color: var(--muted);
  font-weight: 600;
}

/* Enrichment Badges */
.enrichment-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.enrichment-badge--api {
  background: linear-gradient(135deg, #667eea33, #764ba233);
  color: #a78bfa;
  border: 1px solid #667eea55;
}

.enrichment-badge--scraper {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.enhance-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #555 !important;
}

/* Section Header for Module Pages */
.section-header {
  margin-bottom: 32px;
  max-width: 800px;
}

.section-header .eyebrow {
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 2.5em;
  margin: 0 0 12px;
  line-height: 1.2;
}

.section-header .lead {
  font-size: 1.15em;
  color: var(--muted);
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .quick-start-steps {
    grid-template-columns: 1fr;
  }
  
  .parts-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   UI FEEDBACK ENHANCEMENTS
   Toast notifications, spinners, animations, and visual feedback
   ============================================================================ */

/* Toast Notification Container */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  pointer-events: none;
}

/* Toast */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  pointer-events: all;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.toast.toast-hide {
  opacity: 0;
  transform: translateX(400px);
}

.toast-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: var(--text);
}

/* Toast Types */
.toast-success {
  border-left: 4px solid #2dd4bf;
}

.toast-success .toast-icon {
  color: #2dd4bf;
}

.toast-error {
  border-left: 4px solid #f87171;
}

.toast-error .toast-icon {
  color: #f87171;
}

.toast-warning {
  border-left: 4px solid #fbbf24;
}

.toast-warning .toast-icon {
  color: #fbbf24;
}

.toast-info {
  border-left: 4px solid var(--accent);
}

.toast-info .toast-icon {
  color: var(--accent);
}

.toast-sync {
  border-left: 4px solid #a78bfa;
}

.toast-sync .toast-icon {
  color: #a78bfa;
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Loading Spinner Overlay */
.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 19, 26, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.spinner-overlay.spinner-show {
  opacity: 1;
}

.spinner-content {
  text-align: center;
  color: var(--text);
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-message {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

/* Success Checkmark Animation */
.success-checkmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.success-checkmark.checkmark-show {
  opacity: 1;
}

.checkmark-svg {
  width: 80px;
  height: 80px;
  display: block;
  stroke-width: 3;
  stroke: #2dd4bf;
  stroke-miterlimit: 10;
  box-shadow: inset 0 0 0 #2dd4bf;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke: #2dd4bf;
  fill: var(--panel);
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}

/* Pulse Animation for Badges */
.pulse-animation {
  animation: pulse 1s cubic-bezier(0.4, 0, 0.6, 1) 2;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.15);
  }
}

/* Highlight Flash Animation */
@keyframes highlight-flash {
  0% { background-color: transparent; }
  50% { background-color: rgba(251, 191, 36, 0.3); }
  100% { background-color: transparent; }
}

/* Confirm Modal */
.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 19, 26, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.confirm-modal.confirm-show {
  opacity: 1;
}

.confirm-modal.confirm-hide {
  opacity: 0;
}

.confirm-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.confirm-modal.confirm-show .confirm-content {
  transform: scale(1);
}

.confirm-content h3 {
  margin: 0 0 16px;
  font-size: 1.5em;
  color: var(--text);
}

.confirm-content p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Part Editor Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 19, 26, 0.90);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5em;
  color: var(--text);
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
}

/* Report Button Icons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-icon::before {
  font-size: 1.2em;
  line-height: 1;
}

/* Platform Visualization */
.platform-viz {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.viz-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 400px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.05) 0%, rgba(110, 193, 255, 0.05) 100%);
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.viz-layer {
  position: absolute;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.viz-layer.active {
  opacity: 1;
  animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Airframe - Center large frame */
.viz-airframe.active {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #4da3ff 0%, #6ec1ff 100%);
  border-radius: 20px;
  border: 4px solid rgba(77, 163, 255, 0.3);
  box-shadow: 0 0 30px rgba(77, 163, 255, 0.4);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.viz-airframe.active::before {
  content: "⬢";
  font-size: 80px;
  color: rgba(255, 255, 255, 0.3);
}

/* Motors - Four corners */
.viz-motors.active {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.viz-motors.active::before,
.viz-motors.active::after {
  content: "◉";
  position: absolute;
  font-size: 40px;
  color: #f39c12;
  text-shadow: 0 0 15px rgba(243, 156, 18, 0.6);
}

.viz-motors.active::before {
  top: 60px;
  left: 60px;
}

.viz-motors.active::after {
  top: 60px;
  right: 60px;
}

.viz-motors.active {
  --motor-color: #f39c12;
}

/* Add bottom motors using a pseudo element hack */
.viz-container.has-motors::after {
  content: "◉";
  position: absolute;
  font-size: 40px;
  color: #f39c12;
  text-shadow: 0 0 15px rgba(243, 156, 18, 0.6);
  bottom: 60px;
  left: 60px;
}

.viz-container.has-motors::before {
  content: "◉";
  position: absolute;
  font-size: 40px;
  color: #f39c12;
  text-shadow: 0 0 15px rgba(243, 156, 18, 0.6);
  bottom: 60px;
  right: 60px;
}

/* Battery - Bottom center */
.viz-battery.active {
  width: 120px;
  height: 60px;
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  border-radius: 8px;
  border: 3px solid rgba(46, 204, 113, 0.3);
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.viz-battery.active::before {
  content: "";
  font-size: 30px;
  filter: grayscale(100%) brightness(200%);
}

/* Flight Controller - Top center */
.viz-fc.active {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
  border-radius: 12px;
  border: 3px solid rgba(155, 89, 182, 0.3);
  box-shadow: 0 0 20px rgba(155, 89, 182, 0.4);
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.viz-fc.active::before {
  content: "";
  font-size: 35px;
}

/* Radio - Top right */
.viz-radio.active {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-radius: 50%;
  border: 3px solid rgba(231, 76, 60, 0.3);
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.4);
  top: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viz-radio.active::before {
  content: "";
  font-size: 25px;
  filter: grayscale(100%) brightness(200%);
}

/* Sensors - Left side */
.viz-sensors.active {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border-radius: 8px;
  border: 3px solid rgba(52, 152, 219, 0.3);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
  top: 50%;
  left: 30px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.viz-sensors.active::before {
  content: "";
  font-size: 20px;
}

/* Legend */
.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

.legend-dot.airframe {
  background: #4da3ff;
  border-color: #6ec1ff;
}

.legend-dot.motors {
  background: #f39c12;
  border-color: #f39c12;
}

.legend-dot.battery {
  background: #2ecc71;
  border-color: #27ae60;
}

.legend-dot.fc {
  background: #9b59b6;
  border-color: #8e44ad;
}

.legend-dot.radio {
  background: #e74c3c;
  border-color: #c0392b;
}

.legend-dot.sensors {
  background: #3498db;
  border-color: #2980b9;
}

/* ========== Platform Viz SVG ========== */
.platform-viz-svg-wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #0f131a;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-height: 300px;
}

.platform-viz-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface, #1e293b);
  color: var(--text, #e2e8f0);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: monospace;
  border: 1px solid var(--border, #334155);
  white-space: nowrap;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Motor config buttons */
.motor-config-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.motor-count-btn {
  padding: 8px 18px !important;
  font-size: 13px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface, #1e293b) !important;
  color: var(--text, #e2e8f0) !important;
  border-radius: 6px !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.motor-count-btn:hover {
  border-color: var(--accent, #667eea) !important;
}

.motor-count-btn.active {
  background: var(--accent, #667eea) !important;
  border-color: var(--accent, #667eea) !important;
  color: #fff !important;
}

/* Weight breakdown chart */
.weight-chart-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px 0;
}

.weight-donut {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.weight-donut-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--surface, #1e293b);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.weight-total-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  font-family: monospace;
}

.weight-total-label {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  font-family: monospace;
}

.weight-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.weight-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: monospace;
}

.weight-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.weight-legend-name {
  color: var(--text, #e2e8f0);
  min-width: 80px;
}

.weight-legend-val {
  color: var(--text-muted, #94a3b8);
}

/* ========== Component Lifecycle Card Indicators ========== */
.lc-card-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.lc-cond-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.lc-good  { background: #1a3a2a; color: #4ade80; }
.lc-warn  { background: #3a3520; color: #facc15; }
.lc-crit  { background: #3a1a1a; color: #f87171; }

.lc-maint-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  animation: lc-pulse 2s ease-in-out infinite;
}
@keyframes lc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.lc-stat {
  color: var(--muted);
  font-family: monospace;
  font-size: 12px;
}

.lc-health-bar {
  flex: 1 1 60px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  min-width: 40px;
}
.lc-health-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.lc-health-fill.lc-good { background: #4ade80; }
.lc-health-fill.lc-warn { background: #facc15; }
.lc-health-fill.lc-crit { background: #f87171; }

/* Maintenance Alerts Panel */
.lc-alert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--panel);
  border-radius: 6px;
  font-size: 13px;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  #toast-container {
    left: 10px;
    right: 10px;
    max-width: none;
  }

  .toast {
    padding: 12px 14px;
  }

  .confirm-content {
    padding: 20px;
  }

  .viz-container {
    height: 300px;
  }

  .viz-airframe.active {
    width: 150px;
    height: 150px;
  }
}

/* Sensor FOV Map Control */
.sensor-fov-control select,
.sensor-fov-control input[type="number"] {
  background: var(--panel, #161c25);
  color: var(--text, #e6eefc);
  border: 1px solid var(--border, #273142);
}
.sensor-fov-control select:focus,
.sensor-fov-control input:focus {
  outline: 1px solid var(--accent, #4da3ff);
}
.sensor-fov-marker {
  background: none !important;
  border: none !important;
}

/* ---- JRFL Conflict Badges ---- */
.jrfl-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  vertical-align: middle;
  margin-left: 6px;
  letter-spacing: 0.3px;
}
.jrfl-badge.jrfl-clear {
  background: #16a34a;
}

/* ---- JRFL Spectrum Visualization ---- */
#jrflSpectrumViz svg {
  display: block;
  border-radius: 6px;
}
.jrfl-spectrum-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-secondary, #aaa);
}
.jrfl-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

/* App Extras: small buttons */
.btn-sm { padding: 3px 10px; font-size: 11px; min-height: auto; }

/* ========== Digital PMCS Styles ========== */
.pmcs-checklist-card {
  border: 2px solid var(--accent, #4da3ff);
}

.pmcs-progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.pmcs-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.pmcs-readiness-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pmcs-readiness-go {
  background: #1a3a2a;
  color: #4ade80;
  border: 1px solid #2d6a4f;
}

.pmcs-readiness-nogo {
  background: #3a1a1a;
  color: #f87171;
  border: 1px solid #6b1a1a;
}

.pmcs-item {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 6px;
  background: var(--card);
  transition: border-color 0.15s ease;
}

.pmcs-item:hover {
  border-color: var(--accent);
}

.pmcs-sev-critical {
  border-left: 4px solid #dc2626;
}

.pmcs-sev-important {
  border-left: 4px solid #d97706;
}

.pmcs-sev-recommended {
  border-left: 4px solid #6b7280;
}

.pmcs-lifecycle-overdue {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.3);
}

.pmcs-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.pmcs-item-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.pmcs-item-text.pmcs-done {
  text-decoration: line-through;
  opacity: 0.6;
}

.pmcs-auto-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(77, 163, 255, 0.15);
  color: var(--accent);
  letter-spacing: 0.3px;
}

.pmcs-overdue-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  letter-spacing: 0.3px;
  animation: lc-pulse 2s ease-in-out infinite;
}

.pmcs-status-toggle {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.pmcs-status-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pmcs-status-btn:hover {
  border-color: var(--accent);
}

.pmcs-status-btn.active {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

.pmcs-status-btn.pmcs-fail.active {
  background: #dc2626;
  border-color: #dc2626;
}

.pmcs-status-btn.pmcs-na.active {
  background: #6b7280;
  border-color: #6b7280;
}

.pmcs-item-desc {
  margin: 4px 0 6px 28px;
  font-size: 12px;
}

.pmcs-notes {
  width: 100%;
  padding: 4px 8px;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
}

.pmcs-notes:focus {
  outline: 1px solid var(--accent);
}

.pmcs-category h4 {
  color: var(--text);
}
