.brand-mark {
  border-color: var(--amber);
  background: rgba(255, 209, 102, 0.14);
  color: var(--amber);
}

.primary-action {
  background: var(--amber);
  border-color: var(--amber);
}

.boundary-section {
  border-color: rgba(255, 209, 102, 0.32);
}

#original-da-s12-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
}

main {
  width: min(1760px, calc(100% - 36px));
}

.site-top {
  gap: 18px;
  padding-left: clamp(16px, 3vw, 64px);
  padding-right: clamp(16px, 3vw, 64px);
}

.brand {
  flex: 1 1 360px;
  min-width: 0;
}

.brand span:last-child,
.site-top nav,
.module-card,
.core-card,
.risk-card,
.concept-chip,
.source-toolbar,
.page-links,
.module-meta {
  min-width: 0;
}

.site-top nav {
  flex: 2 1 760px;
  gap: 8px 14px;
}

.brand strong,
.brand small,
.site-top nav a,
.module-card h3,
.module-card p,
.module-card a,
.stage,
.module-stage,
.module-meta code,
.page-links a,
.source-toolbar code,
.code-titlebar strong,
.core-card strong,
.line-ref,
.risk-card,
.concept-chip,
.visual-caption {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.module-card {
  min-height: 260px;
}

.hero,
.module-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
}

.analysis-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.source-toolbar code {
  white-space: normal;
}

.legacy-warning {
  margin: 12px 0;
  border: 1px solid rgba(255, 209, 102, 0.38);
  background: rgba(255, 209, 102, 0.09);
  color: #ffe8a3;
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.55;
}

.source-open-link {
  border: 1px solid rgba(255, 209, 102, 0.46);
  border-radius: 999px;
  color: var(--amber);
  padding: 6px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.source-open-link:hover {
  background: rgba(255, 209, 102, 0.12);
}

.public-code-placeholder {
  margin-top: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 18px;
}

.public-code-placeholder p {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero,
  .module-layout,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .site-top nav {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  main {
    width: min(100% - 24px, 1760px);
  }

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