:root {
  color-scheme: dark;
  --bg: #05070a;
  --panel: rgba(6, 11, 14, 0.74);
  --panel-strong: rgba(7, 13, 17, 0.88);
  --line: rgba(232, 247, 243, 0.14);
  --line-strong: rgba(119, 222, 196, 0.42);
  --text: #f4fbf8;
  --muted: #93a9a6;
  --cyan: #4bd9ff;
  --green: #70e08b;
  --gold: #f1c75b;
  --red: #ff746d;
  --blue: #7ba7ff;
  --nd-red: #ef3f3f;
  --nd-blue: #1f98d2;
  --nd-green: #64c46c;
  --nd-alloy: #181817;
  --geo-overburden: #8a7c62;
  --geo-seal: #6b7480;
  --geo-sand: #d8b65f;
  --geo-base: #37465a;
  --brand-ribbon: linear-gradient(90deg, var(--nd-red), var(--nd-blue), var(--nd-green), var(--nd-alloy));
  --brand-ribbon-soft: linear-gradient(90deg, rgba(239, 63, 63, 0.72), rgba(31, 152, 210, 0.76), rgba(100, 196, 108, 0.72));
  --brand-ambient:
    radial-gradient(circle at 24% 22%, rgba(31, 152, 210, 0.08), transparent 28%),
    radial-gradient(circle at 76% 70%, rgba(100, 196, 108, 0.07), transparent 30%);
  --panel-edge-left: rgba(31, 152, 210, 0.72);
  --panel-edge-right: rgba(100, 196, 108, 0.58);
  --evidence-top: var(--brand-ribbon-soft);
  --active-panel-bg: rgba(75, 217, 255, 0.12);
}

html[data-theme="alloy"] {
  --brand-ribbon: linear-gradient(90deg, rgba(239, 63, 63, 0.62), rgba(31, 152, 210, 0.54), rgba(100, 196, 108, 0.58), rgba(255, 255, 255, 0.26));
  --brand-ribbon-soft: linear-gradient(90deg, rgba(239, 63, 63, 0.45), rgba(31, 152, 210, 0.52), rgba(100, 196, 108, 0.46));
  --brand-ambient:
    radial-gradient(circle at 18% 16%, rgba(31, 152, 210, 0.04), transparent 25%),
    radial-gradient(circle at 72% 78%, rgba(100, 196, 108, 0.04), transparent 28%);
  --panel-edge-left: rgba(31, 152, 210, 0.46);
  --panel-edge-right: rgba(100, 196, 108, 0.42);
  --evidence-top: linear-gradient(90deg, rgba(239, 63, 63, 0.48), rgba(31, 152, 210, 0.5), rgba(100, 196, 108, 0.48));
  --active-panel-bg: rgba(255, 255, 255, 0.055);
}

html[data-theme="spectrum"] {
  --brand-ribbon: linear-gradient(90deg, #ef3f3f 0 18%, #1f98d2 18% 56%, #64c46c 56% 86%, rgba(255, 255, 255, 0.46) 86%);
  --brand-ribbon-soft: linear-gradient(90deg, rgba(239, 63, 63, 0.92), rgba(31, 152, 210, 0.88), rgba(100, 196, 108, 0.88));
  --brand-ambient:
    radial-gradient(circle at 18% 18%, rgba(31, 152, 210, 0.14), transparent 28%),
    radial-gradient(circle at 58% 12%, rgba(239, 63, 63, 0.08), transparent 24%),
    radial-gradient(circle at 82% 74%, rgba(100, 196, 108, 0.13), transparent 32%);
  --panel-edge-left: rgba(31, 152, 210, 0.94);
  --panel-edge-right: rgba(100, 196, 108, 0.86);
  --evidence-top: var(--brand-ribbon);
  --active-panel-bg: rgba(31, 152, 210, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

button:hover,
button.active {
  border-color: var(--line-strong);
  background: rgba(75, 217, 255, 0.12);
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(75, 217, 255, 0.065), transparent 34%),
    linear-gradient(90deg, rgba(5, 7, 10, 0.96), rgba(5, 7, 10, 0.18) 31%, rgba(5, 7, 10, 0.18) 69%, rgba(5, 7, 10, 0.96)),
    var(--bg);
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--brand-ambient);
  mix-blend-mode: screen;
}

#sceneCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.topbar,
.public-entry,
.mobile-showcase,
.insight-switcher,
.project-panel,
.layer-manager,
.section-panel,
.viewport-hud,
.property-legend,
.depth-ruler,
.workflow-panel,
.decision-panel,
.evidence-dock,
.scene-hints,
.tour-card,
.case-panel,
.record-story-panel,
.record-story-end,
.author-stamp,
.about-modal,
.study-modal,
.loading {
  position: absolute;
  z-index: 5;
}

.topbar {
  top: 14px;
  left: 14px;
  right: 14px;
  display: grid;
  grid-template-columns: minmax(290px, 420px) minmax(0, 1fr) 552px;
  gap: 12px;
  align-items: center;
  pointer-events: none;
}

.mobile-showcase {
  display: none;
}

.brand,
.kpis,
.top-actions,
.public-entry-card,
.mobile-showcase,
.insight-switcher,
.project-panel,
.layer-manager,
.section-panel,
.viewport-hud,
.property-legend,
.depth-ruler,
.workflow-panel,
.decision-panel,
.evidence-dock,
.scene-hints,
.tour-card,
.case-panel,
.record-story-panel,
.record-story-end,
.author-stamp,
.about-modal,
.study-modal,
.loading {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(22px);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.34);
}

.brand {
  position: relative;
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  pointer-events: auto;
  overflow: hidden;
}

.brand::after,
.author-stamp::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--brand-ribbon);
  opacity: 0.86;
}

.nd-mark,
.mini-nd {
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 9px;
  background: #111;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 30px rgba(75, 217, 255, 0.16);
}

.nd-mark {
  width: 48px;
  height: 48px;
}

.mini-nd {
  width: 44px;
  height: 44px;
}

.nd-mark img,
.mini-nd img {
  display: block;
  width: 300%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: translateX(-33.333%);
}

.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nd-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: 26px;
  padding: 1px 7px 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(239, 63, 63, 0.2), transparent 31%),
    linear-gradient(155deg, rgba(31, 152, 210, 0.26), rgba(100, 196, 108, 0.18)),
    rgba(24, 24, 23, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.nd-n {
  display: inline-block;
  color: #d8dbd2;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  transform: skewX(-8deg);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.18);
}

.nd-d-shape {
  position: relative;
  display: inline-block;
  width: 27px;
  height: 20px;
  background: linear-gradient(135deg, var(--nd-blue), var(--nd-green) 58%, rgba(255, 255, 255, 0.82));
  clip-path: polygon(0 0, 70% 0, 100% 50%, 70% 100%, 0 100%);
  filter: drop-shadow(0 0 8px rgba(75, 217, 255, 0.22));
}

.nd-d-shape::after {
  content: "";
  position: absolute;
  inset: 4px 5px 4px 4px;
  background: rgba(9, 13, 14, 0.94);
  clip-path: polygon(0 0, 66% 0, 100% 50%, 66% 100%, 0 100%);
}

.brand small,
.section-label,
.mini-panel span,
.evidence-block span,
.kpi span,
.card-title span,
.risk-row span,
.slider-row span,
.loading span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 64px;
  pointer-events: auto;
}

.kpi {
  padding: 11px 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.kpi:last-child {
  border-right: 0;
}

.kpi:nth-child(1) {
  box-shadow: inset 0 2px 0 var(--nd-blue);
}

.kpi:nth-child(2) {
  box-shadow: inset 0 2px 0 var(--nd-green);
}

.kpi:nth-child(3) {
  box-shadow: inset 0 2px 0 var(--nd-red);
}

.kpi:nth-child(4) {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.38);
}

.kpi strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(15px, 1.4vw, 23px);
  line-height: 1;
}

.top-actions {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 7px;
  padding: 10px;
  pointer-events: auto;
}

.top-actions button {
  min-height: 42px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
}

#startHereBtn {
  border-color: rgba(112, 224, 139, 0.42);
  background: rgba(112, 224, 139, 0.09);
}

