:root {
  color-scheme: light;
  --page: #eef3ef;
  --ink: #102018;
  --muted: #637169;
  --line: #d8e1db;
  --panel: #ffffff;
  --panel-soft: #f7faf7;
  --green: #1f7a4d;
  --green-dark: #0f3c2a;
  --lime: #9fca3f;
  --orange: #e38a2f;
  --red: #c94735;
  --blue: #2f80ed;
  --shadow: 0 20px 60px rgba(31, 52, 41, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 12%, rgba(159, 202, 63, 0.18), transparent 34%),
    radial-gradient(circle at 86% 4%, rgba(47, 128, 237, 0.1), transparent 28%),
    linear-gradient(135deg, #edf4ef 0%, #e8efe8 48%, #f4f1e8 100%);
  background-size: 100% 100%, 120% 120%, 100% 100%;
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1500px, calc(100vw - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 4px 16px;
}

.overline,
.panel-heading span,
.mission-strip span,
.summary-grid span,
.map-toolbar span,
.metric-row span,
.provenance-strip span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  margin: 3px 0 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.topbar-meta strong {
  border-radius: 999px;
  background: #dff3e6;
  color: var(--green-dark);
  padding: 9px 14px;
}

body[data-scanning] .topbar-meta strong {
  animation: statusPulse 1.1s ease-in-out infinite;
}

.mission-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr 1.15fr auto;
  gap: 12px;
  margin-bottom: 12px;
}

.mission-strip article,
.primary-action {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 30px rgba(31, 52, 41, 0.06);
}

.mission-strip article {
  display: grid;
  gap: 5px;
  padding: 13px 16px;
}

.mission-strip strong {
  font-size: 16px;
}

.primary-action {
  cursor: pointer;
  border-color: #174c35;
  background: #174c35;
  color: #fff;
  padding: 0 22px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.primary-action:hover {
  background: #0e3827;
  transform: translateY(-1px);
}

.primary-action[data-busy] {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.primary-action[data-busy]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-100%);
  animation: actionSweep 1.1s linear infinite;
}

.workspace {
  display: grid;
  grid-template-columns: 270px minmax(560px, 1fr) 360px;
  gap: 12px;
  align-items: stretch;
}

.workflow-panel,
.map-panel,
.decision-panel > section {
  border: 1px solid rgba(216, 225, 219, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.workflow-panel {
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading strong {
  color: var(--green-dark);
  font-size: 12px;
}

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

.workflow li {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 7px 10px;
}

.workflow b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e5ece6;
  color: #486156;
  font-size: 12px;
}

.workflow li[data-done] {
  border-color: rgba(31, 122, 77, 0.38);
  background: #f0f8f1;
  color: var(--green-dark);
}

.workflow li[data-done] b {
  background: var(--green);
  color: #fff;
}

.workflow li[data-active] {
  border-color: rgba(227, 138, 47, 0.52);
  background: #fff7ec;
  color: #915417;
  animation: activeStep 1s ease-in-out infinite;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.summary-grid article {
  border-radius: 8px;
  background: #f7faf7;
  padding: 13px;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

body[data-scan-complete] .summary-grid article {
  animation: metricPop 520ms ease both;
}

body[data-scan-complete] .summary-grid article:nth-child(2) {
  animation-delay: 70ms;
}

body[data-scan-complete] .summary-grid article:nth-child(3) {
  animation-delay: 140ms;
}

body[data-scan-complete] .summary-grid article:nth-child(4) {
  animation-delay: 210ms;
}

.summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.map-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 720px;
  overflow: hidden;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.map-toolbar strong {
  display: block;
  margin-top: 4px;
  font-size: 21px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-group button {
  min-width: 58px;
  height: 34px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #40554a;
  font-size: 13px;
  font-weight: 800;
}

.filter-group button[data-selected] {
  border-color: #174c35;
  background: #174c35;
  color: #fff;
}

.field-map {
  position: relative;
  min-height: 560px;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 40px),
    linear-gradient(10deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(102deg, #48773f 0 18px, #416f39 18px 34px, #558444 34px 50px);
}

.map-scan-grid,
.scan-beam,
.flight-route,
.map-hud {
  position: absolute;
  pointer-events: none;
}

.map-scan-grid {
  inset: 0;
  z-index: 1;
  opacity: 0.42;
  background:
    linear-gradient(rgba(168, 228, 125, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 228, 125, 0.16) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 78%, transparent);
}

.field-map[data-scanning] .map-scan-grid {
  animation: gridDrift 3.2s linear infinite;
}

.scan-beam {
  top: -28%;
  bottom: -28%;
  left: -28%;
  width: 34%;
  z-index: 2;
  opacity: 0;
  background:
    linear-gradient(90deg, transparent, rgba(178, 255, 176, 0.14), rgba(255, 255, 255, 0.48), rgba(178, 255, 176, 0.16), transparent);
  filter: blur(0.2px);
  transform: rotate(16deg) translateX(-120%);
}

.field-map[data-scanning] .scan-beam {
  opacity: 1;
  animation: scanSweep 1.4s ease-in-out infinite;
}

.flight-route {
  inset: 9% 10%;
  z-index: 4;
}

.flight-route::before {
  content: "";
  position: absolute;
  inset: 4% 0 10%;
  border: 1px dashed rgba(255, 255, 255, 0.54);
  border-radius: 42% 58% 52% 48%;
  transform: rotate(-5deg);
}

.route-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.86);
}

.route-a {
  left: 8%;
  top: 18%;
}

.route-b {
  right: 16%;
  top: 34%;
}

.route-c {
  left: 56%;
  bottom: 13%;
}

.drone-body {
  position: absolute;
  left: 8%;
  top: 15%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(13, 40, 28, 0.58);
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
}

.drone-body::before,
.drone-body::after,
.drone-body span::before,
.drone-body span::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  animation: rotorSpin 420ms linear infinite;
}

.drone-body::before {
  left: -7px;
  top: 9px;
}

.drone-body::after {
  right: -7px;
  top: 9px;
}

.drone-body span::before {
  left: -7px;
  bottom: 9px;
}

.drone-body span::after {
  right: -7px;
  bottom: 9px;
}

.drone-body span {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #f3fff0;
  box-shadow: inset 0 0 0 3px #9fca3f;
}

.field-map[data-scanning] .drone-body,
.field-map[data-complete] .drone-body {
  opacity: 1;
}

.field-map[data-scanning] .drone-body {
  animation: droneFlight 4.2s cubic-bezier(0.5, 0.02, 0.28, 0.98) infinite;
}

.map-hud {
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: grid;
  gap: 4px;
  min-width: 118px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(9, 30, 22, 0.74);
  color: #fff;
  padding: 12px 13px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.map-hud span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
}

.map-hud strong {
  font-size: 28px;
  line-height: 1;
}

.field-map::before {
  content: "";
  position: absolute;
  inset: 42px 38px;
  border: 2px solid rgba(255, 255, 255, 0.64);
  border-radius: 18px 70px 24px 42px;
  background:
    linear-gradient(110deg, transparent 0 48%, rgba(247, 239, 176, 0.24) 49% 51%, transparent 52%),
    repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.1) 0 8px, transparent 8px 24px);
  transform: rotate(-2deg);
  z-index: -1;
}

.field-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.17) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.17) 1px, transparent 1px);
  background-size: 64px 64px;
  mix-blend-mode: soft-light;
}

