.capture-intelligence,
.vault-panel,
.build-phase-editor,
.build-summary-panel,
.build-record-toolbar,
.build-comparison {
  border: 1px solid rgba(212, 175, 55, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 34%),
    rgba(9, 12, 15, 0.94);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.28);
}

.capture-intelligence {
  margin: 24px 0;
  padding: 22px;
  border-radius: 22px;
}

.capture-intelligence-head,
.vault-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.capture-intelligence-head h3,
.vault-panel-head h2 {
  margin: 6px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 3vw, 3rem);
  font-weight: 600;
  line-height: 0.98;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 16px;
  overflow: hidden;
}

.capability-grid > div {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid rgba(212, 175, 55, 0.13);
  background: rgba(255, 255, 255, 0.018);
}

.capability-grid > div:last-child {
  border-right: 0;
}

.capability-grid span,
.scan-artifact span,
.vault-stat-grid span,
.vault-stat-grid small,
.evidence-copy span {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.capability-grid strong {
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.scan-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  margin-top: 20px;
}

.scan-import-copy,
.scan-artifact-list {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.018);
}

.scan-import-copy > strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
}

.scan-import-copy > p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

.scan-artifact-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: 330px;
  overflow: auto;
}

.scan-artifact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.2);
}

.scan-artifact > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.scan-artifact strong,
.scan-artifact span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-artifact-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.scan-model-preview {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(212, 175, 55, 0.14), transparent 35%),
    #050708;
}

.scan-model-preview model-viewer {
  width: 100%;
  height: min(62vh, 560px);
}

.scan-model-preview > button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

.vault-seal {
  display: grid;
  justify-items: start;
}

.vault-seal img {
  width: 84px;
  height: 84px;
  margin-bottom: 20px;
  object-fit: contain;
}

.vault-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.23);
  border-radius: 22px;
  background: rgba(8, 11, 13, 0.88);
}

.vault-stat-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: clamp(20px, 3vw, 34px);
  border-right: 1px solid rgba(212, 175, 55, 0.16);
}

.vault-stat-grid article:last-child {
  border-right: 0;
}

.vault-stat-grid strong {
  overflow-wrap: anywhere;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
  color: #e2bd64;
}

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

.vault-panel {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 24px;
}

.vault-panel > p,
.backup-panel > p,
.danger-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.vault-state-pill {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 999px;
  color: #e8c875;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.backup-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.backup-panel h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 600;
}

.privacy-choice-list {
  display: grid;
  gap: 10px;
}

.privacy-choice-list label {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
}

.privacy-choice-list input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--gold);
}

.privacy-choice-list span {
  display: grid;
  gap: 4px;
}

.privacy-choice-list small {
  color: var(--muted);
  line-height: 1.55;
}

.vault-panel code {
  color: #e9c979;
  overflow-wrap: anywhere;
}

.vault-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.vault-project-card {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(212, 175, 55, 0.19);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.055), transparent 45%),
    rgba(11, 14, 17, 0.92);
}

.vault-project-card h3 {
  margin: 8px 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.vault-project-card p {
  min-height: 64px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.danger-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: clamp(28px, 5vw, 70px);
  border-color: rgba(191, 82, 63, 0.35);
  background:
    linear-gradient(120deg, rgba(150, 47, 36, 0.1), transparent 42%),
    rgba(12, 10, 11, 0.96);
}

.danger-action {
  display: grid;
  align-content: center;
  gap: 10px;
}

.danger-action .button {
  border-color: rgba(224, 104, 83, 0.45);
  color: #f0b1a5;
}

.privacy-standard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.17);
  border-radius: 18px;
  background: rgba(212, 175, 55, 0.14);
}

.privacy-standard-grid article {
  min-width: 0;
  padding: 24px;
  background: #0a0d10;
}

.privacy-standard-grid article > span {
  color: #d9b85d;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.privacy-standard-grid h3 {
  margin: 12px 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.65rem;
  font-weight: 600;
}

.privacy-standard-grid p,
.legal-notice-stack p {
  color: var(--muted);
  line-height: 1.7;
}

.legal-notice-stack {
  display: grid;
  gap: 20px;
}

.legal-notice-stack h2 {
  margin: 8px 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 600;
}

.legal-notice-stack blockquote {
  margin: 24px 0;
  padding: 20px 22px;
  border-left: 3px solid var(--gold);
  color: #ead69f;
  line-height: 1.75;
  background: rgba(212, 175, 55, 0.055);
}

.build-record-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 0.9fr) minmax(230px, 1.2fr) auto;
  align-items: end;
  gap: 14px;
  padding: 20px;
  border-radius: 20px;
}

.build-phase-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 28px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 20px;
  background: rgba(5, 7, 9, 0.86);
}

.build-phase {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 0;
  padding: 19px 17px;
  border: 0;
  border-right: 1px solid rgba(212, 175, 55, 0.13);
  color: var(--muted);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.build-phase:last-child {
  border-right: 0;
}

.build-phase span {
  color: #b99543;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
}

.build-phase strong {
  color: var(--limestone);
  font-size: 0.82rem;
}

.build-phase small {
  overflow: hidden;
  max-width: 100%;
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-phase.is-active {
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.19), rgba(212, 175, 55, 0.045));
  box-shadow: inset 0 -3px #d4af37;
}