.public-entry {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 96px 24px 28px;
  background:
    linear-gradient(90deg, rgba(3, 6, 8, 0.88), rgba(3, 6, 8, 0.42) 48%, rgba(3, 6, 8, 0.84)),
    radial-gradient(circle at 50% 36%, rgba(31, 152, 210, 0.11), transparent 36%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.public-entry-open .public-entry {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.public-entry-card {
  position: relative;
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 124px);
  padding: 26px;
  overflow: auto;
  background:
    linear-gradient(135deg, rgba(31, 152, 210, 0.1), rgba(100, 196, 108, 0.07)),
    rgba(6, 11, 14, 0.94);
}

.public-entry-card::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 3px;
  background: var(--brand-ribbon);
}

.public-entry-heading {
  max-width: 820px;
}

.public-entry-heading > span,
.public-entry-results span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.public-entry-heading h1 {
  max-width: 760px;
  margin: 7px 0 0;
  color: #f4fbf8;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.public-entry-heading p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #dce9e5;
  font-size: 14px;
  font-weight: 740;
  line-height: 1.55;
}

.public-entry-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.public-entry-results article {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(232, 247, 243, 0.11);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 2px 0 rgba(75, 217, 255, 0.18);
}

.public-entry-results article:nth-child(2) {
  box-shadow: inset 0 2px 0 rgba(112, 224, 139, 0.25);
}

.public-entry-results article:nth-child(3) {
  box-shadow: inset 0 2px 0 rgba(241, 199, 91, 0.26);
}

.public-entry-results strong {
  display: block;
  margin-top: 7px;
  color: #f4fbf8;
  font-size: 16px;
  line-height: 1.25;
}

.public-entry-results p {
  margin: 7px 0 0;
  color: #adbfbc;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.48;
}

.public-entry-actions {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.public-entry-actions button {
  min-height: 48px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 900;
}

.public-entry-actions .primary {
  border-color: rgba(112, 224, 139, 0.52);
  background:
    linear-gradient(120deg, rgba(31, 152, 210, 0.2), rgba(100, 196, 108, 0.18)),
    rgba(255, 255, 255, 0.045);
}

.public-entry-note {
  display: flex;
  gap: 10px;
  margin-top: 13px;
  padding: 11px 12px;
  border-left: 3px solid var(--nd-blue);
  background: rgba(31, 152, 210, 0.065);
  color: #b9cbc8;
  font-size: 11px;
  line-height: 1.45;
}

.public-entry-note strong {
  flex: 0 0 auto;
  color: #eef8f5;
}

.insight-switcher {
  left: 50%;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  width: min(860px, calc(100vw - 520px));
  min-width: 680px;
  gap: 6px;
  padding: 7px;
  transform: translateX(-50%);
  pointer-events: auto;
}

.insight-switcher button {
  min-height: 34px;
  padding: 0 9px;
  border-color: rgba(232, 247, 243, 0.12);
  background: rgba(7, 13, 16, 0.74);
  color: #e8f4f1;
  font-size: 11px;
  font-weight: 900;
}

.insight-switcher button.active {
  border-color: rgba(75, 217, 255, 0.58);
  background:
    linear-gradient(120deg, rgba(31, 152, 210, 0.18), rgba(100, 196, 108, 0.12)),
    rgba(7, 13, 16, 0.88);
  box-shadow: inset 0 2px 0 var(--nd-blue);
}

#clearDrawersBtn {
  color: #d3dfdc;
}

.project-panel {
  left: 14px;
  top: 124px;
  width: 306px;
  max-height: calc(100vh - 214px);
  padding: 12px;
  overflow: auto;
  box-shadow:
    inset 2px 0 0 rgba(31, 152, 210, 0.72),
    0 22px 80px rgba(0, 0, 0, 0.34);
}

.project-tree {
  display: grid;
  gap: 8px;
}

.project-registry {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(75, 217, 255, 0.2);
  background:
    linear-gradient(135deg, rgba(31, 152, 210, 0.09), rgba(100, 196, 108, 0.035)),
    rgba(3, 6, 8, 0.72);
  box-shadow: inset 2px 0 0 rgba(75, 217, 255, 0.68);
}

.project-registry > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.project-registry header span,
.project-registry header strong,
.project-registry header em,
.project-name-field span,
.project-registry-list span,
.project-registry-list strong,
.project-registry-list em {
  display: block;
}

.project-registry header span,
.project-name-field span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-registry header strong {
  margin-top: 3px;
  color: #eaf6f3;
  font-size: 9px;
  line-height: 1.3;
}

.project-registry header em {
  margin-top: 2px;
  overflow: hidden;
  color: #70e08b;
  font-size: 8px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-registry > header nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 4px;
}

.project-registry > header button {
  min-height: 30px;
  padding: 0 7px;
  border-color: rgba(75, 217, 255, 0.34);
  color: #eaffff;
  font-size: 9px;
  font-weight: 950;
}

.project-name-field {
  display: grid;
  gap: 4px;
}

.project-active-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  padding: 6px 8px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(255, 255, 255, 0.025);
}

.project-active-summary span,
.project-active-summary strong,
.project-active-summary em {
  overflow: hidden;
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-active-summary span {
  color: #dce9e5;
  font-weight: 900;
}

.project-active-summary strong {
  color: #70e08b;
}

.project-active-summary em {
  grid-column: 1 / -1;
  color: #8fa5a1;
}

.project-conflict {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 183, 77, 0.58);
  background: rgba(255, 153, 51, 0.11);
  box-shadow: inset 2px 0 0 #ffb74d;
}

.project-conflict span,
.project-conflict strong {
  display: block;
}

.project-conflict span {
  color: #ffd39a;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-conflict strong {
  margin-top: 3px;
  color: #fff1dd;
  font-size: 8.5px;
  line-height: 1.35;
}

.project-conflict nav {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 5px;
}

.project-conflict button {
  min-height: 28px;
  padding: 0 6px;
  border-color: rgba(255, 183, 77, 0.46);
  color: #fff1dd;
  font-size: 8px;
  font-weight: 950;
}

.project-name-field input {
  width: 100%;
  height: 29px;
  border: 1px solid rgba(232, 247, 243, 0.12);
  border-radius: 4px;
  outline: 0;
  background: rgba(3, 6, 8, 0.76);
  color: #f4fbf8;
  font-size: 10px;
  font-weight: 900;
  padding: 0 8px;
}

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

.project-metadata-grid label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-metadata-grid label.wide {
  grid-column: 1 / -1;
}

.project-metadata-grid span,
.project-registry footer span,
.project-registry footer strong {
  display: block;
}

.project-metadata-grid span,
.project-registry footer span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-metadata-grid input,
.project-metadata-grid select,
.project-metadata-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(232, 247, 243, 0.12);
  border-radius: 3px;
  outline: 0;
  background: rgba(3, 6, 8, 0.76);
  color: #eaf6f3;
  font-size: 8.5px;
  font-weight: 850;
}

.project-metadata-grid input,
.project-metadata-grid select {
  height: 26px;
  padding: 0 6px;
}

.project-metadata-grid textarea {
  min-height: 44px;
  max-height: 76px;
  padding: 6px;
  resize: vertical;
}

.project-metadata-grid input:focus,
.project-metadata-grid select:focus,
.project-metadata-grid textarea:focus {
  border-color: rgba(75, 217, 255, 0.64);
}

.project-name-field input:focus {
  border-color: rgba(75, 217, 255, 0.64);
  box-shadow: 0 0 0 2px rgba(75, 217, 255, 0.08);
}

.project-registry-list {
  display: grid;
  gap: 4px;
}

.project-registry-list button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
}

.project-registry-list button.active {
  border-color: rgba(112, 224, 139, 0.5);
  background: rgba(112, 224, 139, 0.08);
  box-shadow: inset 2px 0 0 #70e08b;
}

.project-registry-list span {
  overflow: hidden;
  color: #f4fbf8;
  font-size: 10px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-registry-list strong,
.project-registry-list em {
  overflow: hidden;
  color: #93a9a6;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-registry-list button.active strong {
  color: #bfeccb;
}

.project-registry footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid rgba(232, 247, 243, 0.09);
}

.project-registry footer strong {
  margin-top: 2px;
  overflow: hidden;
  color: #93a9a6;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-registry footer em {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #718884;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-registry footer em.storage-warning {
  color: #ffbd6a;
}

.project-registry footer nav {
  display: flex;
  gap: 4px;
}

.project-registry footer nav > button:not(.danger) {
  min-height: 28px;
  padding: 0 8px;
  border-color: rgba(75, 217, 255, 0.24);
  color: #bcd5d0;
  font-size: 8.5px;
  font-weight: 950;
}

.project-registry .danger {
  min-height: 28px;
  padding: 0 8px;
  border-color: rgba(255, 116, 109, 0.28);
  color: #ffaaa5;
  font-size: 8.5px;
  font-weight: 950;
}

.project-registry .danger.armed {
  border-color: rgba(255, 116, 109, 0.72);
  background: rgba(255, 116, 109, 0.14);
  color: #ffe2df;
}

.project-registry .danger:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.tree-group {
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.tree-group > strong {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(232, 247, 243, 0.08);
  color: #dce9e5;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tree-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.tree-item:hover,
.tree-item.active {
  background: rgba(75, 217, 255, 0.1);
}

.tree-item i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--tree-color, var(--cyan));
}

.tree-item span {
  overflow: hidden;
  color: #eef8f5;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-item em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.layer-manager {
  left: 50%;
  bottom: 66px;
  display: grid;
  width: min(560px, calc(100vw - 660px));
  min-width: 470px;
  max-height: min(560px, calc(100vh - 190px));
  gap: 10px;
  padding: 12px;
  overflow: auto;
  transform: translateX(-50%) translateY(16px);
  pointer-events: auto;
}

.section-panel {
  left: 50%;
  top: 118px;
  bottom: auto;
  width: min(1120px, calc(100vw - 440px));
  min-width: 860px;
  max-height: calc(100vh - 200px);
  padding: 12px;
  overflow: auto;
  transform: translateX(-50%) translateY(16px);
  pointer-events: auto;
}

.section-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(232, 247, 243, 0.1);
}