.anomaly-marker {
  position: absolute;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 116px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--marker) 82%, #ffffff);
  color: #fff;
  cursor: pointer;
  padding: 8px 10px 8px 13px;
  box-shadow:
    0 0 0 10px color-mix(in srgb, var(--marker) 18%, transparent),
    0 12px 24px rgba(11, 27, 20, 0.28);
  transform: translate(-50%, -50%);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
  z-index: 6;
}

.anomaly-marker i {
  position: absolute;
  inset: -16px;
  z-index: -1;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--marker) 32%, transparent), transparent 62%);
  animation: heatPulse 1.9s ease-in-out infinite;
}

.anomaly-marker span {
  font-size: 13px;
  font-weight: 800;
}

.anomaly-marker strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 13px;
}

.anomaly-marker[data-muted] {
  opacity: 0.2;
}

.anomaly-marker[data-selected] {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow:
    0 0 0 12px color-mix(in srgb, var(--marker) 22%, transparent),
    0 16px 36px rgba(11, 27, 20, 0.38);
}

.field-map[data-scanning] .anomaly-marker {
  animation: markerFloat 1.6s ease-in-out infinite;
}

.field-map[data-scanning] .anomaly-marker:nth-of-type(2) {
  animation-delay: 120ms;
}

.field-map[data-scanning] .anomaly-marker:nth-of-type(3) {
  animation-delay: 240ms;
}

