:root {
  --accent: #0c6;
  --accent-rgb: 0, 204, 102;
}

/* ── Page-specific overrides ───────────────────────────────────── */
#runway { height: 500vh; }
#header-panel { padding: 24px 32px 8px; width: auto; }
.row-title { font-size: clamp(18px, 2.2vw, 26px); }
.arch-svg { max-width: 400px; }
.arch-label { font-size: 16px; }
.arch-line { stroke: rgba(var(--accent-rgb), 0.2); stroke-width: 1.5; }

/* Arch colour variants */
.arch-node-hw {
  fill: rgba(0, 170, 255, 0.08);
  stroke: rgba(0, 170, 255, 0.4);
  stroke-width: 1.5;
}
.arch-node-warn {
  fill: rgba(255, 170, 0, 0.08);
  stroke: rgba(255, 170, 0, 0.4);
  stroke-width: 1.5;
}
.arch-label-blue { fill: #0af; }
.arch-label-warn { fill: #fa0; }
.arch-line-blue { stroke: rgba(0, 170, 255, 0.2); }

/* ── Title / subtitle ──────────────────────────────────────────── */
#title-overlay {
  display: block;
  margin: 0 auto;
  font-family: 'Major Mono Display', monospace;
  font-size: clamp(20px, 3vw, 36px);
  color: #0c6;
  letter-spacing: 0.05em;
}
#subtitle {
  font-size: clamp(12px, 1.3vw, 16px);
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
  letter-spacing: 0.12em;
}
#oasis-logo {
  height: 2.5em;
  vertical-align: middle;
  mix-blend-mode: screen;
  margin-right: 0.15em;
}
.narrative-line {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(18px, 2.5vw, 28px);
  line-height: 1.4;
  max-width: 30vw;
  will-change: transform, opacity, filter;
}