.section-panel-head span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-panel-head strong {
  display: block;
  margin-top: 3px;
  color: #f4fbf8;
  font-size: 16px;
}

.section-panel-head em {
  max-width: 440px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  text-align: right;
}

.workspace-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 8px;
  padding: 4px;
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(3, 6, 8, 0.66);
}

.workspace-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #8fa39f;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.workspace-tabs button.active {
  background: rgba(75, 217, 255, 0.08);
  color: #f4fbf8;
  box-shadow: inset 0 -2px 0 #4bd9ff;
}

.seismic-display-controls {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.seismic-mode-group,
.slice-mode-group {
  display: flex;
  gap: 4px;
}

.seismic-mode-group {
  align-items: stretch;
}

.seismic-display-controls button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 4px;
  border-color: rgba(232, 247, 243, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: #dce9e5;
  font-size: 10px;
  font-weight: 900;
}

.seismic-display-controls button.active {
  border-color: rgba(216, 182, 95, 0.72);
  background:
    linear-gradient(90deg, rgba(197, 43, 39, 0.18), rgba(36, 92, 180, 0.16)),
    rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 2px 0 rgba(216, 182, 95, 0.86);
}

.seismic-display-controls button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.seismic-slice-workbench {
  display: grid;
  grid-template-areas:
    "modes primary secondary apply badge"
    "status status status status status";
  grid-template-columns: max-content minmax(110px, 1fr) minmax(110px, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(3, 6, 8, 0.72);
  box-shadow: inset 2px 0 0 rgba(143, 163, 159, 0.32);
}

.seismic-slice-workbench .slice-mode-group {
  grid-area: modes;
}

.seismic-slice-workbench.ready {
  box-shadow: inset 2px 0 0 rgba(75, 217, 255, 0.68);
}

.seismic-slice-workbench label {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto;
  gap: 5px;
  align-items: center;
  min-width: 0;
  color: #8fa39f;
  font-size: 8px;
  font-weight: 950;
}

.seismic-slice-workbench label:nth-of-type(1) {
  grid-area: primary;
}

.seismic-slice-workbench label:nth-of-type(2) {
  grid-area: secondary;
}

.seismic-slice-workbench.plane-mode {
  grid-template-areas:
    "modes primary secondary apply badge"
    "modes tertiary quaternary apply badge"
    "status status status status status";
}

.seismic-slice-workbench.plane-mode label:nth-of-type(3) {
  grid-area: tertiary;
}

.seismic-slice-workbench.plane-mode label:nth-of-type(4) {
  grid-area: quaternary;
}

.seismic-slice-workbench.plane-mode {
  column-gap: 9px;
}

.seismic-slice-workbench.plane-mode .slice-mode-group {
  gap: 3px;
}

.seismic-slice-workbench.plane-mode .slice-mode-group button {
  padding: 0 7px;
  font-size: 9px;
}

.seismic-slice-workbench.plane-mode label {
  grid-template-columns: auto minmax(62px, 1fr) auto;
}

.seismic-slice-workbench.plane-mode input[type="range"] {
  min-width: 62px;
}

.seismic-slice-workbench.plane-mode b {
  min-width: 44px;
  font-size: 8px;
}

.seismic-slice-workbench input[type="range"] {
  width: 100%;
  min-width: 80px;
  accent-color: #4bd9ff;
}

.seismic-slice-workbench b {
  min-width: 48px;
  color: #f4fbf8;
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}

.seismic-slice-workbench em {
  grid-area: status;
  min-width: 0;
  overflow: hidden;
  color: #8fa39f;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seismic-slice-workbench > strong {
  grid-area: badge;
  color: #4bd9ff;
  font-size: 8px;
  font-weight: 950;
  white-space: nowrap;
}

.seismic-slice-workbench .slice-apply {
  grid-area: apply;
  border-color: rgba(75, 217, 255, 0.42);
  color: #eaffff;
}

.interpretation-sync {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(250px, 0.95fr) minmax(250px, 0.95fr) minmax(320px, 1.1fr);
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}

#sectionPanel [hidden] {
  display: none !important;
}

#sectionPanel .sync-actions,
#sectionPanel .pick-manager,
#sectionPanel .contact-manager,
#sectionPanel .las-audit-panel,
#sectionPanel .las-import-workspace,
#sectionPanel .project-import-workspace,
#sectionPanel .calibration-workspace,
#sectionPanel .property-workspace,
#sectionPanel .qc-workspace,
#sectionPanel .petro-model-strip {
  display: none;
}

#sectionPanel[data-workspace="seismic"] .sync-actions,
#sectionPanel[data-workspace="seismic"] .pick-manager,
#sectionPanel[data-workspace="imports"] .las-audit-panel,
#sectionPanel[data-workspace="imports"] .las-import-workspace,
#sectionPanel[data-workspace="imports"] .project-import-workspace,
#sectionPanel[data-workspace="correlation"] .contact-manager,
#sectionPanel[data-workspace="correlation"] .las-audit-panel,
#sectionPanel[data-workspace="correlation"] .las-import-workspace,
#sectionPanel[data-workspace="calibration"] .calibration-workspace,
#sectionPanel[data-workspace="properties"] .property-workspace,
#sectionPanel[data-workspace="properties"] .petro-model-strip,
#sectionPanel[data-workspace="qc"] .qc-workspace {
  display: grid;
}

#sectionPanel:not([data-workspace="seismic"]) .interpretation-sync {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sync-readout,
.volume-readout,
.las-readout,
.sync-actions,
.pick-manager,
.contact-manager,
.petro-model-strip {
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(255, 255, 255, 0.032);
}

.sync-readout,
.volume-readout,
.las-readout {
  padding: 8px 10px;
}

.sync-readout span,
.volume-readout span,
.las-readout span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sync-readout strong,
.volume-readout strong,
.las-readout strong {
  display: block;
  margin-top: 3px;
  color: #f4fbf8;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-readout em,
.volume-readout em,
.las-readout em {
  display: block;
  margin-top: 3px;
  color: #9fb2af;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.volume-readout small {
  display: block;
  margin-top: 4px;
  color: #6fcbe1;
  font-size: 8px;
  font-weight: 850;
  line-height: 1.3;
}

.volume-readout small.geometry-warning {
  color: #f1c75b;
}

.volume-readout input,
.las-readout input {
  display: none;
}

.sync-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-content: center;
  padding: 8px;
}

.sync-actions button,
.pick-row > button {
  min-height: 28px;
  border-color: rgba(232, 247, 243, 0.12);
  border-radius: 4px;
  background: rgba(7, 13, 16, 0.72);
  color: #dce9e5;
  font-size: 10px;
  font-weight: 900;
}

.sync-actions button.active,
.pick-row > button.active {
  border-color: rgba(75, 217, 255, 0.58);
  box-shadow: inset 0 2px 0 rgba(75, 217, 255, 0.78);
}

.pick-manager {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.contact-manager {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 1.65fr) repeat(4, minmax(90px, 1fr));
  gap: 6px;
  padding: 7px;
}

.contact-note {
  padding: 6px 8px;
  border-right: 1px solid rgba(232, 247, 243, 0.1);
}

.contact-note span,
.contact-note strong,
.contact-note em {
  display: block;
}

.contact-note span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-note strong {
  margin-top: 3px;
  color: #f4fbf8;
  font-size: 11px;
}

.contact-note em {
  margin-top: 3px;
  color: #9fb2af;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.contact-manager button {
  min-height: 34px;
  border-radius: 4px;
  border-color: rgba(232, 247, 243, 0.12);
  background: rgba(7, 13, 16, 0.72);
  color: #dce9e5;
  font-size: 9px;
  font-weight: 900;
}

.contact-manager button[data-well-pick-select] {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  text-align: left;
}

.contact-manager button[data-well-pick-select] i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--well-pick-color);
}

.contact-manager button span,
.contact-manager button em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-manager button em {
  grid-column: 2;
  color: #9fb2af;
  font-size: 8px;
  font-style: normal;
}