.field-map[data-scanning] .anomaly-marker:nth-of-type(4) {
  animation-delay: 360ms;
}

.map-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  border-top: 1px solid rgba(216, 225, 219, 0.84);
  background: rgba(255, 255, 255, 0.8);
  padding: 13px 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.decision-panel {
  display: grid;
  gap: 12px;
}

.detail-card,
.side-card {
  padding: 16px;
}

.detail-card {
  border-top: 5px solid var(--accent, var(--green));
}

.detail-kicker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-kicker strong {
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, var(--green)) 16%, white);
  color: var(--accent, var(--green));
  padding: 6px 10px;
}

.detail-card h2 {
  margin: 10px 0 4px;
  font-size: 25px;
  line-height: 1.16;
}

.detail-card p {
  margin: 0;
  color: var(--muted);
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}

.metric-row article {
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
}

.metric-row strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.action-copy {
  border-left: 3px solid var(--accent, var(--green));
  background: color-mix(in srgb, var(--accent, var(--green)) 7%, white);
  padding: 11px 12px;
  line-height: 1.6;
}

.step-list,
.work-order ol {
  margin: 12px 0 0;
  padding-left: 19px;
  color: #33473c;
  line-height: 1.7;
}

.anomaly-list {
  display: grid;
  gap: 8px;
}

.anomaly-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.anomaly-row:hover {
  transform: translateX(2px);
}

.anomaly-row[data-selected] {
  border-color: rgba(31, 122, 77, 0.5);
  background: #f0f8f1;
}

.row-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot);
}

.anomaly-row strong,
.anomaly-row small {
  display: block;
}

.anomaly-row small {
  margin-top: 4px;
  color: var(--muted);
}

.anomaly-row b {
  color: var(--green-dark);
  font-size: 13px;
}

.work-order p,
.report-copy,
.data-card p {
  margin: 0;
  color: #40554a;
  line-height: 1.7;
}

.report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 12px;
  border-radius: 999px;
  background: #eaf5ed;
  color: var(--green-dark);
  padding: 0 14px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.work-order .primary-action {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-created {
  animation: orderFlash 520ms ease both;
}

.work-order h4 {
  margin: 10px 0 6px;
  font-size: 18px;
}

.model-roadmap {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(216, 225, 219, 0.94);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 76, 53, 0.94), rgba(26, 94, 59, 0.9)),
    #174c35;
  color: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.roadmap-copy span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.roadmap-copy h2 {
  margin: 8px 0 10px;
  font-size: 30px;
  line-height: 1.12;
}

.roadmap-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.7;
}

.roadmap-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 900;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.roadmap-link:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.roadmap-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.roadmap-steps article {
  min-height: 154px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 13px;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.roadmap-steps article:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-3px);
}

.roadmap-steps b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green-dark);
  font-size: 12px;
}

.roadmap-steps strong {
  display: block;
  margin-top: 15px;
  font-size: 17px;
}

.roadmap-steps span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.55;
}

.ghost-link {
  border: 1px solid rgba(23, 76, 53, 0.22);
  border-radius: 999px;
  color: var(--green-dark);
  padding: 8px 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.adapter-page {
  background:
    radial-gradient(circle at 14% 8%, rgba(159, 202, 63, 0.18), transparent 30%),
    radial-gradient(circle at 82% 14%, rgba(47, 128, 237, 0.13), transparent 26%),
    linear-gradient(135deg, #eef5ef 0%, #e8f0ed 54%, #eef2f7 100%);
}

.adapter-workspace {
  display: grid;
  grid-template-columns: 280px minmax(560px, 1fr) 380px;
  gap: 12px;
}

.adapter-pipeline,
.adapter-main,
.adapter-decision > section {
  border: 1px solid rgba(216, 225, 219, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.adapter-pipeline {
  padding: 18px;
}

.training-meter {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  border-radius: 8px;
  background: #10291d;
  color: #fff;
  padding: 15px;
}

.training-meter span,
.selector-block > span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.training-meter strong {
  font-size: 34px;
  line-height: 1;
}

.training-meter div {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.training-meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), #2f80ed);
  transition: width 320ms ease;
}

.selector-block {
  display: grid;
  gap: 11px;
  margin-top: 18px;
  border-radius: 8px;
  background: #174c35;
  padding: 14px;
}

.filter-group.vertical {
  display: grid;
  justify-content: stretch;
}

.filter-group.vertical button {
  width: 100%;
}

.adapter-main {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.adapter-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 20px;
  min-height: 250px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(15, 60, 42, 0.95), rgba(31, 122, 77, 0.82)),
    #174c35;
  color: #fff;
  padding: 24px;
}

.adapter-hero::before,
.adapter-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.adapter-hero::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, black, transparent 86%);
}