.build-phase.is-complete {
  background-color: rgba(87, 138, 91, 0.12);
}

.build-phase.is-complete span::after {
  content: " / ACCEPTED";
  color: #9cd19f;
}

.build-phase.is-review {
  background-color: rgba(212, 175, 55, 0.08);
}

.build-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.31fr);
  gap: 18px;
  align-items: start;
}

.build-phase-editor,
.build-summary-panel {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 24px;
}

.build-phase-editor > p {
  max-width: 880px;
  color: var(--muted);
  line-height: 1.75;
}

.build-summary-panel {
  position: sticky;
  top: 116px;
}

.build-summary-panel > strong {
  display: block;
  margin: 10px 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 4rem;
  font-weight: 600;
  color: #e2bd64;
}

.evidence-capture-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 17px;
  background: rgba(212, 175, 55, 0.035);
}

.evidence-capture-bar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.evidence-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.23);
}

.evidence-media {
  min-height: 126px;
  background: #050607;
}

.evidence-media img,
.evidence-media video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 126px;
  object-fit: cover;
}

.evidence-file {
  display: grid;
  align-content: center;
  justify-items: center;
  height: 100%;
  padding: 10px;
  color: #d7b75f;
  text-align: center;
}

.evidence-file span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.58rem;
}

.evidence-copy {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 14px;
}

.evidence-copy strong,
.evidence-copy span,
.evidence-copy code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-copy code {
  color: #cbb77e;
  font-size: 0.62rem;
}

.evidence-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.evidence-actions button {
  padding: 10px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
}

.evidence-actions button:last-child {
  border-right: 0;
}

.compare-control-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.4fr) minmax(180px, 0.4fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
}

.build-comparison {
  position: relative;
  min-height: min(62vw, 680px);
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle, rgba(212, 175, 55, 0.08), transparent 42%),
    #060809;
}

.build-comparison > img,
.comparison-after-layer,
.comparison-after-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparison-after-layer {
  z-index: 2;
  width: 50%;
  overflow: hidden;
  border-right: 2px solid #e2bd64;
}

.comparison-after-layer img {
  width: 100%;
  max-width: none;
}

.comparison-empty {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.comparison-label {
  position: absolute;
  top: 18px;
  z-index: 5;
  padding: 9px 12px;
  border: 1px solid rgba(212, 175, 55, 0.36);
  border-radius: 999px;
  color: var(--limestone);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(7, 9, 11, 0.82);
}

.comparison-label-before {
  left: 18px;
}

.comparison-label-after {
  right: 18px;
}

.build-comparison[data-empty="true"] .comparison-label,
.build-comparison[data-empty="true"] #comparison-range {
  display: none;
}

#comparison-range {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 6;
  width: calc(100% - 48px);
  accent-color: var(--gold);
}

@media (max-width: 1080px) {
  .capability-grid,
  .vault-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-grid > div:nth-child(2),
  .vault-stat-grid article:nth-child(2) {
    border-right: 0;
  }

  .capability-grid > div:nth-child(-n + 2),
  .vault-stat-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(212, 175, 55, 0.13);
  }

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

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

  .build-record-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .build-record-toolbar > .button {
    min-height: 48px;
  }

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

  .build-summary-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .capture-intelligence,
  .vault-panel,
  .build-phase-editor,
  .build-summary-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .capture-intelligence-head,
  .vault-panel-head,
  .evidence-capture-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .scan-import-grid,
  .vault-layout,
  .backup-grid,
  .danger-panel,
  .build-record-toolbar,
  .compare-control-row {
    grid-template-columns: 1fr;
  }

  .scan-artifact {
    align-items: stretch;
    flex-direction: column;
  }

  .scan-artifact-actions {
    flex-wrap: wrap;
  }

  .vault-project-grid,
  .evidence-grid,
  .privacy-standard-grid {
    grid-template-columns: 1fr;
  }

  .build-phase-rail {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .build-phase {
    grid-template-columns: 34px 92px minmax(0, 1fr);
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.13);
  }

  .build-phase:last-child {
    border-bottom: 0;
  }

  .build-phase small {
    text-align: right;
  }

  .evidence-capture-bar .panel-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .build-comparison {
    min-height: 72vw;
  }
}

@media (max-width: 520px) {
  .capability-grid,
  .vault-stat-grid {
    grid-template-columns: 1fr;
  }

  .capability-grid > div,
  .vault-stat-grid article {
    border-right: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.13);
  }

  .capability-grid > div:last-child,
  .vault-stat-grid article:last-child {
    border-bottom: 0;
  }

  .evidence-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .comparison-label {
    top: 10px;
    padding: 7px 9px;
    font-size: 0.55rem;
  }

  .comparison-label-before {
    left: 10px;
  }

  .comparison-label-after {
    right: 10px;
  }
}