.contact-manager button.active {
  border-color: color-mix(in srgb, var(--well-pick-color, #4bd9ff) 72%, white 8%);
  box-shadow: inset 0 2px 0 var(--well-pick-color, #4bd9ff);
}

.petro-model-strip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.petro-model-strip div {
  padding: 9px 10px;
  border-left: 1px solid rgba(232, 247, 243, 0.08);
  box-shadow: inset 0 2px 0 rgba(112, 224, 139, 0.18);
}

.petro-model-strip div:first-child {
  border-left: 0;
}

.petro-model-strip span,
.petro-model-strip strong,
.petro-model-strip em {
  display: block;
}

.petro-model-strip span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.petro-model-strip strong {
  margin-top: 4px;
  color: #f4fbf8;
  font-size: 12px;
  font-weight: 950;
}

.petro-model-strip em {
  margin-top: 3px;
  color: #9fb2af;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}

.las-audit-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 0.78fr) minmax(360px, 1.25fr) minmax(300px, 1fr);
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(232, 247, 243, 0.12);
  background:
    linear-gradient(90deg, rgba(75, 217, 255, 0.065), rgba(112, 224, 139, 0.045), rgba(216, 182, 95, 0.055)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 2px 0 rgba(75, 217, 255, 0.36),
    inset 0 -1px 0 rgba(239, 69, 47, 0.22);
}

.las-audit-head,
.las-audit-grid,
.las-map-grid,
.las-cutoff-grid,
.las-pay-proof {
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(3, 6, 8, 0.48);
}

.las-audit-head {
  padding: 9px 10px;
}

.las-audit-head span,
.las-audit-head strong,
.las-audit-head em,
.las-audit-grid span,
.las-audit-grid strong,
.las-audit-grid em,
.las-map-grid span,
.las-map-grid strong,
.las-map-grid em,
.las-pay-proof span,
.las-pay-proof strong,
.las-pay-proof em {
  display: block;
}

.las-audit-head span,
.las-audit-grid span,
.las-map-grid span,
.las-pay-proof span,
.las-cutoff-grid span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.las-audit-head strong,
.las-audit-grid strong,
.las-map-grid strong,
.las-pay-proof strong {
  margin-top: 4px;
  color: #f4fbf8;
  font-size: 11px;
  font-weight: 950;
}

.las-audit-head em,
.las-audit-grid em,
.las-map-grid em,
.las-pay-proof em {
  margin-top: 3px;
  color: #9fb2af;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.28;
}

.las-audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: span 2;
}

.las-audit-grid div,
.las-map-grid div {
  min-width: 0;
  padding: 8px 9px;
  border-left: 1px solid rgba(232, 247, 243, 0.07);
  border-top: 1px solid rgba(232, 247, 243, 0.055);
}

.las-audit-grid div:nth-child(odd),
.las-map-grid div:first-child {
  border-left: 0;
}

.las-map-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-column: 1 / -1;
}

.las-map-grid div.mapped {
  box-shadow: inset 0 2px 0 rgba(112, 224, 139, 0.44);
}

.las-map-grid div.missing {
  box-shadow: inset 0 2px 0 rgba(239, 69, 47, 0.38);
}

.las-map-grid div.review {
  box-shadow: inset 0 2px 0 rgba(241, 199, 91, 0.58);
}

.las-cutoff-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-column: 1 / 3;
  gap: 6px;
  padding: 7px;
}

.las-cutoff-grid label {
  display: grid;
  grid-template-columns: minmax(52px, 0.75fr) minmax(64px, 1fr) minmax(40px, 0.5fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(232, 247, 243, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.las-cutoff-grid input {
  width: 100%;
  min-width: 0;
  height: 24px;
  border: 1px solid rgba(75, 217, 255, 0.26);
  border-radius: 3px;
  background: rgba(3, 6, 8, 0.78);
  color: #f4fbf8;
  font-size: 10px;
  font-weight: 900;
  text-align: right;
}

.las-cutoff-grid strong {
  color: #70e08b;
  font-size: 10px;
  font-weight: 950;
  text-align: right;
}

.las-pay-proof {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(190px, 1fr);
  gap: 0;
  grid-column: 3;
  padding: 0;
}

.las-pay-proof > div {
  padding: 8px 9px;
}

.las-pay-proof > div + div {
  border-left: 1px solid rgba(232, 247, 243, 0.08);
}

.las-intervals {
  display: grid;
  gap: 5px;
}

.las-intervals span {
  padding: 4px 5px;
  border-left: 2px solid rgba(112, 224, 139, 0.74);
  background: rgba(112, 224, 139, 0.045);
  color: #dce9e5;
  font-size: 8.5px;
  font-weight: 900;
  text-transform: none;
}

.las-intervals b {
  display: inline-block;
  min-width: 42px;
  color: #70e08b;
}

.las-import-workspace {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1.28fr);
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(232, 247, 243, 0.12);
  background: rgba(3, 6, 8, 0.54);
  box-shadow: inset 0 2px 0 rgba(112, 224, 139, 0.34);
}

.las-import-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-column: 1 / -1;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.las-import-head span,
.las-import-head strong,
.las-import-head em {
  display: block;
}

.las-import-head span,
.las-manual-map > div > span,
.las-import-ledger label span,
.las-manual-map label span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.las-import-head strong,
.las-manual-map > div > strong {
  margin-top: 3px;
  color: #f4fbf8;
  font-size: 11px;
}

.las-import-head em,
.las-manual-map > div > em {
  margin-top: 3px;
  color: #9fb2af;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 850;
}

.las-import-kpis {
  display: flex;
  gap: 5px;
}

.las-import-kpis span {
  min-width: 62px;
  padding: 6px 8px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(3, 6, 8, 0.62);
  text-align: center;
}

.las-import-kpis b {
  display: block;
  color: #70e08b;
  font-size: 13px;
}

.las-import-ledger {
  display: grid;
  gap: 5px;
  align-content: start;
}

.las-import-ledger > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(232, 247, 243, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.las-import-ledger > div.passed {
  box-shadow: inset 3px 0 0 rgba(112, 224, 139, 0.72);
}

.las-import-ledger > div.failed {
  box-shadow: inset 3px 0 0 rgba(239, 69, 47, 0.78);
}

.las-import-ledger button {
  min-width: 0;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  text-align: left;
}

.las-import-ledger button span,
.las-import-ledger button strong,
.las-import-ledger button em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.las-import-ledger button span {
  color: #f4fbf8;
  font-size: 10px;
  font-weight: 950;
}

.las-import-ledger button strong {
  margin-top: 2px;
  color: #b9cbc7;
  font-size: 8px;
}

.las-import-ledger button em {
  margin-top: 2px;
  color: #829692;
  font-size: 8px;
  font-style: normal;
}

.las-import-ledger label,
.las-manual-map label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.las-import-ledger select,
.las-manual-map select {
  width: 100%;
  min-width: 0;
  height: 26px;
  border: 1px solid rgba(75, 217, 255, 0.22);
  border-radius: 3px;
  background: #071013;
  color: #eaf6f3;
  font-size: 8.5px;
  font-weight: 850;
}

.las-manual-map {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) repeat(3, minmax(90px, 0.68fr));
  gap: 6px;
  align-content: start;
  padding: 7px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(255, 255, 255, 0.025);
}

.las-manual-map > div {
  grid-row: span 2;
  padding: 5px;
  border-right: 1px solid rgba(232, 247, 243, 0.08);
}

.import-progress {
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  padding: 8px 10px 11px;
  border: 1px solid rgba(75, 217, 255, 0.2);
  background: rgba(4, 10, 13, 0.78);
}

.import-progress span,
.import-progress strong {
  position: relative;
  z-index: 1;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-progress span {
  color: #dce9e5;
  font-weight: 900;
}

.import-progress strong {
  color: #70e08b;
  font-weight: 950;
}

.import-progress i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(232, 247, 243, 0.08);
}

.import-progress i::after {
  content: "";
  display: block;
  width: var(--import-progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--nd-blue), var(--nd-green));
  transition: width 160ms ease;
}

.project-import-workspace {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(75, 217, 255, 0.16);
  background: rgba(3, 6, 8, 0.62);
  box-shadow: inset 0 2px 0 rgba(75, 217, 255, 0.42);
}

.project-import-workspace > header {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.project-import-workspace header span,
.project-import-workspace header strong,
.project-import-workspace header em,
.project-map-grid span,
.project-map-grid em,
.project-validation span,
.project-validation strong,
.project-validation em {
  display: block;
}

.project-import-workspace header span,
.project-map-grid span,
.project-validation span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-import-workspace header strong,
.project-validation strong {
  margin-top: 3px;
  color: #f4fbf8;
  font-size: 11px;
}

.project-import-workspace header em,
.project-map-grid em,
.project-validation em {
  margin-top: 3px;
  color: #93a9a6;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
}

.project-import-kpis {
  display: flex;
  gap: 5px;
}

.project-import-kpis span {
  min-width: 68px;
  padding: 6px 8px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(3, 6, 8, 0.62);
  text-align: center;
}

.project-import-kpis b {
  display: block;
  color: #70e08b;
  font-size: 13px;
}

.project-map-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(105px, 1fr));
  gap: 6px;
  align-content: start;
  padding: 7px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(255, 255, 255, 0.025);
}

.project-map-grid label {
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(232, 247, 243, 0.07);
  background: rgba(3, 6, 8, 0.42);
}

.project-map-grid select {
  width: 100%;
  height: 26px;
  margin-top: 4px;
  border: 1px solid rgba(75, 217, 255, 0.22);
  border-radius: 3px;
  background: #071013;
  color: #eaf6f3;
  font-size: 8.5px;
  font-weight: 850;
}

.project-validation {
  display: grid;
  gap: 6px;
  align-content: start;
}

.project-validation > div,
.project-validation nav {
  padding: 8px 9px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(255, 255, 255, 0.025);
}

.project-validation nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.project-validation button {
  min-height: 30px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 950;
}

.calibration-workspace {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(420px, 1.1fr) minmax(360px, 0.9fr);
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(75, 217, 255, 0.16);
  background: rgba(3, 6, 8, 0.62);
  box-shadow: inset 0 2px 0 rgba(75, 217, 255, 0.42), inset 3px 0 0 rgba(210, 113, 255, 0.26);
}