.adapter-hero::after {
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-100%);
}

body[data-training] .adapter-hero::after {
  animation: actionSweep 1.8s linear infinite;
}

.adapter-hero > div:first-child {
  position: relative;
  z-index: 1;
}

.adapter-hero span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.adapter-hero h2 {
  max-width: 680px;
  margin: 12px 0;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.08;
}

.adapter-hero p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
}

.model-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 200px;
}

.model-core strong {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 34px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 42px rgba(159, 202, 63, 0.36);
}

.core-ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.ring-a {
  width: 190px;
  height: 190px;
  animation: coreSpin 8s linear infinite;
}

.ring-b {
  width: 150px;
  height: 150px;
  border-style: dashed;
  animation: coreSpin 6s linear infinite reverse;
}

.ring-c {
  width: 216px;
  height: 92px;
  border-radius: 50%;
  transform: rotate(-22deg);
  animation: coreTilt 3s ease-in-out infinite;
}

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

.sample-card,
.eval-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.sample-card {
  display: grid;
  gap: 12px;
  min-height: 170px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.sample-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(31, 52, 41, 0.1);
}

.sample-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sample-card span,
.sample-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sample-card strong {
  font-size: 24px;
}

.sample-card p {
  margin: 0;
  color: #40554a;
  line-height: 1.5;
}

.sample-card em {
  width: fit-content;
  border-radius: 999px;
  background: #eef5ed;
  color: var(--green-dark);
  padding: 5px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.sample-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.provenance-strip {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(150px, 0.8fr) minmax(220px, 1.7fr);
  gap: 10px;
}

.provenance-strip article,
.provenance-strip p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
}

.provenance-strip strong {
  display: block;
  margin-top: 6px;
  color: var(--green-dark);
  font-size: 17px;
}

.provenance-strip p {
  color: #40554a;
  line-height: 1.65;
}

.sample-meter i {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--green), var(--lime)) 0 / var(--coverage) 100% no-repeat,
    #e6ede8;
}

.eval-board {
  display: grid;
  gap: 12px;
}

.eval-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.eval-cards article {
  border-radius: 8px;
  background: #f7faf7;
  padding: 13px;
}

.eval-cards span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.eval-cards strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.eval-cards p {
  margin: 8px 0 0;
  color: #40554a;
  font-size: 13px;
  line-height: 1.45;
}

.adapter-decision {
  display: grid;
  gap: 12px;
}

.model-list {
  display: grid;
  gap: 8px;
}

.model-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.model-row:hover {
  transform: translateX(2px);
}

.model-row[data-selected] {
  border-color: rgba(31, 122, 77, 0.5);
  background: #f0f8f1;
}

.model-row strong,
.model-row small {
  display: block;
}

.model-row small {
  margin-top: 4px;
  color: var(--muted);
}

.model-row b {
  color: var(--green-dark);
}

.deployment-plan p {
  margin: 0 0 10px;
  color: #40554a;
  line-height: 1.7;
}

.deployment-plan .primary-action {
  width: 100%;
  min-height: 46px;
}

.deployment-plan h4 {
  margin: 10px 0 6px;
  font-size: 18px;
}

.deployment-plan ol {
  margin: 10px 0 0;
  padding-left: 19px;
  color: #33473c;
  line-height: 1.7;
}

body[data-training] .sample-card {
  animation: metricPop 620ms ease both;
}

body[data-training] .sample-card:nth-child(2) {
  animation-delay: 80ms;
}

body[data-training] .sample-card:nth-child(3) {
  animation-delay: 160ms;
}

body[data-training] .sample-card:nth-child(4) {
  animation-delay: 240ms;
}

body[data-trained] .model-core strong {
  animation: statusPulse 1.1s ease-in-out 2;
}