/* ── iPad dashboard ────────────────────────────────────────────── */
#dashboard {
  position: fixed;
  right: 5%;
  top: 28%;
  width: 36vw;
  max-width: 520px;
  z-index: 10;
  opacity: 0;
  will-change: opacity;
  transition: opacity 0.4s ease;
}
.ipad-frame {
  background: #1a1a1e;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  padding: 10px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.ipad-screen {
  background: rgba(0, 8, 4, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(0, 204, 102, 0.08);
  padding: 12px 14px;
  overflow: hidden;
}
.ipad-info {
  border-bottom: 1px solid rgba(0, 204, 102, 0.15);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.ipad-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.ipad-line-tag {
  background: rgba(0, 204, 102, 0.15);
  color: #0c6;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: bold;
  white-space: nowrap;
}
.ipad-now {
  font-size: clamp(12px, 1.1vw, 15px);
  color: rgba(255, 255, 255, 0.5);
}
.ipad-variety-name {
  color: #0c6;
  font-weight: bold;
}
.ipad-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.ipad-progress-track {
  flex: 1;
  height: 8px;
  background: rgba(0, 204, 102, 0.1);
  border-radius: 4px;
  overflow: hidden;
}
.ipad-progress-fill {
  height: 100%;
  width: 0%;
  background: #0c6;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.ipad-progress-text {
  font-size: clamp(12px, 1.1vw, 15px);
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  min-width: 6em;
  text-align: right;
}
.ipad-table {
  font-size: clamp(11px, 1vw, 14px);
}
.ipad-thead {
  padding: 4px 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}
.ipad-th {
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(12px, 1vw, 14px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ipad-row {
  padding: 5px 0;
  transition: background 0.3s;
}
.ipad-row.active {
  background: rgba(0, 204, 102, 0.04);
  border-radius: 4px;
  padding: 5px 4px;
}
.ipad-row.scan-flash {
  background: rgba(0, 204, 102, 0.18);
}
.ipad-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px;
}
.ipad-row-name {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(13px, 1.1vw, 15px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ipad-row-count {
  color: #0c6;
  font-size: clamp(13px, 1.1vw, 15px);
  white-space: nowrap;
  margin-left: 8px;
}
.ipad-row-bar {
  height: 5px;
  background: rgba(0, 204, 102, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.ipad-row-fill {
  height: 100%;
  width: 0%;
  background: #0c6;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.ipad-row.warn .ipad-row-name { color: #fa0; }
.ipad-row.warn .ipad-row-count { color: #fa0; }
.ipad-row.warn .ipad-row-bar { background: rgba(255, 170, 0, 0.1); }
.ipad-row.warn .ipad-row-fill { background: #fa0; }
.ipad-warn-banner {
  background: rgba(255, 170, 0, 0.08);
  border: 1px solid rgba(255, 170, 0, 0.2);
  border-radius: 4px;
  padding: 3px 8px;
  margin: 6px 0 2px;
  color: #fa0;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: bold;
  letter-spacing: 0.05em;
}

/* ── Workflow comparison visual (Row 2) ────────────────────────── */
.wf-compare {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wf-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
}
.wf-paper {
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.wf-digital {
  border: 1px solid rgba(0, 204, 102, 0.35);
  box-shadow: 0 0 16px rgba(0, 204, 102, 0.06);
  animation: wf-sweep 3s ease-in-out infinite;
}
.wf-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 46px;
  flex-shrink: 0;
}
.wf-paper .wf-label { color: rgba(255, 255, 255, 0.25); }
.wf-digital .wf-label { color: #0c6; }
.wf-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 5px;
  font-size: 13px;
  line-height: 1.5;
}
.wf-paper .wf-steps { color: rgba(255, 255, 255, 0.3); }
.wf-digital .wf-steps { color: rgba(255, 255, 255, 0.8); }
.wf-dot {
  color: rgba(255, 255, 255, 0.15);
}
.wf-digital .wf-dot { color: rgba(0, 204, 102, 0.5); }
.wf-time {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  color: #0c6;
  font-weight: bold;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

@keyframes wf-sweep {
  0%, 100% { box-shadow: 0 0 16px rgba(0, 204, 102, 0.06); }
  50%      { box-shadow: 0 0 24px rgba(0, 204, 102, 0.15); }
}

/* ── Reconciliation visual ─────────────────────────────────────── */
.recon-visual {
  width: 100%;
  max-width: 360px;
}
.recon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}
.recon-row.recon-warn {
  border-color: rgba(255, 170, 0, 0.4);
  box-shadow: 0 0 12px rgba(255, 170, 0, 0.08);
}
.recon-line-tag {
  font-size: 14px;
  color: #0c6;
  min-width: 24px;
}
.recon-bar-wrap {
  flex: 1;
  position: relative;
  height: 18px;
}
.recon-bar-plug {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: rgba(0, 170, 255, 0.3);
  border-radius: 3px;
}
.recon-bar-seed {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: rgba(0, 204, 102, 0.5);
  border-radius: 3px;
}
.recon-bar-over {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(255, 170, 0, 0.5);
  border-radius: 0 3px 3px 0;
  animation: over-pulse 2s ease-in-out infinite;
}
@keyframes over-pulse {
  0%, 100% { opacity: 0.5; box-shadow: none; }
  50%      { opacity: 1;   box-shadow: 0 0 8px rgba(255, 170, 0, 0.3); }
}
.recon-counts {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  min-width: 70px;
  text-align: right;
}
.recon-delta { color: #fa0; font-weight: bold; }
.recon-ok { color: #4f8; }
.recon-legend {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .narrative-line {
    max-width: 25vw;
  }
  #dashboard {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(500px, 90vw);
    max-width: none;
  }
}
@media (max-width: 800px) {
  .narrative-line {
    max-width: 80vw;
    left: 50% !important;
    transform: translateX(-50%) !important;
    text-align: center !important;
  }
}
@media (max-width: 600px) {
  #header-panel {
    padding: 16px 20px 12px;
    max-width: 94vw;
  }
  .narrative-line {
    font-size: clamp(14px, 3.5vw, 18px);
    max-width: 88vw;
    left: 50% !important;
    transform: translateX(-50%) !important;
    text-align: center !important;
  }
  #dashboard {
    left: 5%;
    right: 5%;
    top: 55%;
    bottom: auto;
    transform: translateY(-40%);
    width: auto;
    max-width: none;
  }
  .ipad-frame {
    padding: 6px;
    border-radius: 14px;
  }
  .ipad-screen {
    padding: 10px;
    border-radius: 8px;
  }
  .ipad-info-row {
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arch-line-blue { animation: none; }
  .narrative-line { filter: none !important; }
  .wf-digital { animation: none; }
  .recon-bar-over { animation: none; }
}