.calibration-head {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.calibration-head span,
.calibration-head strong,
.calibration-head em {
  display: block;
}

.calibration-head > div:first-child > span,
.residual-head span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.calibration-head > div:first-child > strong,
.residual-head strong {
  margin-top: 3px;
  color: #f4fbf8;
  font-size: 11px;
}

.calibration-head > div:first-child > em,
.residual-head em {
  margin-top: 3px;
  color: #9fb2af;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 850;
}

.calibration-kpis {
  display: flex;
  gap: 5px;
}

.calibration-kpis span {
  min-width: 68px;
  padding: 6px 7px;
  border: 1px solid rgba(232, 247, 243, 0.09);
  background: rgba(3, 6, 8, 0.64);
  color: #91a7a3;
  font-size: 7.5px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calibration-kpis b {
  display: block;
  color: #d271ff;
  font-size: 12px;
  text-transform: none;
}

.calibration-kpis .post b {
  color: #70e08b;
}

.calibration-kpis .holdout b {
  color: #4bd9ff;
}

.calibration-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calibration-actions input {
  display: none;
}

.calibration-actions button {
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 3px;
  border-color: rgba(232, 247, 243, 0.12);
  background: rgba(7, 13, 16, 0.82);
  color: #dce9e5;
  font-size: 8px;
  font-weight: 900;
}

.calibration-actions button.active {
  border-color: rgba(112, 224, 139, 0.54);
  box-shadow: inset 0 2px 0 rgba(112, 224, 139, 0.78);
}

.calibration-ledger,
.calibration-residuals {
  display: grid;
  gap: 5px;
  align-content: start;
}

.calibration-ledger > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 104px;
  gap: 7px;
  align-items: center;
  min-height: 42px;
  padding: 5px 6px;
  border: 1px solid rgba(232, 247, 243, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.calibration-ledger > div.deviation {
  box-shadow: inset 3px 0 0 rgba(112, 224, 139, 0.72);
}

.calibration-ledger > div.checkshot {
  box-shadow: inset 3px 0 0 rgba(210, 113, 255, 0.72);
}

.calibration-ledger > div > span {
  color: #dce9e5;
  font-size: 9px;
  font-weight: 950;
  text-align: center;
}

.calibration-ledger p {
  min-width: 0;
  margin: 0;
}

.calibration-ledger strong,
.calibration-ledger em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calibration-ledger strong {
  color: #f4fbf8;
  font-size: 9px;
}

.calibration-ledger em {
  margin-top: 2px;
  color: #8fa39f;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 800;
}

.calibration-ledger label {
  display: grid;
  gap: 2px;
}

.calibration-ledger small {
  color: #829692;
  font-size: 7px;
  font-weight: 900;
}

.calibration-ledger select {
  width: 100%;
  height: 24px;
  border: 1px solid rgba(75, 217, 255, 0.22);
  border-radius: 3px;
  background: #071013;
  color: #eaf6f3;
  font-size: 8px;
  font-weight: 850;
}

.calibration-residuals {
  padding: 6px;
  border: 1px solid rgba(232, 247, 243, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.residual-head {
  padding: 2px 3px 7px;
  border-bottom: 1px solid rgba(232, 247, 243, 0.08);
}

.residual-row {
  display: grid;
  grid-template-columns: 38px repeat(5, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
  min-height: 29px;
  padding: 4px 5px;
  border-left: 2px solid rgba(75, 217, 255, 0.48);
  background: rgba(3, 6, 8, 0.48);
}

.residual-row strong {
  color: #f4fbf8;
  font-size: 9px;
}

.residual-row span,
.residual-empty {
  color: #9fb2af;
  font-size: 7.5px;
  font-weight: 850;
  white-space: nowrap;
}

.residual-row .post {
  color: #70e08b;
}

.residual-row .holdout {
  color: #4bd9ff;
}

.residual-empty {
  padding: 10px;
  white-space: normal;
}

.property-workspace,
.qc-workspace {
  grid-column: 1 / -1;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(3, 6, 8, 0.58);
}

.property-workspace {
  grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.2fr) minmax(330px, 1fr);
  align-items: center;
  box-shadow: inset 0 2px 0 rgba(112, 224, 139, 0.36);
}

.property-workspace > div:first-child span,
.property-workspace > div:first-child strong,
.property-workspace > div:first-child em,
.qc-workspace header span,
.qc-workspace header strong,
.qc-workspace header em {
  display: block;
}

.property-workspace > div:first-child span,
.qc-workspace header span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.property-workspace > div:first-child strong,
.qc-workspace header strong {
  margin-top: 3px;
  color: #f4fbf8;
  font-size: 12px;
}

.property-workspace > div:first-child em,
.qc-workspace header em {
  margin-top: 3px;
  color: #8fa39f;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
}

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

@media (max-width: 1180px) {
  .seismic-display-controls {
    grid-template-columns: 1fr;
  }

  .seismic-slice-workbench {
    grid-template-areas:
      "modes primary apply badge"
      "secondary secondary secondary secondary"
      "status status status status";
    grid-template-columns: max-content minmax(160px, 1fr) auto auto;
  }

  .seismic-slice-workbench em {
    grid-column: auto;
  }
}

.property-workspace nav button {
  min-height: 28px;
  border-radius: 3px;
  border-color: rgba(232, 247, 243, 0.1);
  background: rgba(7, 13, 16, 0.78);
  color: #aebfbb;
  font-size: 8px;
  font-weight: 900;
}

.property-workspace nav button.active {
  border-color: rgba(112, 224, 139, 0.54);
  color: #f4fbf8;
  box-shadow: inset 0 2px 0 #70e08b;
}

.property-qc {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.property-qc span {
  padding: 6px 4px;
  border: 1px solid rgba(232, 247, 243, 0.08);
  color: #8fa39f;
  font-size: 7px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.property-qc b {
  display: block;
  margin-bottom: 2px;
  color: #70e08b;
  font-size: 10px;
  text-transform: none;
}

.qc-workspace {
  box-shadow: inset 0 2px 0 rgba(75, 217, 255, 0.36);
}

.qc-workspace header {
  padding: 3px 4px 8px;
  border-bottom: 1px solid rgba(232, 247, 243, 0.08);
}

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

.qc-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  min-height: 70px;
  padding: 8px;
  border: 1px solid rgba(232, 247, 243, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.qc-grid article.passed {
  box-shadow: inset 3px 0 0 rgba(112, 224, 139, 0.74);
}

.qc-grid article.warning {
  box-shadow: inset 3px 0 0 rgba(241, 199, 91, 0.74);
}

.qc-grid i {
  grid-row: 1 / span 3;
  align-self: start;
  padding: 3px 5px;
  border: 1px solid currentColor;
  color: #70e08b;
  font-size: 7px;
  font-style: normal;
  font-weight: 950;
}

.qc-grid .warning i {
  color: #f1c75b;
}

.qc-grid span {
  color: #8fa39f;
  font-size: 8px;
  font-weight: 950;
  text-transform: uppercase;
}

.qc-grid strong {
  color: #f4fbf8;
  font-size: 12px;
}

.qc-grid em {
  color: #8fa39f;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.pick-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border-left: 1px solid rgba(232, 247, 243, 0.08);
}

.pick-row:first-child {
  border-left: 0;
}

.pick-row.active {
  background: rgba(75, 217, 255, 0.08);
  box-shadow: inset 0 2px 0 var(--pick-color);
}

.pick-row button:first-child {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  grid-column: 1 / -1;
  min-height: 30px;
  padding: 0 5px;
  text-align: left;
}

.pick-row i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--pick-color);
}

.pick-row span,
.pick-row em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pick-row span {
  color: #f4fbf8;
  font-size: 10px;
}

.pick-row em {
  grid-column: 2;
  color: #9fb2af;
  font-size: 9px;
  font-style: normal;
}

.pick-row small {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: start;
  color: #9fb2af;
  font-size: 9px;
  font-weight: 900;
}

.linked-views {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 8px;
}

.view-cell {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.view-cell span {
  display: block;
  margin-bottom: 6px;
  color: #b8c9c5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.view-cell canvas {
  display: block;
  width: 100%;
  height: 132px;
  background: rgba(2, 6, 8, 0.72);
}

.view-cell.wide {
  grid-row: span 2;
}

.view-cell.wide canvas {
  height: 318px;
}

.view-cell.correlation-wide {
  grid-column: 1 / -1;
  order: -1;
}

.view-cell.correlation-wide canvas {
  height: 260px;
}

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

.layer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.layer-row span {
  display: block;
  color: #eef8f5;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
}

.layer-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.layer-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.layer-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border: 1px solid rgba(232, 247, 243, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.layer-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(232, 247, 243, 0.68);
  transition: transform 0.18s ease, background 0.18s ease;
}

.layer-row input:checked + .layer-toggle {
  border-color: rgba(75, 217, 255, 0.52);
  background:
    linear-gradient(90deg, rgba(31, 152, 210, 0.48), rgba(100, 196, 108, 0.42)),
    rgba(7, 13, 16, 0.86);
}

.layer-row input:checked + .layer-toggle::after {
  transform: translateX(17px);
  background: #f4fbf8;
}

.property-controls {
  padding-top: 2px;
}

.property-buttons {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.property-buttons button {
  min-height: 32px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 900;
}

.viewport-hud {
  top: 106px;
  left: 296px;
  right: 380px;
  display: grid;
  grid-template-columns: 1.18fr 1fr 1fr 1.25fr 0.55fr;
  gap: 1px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.industry-mode .viewport-hud {
  opacity: 1;
  transform: translateY(0);
}

.viewport-hud div {
  min-width: 0;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.035);
}

.viewport-hud span,
.legend-head span,
.legend-ticks,
.depth-ruler {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.viewport-hud strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #ecf7f3;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-legend {
  top: 166px;
  left: 296px;
  width: 316px;
  padding: 9px 10px 8px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.industry-mode .property-legend {
  opacity: 1;
  transform: translateY(0);
}

.legend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.legend-head strong {
  color: #edf7f4;
  font-size: 11px;
  white-space: nowrap;
}

.legend-bar {
  height: 13px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--legend-gradient, linear-gradient(90deg, #1b2433, #2c83be, #d6cf69, #db513f));
  box-shadow: 0 0 22px rgba(75, 217, 255, 0.12);
}

.legend-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.legend-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(207, 224, 219, 0.68);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.depth-ruler {
  top: 166px;
  right: 380px;
  display: grid;
  width: 78px;
  height: min(414px, calc(100vh - 310px));
  min-height: 260px;
  align-content: space-between;
  padding: 10px 7px 10px 18px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.industry-mode .depth-ruler {
  opacity: 1;
  transform: translateX(0);
}

.depth-ruler::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 10px;
  width: 1px;
  background: rgba(232, 247, 243, 0.22);
}

.depth-ruler span {
  position: relative;
  color: #d3e1de;
  font-size: 10px;
  line-height: 1.1;
}

.depth-ruler strong {
  position: absolute;
  top: -18px;
  right: 0;
  color: #e5f2ee;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.depth-ruler span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -14px;
  width: 7px;
  height: 1px;
  background: rgba(232, 247, 243, 0.42);
}

.workflow-panel {
  left: 14px;
  top: 124px;
  width: 268px;
  padding: 12px;
  box-shadow:
    inset 2px 0 0 var(--panel-edge-left),
    0 22px 80px rgba(0, 0, 0, 0.34);
}

.section-label {
  margin-bottom: 10px;
  color: #b7c8c5;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow {
  display: grid;
  gap: 8px;
}

.step-btn {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px;
  text-align: left;
}

.step-btn::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--nd-blue), var(--nd-green));
  opacity: 0;
}

.step-btn:nth-child(3n + 1) i {
  color: var(--nd-blue);
}

.step-btn:nth-child(3n + 2) i {
  color: var(--nd-green);
}

.step-btn:nth-child(3n) i {
  color: var(--nd-red);
}

.step-btn.active::after {
  opacity: 0.9;
}

.step-btn.active {
  background:
    linear-gradient(90deg, rgba(31, 152, 210, 0.12), rgba(100, 196, 108, 0.08)),
    var(--active-panel-bg);
}

.step-btn i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
  font-style: normal;
  font-weight: 900;
}

.step-btn strong {
  display: block;
  font-size: 13px;
}

.step-btn span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.mini-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.mini-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 20px;
}

.mini-panel p {
  margin: 8px 0 0;
  color: #d9e7e3;
  font-size: 12px;
  line-height: 1.45;
}

.strat-card {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.strat-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.strat-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 1px 7px;
  align-items: center;
  min-height: 34px;
  padding: 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #dfe9e5;
  font-size: 11px;
}

.strat-row:first-of-type {
  border-top: 0;
}

.strat-row i {
  grid-row: 1 / 3;
  display: block;
  width: 10px;
  height: 26px;
  border-radius: 2px;
}

.strat-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strat-row small {
  color: #d0ddd9;
  font-size: 10px;
  white-space: nowrap;
}

.strat-row em {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.strat-row.overburden i {
  background: var(--geo-overburden);
}

.strat-row.seal i {
  background: var(--geo-seal);
}

.strat-row.reservoir i {
  background:
    linear-gradient(180deg, transparent 0 66%, var(--nd-blue) 66% 83%, var(--nd-green) 83%),
    var(--geo-sand);
}

.strat-row.base i {
  background: var(--geo-base);
}

.decision-panel {
  top: 112px;
  right: 14px;
  width: 352px;
  max-height: calc(100vh - 226px);
  overflow: auto;
  padding: 12px;
  box-shadow:
    inset -2px 0 0 var(--panel-edge-right),
    0 22px 80px rgba(0, 0, 0, 0.34);
}

.prospect-cards {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.prospect-card,
.decision-card,
.formula-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.prospect-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 10px;
  text-align: left;
}

.prospect-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--nd-blue);
  opacity: 0.5;
}

.prospect-card:nth-child(2)::before {
  background: var(--nd-green);
}

.prospect-card:nth-child(3)::before {
  background: var(--nd-red);
}

.prospect-card.active {
  border-color: rgba(112, 224, 139, 0.62);
  background:
    linear-gradient(120deg, rgba(31, 152, 210, 0.11), rgba(100, 196, 108, 0.13)),
    rgba(112, 224, 139, 0.07);
}

.prospect-card strong,
.rank-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.prospect-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.mini-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  color: #dbe8e5;
  font-size: 11px;
}

.decision-card,
.formula-card {
  margin-top: 10px;
  padding: 12px;
}

.card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-title strong,
#recommendation {
  color: var(--green);
}

.decision-card p {
  margin: 0 0 11px;
  color: #e4efeb;
  font-size: 12px;
  line-height: 1.52;
}

.risk-bars {
  display: grid;
  gap: 8px;
}

.risk-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.risk-track,
.range-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.risk-track i,
.range-track i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--nd-red), var(--gold), var(--nd-green));
}