@keyframes actionSweep {
  to {
    transform: translateX(100%);
  }
}

@keyframes activeStep {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(227, 138, 47, 0.18);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(227, 138, 47, 0.12);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(31, 122, 77, 0.24);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(31, 122, 77, 0.1);
  }
}

@keyframes metricPop {
  0% {
    transform: translateY(8px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes gridDrift {
  to {
    background-position: 38px 38px;
  }
}

@keyframes scanSweep {
  0% {
    transform: rotate(16deg) translateX(-130%);
  }
  100% {
    transform: rotate(16deg) translateX(410%);
  }
}

@keyframes droneFlight {
  0% {
    left: 7%;
    top: 15%;
    transform: rotate(-8deg);
  }
  28% {
    left: 78%;
    top: 27%;
    transform: rotate(10deg);
  }
  57% {
    left: 63%;
    top: 72%;
    transform: rotate(18deg);
  }
  82% {
    left: 18%;
    top: 61%;
    transform: rotate(-16deg);
  }
  100% {
    left: 7%;
    top: 15%;
    transform: rotate(-8deg);
  }
}

@keyframes rotorSpin {
  0% {
    transform: rotate(0deg) scaleX(1);
  }
  100% {
    transform: rotate(360deg) scaleX(1.2);
  }
}

@keyframes heatPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.88);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.12);
  }
}

@keyframes markerFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -4px;
  }
}

@keyframes orderFlash {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes coreSpin {
  to {
    rotate: 360deg;
  }
}

@keyframes coreTilt {
  0%,
  100% {
    transform: rotate(-22deg) scaleX(1);
  }
  50% {
    transform: rotate(-12deg) scaleX(1.08);
  }
}

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

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 240px 1fr;
  }

  .decision-panel {
    grid-column: 1 / -1;
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .decision-panel .side-card:last-child {
    grid-column: 1 / -1;
  }

  .model-roadmap {
    grid-template-columns: 1fr;
  }

  .roadmap-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .adapter-decision {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 720px);
    margin: 10px auto;
  }

  .topbar,
  .map-toolbar,
  .topbar-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .mission-strip,
  .workspace,
  .decision-panel,
  .adapter-workspace,
  .adapter-decision,
  .adapter-hero,
  .sample-grid,
  .eval-cards,
  .provenance-strip {
    grid-template-columns: 1fr;
  }

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

  .mission-strip article,
  .primary-action {
    min-height: 54px;
  }

  .map-panel {
    min-height: 620px;
  }

  .field-map {
    min-height: 470px;
  }

  .filter-group {
    justify-content: flex-start;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

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

  .roadmap-copy h2 {
    font-size: 24px;
  }

  .anomaly-marker {
    min-width: 96px;
    padding: 7px 8px 7px 10px;
  }

  .adapter-main {
    padding: 12px;
  }

  .adapter-hero {
    min-height: auto;
  }

  .model-core {
    min-height: 180px;
  }
}

/* Unified executive-grade visual skin for field and crop service workspaces. */
body {
  background:
    linear-gradient(rgba(238, 245, 239, 0.9), rgba(244, 248, 245, 0.94)),
    url("./data/preview/agriculture-vision-2017/data2017_miniscale/field_images/rgb/JEGPDJQLK_7730-8885-8242-9397.jpg") center 0 / cover fixed;
}

.app-shell {
  width: min(1560px, calc(100vw - 32px));
}

.topbar {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(115deg, rgba(7, 31, 21, 0.96), rgba(18, 63, 44, 0.88)),
    var(--green-dark);
  color: #fff;
  padding: 28px 30px;
  box-shadow: 0 28px 82px rgba(20, 45, 32, 0.18);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 82% 32%, rgba(159, 202, 63, 0.24), transparent 28%);
  background-size: 50px 50px, 50px 50px, 100% 100%;
  pointer-events: none;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar .overline {
  color: rgba(231, 246, 220, 0.76);
}

.topbar h1 {
  color: #fff;
  font-size: clamp(34px, 4.3vw, 62px);
}

.topbar-meta {
  color: rgba(255, 255, 255, 0.72);
}

.topbar-meta strong {
  background: rgba(255, 255, 255, 0.14);
  color: #effbe9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.ghost-link {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(12px);
}

.mission-strip {
  gap: 14px;
  margin: 14px 0;
}