.formula-card code {
  display: block;
  padding: 9px;
  border: 1px solid rgba(75, 217, 255, 0.18);
  background: rgba(75, 217, 255, 0.08);
  color: #dff9ff;
  font-size: 11px;
  white-space: normal;
}

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

.slider-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}

.evidence-dock {
  left: 296px;
  right: 380px;
  bottom: 14px;
  display: grid;
  grid-template-columns: 1.05fr 0.72fr 280px 1fr;
  gap: 8px;
  padding: 10px;
}

.evidence-block {
  position: relative;
  overflow: hidden;
  min-height: 86px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

.evidence-block::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--evidence-top);
  opacity: 0.74;
}

html[data-theme="balanced"] .evidence-block:nth-child(1)::before,
html[data-theme="spectrum"] .evidence-block:nth-child(1)::before {
  background: linear-gradient(90deg, var(--nd-red), var(--nd-blue));
}

html[data-theme="balanced"] .evidence-block:nth-child(2)::before,
html[data-theme="spectrum"] .evidence-block:nth-child(2)::before {
  background: linear-gradient(90deg, var(--nd-blue), var(--nd-green));
}

html[data-theme="balanced"] .evidence-block:nth-child(3)::before,
html[data-theme="spectrum"] .evidence-block:nth-child(3)::before {
  background: linear-gradient(90deg, var(--nd-green), var(--nd-blue));
}

html[data-theme="balanced"] .evidence-block:nth-child(4)::before,
html[data-theme="spectrum"] .evidence-block:nth-child(4)::before {
  background: linear-gradient(90deg, var(--nd-red), var(--nd-green));
}

.evidence-block strong {
  display: block;
  margin-top: 8px;
  color: #edf7f4;
  font-size: 13px;
  line-height: 1.35;
}

.log-card {
  padding-bottom: 7px;
}

#logCanvas {
  display: block;
  width: 100%;
  height: 64px;
  margin-top: 5px;
}

.scene-hints {
  left: 50%;
  bottom: 126px;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  transform: translateX(-50%);
  color: #bfd3d0;
  font-size: 11px;
}

.scene-hints span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.tour-card {
  left: 50%;
  bottom: 118px;
  width: min(540px, calc(100vw - 620px));
  min-width: 340px;
  padding: 13px 15px;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.tour-card.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tour-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tour-card strong {
  display: block;
  margin-top: 5px;
  color: #f4fbf8;
  font-size: 17px;
}

.tour-card p {
  margin: 7px 0 0;
  color: #dce9e5;
  font-size: 12px;
  line-height: 1.5;
}

.case-panel {
  left: 50%;
  bottom: 18px;
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr) auto;
  gap: 12px;
  width: min(1120px, calc(100vw - 560px));
  min-width: 680px;
  padding: 13px;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.case-panel::before {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  top: 0;
  height: 3px;
  background: var(--brand-ribbon);
}

.case-mode .case-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.case-progress {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.case-progress button {
  min-height: 24px;
  padding: 0 8px;
  border-color: rgba(232, 247, 243, 0.1);
  color: #a9bbb8;
  font-size: 9px;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.case-progress button.active {
  border-color: rgba(75, 217, 255, 0.52);
  background:
    linear-gradient(90deg, rgba(31, 152, 210, 0.22), rgba(100, 196, 108, 0.1)),
    rgba(255, 255, 255, 0.055);
  color: #f4fbf8;
  box-shadow: inset 3px 0 0 var(--nd-blue);
}

.case-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
  gap: 12px;
  min-width: 0;
}

.case-story {
  min-width: 0;
  padding: 2px 0 0;
}

.case-story span,
.case-proof span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.case-story strong {
  display: block;
  margin-top: 4px;
  color: #f4fbf8;
  font-size: 19px;
  line-height: 1.14;
}

.case-story p {
  margin: 7px 0 0;
  color: #dce9e5;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.5;
}

.case-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.case-proof div {
  min-width: 0;
  padding: 10px;
  border-left: 1px solid rgba(232, 247, 243, 0.08);
}

.case-proof div:first-child {
  border-left: 0;
}

.case-proof strong {
  display: block;
  margin-top: 4px;
  color: #f4fbf8;
  font-size: 14px;
  line-height: 1.15;
}

.case-proof em {
  display: block;
  margin-top: 4px;
  color: #9fb2af;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}

.case-actions {
  display: grid;
  grid-template-columns: repeat(2, 82px);
  gap: 7px;
  align-content: center;
}

.case-actions button {
  min-height: 34px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 950;
}

.case-actions #caseMemoBtn {
  grid-column: 1 / -1;
  border-color: rgba(112, 224, 139, 0.42);
  background: rgba(112, 224, 139, 0.1);
}

.record-story-panel {
  left: 50%;
  bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.78fr) auto;
  gap: 14px;
  width: min(1160px, calc(100vw - 56px));
  padding: 15px;
  transform: translateX(-50%) translateY(22px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.record-story-panel::before {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  top: 0;
  height: 3px;
  background: var(--brand-ribbon);
}

.record-story-mode .record-story-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.record-story-head {
  min-width: 0;
  padding-right: 8px;
}

.record-story-head span,
.record-story-proof span,
.record-story-end span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.record-story-head strong {
  display: block;
  margin-top: 5px;
  color: #f4fbf8;
  font-size: 21px;
  line-height: 1.12;
}

.record-story-head p {
  max-width: 660px;
  margin: 8px 0 0;
  color: #e0ece8;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.5;
}

.record-story-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(255, 255, 255, 0.032);
}

.record-story-proof div {
  min-width: 0;
  padding: 11px;
  border-left: 1px solid rgba(232, 247, 243, 0.08);
  box-shadow: inset 0 2px 0 rgba(75, 217, 255, 0.12);
}

.record-story-proof div:first-child {
  border-left: 0;
}

.record-story-proof strong {
  display: block;
  margin-top: 5px;
  color: #f4fbf8;
  font-size: 15px;
  line-height: 1.14;
}

.record-story-proof em {
  display: block;
  margin-top: 4px;
  color: #9fb2af;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}

.record-story-progress {
  display: grid;
  width: 94px;
  gap: 5px;
  align-content: center;
}

.record-story-progress i {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(232, 247, 243, 0.12);
}

.record-story-progress i.done {
  background: linear-gradient(90deg, var(--nd-blue), var(--nd-green));
}

.record-story-progress i.active {
  background: linear-gradient(90deg, var(--nd-red), var(--nd-blue), var(--nd-green));
  box-shadow: 0 0 18px rgba(75, 217, 255, 0.32);
}

#recordStoryExitBtn {
  position: absolute;
  right: 15px;
  top: -44px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 950;
}

.record-story-end {
  left: 50%;
  top: 50%;
  display: flex;
  width: min(720px, calc(100vw - 48px));
  min-height: 170px;
  align-items: center;
  gap: 18px;
  padding: 22px;
  transform: translate(-50%, -48%) scale(0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.record-story-end::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  background: var(--brand-ribbon);
}

.record-story-end .mini-nd {
  width: 68px;
  height: 68px;
}

.record-story-end strong {
  display: block;
  margin-top: 5px;
  color: #f4fbf8;
  font-size: 30px;
  line-height: 1.05;
}

.record-story-end p {
  margin: 10px 0 0;
  color: #dce9e5;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.5;
}

#recordStoryEndExitBtn {
  flex: 0 0 auto;
  min-height: 40px;
  margin-left: auto;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 950;
}

.record-story-mode.story-end .record-story-end {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.record-story-mode.story-end .record-story-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(22px);
}

.author-stamp {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  width: 268px;
  min-height: 70px;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  overflow: hidden;
}

.author-stamp strong {
  display: block;
  color: #f4fbf8;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.author-stamp span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.about-modal {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 5, 7, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.about-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.about-card {
  position: relative;
  width: min(620px, 92vw);
  padding: 24px;
  border: 1px solid rgba(232, 247, 243, 0.18);
  background:
    linear-gradient(140deg, rgba(31, 152, 210, 0.11), rgba(100, 196, 108, 0.08)),
    rgba(8, 13, 16, 0.96);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.52);
}

.about-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  background: var(--brand-ribbon);
}

.about-card > button {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.about-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.about-card h2 {
  margin: 7px 88px 10px 0;
  font-size: 28px;
  line-height: 1.05;
}

.about-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-wordmark {
  height: 30px;
  padding-right: 8px;
}

.about-wordmark .nd-n {
  font-size: 22px;
}

.about-wordmark .nd-d-shape {
  width: 32px;
  height: 23px;
}

.about-card p {
  margin: 0;
  color: #e6f1ee;
  font-size: 14px;
  line-height: 1.56;
}

.about-grid {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 10px 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.about-grid strong {
  color: #f4fbf8;
  font-size: 13px;
}

.about-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.study-modal {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 5, 7, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.study-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.study-card {
  position: relative;
  width: min(1120px, 94vw);
  max-height: min(820px, 92vh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid rgba(232, 247, 243, 0.18);
  background:
    linear-gradient(140deg, rgba(31, 152, 210, 0.1), rgba(100, 196, 108, 0.07)),
    rgba(8, 13, 16, 0.98);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.58);
}

.study-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  background: var(--brand-ribbon);
}

.study-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 14px;
  border-bottom: 1px solid rgba(232, 247, 243, 0.1);
}

.study-head span,
.study-status span,
.study-section span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.study-head h2 {
  margin: 6px 0 0;
  color: #f4fbf8;
  font-size: 26px;
  line-height: 1.08;
}

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

.study-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
}

.study-status {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid rgba(232, 247, 243, 0.1);
}

.study-status div {
  min-width: 0;
  padding: 12px 14px;
  border-left: 1px solid rgba(232, 247, 243, 0.08);
  box-shadow: inset 0 2px 0 rgba(75, 217, 255, 0.16);
}

.study-status div:first-child {
  border-left: 0;
}

.study-status strong {
  display: block;
  margin-top: 4px;
  color: #f4fbf8;
  font-size: 13px;
  line-height: 1.2;
}

.study-status em {
  display: block;
  margin-top: 3px;
  color: #9fb2af;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.3;
}

.study-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.study-section {
  padding: 14px;
  border: 1px solid rgba(232, 247, 243, 0.1);
  background: rgba(255, 255, 255, 0.032);
}

.study-section.wide {
  grid-column: 1 / -1;
}

.study-section h3 {
  margin: 5px 0 8px;
  color: #f4fbf8;
  font-size: 15px;
}

.study-section p {
  margin: 0;
  color: #dce9e5;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.55;
}

.study-section ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #dce9e5;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.55;
}

.study-section li + li {
  margin-top: 4px;
}

.loading {
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  background:
    linear-gradient(rgba(5, 7, 10, 0.9), rgba(5, 7, 10, 0.9)),
    var(--brand-ambient);
  text-align: center;
}

.loading::before {
  content: "";
  width: 34px;
  height: 34px;
  margin: 0 auto 5px;
  border: 2px solid rgba(232, 247, 243, 0.12);
  border-top-color: var(--nd-blue);
  border-right-color: var(--nd-green);
  border-radius: 50%;
  animation: nd-loading-spin 780ms linear infinite;
}

.loading strong {
  font-size: 14px;
}

.loading.hidden {
  display: none;
}

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

.recording .workflow-panel,
.recording .decision-panel,
.recording .scene-hints,
.recording .author-stamp {
  opacity: 0;
  pointer-events: none;
}

.recording .topbar {
  grid-template-columns: minmax(290px, 440px) minmax(0, 1fr) 0;
}

.recording .top-actions {
  display: none;
}

.recording .viewport-hud {
  left: 14px;
  right: 14px;
  top: 102px;
}

.recording .property-legend {
  left: 14px;
  top: 162px;
}

.recording .depth-ruler {
  right: 24px;
  top: 178px;
}