.mission-strip article,
.workflow-panel,
.map-panel,
.decision-panel > section,
.adapter-pipeline,
.adapter-main,
.adapter-decision > section,
.model-roadmap {
  border-radius: 12px;
  border-color: rgba(206, 220, 212, 0.92);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 56px rgba(27, 55, 39, 0.11);
  backdrop-filter: blur(10px);
}

.mission-strip article {
  min-height: 76px;
  padding: 16px 18px;
}

.mission-strip article:first-child {
  background:
    linear-gradient(145deg, rgba(18, 63, 44, 0.95), rgba(31, 122, 77, 0.88)),
    var(--green-dark);
  color: #fff;
}

.mission-strip article:first-child span {
  color: rgba(255, 255, 255, 0.66);
}

.mission-strip article:first-child strong {
  color: #fff;
}

.primary-action {
  min-height: 76px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, #123f2c, #1f7a4d),
    var(--green-dark);
  box-shadow: 0 18px 42px rgba(18, 63, 44, 0.2);
}

.workspace,
.adapter-workspace {
  gap: 14px;
}

.workflow-panel,
.adapter-pipeline {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 248, 0.9)),
    #fff;
}

.workflow li,
.summary-grid article,
.metric-row article,
.anomaly-row,
.sample-card,
.eval-board,
.eval-cards article,
.model-row,
.provenance-strip article,
.provenance-strip p {
  border-radius: 10px;
}

.workflow li[data-done],
.anomaly-row[data-selected],
.model-row[data-selected] {
  background: linear-gradient(135deg, #eef8ef, #f8fcf7);
}

.map-panel {
  overflow: hidden;
}

.map-toolbar {
  min-height: 76px;
  background:
    linear-gradient(90deg, rgba(18, 63, 44, 0.08), rgba(255, 255, 255, 0.4)),
    rgba(255, 255, 255, 0.84);
}

.map-toolbar strong {
  font-size: 24px;
}

.field-map {
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 40px),
    linear-gradient(10deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 46px),
    url("./data/preview/agriculture-vision-2017/data2017_miniscale/field_images/rgb/JEGPDJQLK_7730-8885-8242-9397.jpg") center / cover;
}

.field-map::before {
  background:
    linear-gradient(110deg, transparent 0 48%, rgba(247, 239, 176, 0.25) 49% 51%, transparent 52%),
    rgba(72, 119, 63, 0.18);
  backdrop-filter: saturate(1.2);
}

.field-map::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(5, 26, 18, 0.08), rgba(5, 26, 18, 0.08));
}

.detail-card {
  border-top-width: 0;
  border-left: 5px solid var(--accent, var(--green));
}

.side-card,
.detail-card {
  box-shadow: 0 14px 42px rgba(27, 55, 39, 0.09);
}

.model-roadmap {
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(8, 36, 24, 0.96), rgba(30, 112, 72, 0.9)),
    #174c35;
}

.adapter-page {
  background:
    linear-gradient(rgba(238, 245, 239, 0.91), rgba(242, 247, 244, 0.94)),
    url("./data/preview/agriculture-vision-2017/data2017_miniscale/field_images/rgb/JEGPDJQLK_7730-8885-8242-9397.jpg") center 0 / cover fixed;
}

.adapter-hero {
  min-height: 286px;
  border-radius: 12px;
  background:
    linear-gradient(115deg, rgba(7, 31, 21, 0.94), rgba(31, 122, 77, 0.78)),
    url("./data/preview/agriculture-vision-2017/data2017_miniscale/field_images/rgb/JEGPDJQLK_7730-8885-8242-9397.jpg") center / cover;
}

.adapter-hero h2 {
  font-size: clamp(32px, 3.5vw, 54px);
}

.model-core strong {
  width: 126px;
  height: 126px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 52px rgba(159, 202, 63, 0.42);
}

.sample-card {
  background:
    linear-gradient(180deg, #fff, #f9fcfa);
  min-height: 182px;
}

.adapter-decision .detail-card {
  background:
    linear-gradient(180deg, #fff, #f7fbf8);
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 720px);
  }

  .topbar {
    padding: 24px 20px;
  }

  .topbar h1 {
    font-size: 38px;
  }

  .primary-action {
    min-height: 58px;
  }

  .mission-strip article {
    min-height: 62px;
  }
}