.recording .evidence-dock {
  left: 14px;
  right: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.recording .tour-card.active {
  bottom: 118px;
  width: min(680px, calc(100vw - 48px));
}

.record-story-mode .topbar {
  grid-template-columns: minmax(290px, 440px) minmax(0, 1fr) 0;
}

.record-story-mode .top-actions {
  display: none;
}

.record-story-mode .insight-switcher,
.record-story-mode .project-panel,
.record-story-mode .workflow-panel,
.record-story-mode .decision-panel,
.record-story-mode .layer-manager,
.record-story-mode .section-panel,
.record-story-mode .viewport-hud,
.record-story-mode .property-legend,
.record-story-mode .depth-ruler,
.record-story-mode .evidence-dock,
.record-story-mode .scene-hints,
.record-story-mode .tour-card,
.record-story-mode .case-panel,
.record-story-mode .author-stamp {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.record-story-mode .brand,
.record-story-mode .kpis {
  background: rgba(5, 10, 13, 0.7);
}

.case-mode .insight-switcher,
.case-mode .scene-hints,
.case-mode .author-stamp {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.case-mode .tour-card {
  opacity: 0;
  visibility: hidden;
}

.case-mode.drawer-project .project-panel,
.case-mode.drawer-workflow .workflow-panel,
.case-mode.drawer-evaluation .decision-panel {
  max-height: calc(100vh - 348px);
  overflow: auto;
}

.case-mode.drawer-sections .section-panel,
.case-mode.drawer-layers .layer-manager {
  bottom: 208px;
}

.canvas-first .workflow-panel,
.canvas-first .project-panel,
.canvas-first .decision-panel,
.canvas-first .evidence-dock,
.canvas-first .layer-manager,
.canvas-first .section-panel,
.canvas-first .viewport-hud,
.canvas-first .property-legend,
.canvas-first .depth-ruler,
.canvas-first .author-stamp,
.canvas-first .case-panel,
.canvas-first .scene-hints {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.canvas-first .workflow-panel,
.canvas-first .project-panel,
.canvas-first .author-stamp {
  transform: translateX(-18px);
}

.canvas-first .decision-panel {
  transform: translateX(18px);
}

.canvas-first .evidence-dock {
  bottom: 66px;
  transform: translateY(18px);
}

.canvas-first .layer-manager {
  transform: translateX(-50%) translateY(18px);
}

.canvas-first .section-panel {
  transform: translateX(-50%) translateY(18px);
}

.canvas-first .viewport-hud,
.canvas-first .property-legend {
  transform: translateY(-10px);
}

.canvas-first .depth-ruler {
  transform: translateX(10px);
}

.app-shell.canvas-first.industry-mode:not(.record-story-mode):not(.recording) .property-legend {
  top: 116px;
  right: 24px;
  left: auto;
  width: min(324px, calc(100vw - 32px));
  visibility: visible;
  opacity: 0.92;
  pointer-events: none;
  transform: translate(0, 0);
}

.app-shell.canvas-first.industry-mode:not(.record-story-mode):not(.recording) .depth-ruler {
  top: 238px;
  right: 24px;
}

.canvas-first.drawer-project .project-panel,
.canvas-first.drawer-workflow .workflow-panel,
.canvas-first.drawer-workflow .author-stamp,
.canvas-first.drawer-evaluation .decision-panel,
.canvas-first.drawer-layers .layer-manager,
.canvas-first.drawer-sections .section-panel,
.canvas-first.drawer-evidence .evidence-dock,
.canvas-first.drawer-technical .viewport-hud,
.canvas-first.drawer-technical .property-legend,
.canvas-first.drawer-technical .depth-ruler {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, 0);
}

.canvas-first.drawer-technical .depth-ruler {
  pointer-events: none;
}

.canvas-first.case-mode .case-panel {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.canvas-first.drawer-layers .layer-manager {
  transform: translateX(-50%) translateY(0);
}

.canvas-first.drawer-sections .section-panel {
  transform: translateX(-50%) translateY(0);
}

.canvas-first.drawer-sections .property-legend {
  visibility: hidden !important;
  opacity: 0 !important;
}

.recording .insight-switcher,
.recording .project-panel,
.recording .layer-manager,
.recording .section-panel,
.recording .viewport-hud,
.recording .property-legend,
.recording .depth-ruler {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  #sceneCanvas {
    position: fixed;
    touch-action: none;
  }

  .topbar,
  .public-entry,
  .mobile-showcase,
  .insight-switcher,
  .project-panel,
  .layer-manager,
  .section-panel,
  .viewport-hud,
  .property-legend,
  .depth-ruler,
  .workflow-panel,
  .decision-panel,
  .evidence-dock,
  .tour-card,
  .case-panel,
  .record-story-panel,
  .record-story-end,
  .author-stamp {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 12px;
  }

  .topbar,
  .viewport-hud,
  .evidence-dock {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 8px;
    margin: 10px;
  }

  .public-entry {
    display: none;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  .kpi {
    min-height: 58px;
    padding: 9px 11px;
  }

  .kpi:nth-child(2) {
    border-right: 0;
  }

  .top-actions {
    display: none;
  }

  .mobile-showcase {
    display: grid;
    gap: 12px;
    margin: 10px;
    padding: 16px;
    overflow: hidden;
    pointer-events: auto;
  }

  .mobile-showcase::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 0;
    height: 3px;
    background: var(--brand-ribbon);
  }

  .mobile-showcase-copy > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mobile-showcase-copy > strong {
    display: block;
    margin-top: 5px;
    color: #f4fbf8;
    font-size: clamp(19px, 4.5vw, 26px);
    line-height: 1.12;
  }

  .mobile-showcase-copy p {
    margin: 7px 0 0;
    color: #dce9e5;
    font-size: 12px;
    font-weight: 760;
    line-height: 1.45;
  }

  .mobile-showcase-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-showcase-actions button {
    min-height: 46px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
  }

  #mobileStoryBtn {
    border-color: rgba(112, 224, 139, 0.46);
    background: rgba(112, 224, 139, 0.1);
  }

  .mobile-device-note {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border-left: 3px solid var(--nd-blue);
    background: rgba(31, 152, 210, 0.08);
  }

  .mobile-device-note strong {
    color: #f4fbf8;
    font-size: 12px;
  }

  .mobile-device-note span {
    color: #dce9e5;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.42;
  }

  .mobile-device-note small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
  }

  .viewport-hud,
  .property-legend,
  .depth-ruler,
  .project-panel,
  .layer-manager,
  .section-panel,
  .insight-switcher,
  .workflow-panel,
  .decision-panel,
  .evidence-dock,
  .author-stamp {
    display: none;
  }

  .scene-hints {
    display: none;
  }

  .tour-card {
    width: auto;
    min-width: 0;
    transform: none;
    opacity: 1;
  }

  .case-panel,
  .record-story-panel,
  .record-story-end {
    display: none;
  }

  .record-story-mode .mobile-showcase {
    display: none;
  }

  .record-story-mode .topbar {
    grid-template-columns: 1fr;
  }

  .record-story-mode .kpis {
    display: none;
  }

  .record-story-mode .record-story-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: auto;
    max-height: calc(100dvh - 210px);
    padding: 16px;
    overflow: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .record-story-head {
    padding-right: 0;
  }

  .record-story-head strong {
    font-size: clamp(18px, 4.5vw, 23px);
  }

  .record-story-head p {
    font-size: 12px;
  }

  .record-story-progress {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
  }

  #recordStoryExitBtn {
    position: static;
    min-height: 44px;
  }

  .record-story-mode.story-end .record-story-panel {
    display: none;
  }

  .record-story-mode.story-end .record-story-end {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    min-height: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #recordStoryEndExitBtn {
    width: 100%;
    min-height: 44px;
    margin-left: 0;
  }

  .record-story-end strong {
    font-size: clamp(23px, 6vw, 30px);
  }

  .about-card,
  .study-card {
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }

  .study-modal {
    padding: 12px;
  }

  .study-head {
    flex-direction: column;
    padding: 18px 16px 12px;
  }

  .study-actions {
    width: 100%;
  }

  .study-actions button {
    min-height: 44px;
    flex: 1;
  }

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

  .study-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand {
    min-height: 58px;
    padding: 9px 10px;
  }

  .brand small {
    display: none;
  }

  .nd-mark {
    width: 42px;
    height: 42px;
  }

  .mobile-showcase-actions {
    grid-template-columns: 1fr;
  }

  .record-story-proof {
    grid-template-columns: 1fr;
  }

  .record-story-proof div {
    border-left: 0;
    border-top: 1px solid rgba(232, 247, 243, 0.08);
  }

  .record-story-proof div:first-child {
    border-top: 0;
  }

  .record-story-mode.story-end .record-story-end {
    align-items: flex-start;
  }

  .record-story-end .mini-nd {
    width: 48px;
    height: 48px;
  }

  .about-modal {
    padding: 12px;
  }

  .about-card {
    width: 100%;
    padding: 20px 16px;
  }

  .about-card h2 {
    margin-right: 72px;
    font-size: 22px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .about-grid span + strong {
    margin-top: 8px;
  }
}

@media (min-width: 1181px) {
  .app-shell.canvas-first.drawer-project .project-panel,
  .app-shell.canvas-first.drawer-workflow .workflow-panel,
  .app-shell.canvas-first.drawer-workflow .author-stamp,
  .app-shell.canvas-first.drawer-evaluation .decision-panel,
  .app-shell.canvas-first.drawer-evidence .evidence-dock,
  .app-shell.canvas-first.drawer-technical .viewport-hud,
  .app-shell.canvas-first.drawer-technical .property-legend,
  .app-shell.canvas-first.drawer-technical .depth-ruler {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translate(0, 0) !important;
  }

  .app-shell.canvas-first.drawer-layers .layer-manager,
  .app-shell.canvas-first.drawer-sections .section-panel {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0) !important;
  }
}
